Question

In: Computer Science

se strong induction to show that every positive integer, n, can be written as a sum...

  1. se strong induction to show that every positive integer, n, can be written as a sum of powers of two: 20, 21, 22, 23, .....
  2. Give recursive definitions of the following sets.
    1. The set of all integers divisible by 5.
    2. The set of all ordered pairs, ( n, m ), where m = n mod 5.

Solutions

Expert Solution

Answer 1: * Using Strong Induction...

Note: For the inductive step, we are separately considering the case where k+1 is even and where it is odd. When it is even, note that (k + 1)/2 is an integer.

For example, if n = 3, assume n = k + 1, that means k + 1 = 3, then we can write k as and can write 1 as . (here 3 can be expressed a sum of two different powers of 2)

Let P(n) be the claim that n can be written as a sum of distinct powers of two.

We show that P(n) is true for all positive integers n.

Base step: Since 1 =    ..we have that P(1) is true.

Inductive hypothesis: Assume for a positive integer k that P(i) is true for all 1 ≤ i ≤ k.

Inductive step: We consider two cases, namely when k + 1 is even and when k + 1 is odd. If k + 1 is even, then (k + 1)/2 is an integer, and by the inductive hypothesis, we can express (k + 1)/2 by a sum of distinct powers of two. We can then multiply this sum by 2, which simply increases the exponent of each power of two by 1, so this is again a sum of distinct powers of two that is equal to k + 1. When k+1 is odd, we have that k is even. By the inductive hypothesis, we can express k as a sum of distinct powers of two. However, since k is even, the sum cannot contain Thus, we can add to this sum, which remains a sum of distinct powers of two, and equals k + 1.

Thus, in both cases, we can express k + 1 as a sum of distinct powers of two, so when P(i) is true for all 1 ≤ i ≤ k, we have that P(k + 1) is true. Since P(1) is true, this means that the claim is true for all positive integers, as shown by strong induction.

Answer 2: * Recursive Definition consists of two steps, basis step and recursive step.

a) The set of all integers divisible by 5

Basis Step: 1 S, 2 S, 3 S, 4 S, OR, 1, 2, 3, 4 S

Recursive Step : If   x S, then   x + 5 S.

b) The set of all ordered pairs, ( n, m ), where m = n mod 5

Basis Step: n S, m S.

Recursive Step: If  x S, then   x + 5 S.

**for a simpler explanation of answer 1, I have added 3 images, please find the handwritten images below:


Related Solutions

Use strong induction to show that every positive integer, n, can be written as a sum...
Use strong induction to show that every positive integer, n, can be written as a sum of powers of two: 20, 21, 22, 23, .....
Use strong induction to show that every positive integer n can be written as a sum...
Use strong induction to show that every positive integer n can be written as a sum of distinct powers of two, that is, as a sum of a subset of the integers 2^0 =1, 2^1 = 2, 2^2 = 4, and so on. [Hint: For the inductive step, separately consider the case where k + 1 is even and where it is odd. When it is even, note that (k + 1)/2 is an integer.]
Use Strong induction to show that any counting number can be written as the sum of...
Use Strong induction to show that any counting number can be written as the sum of distinct powers of 2.
Use induction to prove that for any positive integer n, 8^n - 3^n is a multiple...
Use induction to prove that for any positive integer n, 8^n - 3^n is a multiple of 5.
Prove or disprove that 3|(n 3 − n) for every positive integer n.
Prove or disprove that 3|(n 3 − n) for every positive integer n.
Use mathematical induction to prove that for every integer n >=2, if a set S has...
Use mathematical induction to prove that for every integer n >=2, if a set S has n elements, then the number of subsets of S with an even number of elements equals the number of subsets of S with an odd number of elements. pleases send all detail solution.
1a. Proof by induction: For every positive integer n, 1•3•5...(2n-1)=(2n)!/(2n•n!). Please explain what the exclamation mark...
1a. Proof by induction: For every positive integer n, 1•3•5...(2n-1)=(2n)!/(2n•n!). Please explain what the exclamation mark means. Thank you for your help! 1b. Proof by induction: For each integer n>=8, there are nonnegative integers a and b such that n=3a+5b
P4.4.2 Give a rigorous proof, using strong induction, that every positive natural has at least one...
P4.4.2 Give a rigorous proof, using strong induction, that every positive natural has at least one factorization into prime numbers.
Envision an algorithm that when given any positive integer n, it will print out the sum...
Envision an algorithm that when given any positive integer n, it will print out the sum of the squares from 1 to n. E.g. given 4 the algorithm would print 30 (because 1 + 4 + 9 + 16 = 30) You can use multiplication denoted as * in your solution and you do not have to define it (e.g. 2*2=4) Write pseudocode for this algorithm using iteration (looping). Create a flow chart Implement solution from flowchart in Python at...
show that every function can be expressed as the sum of an even function and an...
show that every function can be expressed as the sum of an even function and an odd function and that there is only one way to do this.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT