wm@tekchips.UUCP (Wm Leler) (11/14/84)
Well, I'm not sure what this has to do with AI, but my favorite Malgorithm of all time has to do with sorting. When I was an undergraduate the programming class that taught sorting would always give this assignment: Your input will be a sequence of numbers whose values range between 1 and 100 inclusive with no duplicates. Sort them in the smallest possible time. You wouldn't believe the amazingly complex Malgorithm sorts that students wrote trying to satisfy the request for "smallest possible time". As I recall, they didn't know about recursion yet. Have you ever seen an iterative quick sort that drops back into insertion sort for small lists written by a first year programming student? Of course, the solution is to use what is politely called a bucket sort -- have a 100 element array, and just plug the numbers in the right place. They said it couldn't be done, but this is an order n sort. It also takes about 5 minutes to write. Unfortunately, after a few years this assignment got famous and they had to drop it. Wm Leler tektronix!tekchips!wm