Find the error in the following argument: Theorem. All computer programs contain the same number of bugs. Proof. If we show that any set of n programs contains the same number of bugs, then we have proved the theorem. We argue by induction on n. If n=1 then in any set of 1 program, all the programs contain the same number of bugs, so the statement is true, in this case. Now suppose that for every set of programs containing less then n programs, all the programs have the same number of bugs. Let DD be a set of n programs p1,p2,…,pn. Now the set D1={p2,…,pn} contains n−1 programs and hence they all contain the same number of bugs, by the induction hypothesis. Similarly the set D2={p1,…,pn−1} contains n−1 programs and hence they all contain the same number of bugs. In particular p1 and pn contains the same number of bugs as the other programs in the set. Hence all the programs contain the same number of bugs.
Find the error in the following argument:
Theorem. All computer programs contain the same number of bugs.
Proof. If we show that any set of n programs contains the same number of bugs, then we have proved the theorem. We argue by induction on n.
If n=1 then in any set of 1
Now suppose that for every set of programs containing less then n programs, all the programs have the same number of bugs. Let DD be a set of n programs p1,p2,…,pn. Now the set D1={p2,…,pn} contains n−1 programs and hence they all contain the same number of bugs, by the induction hypothesis. Similarly the set D2={p1,…,pn−1} contains n−1 programs and hence they all contain the same number of bugs. In particular p1 and pn contains the same number of bugs as the other programs in the set. Hence all the programs contain the same number of bugs.
Step by step
Solved in 2 steps