Describing Deutsch’s problem
Deutsch’s algorithm solves a problem concerning constant and balanced functions. So, as you start this chapter, I want to make sure that you’re familiar with the terms algorithm, function, constant function, and balanced function. This section covers those essential ideas.
Algorithms
You may have seen friendly signs that display the equivalent of “Welcome!” in many languages. Figure 7.1 does the same kind of thing for a particular sequence of instructions:
Figure 7.1 – Expressing the steps that add 1 to a number
Each part of Figure 7.1 inputs a number and outputs that number plus 1. The parts look different, but they all describe the same sequence of steps. This sequence of steps is an example of an algorithm.
Definition
An algorithm is a sequence of steps.
You can change the way you describe a particular sequence of steps. But when you do, you still have the same algorithm...