Talk:Greedy algorithm

message: The page says that Kruskal's Algorithm is also a Greedy Algorithm. Tho actually this does not work locally, instead Kruskal always takes the smallest weight of all to add an edge to the set. It knows the whole set of edges and in opposite to Prim it takes the smallest weight - shouldnt we remove Kruskal from this page?
--- User:WhiteCrow 7/24/2005
:I would find Kruskal's algorithm a more natural example of what I understand to be a greedy algorithm than Prim's. In fact, the phrasing seems somewhat unlucky: I'd describe a greedy algorithm as "an algorithm that repeatedly extends a partial solution in the way that increases the objective function most" (in the case of a maximization problem). In Prim's algorithm we maintain the invariant that the partial solution is a tree; in Kruskal's algorithm we're already happy with a forest. —Preceding unsigned comment added by 131.155.68.93 (talk • contribs) 4 October 2005
::My PhD computer scientist wife read this over and says the article is basically OK.  We looked at the algorithms book that I reference (a standard book on the subject) and it agrees with the article's content. About Kruskal's: the book also specifically characterizes Kruskal's as a greedy algorithm (p. 504).  --Brianyoumans 09:42, 6 August 2006 (UTC)
replies: text: Kruskal's algorithm is definitely greedy. When it adds an edge to the forest, it will never have to remove it from there. --ZeroOne (talk | @) 12:02, 30 November 2006 (UTC)
thread_title: Untitled

message: A little example (even pseudocode) would be convincing. Can someone add a typical greedy problem & solution to the article? —Preceding unsigned comment added by 86.34.42.206 (talk • contribs) 19 March 2006
:See the image on the page for a simple example. Also see the linked articles Kruskal's algorithm and Dijkstra's algorithm. The first one has a complete example, the second one some pseudocode. --ZeroOne (talk | @) 17:42, 10 November 2006 (UTC)
thread_title: Example?

message: Am I the only one bothered by the fact that the example image attempts to describe a real world situation by specifying the currency, but provides inaccurate coin values (Except for Australia specifically). If it is a real world example, then specificity, accuracy, and relevance are pretty important. Not to offend the folks from Down Under, but if this were specified then providing the example to a primarily American website made using the American English dialect in regards to Australian Currency when that same currency verbiage is in use in both places... is rather irrelevant. 
NOTE: Yes I looked up the history of the 20 remaining 20 cent silver coins minted in the 19th century which are not currently in circulation.
This should be specified and the exception of American vs. Australian Currency should be clarified. If the currency itself is irrelevant, leaving the value of the objects as the only important element, then the real world example of money may be a poor example and could be replaced. I'm certain that weight, length, or area make more generic real-world examples. Cabbruzz (talk) 17:32, 29 October 2010 (UTC)
thread_title:  Relevancy of the Example Picture 

message: Can anyone shed some light on the purpose of the ordered (numbered) list at the beginning of the article?  --Thinboy00 talk/contribs @983, i.e. 22:35, 10 November 2007 (UTC)
replies: text: It looks like an anatomy list.  --Thinboy00 talk/contribs @985, i.e. 22:38, 10 November 2007 (UTC)

text: Actually, an anonymous user messed it up here and no one spotted it... I've fixed it now. —ZeroOne (talk / @) 12:25, 11 November 2007 (UTC)
thread_title:  Ordered list 

message: Can someone mention what the name is for the "opposite" or "antonym" of the greedy algorithm, if there is one?
:Well the most obvious "opposite" if there could be said to be such a thing would be an algorithm that selects a globally optimal solution, rather than a locally optimal one. In practice, though, non-greedy algorithms include a lot more than just globally optimal algorithms. Dcoetzee 18:02, 30 May 2008 (UTC)
replies: text: "ungreedy" is sometimes used for algorigtms that take the most conservative choice at each step rather than the one that increases the solution value the most, such as in Regular expressions BCoates (talk) 05:13, 7 September 2008 (UTC)
thread_title:  Opposite 

message: Does greedy regex follow these rules, matter for this sort of topic? If it matters, I'm thinking about pcre regex.  —Preceding unsigned comment added by 81.155.84.169 (talk) 21:06, 18 July 2008 (UTC)
replies: text: Greedy regexps are only sort of related to greedy algorithms - the match is always expanded as much as possible before applying the next term of the regexp, but greedy and nongreedy regexps describe different languages and solve different problems; it's not a local heuristic for estimating a solution to a problem. Dcoetzee 03:57, 9 November 2008 (UTC)
thread_title:  regex 

message: I saw this phrase in an article.  Could someone document what it means?  —Preceding unsigned comment added by Skysong263 (talk • contribs) 19:53, 23 April 2010 (UTC)
thread_title:  "forwardly greedy selection algorithm" 

message: I just reverted the addition of a citation to "Computational mind: a complex dynamics perspective" (Vladimir G. Ivancevic, Tijana T. Ivancevic, Springer, 2007).  At first glance, the page in question of the book  makes it look like our article is a copyvio — it has essentially the same text as one of our paragraphs. On second glance, though, judging from the date of publication of the book, the dates at which the text in question was added to our article, and the history of our article showing the text growing organically rather than being added all at once, I think the more likely hypothesis is that Ivancevic and Ivancevic copied from us. Therefore, per WP:CIRCULAR, we can't use it as a source. —David Eppstein (talk) 19:41, 13 November 2011 (UTC)
thread_title:  Computational mind: a complex dynamics perspective 

message: New to editing Wikipedia, so please go gently...
I noticed that in the "Cases of failure" section, an example of coins is given where a greedy algorithm will fail to find the example quantity of 41 cents.  However, immediately following that, the "Types" section says "greedy algorithms are best suited for simple problems (e.g. giving change)."  This seems to be a contradiction - with one section saying the algorithm is suited to finding optimal change and the preceding section illustrating a failure case with giving change.
A possible edit would be "(e.g. giving change in most currencies)" or something similar.    I'm not sure where the example is based as I've never come across a 4-cent coin (I'm writing from the UK).  Another idea would be to change the example of failure to a different problem.  Any thoughts?  — Preceding unsigned comment added by Snapey1979 (talk • contribs) 10:07, 17 April 2012 (UTC)
thread_title:  Apparent contradiction? 

message: There are many many more applications of the greedy algorithm than the applications section lets on. I added a template asking to expand and improve that section. For example, the introduction to this paper contains a number of applications of greedy just to submodular function maximization.
No such thing as logical or not.  — Preceding unsigned comment added by Lyhendq (talk • contribs) 07:38, 23 September 2018 (UTC)
thread_title: Clean up applications

message: An IP user with no other history (but evident knowledge of syntax) stripped out many links from the top section.  Now maybe there were too many, but now I think there are too few.  Opinions? —Tamfang (talk) 05:47, 3 October 2019 (UTC)
thread_title:  underlinking