{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Practice Final

# Practice Final - Math 55 Sample Final Exam 9 December 2009...

This preview shows pages 1–4. Sign up to view the full content.

Math 55: Sample Final Exam, 9 December 2009 1: (a) Compute 1155 55 mod 17. (b) Find the smallest positive inverse of 10 mod 17. (c) State the Chinese Remainder Theorem. (d) Use the procedure of the Chinese Remainder Theorem to compute 1155 55 mod 170. (e) State Fermat’s little Theorem. (f) Use Fermat’s little Theorem to find the smallest odd prime number which divides 1155 55 1. 2: Choose a positive integer solution ( x 1 > 0 , x 2 > 0 , x 3 > 0) of x 1 + x 2 + x 3 = 42 at random, where each solution has equal probability. (a) What is the probability of selecting (14 , 14 , 14)? (b) What is the probability that at least one of the x ’s is exactly equal to 20? (c) What is the probability that x 1 = 10, given that x 2 = 14? 3: (a) Let B be the set of finite bit strings B = { x |∃ n 0 ( x = b 0 b 1 b 2 . . . b n where b i = 0 or 1) } . Is B finite, countable or uncountable? Why? (b) Let F be the set of all Boolean-valued functions f : N →{ 0 , 1 } of a nonnegative integer variable. Is F finite, countable or uncountable? Why? (c) Given any Boolean-valued function f of a nonnegative integer variable n , can we always find a C program which accepts input n and outputs f ( n )? Why or why not? 4: The cycle C n is the simple graph on vertices V = { 1 , 2 , 3 , . . . , n } with edges E = {{ 1 , 2 } , { 2 , 3 } , { 3 , 4 } , . . ., { n 1 , n } , { n, 1 }} . The cocycle ¯ C n is its complement, with vertices ¯ V and edges ¯ E . Justify your answer to each of the following questions. 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
(a) Determine the cardinality of ¯ E . (b) For which n are C n and ¯ C n isomorphic? (c) For which n does ¯ C n have an Euler circuit? 5: Define the divisibility relation R on Z n = { 1 , 2 , 3 , 4 , . . ., n } by aRb a | b . (a) Define a partial order and prove or disprove that R is one. (b) Let M be the matrix of R . Show that the number d ( j ) of divisors of any integer j Z n is given by the sum of the entries in column j of M : d ( j ) = n summationdisplay i =1 M ij . (c) Evaluate d ( p ) for any prime p Z n and d (2 k ) for any 2 k Z n . (d) Consider the experiment of selecting an integer j from Z n at random, with equal probabilities. Show that E ( d ) n summationdisplay k =1 1 k . 6: Consider the following algorithm: procedure S ( a, b : positive integers ) c := 1 while a negationslash = b if a mod 2 = b mod 2 = 0 a := a/ 2 b := b/ 2 c := 2 c else if a mod 2 = 0 b mod 2 = 1 a := a/ 2 else if a mod 2 = 1 b mod 2 = 0 b := b/ 2 else d := | a b | b := min( a, b ) a := d end if 2
end while return ac end (a) What does S (38 , 14) return? (b) What function of ( a, b ) does S compute? Justify your answer. (c) What is the worst-case complexity of S in terms of a and b ? Justify your answer.

This preview has intentionally blurred sections. Sign up to view the full version.

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

{[ snackBarMessage ]}

### Page1 / 8

Practice Final - Math 55 Sample Final Exam 9 December 2009...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online