MTH 202 Assignment #4 Solution:
Q-1:
How many bit strings of length 10 have
a) Exactly three 0’s?
b) The same number of 0’s as 1’s
Solution:a) Exactly three 0’s?
b) The same number of 0’s as 1’s?
Q-2
Prove by mathematical induction that for all positive integral values of n, x2n-1 is divisible by x +1 ;( x¹1)
Solution:using mathematical inductionstep 1: first we will prove that for n =1 it is truethus x^2n-1 = x^2-1 = (x-1)*(x+1) clearly since it has factor of x+1 we can say that x^2n-1 is divisible by x-1step 2: let assume that for n = k it is true thusx^2k-1 is divisible by x+1thus we can write as x^2k-1 = P (x+1) P is quotientnow we have to prove that it is true for n=k+1step 3: now let n = k+1 thusx^2(k+1) - 1 = x^(2k+2) - 1 = x^2k*x^2 -1 = (x^2k-1+1)x^2 - 1(x^2k-1)*x^2 + (x^2-1)for step 2 we can write above equation asP (x+1)*x^2 + (x+1)*(x-1) = (x+1)* (Px^2+x-1)which contain factor of x+1 thus divisible by x+1thus even it is proved for n=k+1according to mathematical induction given is true for all integral values of n
Q:3
Use the Euclidean algorithm to find gcd (1331, 1001)
Solution:
gcd(1331, 1001) = gcd(1001, 330)
= gcd(330, 11)
= gcd(11, 0)
= 11