CS/MATH 111 Winter 2011
Final Test
The test is 2 hours and 30 minutes long, starting at 8:10AM and ending at 10:40AM
There are 8 problems on the test. Each problem is worth 10 points.
Write legibly
CS/MATH 111 FALL 2013
Final Test
The test is 2 hours and 30 minutes long, starting at 8:00AM and ending at 10:30AM
There are 8 problems on the test. Each problem is worth 10 points.
Write legibly.
CS/MATH 111 SPRING 2011
Final Test
The test is 2 hours and 30 minutes long, starting at 8:10AM and ending at 10:40AM
There are 8 problems on the test. Each problem is worth 10 points.
Write legibly
NAME:
SID:
Problem 1: Find a general solution of the recurrence An = 4An1 4An2 + 3n. Show
your work.
CS111-S16 QUIZ 4A, May. 19, 9-9:30AM
Problem 2: (a) Give the definition of Eulers totient function
CS/MATH111 ASSIGNMENT 2 (Revised Oct. 20)
Due date: 8AM, Tuesday, October 25 (Extended to 8AM, Thursday, October 27)
Individual assignment: Problems 1 and 2.
Group assignment: Problems 1,2 and 3.
Prob
NAME:
SID:
Problem 1: Use the -notation to determine the rate of growth of the following functions:
Function
estimate
11n + 2 + 1/n2
(n)
n2 + 0.01n3 + 3
(n3)
23n + 2n2 log n
(n2 log n)
3 log5 n + 2 n
NAME:
SID:
Problem 1: Use the -notation to determine the rate of growth of the following functions:
Function
estimate
n2 + 0.01n3 + 3
(n3)
23n + 2n2 log n
(n2 log n)
11n log5 n + 3n2 + 5 log9 n (n2)
NAME:
SID:
Problem 1: For each question (a), (b), (c) below, give the formula for the number of lottery
draws and a brief justification (at most 15 words). You do not need to compute the numerical
val
NAME:
SID:
Problem 1: For each question (a), (b), (c) below, give the formula for the number of lottery
draws and a brief justification (at most 15 words). You do not need to compute the numerical
val
CS/MATH111 ASSIGNMENT 1
Due date: 8AM, Tuesday, October 11
Individual assignment: Problems 1 and 2.
Group assignment: Problems 1,2 and 3.
Problem 1: (a) Give an exact formula (as a function of n) for
CS/Math 111 Assignment 2
Jamie Madrigal, 861045596
Problem 1:
(a) Compute 131 (mod 17) by enumerating multiples of the number and the modulus. Show your work.
(b) Compute 131 (mod 17) using Fermats th
CS/MATH111 ASSIGNMENT 1 SOLUTIONS
Solution 1: (a) We first determine the number of letters printed by the first nested for-loop. The j-th
iteration of the outer loop prints 3j + 1 letters, and we need
CS/MATH 111 FALL 2013
SOLUTIONS
The test is 2 hours and 30 minutes long, starting at 8:00AM and ending at 10:30AM
There are 8 problems on the test. Each problem is worth 10 points.
Write legibly. W
NAME:
SID:
Problem 1: Below you are given ve choices of parameters p, q, e, d of RSA. For each choice
tell whether these parameters are correct1 (write YES/NO). If not, give a brief justication
(at mo
NAME:
SID:
Problem 1: For each pseudo-code below, tell what is the number of words printed if the
input is n. Give a recurrence and then its solution (expressed using the Big-Theta notation.)
Pseudo-c
NAME:
SID:
Problem 1: Find the general solution of the recurrence Un = 3Un1 + 4Un2 + 3n . Show
your work.
(i) Characteristic equation and its solution:
(ii) General solution of the homogeneous equatio
NAME:
SID:
Problem 1: (a) Complete the statement of the Master Theorem by lling in the blanks.
Assume that a
,b>
,c>
and d
,
and that T (n) satises the recurrence T (n) = aT (n/b) + cnd.
Then
if
T (
NAME:
SID:
Problem 1: (a) Give a complete statement of the Master Theorem.
(b) Give asymptotic solutions for the following recurrences:
f (n) = 3f (n/3) + n
f (n) = 2f (n/3) + n
f (n) = 4f (n/3) + n
C
Problem 1: (a) Complete the statement of the Master Theorem by lling in the blanks.
See the lecture notes .
(b) Give asymptotic solutions for the following recurrences:
f (n) = 4f (n/2) + 3n
f (n) = 4
NAME:
SID:
Problem 1: We have two shapes of dominoes, 1 1 squares and 2 1
rectangles. Each domino can be of one of two colors (in the gure below,
dark grey or light grey.) Determine the number of ways
CS/MATH 111 Winter 2013
Final Test
The test is 2 hours and 30 minutes long, starting at 7PM and ending at 9:30PM
There are 8 problems on the test. Each problem is worth 10 points.
Write legibly. Wh
CS/MATH 111 Winter 2013
Final Test
The test is 2 hours and 30 minutes long, starting at 7PM and ending at 9:30PM
There are 8 problems on the test. Each problem is worth 10 points.
Write legibly. Wh
NAME:
SID:
Problem 1: For each pseudo-code below, tell what is the number of words printed if the
input is n. Give a recurrence and then its solution (expressed using the Big-Theta notation.)
Pseudo-c