Algorithm: Expressing Algorithms
Algorithm: Expressing Algorithms
This is an algorithm that tries to figure out why the lamp doesn't turn on and tries to fix it using the steps. Flowcharts are
often used to represent algorithms graphically.
Each algorithm is a list of well-defined instructions for completing a task. Starting from an initial state, the
instructions describe a computation that proceeds through a well-defined series of successive states,
eventually terminating in a final ending state. The transition from one state to the next is not
necessarily deterministic; some algorithms, known as randomized algorithms, incorporate randomness.
Expressing algorithms
http://www.scriptol.com/programming/algorithm-definition.php#Expressing-algorithms
Let's say that you have a friend arriving at the airport, and your friend needs to get from the airport to your
house. Here are four different algorithms that you might give your friend for getting to your home:
The taxi algorithm:
1. Go to the taxi stand.
2. Get in a taxi.
3. Give the driver my address.
The call-me algorithm:
1. When your plane arrives, call my cell phone.
2. Meet me outside baggage claim.
The rent-a-car algorithm:
1. Take the shuttle to the rental car place.
2. Rent a car.
3. Follow the directions to get to my house.
The bus algorithm:
1. Outside baggage claim, catch bus number 70.
2. Transfer to bus 14 on Main Street.
3. Get off on Elm street.
4. Walk two blocks north to my house.
http://computer.howstuffworks.com/question717.htm