<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikimd.com/index.php?action=history&amp;feed=atom&amp;title=Greedy_algorithm</id>
	<title>Greedy algorithm - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wikimd.com/index.php?action=history&amp;feed=atom&amp;title=Greedy_algorithm"/>
	<link rel="alternate" type="text/html" href="https://wikimd.com/index.php?title=Greedy_algorithm&amp;action=history"/>
	<updated>2026-04-24T09:39:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wikimd.com/index.php?title=Greedy_algorithm&amp;diff=5888750&amp;oldid=prev</id>
		<title>Prab: CSV import</title>
		<link rel="alternate" type="text/html" href="https://wikimd.com/index.php?title=Greedy_algorithm&amp;diff=5888750&amp;oldid=prev"/>
		<updated>2024-06-05T21:45:17Z</updated>

		<summary type="html">&lt;p&gt;CSV import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[File:_Greedy_algorithm_36_cents.svg|thumb|_Greedy_algorithm_36_cents]] &amp;#039;&amp;#039;&amp;#039;Greedy algorithm&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;greedy algorithm&amp;#039;&amp;#039;&amp;#039; is a [[algorithm]]ic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most immediate benefit. Greedy algorithms are used for solving [[optimization problem]]s and are known for their simplicity and efficiency. However, they do not always produce the optimal solution for all problems.&lt;br /&gt;
&lt;br /&gt;
== Characteristics ==&lt;br /&gt;
Greedy algorithms follow a problem-solving heuristic of making the locally optimal choice at each stage with the hope of finding a global optimum. The main characteristics of greedy algorithms include:&lt;br /&gt;
* **Greedy choice property**: A global optimum can be arrived at by selecting a local optimum.&lt;br /&gt;
* **Optimal substructure**: An optimal solution to the problem contains an optimal solution to subproblems.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Greedy algorithms are widely used in various fields, including:&lt;br /&gt;
* [[Graph theory]]: Algorithms like [[Prim&amp;#039;s algorithm]] and [[Kruskal&amp;#039;s algorithm]] for finding the [[minimum spanning tree]].&lt;br /&gt;
* [[Job scheduling]]: The [[Huffman coding]] algorithm for data compression.&lt;br /&gt;
* [[Mathematics]]: The [[Dijkstra&amp;#039;s algorithm]] for finding the shortest path in a graph.&lt;br /&gt;
* [[Computer science]]: The [[Fractional knapsack problem]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Some well-known examples of greedy algorithms include:&lt;br /&gt;
* **Prim&amp;#039;s algorithm**: Used to find the minimum spanning tree of a graph.&lt;br /&gt;
* **Kruskal&amp;#039;s algorithm**: Another algorithm for finding the minimum spanning tree.&lt;br /&gt;
* **Dijkstra&amp;#039;s algorithm**: Used for finding the shortest path between nodes in a graph.&lt;br /&gt;
* **Huffman coding**: Used for lossless data compression.&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
=== Advantages ===&lt;br /&gt;
* **Simplicity**: Greedy algorithms are often easier to understand and implement.&lt;br /&gt;
* **Efficiency**: They can be more efficient in terms of time and space complexity for certain problems.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages ===&lt;br /&gt;
* **Non-optimal solutions**: Greedy algorithms do not always produce the optimal solution.&lt;br /&gt;
* **Problem-specific**: They are not universally applicable and work only for problems with the greedy choice property and optimal substructure.&lt;br /&gt;
&lt;br /&gt;
== Related Pages ==&lt;br /&gt;
* [[Algorithm]]&lt;br /&gt;
* [[Optimization problem]]&lt;br /&gt;
* [[Graph theory]]&lt;br /&gt;
* [[Prim&amp;#039;s algorithm]]&lt;br /&gt;
* [[Kruskal&amp;#039;s algorithm]]&lt;br /&gt;
* [[Dijkstra&amp;#039;s algorithm]]&lt;br /&gt;
* [[Huffman coding]]&lt;br /&gt;
* [[Fractional knapsack problem]]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Dynamic programming]]&lt;br /&gt;
* [[Divide and conquer algorithm]]&lt;br /&gt;
* [[Backtracking]]&lt;br /&gt;
&lt;br /&gt;
{{Algorithm-stub}}&lt;br /&gt;
[[Category:Algorithms]]&lt;br /&gt;
[[Category:Optimization algorithms and methods]]&lt;br /&gt;
[[Category:Graph algorithms]]&lt;/div&gt;</summary>
		<author><name>Prab</name></author>
	</entry>
</feed>