Recurrence Relations & Number Theory Questions

Question 1: Recurrence Relations: (50 points)

(a) Solve the following recurrence and prove your result is correct using induction: a1 = 1 a2 = 3 an = an−2 + 2bn/2c

(b) Solve the following recurrence: an + 9an−1 − 108an−3 = 0 a0 = 9, a1 = 9, a2 = 243

(c) There are n students competing in a school science fair. Each student can either compete on their own (individually) or by pairing up with someone else. Let T (n) be the number of ways for the students of the school to compete in the science fair. For example, if n = 3, then students 1, 2, 3 could compete as: {1}, {2}, {3} or {1, 2}, {3} or {1, 3}, {2} or {1}, {2, 3}, which is a total of 4 possibilities. Write a recurrence fo T (n) including your base cases. Use the recurrence to solve for T (4), T (5) and T (6).

(d) A mouse is sitting in the bottom-left corner of an m × n chessboard. The mouse can move either right by one square or up by one square. The goal is to reach the cheese in the top right corner. Let M (m, n) be the number of different paths the mouse can take to reach the cheese. Write a recurrence for M (m, n), including the base cases. Solve the recurrence for m = 3, n = 3.

(e) Write a recurrence for the number of possible outcomes of flipping a coin n times such that there are no 3 heads in a row. You do not need to solve the recurrence. (f ) Let g(n) : N → N where g(n) = n2 + n. Express g(n) as a recurrence.

(g) A construction worker is tiling a pathway into a newly built home. The pathway has length n. There are black stones of length 1, brown and white stones of length 2, and grey stones of length 3. The worker places the stones one after the other to create a patterned walkway. Let W (n) be the number of ways to tile a pathway of length n using these stones. Write a recurrence W(n), including the base cases. Suppose that the neighbor requests a similar walkway, but doesn’t want two stones of size 2 adjacent to each other. Write a new recurrence for the number of different possible for the neightbor. Include your base cases. You do not need to solve the recurrence. 1

Question 2: Number Theory (50 points)

(a). Let p = 683 and q = 577. Show how to create public and private keys of RSA encryption using these two primes. Encode the message m = 100 and show how it is successfully decoded.

(b) Suppose Jeff would like to receive a message from John using RSA encryption. Jeff selects two primes, determines that n = 3953 and selects a public key e = 19. In preparing to send the information to John, he sends n correctly but accidentally leans on his calculator before sending e, and sends off 192 in the place of e. John encrypts his message using the keys that he receives, not knowing that there is an error in the public key e. Jeff receives the message s = 138. How can he decode it using the private key d = 403? Explain why your solution is correct.

(c) Recall the problem of Jeff and John from above. The next day, Jeff decides he can do better. Jeff is determined to send the correct information! Using the same primes, he computes n = 3953 and e = 19 and d = 403. He sends off the values 3953 and 403 to John. John receives these keys and doesn’t know there is an error in the public key. Again! He encodes his message and sends it off. Jeff receives the message s = 3885. Explain how Jeff can decode this message, even though it was encoded with the private key. What does this work?

(d) Solve the equation below for x, y ∈ Z using the extended Euclidean algorithm: 43845x + 342y = 9 (e) Use number theory to explain why we can’t make all possible postages over k cents using 6 and 27 cent stamps. Use number theory to explain why we can make any postage of at least 12 cents using 4 and 5 cent stamps. (Hint: consider the division algorithm where d = 4).

(f ) Solve x3 − 4×2 + 8x = 0 mod 16. There are four solutions. (g) For each of the following, solve for x or prove that there is no solution: • 6x = 2 mod 48 • 5x = 2 mod 48 • 10x = 2 mod 48 • 10x = 0 mod 48 (h). Evaluate the following using the theorems and definitions from class. • 7663 mod 67 • 134160 mod 17 • 134160 mod 67 2

Do you have a similar assignment and would want someone to complete it for you? Click on the ORDER NOW option to get instant services at EssayBell.com