Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[1 ] (14 pts.) Binary Tutorial 5's proof of the correctness of toBinary (m) establishes that any nonnegative integer m can be represented in binary.

image text in transcribedimage text in transcribed
image text in transcribedimage text in transcribed
[1 ] (14 pts.) Binary Tutorial 5's proof of the correctness of toBinary (m) establishes that any nonnegative integer m can be represented in binary. Now you'll show that this binary representation is unique or, at least, unique up to leading zeros. (For example, we can represent 7 in binary as 111 or 0111 or 00111, but only 111 has no leading zeros.) Prove that every nonnegative integer m that can be represented as a n-bit string is uniquely rep- resented as a n-bit string. In other words, prove the following claim: Claim. For any integer n 2 0, let a := (On, On-1, ...,40) and b := (b,, b,-1, . ..,bo) be two (n + 1)-bit sequences. If _"_ a;2' = _"- b,2' then a; = b; for all i e {0, 1,..., n}. Your proof should be by mathematical induction on n. Use the 7-step process from Lectures 7-10. Hint: Note that this is a proof of an "if LHS then RHS" statement, rather than a LHS=RHS so you'll want to adjust everything accordingly. Hint: Use the fact about sums of powers of 2 from Lecture 7.Step 0: State the (innite set of) statements you want to prove a for all n 2 , we want to show that Step 1: State your P(n) (a function with codomain {T, F}) o for any n 2 , let P(n) be the property that . WTS P(n) is true V n 2 _. Step 2: State & prove your base case. a As a base case, consider when n= . We will show that P(_) is true. Step 3: State your induction hypothesis. 0 For the induction hypothesis, suppose (hypothetically) that P(k) were true for some k 2 _. Step 4: State your inductive assertion. a We want to prove P(k+i) is true, using the (hypothetical) induction assumption that P(k) is true. Step 5: Prove the inductive step. a The proof that P(k+'|) is true (given the assumption that P(k) is true) is as follows Step 6: Conclusion. 0 The steps above showed that for any k2_, if P(k) is true, then P(k+'l) is also true. Combined with the base case, which shows P(_) is true, we have shown P(n) is true for all n2_

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Calculus

Authors: Dale Varberg, Edwin J. Purcell, Steven E. Rigdon

9th edition

131429248, 978-0131429246

More Books

Students also viewed these Mathematics questions

Question

Find all x R that satisfy the inequality 4 Answered: 1 week ago

Answered: 1 week ago

Question

c. Are there any prerequisites for the course?

Answered: 1 week ago