Talk:Algorithm: Difference between revisions

Content deleted Content added
Isis~enwiki (talk | contribs)
no, it doesn't say that, but it may not say what we mean, either
Refilwe: new section
Tags: Reverted Mobile edit Mobile web edit New topic
(881 intermediate revisions by more than 100 users not shown)
Line 1:
{{Article history
I removed:
|action1=RBP
"Some people restrict the definition of ''algorithm'' to procedures that eventually finish, while others also include procedures that run forever without stopping."
|action1date=12:29, 19 January 2004
Because, A) its opinion. B) its moronic.
|action1link=Wikipedia:Archive/Refreshing brilliant prose - Science
|action1result=kept
|action1oldid=2206762
|action2=FAR
|action2date=02:21, 16 May 2006
|action2link=Wikipedia:Featured article removal candidates/Algorithm
|action2result=demoted
|action2oldid=53436000
|action3=GAN
|action3date=13:16, 13 July 2006
|action3result=listed
|action3oldid=63594141
|action4=GAR
|action4link=Talk:Algorithm/GA2
|action4date=17:47, 17 February 2010 (UTC)
|action4result=delisted
|action4oldid=344644436
|maindate=July 20, 2004
|topic=Math
|currentstatus=FFA
}}
{{WikiProject banner shell|vital=yes|class=c|1=
{{WikiProject Computing|importance=top}}
{{WikiProject Mathematics|importance=top | portal=true}}
{{WikiProject Computer science|importance=Top}}
}}
{{User:MiszaBot/config
| algo=old(365d)
| archive=Talk:Algorithm/Archive %(counter)d
| counter=5
| maxarchivesize=75K
| archiveheader={{Automatic archive navigator}}
| minthreadsleft=5
| minthreadstoarchive=1
}}
{{Archives|bot=Lowercase sigmabot III|age=365}}
== Where to cover "algorithms" as used in discussions about social media, big tech, etc? ==
 
I think this article should have some reference to the fact that "algorithms" are now being discussed in the context of social media platforms, "Big Tech", and related Internet technologies. As governments in Europe, the US, and other regions are discussing whether to regulate social platforms and companies such as Twitter, Facebook, and Google, the discussion often comes back to "algorithms". For instance, this is coming up quite often in discussions around [[Section 230]] in the US. In Europe there is an EU activity of "Algorithm Awareness-Building."<ref>{{cite web |url=https://ec.europa.eu/digital-single-market/en/algorithmic-awareness-building}}</ref> Just recently, two representatives introduced the "Protecting Americans from Dangerous Algorithms Act"<ref>{{cite web |url=https://eshoo.house.gov/media/press-releases/reps-eshoo-and-malinowski-introduce-bill-hold-tech-platforms-liable-algorithmic}}</ref>.
:It is not opinion, it is fact. Some people do indeed restrict the term in this way. [[User:AxelBoldt|AxelBoldt]] 16:55 Jan 4, 2003 (UTC)
 
Given that many people may turn to Wikipedia to help understand what an "algorithm" is, I feel like there should be some mention of this usage on the page. But given the amount of detailed and academic info on the current page, I'm not sure how to best integrate this other content. Perhaps something brief in the lead paragraph and then a mention under "Informal definition"? Or a new section about "Algorithms in current politics"? Or a new section under "History" (although that seems mostly about the refinement of algorithms)? Any thoughts? - [[User:Dyork|Dyork]] ([[User talk:Dyork|talk]]) 17:25, 20 October 2020 (UTC)
Havent you ever heard "non-deterministic algorithm"?? this has been used since the 1950's.
 
: I agree that there should be some mention of the social media usage on this page. However I think it's wrong to conflate that usage with the real meaning of the word "algorithm". In the social-media context, "algorithm" usually just means that some kind of processing has been done; it doesn't mean that the processing was in accordance with any kind of clear procedure, which is what an algorithm is supposed to be. I don't want this page to be about any old data-processing. That's not an algorithm. That's just what journos refer to as "algorithm". If we let that go, then we'll need a new term to refer to real algorithms: e.g. "Explicit procedure for performing transformations on data", which is a bit unwieldy.
Imagine this algorithm:
while 1:
a = random integer from 0 to 10
if a < 5:
quit
Thats a set of repeatable steps. yes, the results will be different each time, but its still an algorithm. This is too simple to have a debate on.
:Lot's of people will disagree that this is an algorithm. You can't implement it on a Turing Machine, for example. [[User:AxelBoldt|AxelBoldt]] 17:02 Jan 4, 2003 (UTC)
 
: Can we have our word back please, mister?
I agree that this is moronic, but I'm afraid AxelBoldt has a point about many people using it this way. This distinction even makes it into a footnote in the not that technical book ''[[Darwin's Dangerous Idea]]'' (p. 52). --[[User:Ryguasu|Ryguasu]] 05:29 Jan 12, 2003 (UTC)
 
: 12:30, 27 October 2021 (UTC)
-----
Where does the new cryptographic algorithm that is supposed to be unbreakable and was developed by a faculty member at M.I.T., I believe, belong here. It works by keys picked up from some random source, like a satellite, that are processed in the encryption but never stored anywhere. The inventor has proved that it is unbreakable with current computational power, and no one contests this apparently. Do you know what I am referring to? RoseParks
----
Yes, but it isn't really an encryption algorithm itself so much as a novel means of key exchange. Most modern cryptography techniques are like that: everyone has known about [[:one-time pad|one-time pad]]s for a long time, and that they are unbreakable. Modern techniques like RSA and Diffie-Helmann are just ways to safely exchange keys, which can then be used as one-time pads. RSA and DH key exchange protocols can themselves be broken, while professor Rabin's method theoretically cannot be, but it is not yet practical for other reasons.
----
Thank you. You may remove or do what you want with this. Perhaps other people have read about it and could use your explanation on these pages...maybe a page itself, or
somewhere on these pages. RoseParks
----
Most of the discussion above is pretty confused. Rabin's method isn't theoretically unbreakable, RSA and Diffie-Hellman are essentially never used to exchange one-time pad keys, RSA is not normally thought of as a key-exchange protocol, properly applied RSA may in fact be impossible to break, etc. But I don't have the time to write a section on cryptography just yet. --[[:Kragen|Kragen]]
----
I think it would be a great idea if we came to some sort of standard on writing pseudocode. I've used a sort of hybrid procedural style for the algorithms in [[:Linear search|Linear search]] and [[:Binary search|Binary search]] but I'm wondering if there's a better standard out there. Can we borrow a style from a textbook like Intro to Algorithms? (is this copyrighted or is style a public ___domain thing like an idea?). Only a fairly small set of control structures is needed -- something to define functions, if-statements, loops, list access, mathematical operators and probably a few more. Comments? [[user:Mark Jeays|Mark Jeays]]
 
: Absolutely. I'm surprised there isn't a separate article [[Algorithm (social media)]] that's written for a much more lay audience. Social media algorithms are usually more complex and aren't talked about in terms of big-O or anything like that. Instead, it's on the social impact of various choices of what to hilight -- things like the [[filter bubble]], [[algorithmic radicalization]], and even allegations that some social media company's decisions can [[Big Tech|sway political elections]]. And there are [https://news.google.com/search?q=social%20media%20algorithm&hl=en-US&gl=US&ceid=US%3Aen many news articles] about this topic. --[[Special:Contributions/Hirsutism|Hirsutism]] ([[User talk:Hirsutism|talk]]) 18:45, 24 August 2021 (UTC)
:I do think we should try to do standard pseudocode. I have no idea what that pseudocode should be however. CLR's style is usually clear, but sometimes I find it confusing (often because I do not parse the <code>A <- B</code> assignment syntax properly). I don't think things like pseudocode style are copyrightable... We should make a [[:pseudocode|pseudocode]] article that defines whatever we use (in addition to explaning what pseudocode is in general), then link to that from every pseudocode example. In addition, we could include examples in other languages (see [[:bubble sort|bubble sort]] for example) by putting them in subpages like [[:bubble sort/C++|bubble sort/C++]]. --BlckKnght
----
Robertson L.A, has released a book which attempts to standardise Pseudocode by specifying pseudocode words (READ, GET, DOWHILE etc) in a book "Simple Program Design - A step by Step approach" Nelson Thompson Publishing 2000. The Pseudocode examples are close enough to most High Level Languages so as to easy to translate to any language.
----
We definitely need code samples for all the algorithms; I think there should be one language (pseudocode or otherwise) on the main page, and implementations in other languages on subpages, as [[:BlckKnght|BlckKnght]] suggested above.
 
:: Or perhaps an article about the [[Social impact of algorithms]], with a heavy emphasis on social media algorithms? Because there are articles about algorithms being used to [https://www.bbc.com/news/technology-56515827 hire and fire people], for [https://www.bbc.com/news/technology-53806038 insurance and policing], and [https://www.vox.com/recode/2020/2/18/21121286/algorithms-bias-discrimination-facial-recognition-transparency several other places they can introduce bias], and those should probably also be addressed in the for-a-lay-audience article. --[[Special:Contributions/Hirsutism|Hirsutism]] ([[User talk:Hirsutism|talk]]) 20:18, 24 August 2021 (UTC)
I think some executable language would be far preferable to pseudocode, for the following reasons:
::''"In the social-media context, "algorithm" usually just means that some kind of processing has been done; it doesn't mean that the processing was in accordance with any kind of clear procedure, which is what an algorithm is supposed to be. I don't want this page to be about any old data-processing. That's not an algorithm. That's just what journos refer to as "algorithm". If we let that go, then we'll need a new term to refer to real algorithms: e.g. "Explicit procedure for performing transformations on data", which is a bit unwieldy."''
* it's possible to test executable implementations of algorithms to see if they're buggy
::Thank you! I've been trying to understand what news/social media means by algorithms. But none of the actual definitions help. Now I see that that is because the popular use of algorithm is similar to the popular use of 'metaphysics.' It means something different and sillier.
* executable languages tend to be more rigorous than pseudocode; people writing in pseudocode tend to gloss over relevant details (like whether the range ''n..m'' includes ''n'', ''m'', both, or neither --- this is a huge difficulty with, for example, binary search)
::We Social impact of algorithms: I see that there is already a wiki dealing with [[Algorithmic Bias]] that probably accounts for this. [[User:Jesseraekern|Jesseraekern]] ([[User talk:Jesseraekern|talk]]) 18:14, 2 December 2022 (UTC)
: I've written a bit of an article at [[User:Hirsutism/Algorithm (social media)]]. Could someone take a look at it, and tell me if they think the article should be expanded to cover all AI-with-a-social-impact, or should it focus only on social media algorithms? On the other side, there's quite a few articles about this already, I don't know whether we even ''need'' a new separate article, other than a short summary in this article? --[[Special:Contributions/Hirsutism|Hirsutism]] ([[User talk:Hirsutism|talk]]) 20:41, 29 August 2021 (UTC)
 
{{reflist-talk}}
My current favorite languages for this are [[:Scheme programming language|Scheme]], [[:C programming language|C]], and [[:Python programming language|Python]].
 
:: The "algorithms" that are discussed in the context of social media are usually not algorithms as discussed in this article; the social media "algorithms" that are derived from big datasets by training ML systems are not transparent, and can't even really be expressed. I think it's incorrect to call these systems "algorithms".
Python is the most readable of the three; it reads like pseudocode itself. It's also the least standardized of the three, the most rapidly changing, and the one with the most "hidden" stuff going on behind the scenes. (<tt>arr.append(item)</tt> in Python may allocate new space for the array if the space it's in isn't big enough; that really screws with algorithmic complexity analysis.)
 
:: However I do appreciate that journalists and ML promoters do refer to these systems as "algorithms". Therefore I support the creation of a page for "algorithms" in a social media context. That might make it easier to keep this page focused on the subject of real algorithms.
C is the most widely-used of the three, probably the one with the most complex and irregular syntax, the most standardized of the three, the least rapidly changing, and the one with the least "hidden" stuff going on behind the scenes. It's also the most verbose and the least readable for people who aren't familiar with the language or one derived from it. (Although, since it is so widely used, almost anyone who knows how to program is familiar with the language or one derived from it.)
 
:: [[User:MrDemeanour|MrDemeanour]] ([[User talk:MrDemeanour|talk]]) 08:56, 15 September 2021 (UTC)
Scheme is intermediate between C and Python, in my opinion, except that it is the least widely used.
 
:::Agreed: "algorithm" as used in a social-media context is an important concept, quite distinct from this article's focus. The content of Hirsutism's draft at [[User:Hirsutism/Algorithm (social media)]] looks like a good start, but I'd argue that social media algorithms are simply a special case of a [[recommender system]]s, both on the technical and on the social/behavioral side. The social and behavioral aspects of recommender systems are mostly covered in the [[filter bubble]] article, but that's only one aspect. I'm not sure how to organize this better.... --[[User:Macrakis|Macrakis]] ([[User talk:Macrakis|talk]]) 14:14, 27 October 2021 (UTC)
For now, I'm going to add implementations in Python to the algorithm pages, and when I have time, I'll add implementations in C and Scheme on subpages.
 
'Algorithm' as used by non-computer-scientists / non-experts to discuss recommender systems in social media (which, surely, are implemented by large numbers of algorithms) is a technically-incorrect use of the word almost entirely unrelated to this article. <!-- Template:Unsigned IP --><small class="autosigned">—&nbsp;Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/72.200.126.73|72.200.126.73]] ([[User talk:72.200.126.73#top|talk]]) 12:52, 23 August 2022 (UTC)</small> <!--Autosigned by SineBot-->
-- [[:Kragen|Kragen]]
 
=== Page tidy up needed.===
: Kragen, have a look at the [[:pseudocode|pseudocode]] page, we thrashed out a "standard pseudocode" for Wikipedia a while ago (though feel free to make suggestions/improvements). The trouble with providing actual implementations of algorithms in real languages is that the trees start to get in the way of the forest. This is less of a problem in Python and Scheme, of course. --[[:Robert Merkel|Robert Merkel]]
This page is quite long and rambling and seems to have some content that could go to other pages such as the section on Euclid's algorithm and the conversation between Turing etc. This is a gateway concept to many related issues and it would be good if it was easier for the general reader to navigate. I can get started on some of this. [[User:AmandaSLawrence|Amanda Lawrence]] 01:16, 27 October 2021 (UTC)
 
:I whole-heartedly agree that this article strays off topic in many places. In particular, there is a paragraph in the "Expressing algorithms" section that talks about Turing machines. I have no problem with that idea, but it seems to come out of nowhere to me as currently written. I would either delete it or add a transitional phrase to the beginning of the first sentence. But I'm not going to do that right now, since there is no need to fine-tune this section if it is likely to be significantly modified in line with some of the other discussion on this Talk page.
----
:[[User:Mike-c-in-mv|Mike-c-in-mv]] ([[User talk:Mike-c-in-mv|talk]]) 23:44, 18 June 2023 (UTC)
An algorithm is not a rough form of a computer program. This is an example (among many) of the distinct Computer-science bias of the Wikipedia.
::@[[User:AmandaSLawrence|AmandaSLawrence]] [[Special:Contributions/117.20.112.19|117.20.112.19]] ([[User talk:117.20.112.19|talk]]) 00:25, 6 January 2024 (UTC)
:::The whole section on Euclid's algorithm apart from the first para could be cut which would really help the flow - the examples could be quite short if they have their own page. But I'm not sure if all that long text should be added to the Euclid page or just cut. [[User:AmandaSLawrence|Amanda Lawrence]] 11:12, 25 January 2024 (UTC)
 
== Merge "[[Algorithmics]]" into this page ==
Not every computer program is an algorithm either, at least according to some of the definitions of algorithm.
 
Anyone against merging [[Algorithmics]] into [[Algorithm]]? That page seems almost completely useless. [[User:Weebney|Weebney]] ([[User talk:Weebney|talk]]) 19:55, 23 January 2024 (UTC)
I don't have a reference handy, but I have seen '''algorithm''' defined to mean, roughly, a finite set of rules that is supposed to produce an answer in a finite number of steps. Therefore, infinite loops (which can occur in computer programs) cannot occur in algorithms according to this definition.
 
:In favour - go for it. I don't think we need the illustration - not for the term anyway. [[User:AmandaSLawrence|Amanda Lawrence]] 10:57, 25 January 2024 (UTC)
This is, by the way, one of the motivations for the study of the [[halting problem]]. How do you prove that a certain method is in fact an algorithm?
:It is finished. [[User:Weebney|Weebney]] ([[User talk:Weebney|talk]]) 06:02, 7 February 2024 (UTC)
 
== Contrast with heuristics ==
 
While I understand the thought behind contrasting algorithms with heuristics, I think it makes the page longer than it needs to be. It doesn't add new information about algorithms nor does it clear up common misconceptions. It seems like more of a detour in what should be a concise article. Any thoughts on keeping or removing the heuristics paragraph? [[User:Clubspike2|Clubspike2]] ([[User talk:Clubspike2|talk]]) 11:56, 25 June 2024 (UTC)
----
 
== Definition of heuristic ==
I removed the following example algorithm, because I think it is incorrect. Starting with the words zzz,yyy,xxx, it will in step one produce yyy,zzz,xxx and then it will produce yyy,xxx,zzz and then it will stop. [[User:AxelBoldt|AxelBoldt]] 00:33 Oct 8, 2002 (UTC)
 
The statement that "a heuristic is an approach to solving problems that do not have well-defined correct or optimal results" is simply wrong. A heuristic is an approximate and often unproved method, independent of whether there exist well-defined correct of optimal results. See [[Heuristic]] in WP: "a technique designed for problem solving more quickly when classic methods are too slow for finding an exact or approximate solution, or when classic methods fail to find any exact solution". [[User:Zaslav|Zaslav]] ([[User talk:Zaslav|talk]]) 00:16, 19 December 2024 (UTC)
An example of an algorithm is this rule (or method or procedure) for alphabetizing a list of names by repeating the specified steps until the job is done:
 
== Refilwe ==
* Step 1. Compare the first 2 names on the list:
** a. If the 1st one is alphabetically ahead of the 2nd one, go to step 2.
** b. If the 2nd one is alphabetically ahead of the 1st one, swap the two of them and then go to step 2.
* Step 2. Pretend the 2nd and 3rd names on the list are the 1st and 2nd ones, and repeat step 1.
 
Mo di se@ [[Special:Contributions/105.245.126.148|105.245.126.148]] ([[User talk:105.245.126.148|talk]]) 11:03, 30 August 2025 (UTC)
 
:No, it doesn't stop then -- you forgot to "repeat[] the specified steps until the job is done." The second time thru, you get xxx,yyy,zzz and then you stop, because "the job is done." -- [[User:Isis|isis]] 06:33 Oct 8, 2002 (UTC)
 
We have to formulate the algorithm clearer then. The whole point of an algorithm is to give unambiguous instructions for a process, and these are hardly unambiguous. Step two for instance talks about the 2nd and 3rd names, but doesn't say what to do if there is no 3rd name. I thought it should stop then, but you actually want a loop. If you say "until the job is done", does that imply that after each step 2, I have to scan through the whole list of names to check if it is already alphabetically ordered, and stop if it is? If so, the algorithm should say that clearly (and it wouldn't be bubblesort).
 
Also, please don't mark your edits as "minor" if you make major changes to an article.
[[User:AxelBoldt|AxelBoldt]] 14:25 Oct 8, 2002 (UTC)
 
:The whole idea of an encyclopedia is to explain basic concepts to people who don't know '''anything''' about them, including (or especially) 10 or 12 year-old-olds. I respectfully submit that anyone who knows what a "greatest common divisor" is (and probably anybody who knows what an "integer" is) '''already knows''' what an "algorithm" is. It's okay to put in the stuff that reads like a math textbook, but before that you need introductory material for the ordinary people that are never going to read past that expanded definition in lay terms. What you should really do is write something dynamic that would show a bubble sort of a short alpha list that wouldn't take an explanation at all but would show the items swapping and bubbling up the list. -- [[User:Isis|isis]] 22:46 Oct 8, 2002 (UTC)
 
 
:: GCD and HCF are usually covered at junior school level (10-12). Integers are probably called "whole numbers" at that stage, but the concept is graspable. I'm not sure at what age one encounters a term like "algorithm". Later, I think. -- [[User:Tarquin|Tarquin]] 22:50 Oct 8, 2002 (UTC)
 
There's no question those concepts are taught in math classes at that level, but that's irrelevant to the topic under discussion. My point is that the purpose of an encyclopedia article is to define/introduce its subject to someone who doesn't yet know anything about it. Unless this article explains "algorithm" in terms someone who doesn't already know what one is can understand, it is useless for its intended purpose. Ordinary people (of any age, but I'm talking about only the U.S., and it may be different elsewhere in the world) don't know what GCDs and integers are, and they don't need to know what they are to understand what an algorithm is, so the article should be written (at least at the beginning, and you can put in the technical stuff farther down) in terms they do understand -- that could have been accomplished by using the example of putting a list of numbers in numerical order, for example.
 
But there's a largerr issue I consider pertinent here, and that's that Americans are innumerate, not so much because they're incapable of understanding numerical concepts as that they've acquired a fear of math, and that's the fault of generations of math teachers who didn't understand or couldn't explain the concepts in terms that made them accessible. Those of us who are teaching math now (including teaching it thru the 'pedia) have an obligation to do better by the ones we teach, because math is so much more important a tool than it has ever before been in society. The more non-numerical examples we use to explain the concepts, the less math resistance we have to overcome, and the better (and easier) we get our job done. Therefore "word problems" of practical, everyday matters are better than sets of equations for illustrating mathematical principles, and therefore a list to be alphabetized is better than numbers to be sorted for explaining "algorithm," because it makes the readers comfortable with the concept before they realize it's math and resist it. (I have yet to see a 'pedia article on a mathematical topic that didn't look like it came from a math textbook instead of an encyclopedia.)
 
So I respectfully insist that the example in this article needs to be of a simple sorting algorithm (and there is none simpler than a bubble sort, so I'm still voting for that) that anyone can understand. I'd like for it to be of alphabetizing items, because that would obviate math anxiety, but if it has to be numerical, make it something like putting checks or invoices in serial-number order. I'd like for it to be dynamic, showing the items swapping in pairs, but I don't know how to program anything that moves, although I've started introducing animated gifs to encourage contributors that do know how to animate illustrations to do so. It is ridiculous not to take advantage of the capabilities of this medium, especially when equations are so deadly dull, and instead of showing the transformations in a mind-numbing list of them, you could have the elements moving in and out of the equations on the screen, and the novelty of that would suck your readers in, so they would pick up the concept before they realized it. -- [[User:Isis|isis]] 00:17 Oct 9, 2002 (UTC)
 
I completely agree with you that the first example should be as simple and intuitive as possible, and sorting names is simpler than computing gcd's. I just didn't like the bubblesort description since it wasn't explicit enough. By the way, I always thought [[selection sort]] is simpler: pick the smallest element, put it at the top. Pick the next smallest element, put it at position two, etc. That's how I usually sort things.
 
As to your contention that Wikipedia articles are too technical for an encyclopedia: here is the start of Encyclopedia Britannica's algorithm article, (fair use):
 
:''systematic procedure that produces—in a finite number of steps—the answer to a question or the solution of a problem. The name derives from the Latin translation, Algoritmi de numero Indorum, of the 9th-century Muslim mathematician al-Khwarizmi's arithmetic treatise “Al-Khwarizmi Concerning the Hindu Art of Reckoning.” ''
 
:''For questions or problems with only a finite set of cases or values an algorithm always exists (at least in principle); it consists of a table of values of the answers. In general, it is not such a trivial procedure to answer questions or problems that have an infinite number of cases or values to consider, such as “Is the natural number (1, 2, 3, . . .) a prime?” or “What is the greatest common divisor of the natural numbers a and b?” The first of these questions belongs to a class called decidable; an algorithm that produces a yes or no answer is called a decision procedure. ''
 
And it gets worse from there; not a single example. [[User:AxelBoldt|AxelBoldt]] 00:33 Oct 9, 2002 (UTC)
 
Articles should of course start with good definition/introduction paragraphs that give a person of average intelligence a good idea what the subject is and why it is important but we shouldn't dumb things down to the point where articles are not useful to people who already know the basics. BTW, we should also aim to be better than Britannica in depth, breadth and accessibility by starting off with the basics and building from there. Just my 2 cents. --[[User:Maveric149|mav]] 00:37 Oct 9, 2002 (UTC)
 
:As to selection sorts being easier than bubble sorts, I guess my age in showing -- I learned to sort in assembly language without matrix notation, and bubble sorts were much easier (at least for me) than selection sorts, especially because when there wasn't enough room to hold two lists of the given length (which was usually the case), the job would bounce instead of running, so it wouldn't be done when the assignment was due. I think most of us do use selection sorts in sorting alphabetical or numerical items that are physically separate (like file cards or cancelled checks), so I think that would be a good example to use, but I'd still like to have a dynamic image of the cards rearranging themselves, the way my Windows shows me my files flying from one folder to another.
 
:Did you cite the ''Encyclopædia Britannica'' article because you meant to suggest it was worse than the current Wikipedia article? To me, it's not, -- it starts with a definition that is accurate, complete, and concise, something neither the first sentence nor the first whole paragraph of the current Wikipedia article does. Or did you mean to imply that if ours is no (or not much) worse than theirs, it's acceptable? Even if I considered ''EB'' the standard for encyclopedias (and I never have -- I've always preferred the ''Encyclopedia Americana'' to ''EB'' and ''Funk & Wagnalls'' to ''World Book'', which were the standard reference books in libraries when I was in grade-school), I'd still like for the 'pedia to be the best it could, not just as good as the supposed competition.
 
:So mav has expressed my position very well: Each article should start out with introductory material that explains to an average reader what the article is about and ''why it is important''' and then segue into some more advanced material that will appeal to someone who already knows something about the topic (and then there may even be some advanced topics that appeal only to specialists). A reader who wants the basics will read only the introductory part (so it needs to be complete for that purpose), but that part should not be so simplified ("dumbed down") that it will offend the specialist who skims over it getting to the meatier part. -- [[User:Isis|isis]] 01:51 Oct 9, 2002 (UTC)
 
 
::I gave the EB text because I consider it far worse than our article: they start out with saying "in a finite number of steps" which is wrong; then they enter the topic of table lookups for finite problems which is completely besides the point, and then they go right into primes and gcd's without a single example algorithm. And I don't find the definition "systematic procedure that produces—in a finite number of steps—the answer to a question or the solution of a problem" any better than "well-defined method or procedure for solving a problem, usually a problem in mathematics or otherwise relating to the manipulation of information". [[User:AxelBoldt|AxelBoldt]] 02:45 Oct 9, 2002 (UTC)
 
:Well, as the saying goes, "There's no accounting for tastes." -- [[User:Isis|isis]] 03:03 Oct 9, 2002 (UTC)
 
 
== Choice of example ==
 
We need a different algorithm for the example; this Euclidean GCD one is too unintuitive. I have a master's in math, and I can't figure it out, so I know ordinary readers can't follow it. -- [[User:Isis|isis]] 20:54 Oct 27, 2002 (UTC)
:How about the trial division prime testing algorithm, or maybe one of the bin-packing algorithms ?
 
How about the sieve of Erathosthenes? okay, so it's infinite, but it's a simple prodecure to explain, it's clear how & why it works, and you can limit it to, say, numbers up to 100 so it terminates. I remember doing it at age 10 or so. -- [[User:Tarquin|Tarquin]] 21:09 Oct 27, 2002 (UTC)
 
:I have no idea what that is, but it sounds dirty -- let's do it. -- [[User:Isis|isis]] 21:17 Oct 27, 2002 (UTC)
 
::[[Sieve of Eratosthenes]] --[[User:Imran|Imran]] 21:35 Oct 27, 2002 (UTC)
 
:I'll tell you what: You go out to a shopping area, a mall or downtown, and stop 10 people at random and ask them, and if as many as five of them know what a prime is, I'll agree to this one. The problem I'm having is that the purpose of an example is to clarify things for somebody who's looking the topic up because they don't know anything about it, and none of these mathematical concepts (like "divisor" and "prime") is part of most people's vocabulary, not to mention mind-set. I still say this needs to be an algorithm for something ordinary people understand, like alphabetizing or (if you can't live with its not being numbers) counting or sorting. -- [[User:Isis|isis]] 21:52 Oct 27, 2002 (UTC)
 
 
Sorting is a simpler concept, but is actually a more complex algorithm in terms of the actions involved and what they do. The sieve is easy: you just write the numbers down then cross them out. It's clear that it works, because when you cross out 2,4,6,8, you're removing all the multiples of 2. I think the explanation on [[Sieve of Eratosthenes]] could do with a rewrite though. Some 20% of the shopping mall people will be illiterate, but we're not dumbing down our long words here for them. We must make articles accessible to the ''intelligent'' lay-person. That means someone who can look up "prime" and "divides" and quickly grasp the concept. Like I said, it's 10-year old maths: I clearly remember doing it. If people are so innumerate that they forget this stuff ... *sighs in despair* -- [[User:Tarquin|Tarquin]]
 
:I agree with Tarquin, I certainly recall knowing the sieve technique when I was 10-11, possibly it's just a UK education thing.
: I think we should assume knowledge of what a prime is in the same we assume people know what a noun is.--[[User:Imran|Imran]] 22:19 Oct 27, 2002 (UTC)
 
Guys, if you're just not willing to put it in terms an average reader of the 'pedia can understand without having to look the words up first, then simply take the example out, because it's not going to do what an example is supposed to do. What ''you'' remember from 5th grade is totally irrelevant -- you're not the one that needs to look the word up. The problem is that having an example there that's too hard is worse than not having one at all, because it will scare off someone who was interested enough to try to find out what "algorithm" means. And BTW, people in this country (U.S.) don't know what a noun is, either. -- [[User:Isis|isis]] 23:03 Oct 27, 2002 (UTC)
 
: ask the same people you ask about "prime" whether they have any interest in reading about the meaning of the word "Algorithm". Some might -- but those with no grasp of maths concepts will go away happy with the intro text: "Generally, an algorithm is a list of instructions for accomplishing some task..." Knowledge builds on knowledge, and people getting this far should know that. Anyway, why don't we try writing ''several'' examples: a sort and the sieve, and leave the GCD too. We can then try and decide which is the simplest to the thick *cough* novice reader. -- [[User:Tarquin|Tarquin]]
 
I recommend implementing the selection sort algorithm, whether there will be only the sort algorithm or other ones as example(s). It being simple to understand is an issue, that's the right algorithm. Its correctness is easy to get. [[User:Tcascardo | TCascardo]]
 
----
 
I don't know how to fix this, but I'd like to point out that the article's etymology of "algorithm" doesn't look entirely coherent. The article seems to provide two different stories:
 
# It descended from successive translations of an Arabic guy's name.
# It descended from a word in said Arabic guy's chief work, a word which referred to "the rules of performing arithmetic using Arabic numerals"
 
There seems to be a missing link here somewhere. --[[User:Ryguasu|Ryguasu]] 05:34 Jan 12, 2003 (UTC)
 
:Please read it again more carefully: It says "algorithm" came from his name, and "algebra" came from the name of his book. It may not be expressed clearly enough because all of us who worked on it knew what it meant, so if it doesn't say that to someone who doesn't already know it, please fix it. -- [[User:Isis|isis]] 05:46 Jan 12, 2003 (UTC)