Given a stove with the top-right burner warming, how does a Mathematician move a pot from the top-left burner to the top-right burner?
1) Lift the pot 3 inches.
2) Move the pot 18 inches to the right.
3) Lower the pot 3 inches.
4) Call these steps algorithm number 1.
Now, how does a Mathematician move a pot from the bottom-left burner to the top-right burner?
1) Lift the pot 3 inches.
2) Move the pot 12 inches forward.
3) Lower the pot 3 inches.
4) Execute algorithm number 1.
As you can see, an algorithm is a sequence of instructions.
How does a Computer Scientist move a pot on a stove?
How does a Computer Scientist move a pot from the bottom-left burner to the top-right burner?
procedure move_right( pot )
begin
pot.lift( 3, inches )
pot.move( right, 18, inches )
pot.lower( 3, inches )
end
main()
begin
stove.burner_heat( top_right, warm )
pot = stove.create_pot( bottom_left )
pot.lift( 3, inches )
pot.move( forward, 12, inches )
pot.lower( 3, inches )
execute move_right( pot )
end
As you can see, the Computer Scientist moves the pot the same way as the Mathematician, except for the special syntax. Therefore, a computer program is a special case of algorithm. Because this is the definition of a subset, we have a computer program being essentially an algorithm. More specifically, a computer program is an algorithm in a syntax that can be parsed by a compiler, interpreter, virtual machine, or CPU. And because an algorithm is a sequence of instructions, a computer program is a sequence of instructions in a syntax that can be parsed by a compiler, interpreter, virtual machine, or CPU.
Teacher: The sky is blue — except for the white clouds, not during overcast days, not at night, and away from pollution — because ...
Student: You lack knowledge. During a solar eclipse, the sky is dark.
Teacher: The sky is blue — except for the white clouds, not during overcast days, not at night, away from pollution, and not during a solar eclipse — because ...
Student: That's sloppy. During evenings, the sky is orange.
Teacher: The sky is blue — except for the white clouds, not during overcast days, not at night, away from pollution, not during a solar eclipse, and not at evenings — because nitrogen and oxygen scatter the blue wavelength.
This user believes peripherals should not cloud the essence of the message.
This user believes Be Afraid is an unfortunate reality. "You should also learn that Wikipedia users often display ownership of articles they've edited, and jealously guard the fiefdoms and cliques they've developed..."