Algorithm
From DocForge
| This page is a stub. It's lacking in details and can use your help. Please contribute your knowledge to this page. |
Overview [edit]
An algorithm is a sequence of instructions that can be followed mechanically with no intelligence or input other than that specified by the algorithm itself. The recipe to bake a cake can be considered an algorithm to produce a cake. Algorithms are frequently used as instructions to computers or a sequence of steps to solve problems.
Level of Detail [edit]
As an example of an algorithm, we can examine the different steps in producing a chicken sandwich. At a very high-level, the algorithm may simply be
1. Lay slice of bread down 2. Lay piece of chicken down on bread. 3. Lay slice of bread down on chicken.
We can add more detail to the algorithm:
1. Lay slice of white bread down 2. Lay piece of cooked chicken down on bread. 3. Lay slice of white bread down on chicken.
We an add even more detail to the algorithm as follows:
1. Slice two slices off of a loaf of white bread. 2. Lay 1 slice of bread down. 3. Slice a small piece of chicken off of a whole chicken. 4. Lay the slice of chicken on the first slice of bread. 5. Lay second slice of bread on the chicken.
TODO [edit]
Finish this later - very tired now

