Algorithm: Difference between revisions
imported>Bohdan Leonid Shmorhay m (minor copyedit) |
imported>Bohdan Leonid Shmorhay m (minor copyedit) |
||
Line 1: | Line 1: | ||
An algorithm is a sequence of steps used to solve a problem. A cooking recipe can be considered an example of an algorithm, although the term is more frequently applied to the information processing instructions used in computer programs. | An algorithm is a sequence of steps used to solve a problem. A cooking recipe can be considered an example of an algorithm, although the term is more frequently applied to the information processing instructions used in computer programs. | ||
An algorithm is the underlying recipe steps (print the value of X) rather than the actual computer program source code used to execute the | An algorithm is the underlying recipe steps (print the value of X) rather than the actual computer program source code used to execute the steps (PRINT X). When encoded in computer programs, algorithms operate on data values, preferably data maintained in a consistent [[data structure]]. Thus an algorithm is the recipe, while the data structure is the well-stored ingredients on which the recipe is designed to operate. | ||
Nicklaus Wirth, the inventor of the programming language Pascal, titled one of his books "Algorithms + Data Structures = Programs" (ISBN 0130224189) to indicate the complementary nature of algorithms and data structures, and their centrality to computing. | Nicklaus Wirth, the inventor of the programming language Pascal, titled one of his books "Algorithms + Data Structures = Programs" (ISBN 0130224189) to indicate the complementary nature of algorithms and data structures, and their centrality to computing. |
Revision as of 18:42, 20 August 2007
An algorithm is a sequence of steps used to solve a problem. A cooking recipe can be considered an example of an algorithm, although the term is more frequently applied to the information processing instructions used in computer programs.
An algorithm is the underlying recipe steps (print the value of X) rather than the actual computer program source code used to execute the steps (PRINT X). When encoded in computer programs, algorithms operate on data values, preferably data maintained in a consistent data structure. Thus an algorithm is the recipe, while the data structure is the well-stored ingredients on which the recipe is designed to operate.
Nicklaus Wirth, the inventor of the programming language Pascal, titled one of his books "Algorithms + Data Structures = Programs" (ISBN 0130224189) to indicate the complementary nature of algorithms and data structures, and their centrality to computing.
Algorithms are usually expressed independently of the programming language, typically in terms of a brief, informal list of commands called pseudocode, or diagrammatically in the form of a flowchart.
Examples of different kinds of algorithms used in computer programming include:
- Bounding limit
- Compression
- Conversion
- Encryption
- Fourier transform
- Geometric
- Graphic
- Numeric
- Probabilistic
- Searching
- Sorting
- Text string
The classic texts on computer programming algorithms include three volumes written by Donald Knuth collectively titled "The Art of Computer Programming" (ISBN 0201485419).