Skip to main content

Subsection 8.5.2 The Usefulness of Constructive Proofs

Constructive proofs are often more useful than direct ones because they yield actual values that we can use.

We’ve already seen one example of this.

Prove that, for every prime number, there exists a larger one. In our proof that there is no largest prime (back in our discussion of proof by contradiction), we showed not only that such a larger one must exist, but we gave an algorithm for computing it: Define the sequence pi of prime numbers, where p1 = 2, p2 = 3, and so forth. Now consider the nth prime number, which we can write as pn. Then q, as computed here, must be a prime number greater than pn:

q = (p1p2p3 … pn) + 1.

In our proof by contradiction that there is no largest prime, we showed why q must, in fact, be prime.

Now let’s look at another example.

Prove that every quadratic equation with real coefficients has at least one root.

First, notice that, while we didn’t say so explicitly, this claim has the form of an existential quantifier inside a universal one:

 quadratic equations ( root)

The proof is by construction: Any quadratic equation can be written as: y = ax2 + bx + c, where a is not 0.

Then the root(s) are given by the quadratic formula: x= (-b±√(b^2-4ac))/2a

To complete the proof, we must show that this formula is correct:

Let: x_1= (-b+√(b^2-4ac))/2a and x_2= (-b-√(b^2-4ac))/2a These are the two roots.

Notice that a (x – x1) (x – x2) = 0 has solutions x1 and x2. Notice also:

Thus x1 and x2 are also solutions to ax2 + bx + c.

So we know not only that roots exist. We know what they are.

Prove that, for every positive integer n there exists a sequence of n consecutive positive integers containing no primes. For example, if n is 3, such a sequence would be 8, 9, 10. Another such sequence is 24, 25, 26. Again, notice the form of this claim:

n ( sequence of consecutive positive nonprime integers of length n)

We’ll prove this claim by construction, which has the advantage of giving us an example of the desired sequence for any value of n.

How should we start designing our construction? The first thing we notice is that we need numbers that are composite. That means that every one of them must have some nontrivial (not itself or 1) factor. And that has to be true not just of the first one but of all the others that we get by adding 1, 2, etc. to it. Recall that n! (n factorial) is defined to be 123 … n. We observe that n! has a lot of factors. And, in particular, every positive integer less than or equal to n is a factor. This might be a good place to start.

The sequence that we need is the sequence of n integers starting with (n+1)! + 2. To see why this works, observe:

Call the first element of the sequence x. Then we have:

\(x = (n+1)! + 2 \)

The rest of the numbers in the sequence will then be x + 1, then x + 2, and so forth up to x + (n – 1). That’s n of them. To set the stage for the rest of the sequence, let’s think of the first one as x + 0:

x + 0 = (n+1)! + 2 + 0 Then we also have:

x + 1 = (n+1)! + 2 + 1

… x + (n – 1) = (n+1)! + 2 + (n – 1)

More generally, for every value of i between 0 and (n – 1), we have:

[1] x + i = (n+1)! + (2 + i)

= (n+1)! + (i + 2)

Now, since i is less than n, i + 1 must be less than or equal to n and i + 2 must be less than or equal to (n+1). So i + 2 is one of the factors of (n+1)! Let’s rewrite (n+1)! so that we list the factors up to i + 2, then i + 2, then the remaining ones. That gives us:

[2] x + i = (1  2  …  i  (i + 1)  (i + 2)  … n  (n + 1)) + (i + 2)

(Don’t worry about what happens if i were, say, 2. We’ll still include it only once in the expansion above. We’ve shown 2 explicitly here just to make it clear what’s going on.)

Notice that the right hand side of [2] is the sum of two quantities, both of which have (i + 2) as a factor. So we can factor it out, which produces:

[3] x + i = (i + 2)  ((1  2  …  i  (i + 1)  … n  (n + 1)) + 1)

Now we see that x + i must be composite because it has two factors, neither of which is 1. (Since i starts at 0, i + 2 must be at least 2. In fact, that’s why we had to add 2 to (n+1)! to get the first value in our sequence.)

Exercises Exercises

Exercise Group.

1. Indicate, for each of the following problems, whether it would be a good idea to try a proof by construction. Note: Sometimes a simple proof by single example is thought of as a proof by construction. Don’t count it as that for this purpose.

Part 1.

Prove that the only prime between 1000 and 1010 is 1009.

  1. Try Proof by Construction

  2. Don’t Try Proof by Construction

Answer.
Correct answer is B.
Solution.
Explanation: Proof by construction is generally useful for proving claims of the form, “For every x there exists a y.” It’s not generally useful for proving negative claims, such as this one that says that there does not exist any other prime number between 1000 and 1010. The simplest way to do that is probably just to check each of the candidates.
Part 2.

Prove that every even integer can be written as the sum of two even integers.

  1. Try Proof by Construction

  2. Don’t Try Proof by Construction

Answer.
Correct answer is A.
Solution.
Explanation: This claim can easily be proved by Construction. Given any even integer n, we describe an algorithm for finding the required two integers: They are n/2 and n/2, which are guaranteed to be integers because n is even.
Part 3.

Prove that there is no longest English sentence.

  1. Try Proof by Construction

  2. Don’t Try Proof by Construction

Answer.
Correct answer is A.
Solution.
Explanation: It helps to rephrase the claim as, “For any English sentence, there is a longer one.” Now it’s easy to see that all we need is a procedure that, on input S, returns a sentence that is longer than S. Here’s a simple such procedure: Return “Blake thinks that ‘S’.”
Part 4.

Prove that there exists a power of 2 whose decimal representation contains the digit 9.

  1. Try Proof by Construction

  2. Don’t Try Proof by Construction

Answer.
Correct answer is B.
Solution.
Explanation: All that is required to prove this claim is a single example. 212 = 4096 is one that works.

2.

2. Given any two numbers a and b, prove that, if a < b, then there exists some real number c such that:

a < c < b

Hint: Do the proof by construction. In this case, it probably makes sense to start by writing a formula for c. Then all that remains is to show that the formula is correct.

Answer.

So write your formula. Click here to see ours before you go on. When clicked, should see:

We’ll let c be the average of a and b. So:

c= (a+b)/2

Now we must prove that c is greater than a and that it is less than b. Write out your proof of the first half (a < c). If you need a hint, click here. If clicked, should see:

What we need to show is that the difference between c and a is positive. See if you can do that.

When you’ve finished your proof that a < c, click here to see ours. When clicked, should see:

We show that a must be less than c because c – a is positive:

c – a = (a+b)/2 – a

= (a+b-2a)/2

= (b-a)/2 > 0, since b > a.

Now prove the other required claim, namely that c < b. When you’ve finished, click here to see the complete proof that the required c exists. When clicked, should see:

The proof is by construction. We’ll let c be the average of a and b. So:

c = (a+b)/2

We show that c is strictly in between a and b as follows:

c must be greater than a because c – a is positive:

c – a = (a+b)/2 – a

= (a+b-2a)/2

= (b-a)/2 > 0, since b > a.

c must be less than b because b – c is positive:

b – c = b - (a+b)/2

= (2b-(a+b))/2

= (b-a)/2 > 0, since b > a.

So we have not only that there exists some real number that is strictly between a and b, we have a way to compute such a number.