Midterm Exam Solution

Prove by induction qn 5n 1 50 1 2 q0 which

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: induction: Q(n) = 5n + 1 50 + 1 = 2 = Q(0), which demonstrates that this is true for n = 0. 51 + 1 = 6 = Q(1) (also true for n = 1). We assume that Q(n-1) holds And that Q(n-2) holds Q(n) = 6(5n-1 + 1) – 5(5n-2+ 1) = 6*5n-1 - 5n-1 + 6 –5 = 5*5n-1 + 1 = 5n + 1. 5n-1 + 1 5n-2 + 1 3b) Let n = n6n5n4n3n2n1n0 for some decimal number n. Prove that 11|n if and only if 11| (n0 – n1 + n2 - n3 + n4 – n5 + n6). n = d0 + 10 * d1 + 100 * d2 + … + 10kdk. Alternate sum of the digits of number n is: dk – dk-1 + dk-2 - … + (-1)kd0 Let us consider the following expression: E = (10 + 1) * (d0 + 10(d1 – d0) + 100(d2 – d1 – d0) + … + 10k(dk – dk-1 + dk-2 - … + (-1)kd0)) – 10k+1(dk – dk-1 + dk-2 - … + (-1)kd0). After performing careful multiplication, one can see that E = n. A term that has a factor of (10 + 1) or 11, is divisible by 11. Thus n is divisible by 11 whenever 10k+1(dk – dk-1 + dk-2 - … + (-1)kd0) is divisible by 11. Since 10k+1 is not divisible by 11 and 11 is a prime, we can make a conclusion that n is divisible by 11 if and only if dk – dk-1 + dk-2 - … + (-1)kd0 is divisible by 11. This number is the alternate sum of digits of n....
View Full Document

This document was uploaded on 02/26/2014 for the course ECE 490SIC at Drexel.

Ask a homework question - tutors are online