06.03.2017 Views

Mathematics for Computer Science

e9ck2Ar

e9ck2Ar

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

“mcs” — 2017/3/3 — 11:21 — page 143 — #151<br />

5.3. Strong Induction vs. Induction vs. Well Ordering 143<br />

Proof. We use induction. Let P.n/ be the proposition that 2 C 3 C 4 C C n D<br />

n.n C 1/=2.<br />

Base case: P.0/ is true, since both sides of the equation are equal to zero. (Recall<br />

that a sum with no terms is zero.)<br />

Inductive step: Now we must show that P.n/ implies P.n C 1/ <strong>for</strong> all n 0. So<br />

suppose that P.n/ is true; that is, 2 C 3 C 4 C C n D n.n C 1/=2. Then we can<br />

reason as follows:<br />

2 C 3 C 4 C C n C .n C 1/ D Œ2 C 3 C 4 C C n C .n C 1/<br />

n.n C 1/<br />

D C .n C 1/<br />

2<br />

.n C 1/.n C 2/<br />

D<br />

2<br />

Above, we group some terms, use the assumption P.n/, and then simplify. This<br />

shows that P.n/ implies P.n C 1/. By the principle of induction, P.n/ is true <strong>for</strong><br />

all n 2 N.<br />

<br />

Where exactly is the error in this proof?<br />

Homework Problems<br />

Problem 5.8.<br />

The Fibonacci numbers F .n/ are described in Section 5.2.2.<br />

Prove by induction that <strong>for</strong> all n 1,<br />

F .n 1/ F .n C 1/ F .n/ 2 D . 1/ n : (5.8)<br />

Problem 5.9.<br />

For any binary string ˛ let num .˛/ be the nonnegative integer it represents in binary<br />

notation. For example, num .10/ D 2, and num .0101/ D 5.<br />

An n C 1-bit adder adds two n C 1-bit binary numbers. More precisely, an<br />

n C 1-bit adder takes two length n C 1 binary strings<br />

˛n WWD a n : : : a 1 a 0 ;<br />

ˇn WWD b n : : : b 1 b 0 ;<br />

and a binary digit c 0 as inputs, and produces a length-(n C 1) binary string<br />

n WWD s n : : : s 1 s 0 ;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!