Algorithms and Data Structures

Started by
9 comments, last by Flint 21 years, 3 months ago
An algorithm has a specific definition... you can find the definition in many books, particularly the Art of Computer Programming has a good one.

It takes input
It does something to it
It has an output
It must produce a result in a finite number of steps
It must be possible to replicate the results of an algorithm with pen and paper (it is finite, and conceivable, that a human being can do it)

There are types of code that are not algorithms... sometimes you call them heuristics, sometimes you call them procedures.. in any case, they do not meet the definition of what an algorithm is.

A data structure is just a means of applying an algorithm onto a structure (in computer memory). Data structures are meant to store data in a consistent way that it is possible to use an algorithm to find that data, and manipulate it. An array is a basic data structure.

Algorithms and data structures go hand in hand.

Yes, the Sedgewick books are great for a resource on the topic. The Art of Computer Programming is the de facto academic books, very hard, but very detailed. Sedgewick studied under Knuth so it''s no surprise his books are good... and for most purposes I think you are much better off with Sedgewick than Knuth unless you are interested in academic issues and code that runs on a virtual machine in assembler

Hrrm as for it''s applicability to AI... the science of AI pretty much fathered the art of algorithms and data structures. Languages like Lisp incorporated the idea of linked lists into programming concepts. We take link lists for granted now.. once it was considered an AI concept.

The best book around I know of on the basics of Ai is "AI: A modern approach" by Peter Norvig and others. It contains information about AI topics, algorithms and data structures.
It''s used in intro AI courses in college.
















This topic is closed to new replies.

Advertisement