Deep Algorithms?
Stridar writes "A paper presented in a recent article quotes Donald Knuth as saying the computer science has 500 deep algorithms. He mentions that Euclid's algorithm is one of the most important, and he seems to agree with the idea that CS will be mature when it has 1000 deep algorithms. What I would like to ask Slashdot is the following. What are the most important algorithms in CS? What is your favorite algorithm? And finally, what are the outstanding problems for which algorithms would be immediately placed in the "Top 1000" category." We had an older story where two scientists picked their top ten algorithms.
Well, compiler alrogithms are important :)
Does the Bubble Sort algorithm count as important?
Al Qaeda has ninjas!
Without binary search, life as we know it would not exist.
Calm down, it's *only* ones and zeroes.
THe algorighm is simple, powerful and beautiful. Its properties allows to use for encryption or for authentication. It is simple enough that can be described in a piece of paper, and understood with basic mathematical background, and it affected the e-world in many different, some of them still to be seen.
Quicksort is my personal favourite, and while I haven't ever implemented it in C (not reinventing the wheel etc.), I did code a MC68k assembly version in late 80s.
:)
Radixsort looked a lot like magic at first sight. It was very common on the Amiga, mainly for sorting the Z buffer in one's l33t 3D routines.
Purely to add a little bit of the aesthetic to the list. [Check it out]
My vote goes to Miller-Rabin.
Prime numbers = fun for the whole family.
And therefore I choose:
Cowboy Neal Bubble Butt Algorithm
...What is your favorite algorithm?
Dijkstra's Single Source Shortest Path Algorithm
Boyer-Moore Fast String Searching Algorithm
While I would consider myself geeky, I'm much more of a science geek than computer geek (even though I read /. on a daily basis) I have no real understanding of a computer algorithm, deep or otherwise, my search for "computer science deep algorithm" on google wasn't much help either. Could any one help the uninitiated.
We had to destroy the sig to save the sig.
Of course,
Lather. Rinse. Repeat.
Anything you can do, I can do meta.
You start with 2 sets of items that are related in some way. Next, you identify possible matching relationships. You then rank each relationship pair with some metric, sort the relationship list, and remove all lower ranking relationships. This leaves you with a list of the highest ranking relationships, with items appearing only once in the relationship list.
This was a trivial exercise in Lisp (where I first implemented it), but I've used it quite a few times in various other languages. Anyone know the name of this?
In a band? Use WheresTheGig for free.
My fav is the Quick Sort. Its simple, effective and something I'd like to think I'd come up with myself, but know I couldn't.
My personal favorite is the skiplist. O(ln n) insert, search, and delete in the average case. Simple to understand, has good constant factors, doesn't require maintence (unlike trees). Really, what more could you want?
Here's the paper:
ftp://ftp.cs.umd.edu/pub/skipLists (many formats)PDF
Resolving dependencies between any number things requires this very useful graph sorting algorithm.
The Official Steve Ballmer Webpage
My favorite Al-Gore-ithm was when he invented the Internet.
Algorithms? Its all about PATTERNS now-a-days!
Honestly, I don't think CS will be considered "mature" just by the number of complex algorithms it has.
There's more to CS than algorithms.
And, I always thought algorithms were grouped into "Discrete Mathematics" not "Computer Science" (granted, there is overlap, but isn't there overlap in most sciences??).
Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
I'm not sure if it'd be an 'algorithm' per se, but I've always found the concept of recursion/mathematic induction to be extremely useful. I don't know how much use it is to true programmers, but for writing useful shell scripts and administrative tools it's something I rely on quite a bit.
I dont think I'd call it my favorite algorithm, but the Boyer-Moore string searching algorithm is pretty cool.
Quicksort
The Unification Algorithm
Skip Lists
Conjugate Gradients
Karmarkar's linear programming algorithm
Knuth-Morris-Pratt string matching
Multidimensional scaling
The Kernighan-Lin TSP & graph-partitioning methods
Lempel-Ziv compression
Fast Fourier Transform
Quine-McCluskey optimization
Celine/Gosper/Zeilberger/Wilf algorithm for hypergeometric identities
Fast Multipole method
-Tom Duff
Paul
In the interview, Knuth also repeatedly remarks on the importance of the "individual bricks" over "milestones" and top-ten lists. So maybe you should read the interview again.
Pushin' 'n dealin', shovin' 'n stealin'
begin
while alarm ringing
cover head with blankets
mprecate the onerous noisemaker softly
consider turning the damn thing off
if feeling remarkably hyperactive
then
lethargically slither out of blankets
sinuously stretch out arm
sigh
bang it to kingdom come
else
go back to sleep sweet sleep
endif
if hear name being called
then
see who it is
if kid brother/sister
then
ready
aim
fire
watch baneful clock execute a parabolic trajectory
in approximate direction of youngster
if target intercepted
then
ignore howls for Amnesty International
else
swear a thousand maledictions
endif
else if father
then
get out of bed hyper-quickly
if feeling watched
then
turn alarm off gently
else
kick alarm off gently
endif
else if mother
then
scan her for arms, especially those prohibited by
Geneva Convention
if result is affirmative
then
begin negotiations
else
pretend not to have seen her
increase snoring intensity
endif
endif
if feel something cold and wet being sloshed onto
blankets
then
yell blue murder
get out
endif
endwhile
end
Dinoj Surendran @ 1995 - no rights reserved
Well, that is one to my personal favorites.. Although I use "x" instead of "a"...
:)
Classy.
Not everyone deserves a 320i
One of the most important algorithms ever invented.
Seriously, how about Simulated Annealing or Genetic Algorithm?
Ok, since we're all stuck on the Internet, which is something that has to grow in size continually, I'd say one the routing algorithm has got to be one of the most important. The Internet can't exist without it. Also to note is that we do need faster routing algorithms to cater for future addressing.
It is so far-reaching.
linear programming, minimax game searches, network flow, primal-dual techniques for approximation algorithms......
* Randomized primality testing
* Gaussian elimination
* Euclid's gcd algorithm
All three run in time polynomial in the bitlength of the input, yet the first thing that springs to mind is exponential time:
primality testing: try dividing by every number between 2 and sqrt(N).
matrix determinant: the straight definition has n! terms. With Gaussian elimination you can compute the determinant in O(n^3) time.
gcd: factorize both number and compare? (ugh)
Gotta appreciate algorithms that show real insight into a problem.
Paul
First of all, it's "algorithm". Second, an algorithm, by definition, terminates...
dim accounttotal 'Total number of accounts
n t)-100*int(ac count(count)))/100u nt)*100)/100
dim myaccount 'my account
for count=1 to accountotal
myaccount=myaccount+(100*account(cou
account(count)=int(account(co
next
Run once a week for a healthy balance
SD
âoeWho knew something as harmless as willful ignorance could end up having real consequences?â
Hashing algorithms. Stick that in your pipe and smoke it.
On basis of frequency, it's obvious that simple algorithms are the most common. Linear search of an array, bubble sorts (no matter how bad they are), and linked lists are so common that its hard to believe that anything could be more popular (or frequently abused)
The "Content Scrambling System" it seems pretty Damn important to the MPAA and Congress. They even passed a law (DMCA) to support it..
Elegant, deep, and the foundation of public
key cryptography.
I personally have a love hate relationship with B+ trees.
Anything from Photoshop to cellphones benefits from fast signal processing. A little complex analysis turns an O(n^2) algorithm to O(n log n).
int fib(n)
{
if(n==0|| n==1)
return n;
else
return fib(n-1)+fib(n-2);
}
in this you will find the meaning of life
I'm going with the Fast Fourier Transform, because it is ubiquitous in signal processing and it has various number theoretic applications. As an added bonus: The Quantum Fourier Transform can be used in Shor's Algorithm to factor numbers in polynomial time! Although, this is not yet practically realizable..
Chaos is a name for any order that produces confusion in our minds. --George Santayana
1) Patent the obvious
2) Sue
3) PROFIT!!
I'm a big fan of the Ostrich Algorithm...
IMHO, asking "what are the outstanding problems for which algorithms would be immediately placed in the "Top 1000" category?" reveals a misunderstanding of Knuth's article (All Questions Answered). In regards to "deep algorithms", Knuth was speaking of the maturity of computer science as a theoretical discipline, not as an engineering science. An algorithm is "deep" because it is beautiful (to use another of Knuths words), that is, it demonstrates a penetrating insight into the nature of computation. In this regard, the actual problem domain addressed by any given algorithm, in and of itself, is irrelevant. In fact, in the same article, Knuth is asked to give the five most important problems in computer science. He replies that he "doesn't like this top ten business", but prefers the "bottom ten". What is important, he says, is "the little things ... the stones in the wall".
COordinate Rotation DIgital Computer
This algorithm is implemented by most FPUs and even some PGAs to calculate trigonometric and hyperbolic functions. It replaces the evaluation of those power series you've already forgotten about from school with a clever combinations of bit-shifts and additions. Back in the days when multiplications were much more expensive than additions, this is how it was done.
First off, it's clear that you have a very narrow view of what is actually done with computer science. Granted a lot of what the casual or application programmer deals with can seldom involve the creation of a new algorithm. However, the field of algorithms is constantly expanding.
Examples would be:
A guidance system
Any artificial intelligence
Image manipulation
Video games (quake engines!?!?!)
Telecommunications routing software
VLSI Design
etc..
As far as I know, that stuff is pretty important in the real world. Yes, algorithms exist to do pretty much all of those (in fact, with brute force, many are trivial). However, we are constantly looking for "better" algorithms. If new algorithms are not relevant, why would companies, like Intel, pay hundreds of millions of dollars for a program that would optimally lay out the elements on their chips for them?
I have no idea how it works, but search engines have no trouble finding me pics of nekkid wimmenz. Kudos to whoever invented it!
"Derp de derp."
Alpha-Beta Pruning or "minimax" is my favorite. It is a good way to trim your search space, but as far as I know pretty much is only used in strategy game playing. Chess specifically. The hard part about it is comming quantifying the value of the moves each player can make (Number of pieces, position on the board, tactics, blah!). Unlike most tradeoffs in CS, this one saves both time & space.
Clearly, the most important algorythm. ;)
'Companions the Creator seeks, not corpses, not herds and believers. Fellow creators the Creator seeks, those who write new values on new tablets. Companions the Creator seeks, and fellow harvesters, for everything about him is ripe for the harvest.'
(Friedrich Nietzche)
- For all the comments on this article.
- See which ones show a list of actions to do, especially those who specify conditions (if/then/else), or control flow (repeat,for each,while,until...)
- Study the selected examples.
- Reload and repeat until understood.
I *so* have a future in CS teaching.--- Sueños del Sur - a webcomic about four young siblings
Perhaps, hash tables and quicksort are the top software algorithms. They both are usually hidden from programmers (unless you're coding in low-level programming language), so we don't always $pay->{$attention} to the details.
Just think about it, how many times the hash tables and sort algorithms were used to render this very page?
Ok, this is one for everybody who as ever posted the phrase "Is this really news for nerds?"
.
. :)
Give me a nice recursive function any day.
Technoli
Experienced COMPUTER PROGRAMMERS modify Algorithm A by placing a known elephant in Cairo to ensure that the algorithm will terminate.
Assembly language programmers prefer to execute Algorithm on their hands and knees.
Without it Slashdot would not exist.
"I have opinions of my own, strong opinions, but I don't always agree with them." -- George H. W. Bush
It's well and fine to say that we should use the algorithms "that smart people like Knuth have invented", but that's not enough if you're going to make your living as a genuine developer. I agree that we should use the frameworks we are provided in order to get the highest productivity, but if you can't take some pleasure in the construction of an elegant piece of code (algorithmic or otherwise), then you're just a technician who can easily be replaced when the next fad rolls out.
You can put people like Knuth on a pedestal if you like, and that is certainly warranted in his case. But real progress will only be realized when you disregard people like him and do something of your own.
Please mod this post only if you think others should/n't read this. I have enough ego^H^H^Hkarma. Thanks!
I was always partial to the minimax game playing algo with alpha-beta pruning. I think it is rather cool that you just start lopping off whole chunks of the tree, and you're always searching for that one branch that fits you best and your opponent worst.
"What we elect to call imagination is mere combination of things not heretofore combined." - Frank Norris
...but did you say Al Gore rhythms?
This
If all algorithms, by definition, terminate, then the Halting Problem is easily decidable.
This cartoon is about Knuth
If tits were wings it'd be flying around.
CowboyNeal algorithm? CowboyNeal = SQR(CowboyNeal * CowboyNeal)
"What is your favorite algorithm", then you have no idea what an algorithm is.
Let me put it in common english, so Joe-Six-Pack can understand:
"Hey slashdot readers, what your favorite way of solving problems".
Yessir, we have "a" favorite way to solve problem*s*.
A new low slashdot, a fucking new low.
random number generators
I don't know any names, but they're used in lots of applications
"a quote" -me
Heck, just with crypto breaking you can probably find over a hundred different algorithms that are utilized in breaking crypto only. This way we can get to a thousand in no time, we just need more paranoid developers... ;)
Jobs? Which jobs?
Metropolis algorithm for Monte Carlo
Simplex Method for Linear Programming
Krylov Subspace Iteration Methods
The Decompositionnal Approach to Matrix Computations
The Fortran Optimizing Compiler
QR Algorithm for Computing Eigenvalues
Quicksort Algorithm
Fast Fourier Transform
Integer Relation Detection
Fast Multipole Method
There are many common randomized algorithms that have an expected running time that is linear but could potentially run forever. A simple example is the rejection method.
For example, suppose I had two coins and had to pick a random number from {1,2,3}. I could do the following scheme:
Flip the two coins. If I got:
HH I picked 1.
HT I picked 2.
TH I picked 3.
TT Flip again.
An algorithm is a process for doing something. Perhaps the best example for non-programmers is long division, the way you learned to divide multi-digit numbers with pencil and paper. The basic mathematical definition of division is that it's the inverse of multiplication, which is a fine definition of an operation but doesn't tell you how to divide two numbers. Long division is a procedure which gives you the answer. Other procedures are possible.
This may sound like I'm describing a program, or a piece of code. A piece of code can implement an algorithm, but many different pieces of code can implement the same algorithm. An algorithm has a specific mathematical context in which it works -- e.g. the dividend is not zero. The piece of code has specific to a computational context -- written in C, divisor is in variable x, dividend is in variable y, quotient ends up in z, all of which are single precision floating point.
What's a deep algorithm? That's subjective, but I'd say it has to either be non-obvious or become obvious only after you learn a nontrivial piece of theory. There's probably an aesthetic component as well.
...if you do this on the school's mainframe!"
--A Serious Warning from my Freshmen Comp Sci Instructor (14 years ago).
main() {
while(1)
fork();
}
Er... no. You're wrong.
Here I'm citing from my "Introduction to the Theory of Computation" book from Michael Sipser from MIT (ISBN: 0-534-94728-X):
"Informally speaking, an algorithm is a collection of simple instructions for carrying out some task."
There probably is a real definition somewhere but I think it sufficies to say that algorithms are things done by Turing Machines (that's why Turing invented them in the first place), and since the a=a+10 stuff from the parent can be done by a TM, it's an algorithm.
The man of knowledge must be able not only to love his enemies but also to hate his friends.
The Greatest Algorithm Ever Created:
swap (int* a, int* b)
{
int tmp;
tmp = *a;
*a = *b;
*b = tmp;
}
Personally, I find it interesting that this algorithm was developed by the same guy who wrote Alice's Adventures in Wonderland. A guy I teach with showed it to me a couple months ago, and I'm planning on using it in class soon to teach some programming concepts.
First they ignore you, then they laugh at you, then they fight you, then you win. -- Gandhi
First they ignore you, then they laugh at you, then they fight you, then you win. -- Gandhi
Ever seen that man dance? He has no rhythm!!! What's all the fuss about???
There are plenty of real problems for which the "best" algorithm doesn't yet exist, and you come across them both in academia and in industrial settings.
Any sufficiently advanced technology is indistinguishable from a rigged demo
--Andy Finkel (J. Klass?)
I didn't mean to make sense. :)
--- Sueños del Sur - a webcomic about four young siblings
So what are the best texts on algorithms? I mean texts that describe the algorithm and cover the etiology and perhaps importance rather than just being a cookbook or leaving everything as an exercise for the reader?
The Knuth books? Or is there something better?
I'm surprised that nobody has mentioned finite element analysis as the most important algorithm. Just about any modern structure built today is analyzed to determine it's structural characteristics using FE analysis. From a car bumper to the Sears Tower, it's all about FE.
No temporary storage needed!
Jono
I'm going to make the brave supposition that quantum computers will overcome the decoherence problem and scale to non-trivial sizes.
(Even if this doesn't happen, the following algorithms still deserve honorable mention for being the first to make use of quantum parallelism to give results unattainable thus far by classical algorithms):
- Shor's algorithm for factoring and discrete log
- Grover's search algorithm
They can solve a large set of optimization problems and the basic idea is very simple.
The opinions in this comment are subject to GPL, you can copy, modify and redistribute freely (as in speech).
Gotta be inventing the Internet! How could you top that?
Speaking of sorting, the scientists contemporary to Galileo used it to "patent" their yet unverified ideas and hypotheses by publishing a "one-way hash" of the statement describing the idea by alphabetically sorting the letters of that statement. E.g. a hypothesis "Mars has two satellites" will be "Aaaeehillmorsssstttw". Of course, to be secure, the statement must be much longer.
Do you mean that it is irrelevant to you? For some people, Knuth for example, the obsession with algorithms is very important. Thank goodness that they did do this so that you and I could borrow their work and not invent it ourselves. Some people spend a great deal of time trying to construct and refine algorithms. I would guess that few people in our society care, but it is greater than .001% of the people in the scientific computation communittee.
Believe nothing -- Buddha
Natural selection is the algorithm that solves all of life's problems :)
My favorite is Djikstra's Communicating Semaphores, along with the related algorithms documented in Djikstra & Riddle's paper "The 'T.H.E.' multiprogramming System".
With Mark Weiser's addition of the "T" primative (more commonly called "non-blocking P" i.e. "Try to P but if that would block return an error flag instead.") you have a fantastically powerful tool in a tiny amount of code.
For instance: I was able to implement a kernel for an actor-based, real-time, prioritized, preemptive multitasking system, including initialization code, an idle task, and a minimal startup task table (i.e. everything but the application tasks and device drivers):
- In under 512 bytes of code and initialization data.
- On an 8080.
Communicating P, V, and T, (along with a flavor of "V" doubling as a return-from-interrupt) are a complete set of primitives for such work.
For those not familiar, an "actor" in this context is a class such that each instance of that class or any subclass of it is a separate thread of execution. Messages are exchanged between threads via queues on semaphores rather than C++ member function calls / Smalltalk message sends, but otherwise all the object-oriented concepts apply directly.
Communicating Semaphores handle locking (like normal semaphores), message queueing, and resource allocation (by holding a queue of messages, each of which represents, or actually is, a resource).
"T" lets interrupt routines run initially as parasites on the interrupted task, then "T" a free-message-buffer queue, fill in the message, and "V" it to the incoming-work semaphore of the actual service routine as the interrupt exits - provoking a context switch if the service routine is higher priority than whatever was running. The interrupt routine can punt and return to the interrupted task if no buffers are available.
Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
There's some good ones (like QuickSort) that should be #1, but here's a random collection of some algorithms I find interesting:
The bitter lessons of a veteran coder: http://bitterprogrammer.blogspot.com
algorithms in CS? I can't say this often enough: You don't want none of them fancy-schmanzy algorithms in your Counterstrike, they'll ruin your ping for sure.
My vote: The Bresenham Line algorithm. It provides the most efficient method to draw arbitrary lines on a raster (ie. pixel-based) screen. All 3D Graphics are heavily dependant on this beautiful algorithm.
There have been improvements to the Bresenham line, effectively quadrupling the draw speed over the base Bresenham algorithm.
But the base aspect of Bresenham's work is critical: It allowed the drawing of lines on our computer screens using integer, rather than floating point, arithmetic. 3D Graphics wouldn't be the same without his contribution.
-- Sometimes you have to turn the lights off in order to see.
#include
main()
{
for(;;)
{
printf ("Hello World!\n");
}
}
A simple and somewhat efficient algorithm for finding the square root of a number goes as follows:
n = # ( say 25 ).
Count the number of sucessive odd numbers that add up but not over the target number.
eg: 1+3+5+7+9 = 25
....1.2.3.4.5 so 5^2 = 25.
Who knows what this is really called?
There's a gorilla from Manilla whose a fella that stinks of vanilla and has salmonella.
the quadratic algorithm for solving the Stable Marriage problem... I've been wanting to run it on a bunch of friends to see what bizarre matches came up... (run it twice, to be both male-optimistic and female-optimistic).
Sweepline algorithm for Voronoi diagrams.
The sweepline (directrix) creates parabolas around the points (foci). If illustrated right, these look like breats and make for a humorous lecture.
Sorry, this stuff is all super-Greek to me. I thought I was pretty smart for finally getting the Quicksort algorithm, but even then I needed the pretty Java applet to show how it worked.
What I'm wondering is, what sorts of algorithms are in use all the time that we don't really know about? That article about the top-ten algorithms of all time listing some pretty exotic-sounding things, claimed that many of those algorithms were probably in use on the computer right now. Is that really the case? Are there many algorithms in use for the Linux kernel, for instance?
--------
Bleah! Heh heh heh... BLEAH BLEAH!!! Ha ha ha ha...
That's a bit like saying that there is no need to understand calculus because Newton and company already figured it out for you.
To the professional programmer an algorithm is a tool, and like any other kind of tool it is important to know how it works even if you didn't invent or produce it yourself.
This may suddenly dawn on you when you're coding an algorithm out of a book, and find you don't know whether it's safe to take a particular shortcut or not because you don't understand the algorithm well enough to analyze the implications. Or you're looking at some values in a debugger and can't figure out if they're correct or have been clobbered by a bug because you don't understand the algorithm well enough. And so on.
But the first time I saw a recursive algorithm (eg, that for n!) I was quite impressed.
"Provided by the management for your protection."
What about Newton's Method (and its variants like Quasi-Newton and Gauss-Newton)? This algorithm solves a system of nonlinear equations iteratively by solving a sequence of linear systems of equations. With Newton's method, one can use the extremely effective matrix decompositions (QR, LU, etc.) to solve nonlinear equations. Under typical conditions, it exhibits quadratic convergence (basically, the number of decimal places of precision double after each iteration). Plus, it is very easy to understand. (It is taught in many freshman calculus classes.)
Sorts of all types. Weve got bubble sorts for the kids. Merge sorts for singles. And quick sorts for couples and for all you real CS people out their tell me what the Big O stats for a merge sort are?
is at The Computer Science Hall of Fame
500 deep algorithms, 1000 is maturity? To me this sounds a bit like like Bill Gates saying that 640K is enough for anyone, or the ancient Greeks saying that mathematics is mature because Euclid has codified his geometric axioms, or the head of the US patent office saying that everything's been invented in 1899. (All of which are probably apocryphal, but I digress.)
It's too premature. Computer science has been around for little over half a century. Who knows what will be discovered in the centuries ahead? Mathematics is the source of many algorithms, yet new discoveries are being made in mathematics even now. Don't stop searching when we get to 1000. There's still going to be many new and wondrous algorithms to discover for the geniuses of the future.
The only thing necessary for the triumph of evil is for good men to do nothing. - Edmund Burke
Seeing as to how I just had an Algorithms assignment due today and spent a decent chunk of time solving the following problem to produce an algorithm, I'm gonna say its important. :-)
Let G = (V,E) be a flow network with source s, sink t, and integer capacities. Suppose we are given a maximum flow in G.
Now suppose that the capacity of a single edge (u,v) in E is decreased by 1. Give an O(V + E) time algorithm to update the maximum flow.
---- Yay! I have a sig!
Just run it under Windows and it terminates eventually just fine! Therefore it's an algorithm!
:-) )
(I hated to lose the ability to mod, but I couldn't resist!
One of the algorithms that was impressed onto me as one for a rainy day, was the radix sort. One variant of it can do some real magic. wish I could find my old notes on that...
The other memorable one was Dykstra's shortest path alogorithm. The prof was Romanian, she spoke 12 languages, none of them english. I couln't undertand a word that woman said.
I guess the CS field needs a comprehensive, but simple book on those 500 canonaical algorithms.
Most CS books I've read seem to have been written to impress colleagues.
I.e., it's not the type of question that comes with a multiple-choice answer. Viz., modern university education can't even come close to teaching it.
But developers need a bit more of computer education to code applications using 80-bit floating-point format instead of double-precision.
People still believe that SSE2 and its 64-bit precision will keep up with science applications, but that's not true.
Is interesting that cpus like Itanium support 40-bit integer format and a lot of registers, packing a single 80-bit operation plus a 40-bit integer instruction (128-bit pack, a 8-bit header, 120-bit free) is easy using explicit paralelism and should be a big win for many scientific applications.
Since I'm not formally trained as a computer scientist (I'm merely an information technology major, sorry), I can't offer much in the way of "deep" algorithms to this list.
However, I can poke fun...
My personal favorite algorithm is:
(Ducks)
MacOS, Windows, BeOS, GNOME, KDE: they're all just Xerox copies
Why are so many people thinking of algorithms in terms of precise computations and, more literally, formulas? How about the Scientific Method as an algorithm? Without it, much of modern technology and science would be lost.
pi=sigma{n:0-infinity}[(1/16)^n][(4/(8n+1))-(2/(8n +4))-(1/ (8n+5))-(1/(8n+6))]
That's the definition I go by. Basically the Church-Turing Thesis. Algorithm == Turing Machine.
I would vote for Fortune's algorithm to compute the Voronoi diagram. It is a beautiful algorithm, which almost gave me an orgasm when I looked into its guts. I am shocked that no computational geometry algorithm was included in the top 10 list. Not only have they proved already to be extremely useful, but they are alos going to be more and more important in the future (especially in my case, working on next generation user interfaces).
recursive (ri kur'siv), adj. see 'recursive'.
I wrote a program like that on an Apple II in 3rd grade. I asked the class go guess how long it would take the computer to count to a million. Unfortunately, it took several hours.
In my first computer science course, I was taught that computer science was the study of algorithms.
CSS is just a bad imitation of the ROT13 algorithm.
Or read the FAQ.
For best results, you may need to reference the illustrations of proper use.
I believe it breaks several laws of computational complexity, including NP-completeness and the halting problem.
Lempel-Ziv compression is one of the most clunky, arbitrary, wasteful, inefficient, and widely-used compression algorithms available today. Get a clue about compression before you talk about it like that.
I'd much sooner vote for LZP (for its sheer elegance) or the latest block-sort methods for their efficiency and speed.
See compression.ca for some real numbers
Music speeds up when you yawn, but does not change pitch.
As I noted in another post, one problem with skip lists is that each node must be dynamically resizable because the number of forward pointers is changing and not known at compile-time.
Another problem with skip lists is that they are not very friendly to multiple readers and writers because the nodes provide unfortunate concurrency "chokepoints". In a binary tree, for example, subtrees can be locked without blocking readers in adjacent subtrees.
cpeterso
What then? Even if this was written by a fairly young teenager in 1995, it's kind of pathetic that seven years later there isn't some possibility of waking to the sound of a lover's voice, even if only in the imagination.
My favorite AlGoreithm [has] Gotta be inventing the Internet! How could you top that?
Actually what Al Gore invented was Spam.
Really.
(The legislation he supported to open the Internet to commercial exploitation is part of why we can't do much about the spammers without further legislation.)
His wire-all-the-schools-for-internet was also a trojan horse. It gives government an excuse to censor the net down to elementary-school level to "Save the Children".
Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
Danny.
I have written over 900 book reviews
Where would the world be without the Prof. Nijissen Algorithm. It is a complex algorithm but once you've used it a couple of times, you can create the most complex databases without even working up a sweat!
In Soviet Russia, the monkey spanks you!
This stuff is pretty niche right now (mostly just games and high-end simulations), but I think it will get find more widespread application as computing power increases.
a cool LCP implementation
a fun toy (yes, I'm biased) that uses the above
Build stuff. Stuff that walks, stuff that rolls, whatever.
The following must be *the* most important algorithm known.
(let ((y 0))
(define knowitall
(lambda (x)
(begin
(if (= x 0) (write-char #\.))
(write x)
(knowitall (+ 1 x)))))
(knowitall y))
Why? This algorithm generates (a decimal representation of) Champernowne's Constant, which is a / the (only known?) string that contains within it every possible substring of arbitrary length drawn from the same alphabet of characters. Warning: this algorithm is probably illegal, because it contains within it / will eventually generate DeCSS, the complete source code to every version of Microsoft Windows ever, the complete collection of all Mariah Carey's songs in MP3 format, the complete set of all the documents that Anderson shredded on behalf of Enron, the exact GPS coordinates of Osama Bin Laden at every moment for the rest of his life, George Bush's complete DNA sequence, etc. Enjoy!
The one algorithm of all time that I remember most fondly has got to be the Infocom parser. At the tender age of 14 I spend countless of hours trying to duplicate it in early BASIC. This, in retrospect, might not have been such a great idea...
"I have opinions of my own, strong opinions, but I don't always agree with them." -- George H. W. Bush
That's what deep thought was all about, no?
In particular, the "lifting scheme" for constructing transforms -- it's fast, it's invertable, and it generalizes more easily to a variety of conditions.
For instance, figuring out that most people exercise with an exponential algorithm and devising an O(log n) way to get ripped abs in less than 5 minutes a day.
Or figuring out the shortest distance between meeting a beautiful woman and getting laid.
Devising a "quick sort" routing that got you out the door in the morning 5 minutes after waking up.
Perhaps an exponential growth algorithm for our bank accounts.
Why is it we only apply algorithms to move bits around?
No, Thursday's out. How about never - is never good for you?
I think the next important algorithm would be a good "Fitness" test algorithm for AI.
----- Whats wrong with this picture? http://www.revoh.org:1234/whatswrong
for i=MIN to MAX
aout[ i ] = 0
for i=0 to n
aout[ ain[i] ] = 1
for i=MIN to MAX
if aout[i] == 1
Do whatever with the now sorted output
Since this is a blatant popularity contest, I will submit my own, very biased, favorites. These are all ways of normalizing lambda-calculi.
Lambda-calculi are abstract models of computation which lie at the heart of functional programming languages. Terms of the lambda-calculus are programs, and present computable functions. A normalization algorithm lets you decide whether two terms (programs, basically) are equivalent---not merely syntactically (which is trivial), but semantically, i.e., whether or not they give the same results on the same inputs. This is an extremely important problem in the field of programming languages because it affects program reliability.
The normalization methods mentioned below are important because they are decision procedures on closed terms of typed lambda-calculus, i.e., terms without any free variables. Call-by-name (cbn) is also a "semi"-decision procedure for untyped lambda-calculus (dynamically typed functional languages). This means that if two programs terminate, then they will reduce to the same thing using cbn.
To put this in context: When you program in ML or Scheme or, more or less, LISP, you are using the call-by-value evaluation procedure, since arguments are evaluated before calls. When you program in Haskell (or Scheme with suspensions), you are using the call-by-need procedure, since arguments are evaluated on demand. And, if you are using Algol 60, you are using call-by-name, since arguments are evaluated every time they are demanded.
Other candidates for `deep algorithms' in this vein are Gentzen's "Hauptsatz", or cut elimination procedure and the Hindley-Milner type inference algorithms.
BH
Fools! They laughed at me at the Sorbonne...!
Don't forget about the outOfHotWaterException. If not caught properly, it results in a blue screen of freezing.
I have one particular computer science professor who can barely program worth a damn. But he sure is good at discrete math.
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
Jason
"FORMAT C:" - Kills bugs dead!
I would say the number of unique patterns are much more important. At least to me in my everyday programming.
Everyone is forgetting that simple tests count as algorithms. No one has mentioned Eistenstein's Criterion, or the Weierstrauss M test, or Miller's Primality tests. Some of these tests are quite deep, and at very least they bear consideration alongside some of the more obvious tests from CS, analysis, and basic math.
:-P but I'd be shot.
Heh, I would say the deepest and most important algorithm is the process of induction
Dijkstra's algorithm is very nice, and it's parallelisble too! I used a varation in a class called the Longest Common Subsequence algorithm and we had to parallelize it.
Dynamic programming =)
I also like radix sorting, BSP trees, and B+ trees. Memory managers (allocators/gc/swaping) are fun too.
The biggest trick the devil pulled was letting lawyers become politicians so they can write the laws.
Reachability, closure, minimum spanning trees, finite state automata minimization, etc., have lots of uses and are some of my favorites.
If you reply, do so only to what I explicitly wrote. If I didn't write it, don't assume or infer it.
But I wasn't able to find that one in Netlib.
Completely offtopic, nice effect though which I always ran on my ZX Spectrum 20 years ago:
for n=1 TO 80:CIRCLE n,n,n: NEXT n
going ontopic again, a circle just would be too slow to draw without the BRESENHAM algorithm for slow processors.
Mathematics are also very important. Think taylor rows (correct translation? "Taylorreihen"). Without it we wouldn't have many of the mathematical functions.
But before you even use taylor, you need to have efficient multiplication and division algorithms for floating point numbers.
You know there's some guy still in the shower...
OK, so it's 1987, and I'm 8 years old. My family has just gotten our first computer, an IBM PS/2 Model 30 -- one of the systems with BASIC in ROM. I''ve taken up writing in BASIC, and do so in most of my free time. Which, as an eight-year-old, is a considerably amount of time. I'd taught myself all about Boolean logic, loops, etc., etc.
This is the part that I don't remember, probably because it's been obliterated by my family repeating the story so often. I've been in the shower for something like half an hour when my mother starts knocking on the door, wanting to know if I'm OK. I insist that I'm fine. This process is repeated for a while until they finally force me to get out, no doubt prune-like by this time. My mother asks me what in the world I've been doing in the shower for so long.
I point to the directions on the back of the bottle and say, simply, "Wash. Rinse. Repeat."
-Waldo Jaquith
Hey, without them, bye bye Doom, Quake, Unreal, Half-life, etc...
...is of course: BUBBLE SORT!
Why? It's the only sort algorithm you can ALWAYS remember off the top of your head. (Besides, optimizations are for version 2.0).
Jake
Dating: while( 1 ){ call_girl(); get_rejected(); drink_40(); } return 0;
Where x is the number of people in the elevator and y is the number of people who know for sure who farted.
However, this is one case in which the "constant" factor (the range) is likely to outweigh the actual O(N) factor, so the O(N) notation is misleading. (The range isn't really constant of course - if you wanted to include that you could call it O(N+M)).
Thanks for the algorithm though!
Female Prison Rape in NY
Suppose I knew binary search was a fast way to find something in a sorted array, in O(log n). Of course I'd put all my strings in an array and use binary search, right? No, a better solution is probably to use a hash table, which is O(1). But by not understanding data structures and algorithms, you're not going to realize that problems can be transformed like that. It's the when all you have is a hammer, everything looks like a nail problem.
I really believe that the world does not need more ignorant programmers producing junk code because they don't understand basic CS principles. And you don't need a CS degree either, just some fairly basic knowledge of algorithms, complexity, data structures, and when they apply.
-Kevin
...You may remember me from such algorithmic steps as "Expand my MinTerms and Don't Cares", "Group by Ones", "Compare the Pairs and Cover the Set", and "Find the Prime Implicants".
...oh wait that's the Troy-McClure method...
Guess my prof didn't pronounce it quite right (or I wasn't quite listening).
Great for minimizing the number of logic gates in a circuit, but we had to do it by hand for electrical engineering exams - so tedious! Certainly gave proof to why we now use computers for such mindless monkey-work.
My next sig will be ready soon, but friends can beat the rush!
recently it has been shown that RSA is not that great of an algorithm after all. New theories have shown that 1024-bit keys are not safe enough. The complexity of number factoring (though full of cool deep algorithms like the "Number Field Sieve") are not yet fully understood and seem to be easier computable then was previeously thought.
Time will tell if this is going to lead to some form of world chaos becuase certain powers will be capable of cracking the worlds secrets (HTTPS, SSH, IPSec, S/MIME, PGP).
Female Prison Rape in NY
while (!isSorted (array))
array.swap (random (0, length), random (0, length));
...the one that instructs my Mandrake 8.2 installation to show 25 minutes remaining for the last 15 minutes...
+1 Insightful, -1 Troll. What can I say, I'm an Insightful Troll.
1-click shopping
Thank you for making my day :-)))))))))))))))
0 001 11 1
Probably faster than a Sun E10000 running this [much simpler] equivalent program in java:
:)");
class basic {
public static void main(string args[]) {
long x = 0;
try {
while (true) System.out.println(x++);
} catch (Exception e) {
System.out.println("An exception ocurred
}
}
}
I'm guessing you don't know what ROT13 is. ROT13 is an "encrypting" algorithm used in e-mail and newsgroups that simply adds 13 to each letter (ie, it "rotates the alphabet by 180 degrees"). Most e-mail clients and news readers still have an "apply ROT13" option. I meant it as a joke, of course.
My all time favorite algorithm would have to be the first one i learned:
10 print hello;
20 goto 10
Basically, if you have a lot of network-linked boxes that you want to use for performing some parallel task, you run into network bottlenecks sometimes depending on how the network is structured. Esp. if you have a couple nodes which are doing a lot of communication, they can tie up a segment of the network, and all the other nodes get hurt.
Two Phase Random Routing simply says, if you want to send data to some node, don't send it straight there. First send it to a random other node, who will forward it on.
Amazingly, this fixes the problem.
I don't remember if this was more effective for some networks/applications than others, but I thought it was cool.
"What thou shalt not, I shalt did!" -Bart Simpson
I think what Knuth means by "deep algorithm" is one that seems fundamental, something that tells us about the nature of reality, not necessarily something that is useful.
- Have a picture
I nominate the de Casteljau algorithm for frame independent generation of curves and surfaces from control points by interpolation between the points.
The algorithm sits on a mathematically rigorous foundation in affine (i.e. "frame independent" or "not based in a particular coordinate system") geometry, the study of which is quite fascinating (and complex) and highly recommended. (Book plug: Curves and Surfaces in Geometric Modeling by Jean Gallier. ISBN 1-55860-599-1. Heavy theory-- this is a math book. However, it directly applies to computer graphics.)
Implementation of the algorithm and its extensions (such as the progressive version known as the de Boor algorithm) gives us polynomial and Bézier (spline) curves and surfaces and subdivision (which gives the CS implementor control over level of detail).
Perhaps a reader can help elaborate on this and other algorithms in the curves and surfaces domain?
How about Shor's algorithm? As useful quantum computing gets closer to reality every day, undoubtedly quantum algorithms such as Shor's will become increasingly more important.
Gotta get me one of these!
How is it that the nodes are dynamically resizable? Once a node is created, it has a fixed size. If you use sentinals for head and tail they may need to change size, but not very often. Saying that the nodes are changing size during runtime is flat out wrong.
And as for locking, a skiplist is fast enough that locking the whole thing isn't much of a penalty. Besides, if you're clever enough about it you can lock just a portion of the list and not the whole thing (lock top-down, and pre-decide how high the new node will be). True, that makes the code somewhat more complex, but that's nothing compared to any of the tree structures.
Hmmmm ... speccies ...
... when sorting meant bubble sorts ... now there's an algorithm .. the kind of algorithm you pull out of your head because you didn't know enough to look up alternatives.
Wonderful little putes, especially liked the version of Basic. Easy & powerful, learn it in an afternoon. Ahhhh those were the days
Bitter and proud of it.
This may be a bit of a stretch -- but I have to mention the Beowulf algorithm: fill a room with cheap PCs, string together with scrounged network hardware, add Linux and MPI/PVM, and poof, you have a supercomputer.
That original list of 10 certainly hit the war-horses -- Monte-Carlo, matrix decomposition, FFT -- without which life would be nasty, brutish, and short.
True. I agree 99%.
... took no time to do and worked as advertised. Also used graph algorithms in that too but had to modify them pretty severely.
The other 1% is for weird situations where you want some weird variation on a sort etc or its an algorithm that's in a library not ported to your platform/language so you have to actually code the algorithm. I did this once for some code that determined optimum paths through a network that was changing in real time while the object was moving. I found that the library versions of quicksort made the code too complicated, sorry I forget all the details, so I rewrote it
Bitter and proud of it.
Here's an important one that I bet will be overlooked: Hindley-Milner type inference. It's what makes programming in statically-typed languages require even less type annotations than languages like C!
Don't forget that Milner got a turing award, in part for his work on type systems.
This is a BASIC program running on a real computer, and therefore it accepts inputs that are not explicitly written in the program.
One of these inputs is the BREAK keystroke (exact key depends on the type of computer). That input causes the program to halt. Another is the power connection. If this is removed, the algorithm halts as well. ;-)
It would seem that all real computers are subject to the latter constraint. Thus it would seem that all physically realizable programs (meaning, you can write them and run them on a machine, rather than just talk about them in broad terms) halt. Thus, in the grand scheme of things, they're ultimately eligible to be algorithms on this point due to artifacts of the implementation. :-)
--JoeProgram Intellivision!
:)
I had some fun at the expense of my TA in an intro CS course I took. It was a Java course (yuck) and the TA was a real condecending jerk (which is funny bacuse the professor was a nice guy). Now this course was for people with zero programming experence. I had a fair amount, but had to take it anyways because that is just how you did things in the CS major. The combination of that and the TA made me look for ways to make trouble. Soooooo...
We had a homework assignment that required us to do some various thigns, I don't remember all of it, but one of them was to sort a pretty large list of things. The type of sort wasn't specified. I assume we were supposed to use qucik sort since we had learned it and the code for it was on the course page. However the professor told us that what counted with our programs was having clean, readable code and getting the job done, we could do things our own way to a large degree.
So I wrote the most inefficient sort (short of something like this) I could think of. It was a recursive, bubble sort. It started at the beginning of the list and checked to see if the two items it was looking at were in order. If so, it incrimented it's counter, if not it switched the order. Then it called itself.
As you can imagine this lead to rather a lot of memory usage, and apparently it ran like crap on the TA's computer since it was old, slow and didn't have a lot of memory to start with. I got a kick out of it since when talked to the professor about it, he decided I deserved full credit, since it DID work, just not optimally.
The guessing, the program, or both?
--JoeProgram Intellivision!
I think the translation you want is Taylor Series. Those infinitely long algebraic series for expressing transcendental functions line sine, cosine, etc. Right?
--JoeProgram Intellivision!
As one of my profs loves to put it "No real science has the word 'science' in it". Physics, Chemistry as compared to Social Science or Dropping Mad Science.
And then there is Dijkstra's ubiquous quote/Attrition header "Computer Science is no more about computers than astronomy is about telescopes."
I know this is OT but what would you call CS if you couldn't use the S? Computers? Algorithmics? Fingering Finite State Machines? Gasp, Information Technology? (BTW I think Technology is about as appropriate as Science is as a root noun).
What is music when you despise all sound?
Therefore I nominate the least fixed-point of the lambda-calculus:
\x(xx)
If nothing else, 3 or 4 months ago Steve Jobs was glowing on stage at some conference touting how much the Mac kicks the butt of the PC in BLAST speed. No one, of course, bothered to mention that you'd be crazy to try to run BLAST with even a bacterial genome on a personal computer of any sort. It's efficient, but come on.
The most important algorithm I have used in the last 10 years.
Threaded AVL trees.
It is amazing how much code I have "fixed" or
improved by dumping a:
List with a sort function
binary trees
simple AVL trees
loading data and then sorting it.
This is the most underused yet best bang for the
buck algorithm/data structure out there.
I have used it for directed , undirected graphs,
user interfaces, event handling, cacheing algorithms, data flow algorithms, searchs user information etc. The overhead is minimal and
a known runtime is so important. The automatic
reblancing has known points to make it thread
safe and the ability to linear process through
the tree makes it a replacement for any list were
someone is searching for data.
Leslie Donaldson
BGP's routing algorithm and those of its its cousins and ancestors. Without this routing algorithm, you couldn't read /.
Tastes like burning! - Ralph Wiggum
- Genetic algorithms.
- Neural networks.
- Rule learning / Inductive logic programming algorithms.
- Reinforcement learning.
- Bayesian learning systems.
Admittedly, many of these are actually "classes" of algorithms. There are fairly canonical examples of each though. It is also very important to note that all learning can be phrased as a search process. Hence, all searching techiniques [best first, depth first, A*, etc.] have a very important role in all of learningSince I work with them everyday, I have to support them.
Seriously though, they are very important (and for more things then just good game AI).
Regards,
Mark
Berlinski, author of "A Tour of the Calculus" (a damn good book), later wrote "The Advent of the Algorithm". It's on my to-read stack. I would think many slashdotters would be interested in reading it, and most slashdotters would be interested in reading the last comment on Amazon's review section. :-)
Check out a dictionary of algorithms and data structures at:
http://www.nist.gov/dads
My favorite algorithm, so simple yet so powerful, is the Fast Folding Algorithm, the one used by the seti@home client in your computer to detected repetitions in the signal, it's also used to detect unknown pulsars in space and I have experimented successfully with it on BPM detection in musical signals.
Look it up, you'll like it.
lone.
When science "matures", it becomes technology and engineering. Science, by definition, is the eternal process of charting the unknown, and re-examinating the known.
Try limiting the number of processes it can spawn first: "ulimit -u 100" or something like that on bash. Then you start up top in another window to watch the results.
I tried it on my machine (after syncing the disks) and didn't have to hard boot, but it took literally minutes to kill the damn thing off. Linux tries to split CPU time between processes rather than between users, it seems, and so one root login seems a thousandth as important the scheduler as 1000 spinning forkbombs.
I don't suppose there's any kernel patches like the O(1) scheduler, but which implement a "be fair to multiple users" scheduler instead?
this was one of the first that i learned - i used it just the other day to explain to some art grad students what an algorithm is.
I haven't had much formal compsci training (yet) but I've always loved the way bottom-up parsers work. It's so counterintuitive at first glance, but when you finally grok it it's so simple.
Hey, you try to find an open nick these days!
While this may not quite fit, my favorite implementation of an algorithm has to be strcpy in C, whose hart is:
while (*src++ = *dst++);
If you fully understand this single line, you've past the "beginner" stage...
Also, a more-esoteric (though applicable) algorithm is the infamouse (and cool) swap of two variables without a third. Also a one-liner in C:
a ^= b ^= a ^= b;
or for the nit-picky:
if (a != b) a ^= b ^= a ^= b;
Anywho, these are the elegant examples that made me stick with Comp Sci long enough to learn RSA, et. al.
yeah you're right. Sarah Flannery actually cracked it herself. link here.
"I can't understand why people are frightened by new ideas. I'm frightened of old ones."
Gore didn't claim he invented the Internet, but lots of idiots claim he claimed to invent the Internet. So, where does that leave you?
What Gore did claim was that he took initiative in creating the Internet, which he did. He drafted and sponsored key funding bills for NSFnet. The initiative put Internet access into the hands of univerisity students across all disciplines and, I think, proved that a large "Internet" could attract broad interest.
Evolutionary Computations. Defining a fitness metric for some problem and then searching the space using Darwin's principle of natural selection. It has done wonders for biological computing systems, and shows(has shown) promise for getting good solutions to many "hard" problems.
bash-2.04$
bash-2.04$yes "Don't you hate dialup connections?"| write USERNAME
I mean really, what other algorithm also helps you move and pack a truck?
-Bill
SlashSig Karma: Excellent (mostly affected by moderatio
How on Earth could Euclid's algorithm be the most important CS algorithm? I'll be the first to say Euclid's algorithm is really cool (and I believe I did actually, two days ago on an unrelated matter), but how useful is it?
If we ignore for the moment the fact it isn't really CS at all, when was the last time you needed a GCD? Maybe I'm mathematically naive, but I can't think of one single use of a GCD. I'm sure there are plenty, but are there any outside of maths, physics, engineering, etc? Is there a general use of GCDs, like there is for say crypto or graphs?
Does a GCD have a use in writing an operating system, or a programming language? When was the last time you saw a gcd function provided to a programmer in a standard library?
I'd argue that depth-first search is even more fundamental (topological sort is based on it). You can also compute strongly connected components using 2 DFS passes. Another fundamental graph algorithm would be the breadth-first search. I guess it depends on how you define fundamental, but I'd say a simple algorithm that is used to build simple algorithms.
I have an unpublished "superalgorithm" in my desk drawer... Seriously, it is true.
But, should I first try to patent it or should I publish it to get scientific credit?
Cannot make up my mind. Please advice, with no nonsense arguments.
Pessimal Algorithms and Simplexity Analysis Read it---you'll like it. Find out the best algorithm to use if your boss makes you sort a list in Paris.
chown -R gore /net
I've used this on several of my assignments in my algorithms class. And the beauty is, it solves any problem!
Assume there exists an optimal solution O. Then we have:
Opt()
return O
end
Proof of Correctness:
O is the optimal solution.
The algorithm returns O.
Therefore, the algorithm returns the optimal solution.
Running Time Analysis:
The algorithm returns O, which can be done in constant time. Therefore, the entire algorithm is O(1).
This answer generally recieves minimum credit.
Johnia Machine is definitely the way to go...
_______________________________
"I'm not Conceited...I'm just a realist..."
Why doesnot anyone mention GAs?
I had heard a lot about GAs ( initial work by John Holland) before and was fascinated by the natural appeal of the idea: evoluation and "survuval of the fittest" strategy. Intrigued, i recently used a GA to solve a complex problem and was truly amazed by its efficiency. On the same kind of problems the classical solutions take longer(much longer) time.
But GAs face their share of criticism. For example a strong solution/chromosome in a population can lead the entire population to follow(just like real life), or when after some iterations the difference between the best and worst solutions is not too much... the algorithm stops. The trick is then to have "Diversity" in the chromosome population( think about the Immigration schemes by the developed countries) and simultaneously allowing the solution to "Converge". It would be wrong not to mention R.B Holstein whose Selection Criteria are of trumendous value for handling both Diversity and Convergance at the same time.
Given everything, i think GAs should be ranked in the top 10 algorithms.
Voltaire: God is dead.
God: Voltaire is dead!
Do either of you even know what an algorythm is?
Without a doubt (illustrated in C):
int main (char** argv)
{
printf("Hello World\n");
exit(0);
}
Appearantly it is the fundemental building block upon which all programming languages are based.
Probability provides a way of summarizing the uncertainty that comes from our laziness and ignorance (Russell & Nor
- A* algorithm (generic AI problem solving algorithm.)
- Dijstra's minimum path (and other graph algothms.)
- Risch algorithm (Maple uses this to integrate arbitrary expressions.)
- Toom-Cook/FFT, Montgomery's algorithm (big number multiplies.)
- Introspective sort. (Hybrid of Quick sort and Heap sort which gives great average and worst time complexity.)
- Various pseudo-prime/factoring tests. There are a number of "random trial" algorithms that work unusually/unexpectedly well.
- Karmarkar's algorithm (fast average and worst time complexity Linear program solver.)
- Arithmetic encoding, PPMD, BWT (state of the art in compression algorithms which are pretty damn good.)
- The DCT/iDCT algorithm (video/image compression.)
- Peterson's Critical Section algorithm (great for multitasking.)
- "Dynamic Programming".
- Good Hashing algorithms.
Who is this mister Knuth to say that computer science is not yet mature? If CS brought us UNIX, and even a CS student can program something as wonderful as Linux, then I say Computer Science is as mature as I want it to be, thank you very much. And to this Mr. Knuth I ask, do you even know anything about Computer Science?
And an even more irrelevant side note... I once addressed Noam Chomsky as "Mr Chomsky", and when I realized my mistake and apologized he said "That's not a problem. Only my enemies call me "Professor Chomsky".
-wjc.
"I figure you're here 'cause you need some whacko who's willing to stick his finger in the fan. So who are we helping?
the algorithm par excellence to realise the Self, knowing which everything else is known!
Why not use HeapSort always, which has the same time complexity but lower space complexity (O(n))?
Sounds interesting. Got any documentation or source?
I recently found the listings (after losing them for a couple years). They're a bit large to OCR.
I've got two copies of the source on damaged Starplex(tm) diskettes - 8" floppies, NOT in CPM format, with bent envelopes.
If you know anyone in the silicon valley area that can read Starplex diskettes or OCR 8 1/2 x (whatever printer paper was) fanfold listings, let me know. (Or if you're feeling like typing in 50ish pages of stuff... B-) )
Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
Shouldn't it be the "Top 1024"?
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
Heh, oops, make the line:
if(n1 != 0) n1 = gcd(long n1, long n2);
instead:
if(n1 != 0) n1 = gcd(n2, n1 % n2);
My mistake.
Computer Science is no more about computers than astronomy is about telescopes. --E. W. Dijkstra
The halting problem is regarding PROGRAMS, not algorithms.
Programs and algorithms are _not_ the same thing.
You are somewhat correct, but very misguided. The thread here is that if an "idea" doesn't terminate then it's not an alg. I can clearly devise an alg. to test another alg. / program. However, the halting problem states that I can never know for sure if this input ever terminates. Here, the input is a program, it's not a program itself. Infact, when we talk about TMs we often mention "On input which is the encoding of a machine..." thus we are supplying as input what you call a program.
I will stipulate that not all algs. are programs, since I can device a non-deterministic alg. (even using an oracle) that I can not program in the same way (ie, I can't make it poly time on a deterministic machine). However, I would like to know of one program that can not be defined via an alg.
Wheeeee