







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








Instructions. You have 120 minutes to complete this exam. You may have two page of notes (8.5x11.5 two-sided) but may not use any other sources of information, including electronic devices, textbooks, or notes. Leave at least one seat between yourself and other students. Please write clearly. If we cannot read your writing, it will not be graded.
Honor Code. This course operates under the rules of the College of Engineering Honor Code. Your signature endorses the pledge below. After you finish your exam, please sign on the line below:
I have neither given nor received aid on this examination, nor have I concealed any violations of the Honor Code.
A. Multiple choice (18 points) In this section, each question will have zero or more correct answers. You are to circle each correct answer and leave uncircled each incorrect answer.
[3 points each, -1 per incorrect circle/non-circle, minimum 0 points per problem]
๏ท โ๐โ๐ (๐ฉ(๐, ๐) โง โ๐((๐ โ ๐) โ ยฌ๐ฉ(๐, ๐)))
๏ท โ๐โ๐ (๐ฉ(๐, ๐) โง โ๐((๐ โ ๐) โ ยฌ ๐ฉ(๐, ๐))) ๏ท โ๐โ๐โ๐ ((๐ฉ(๐, ๐) โง (๐ฉ(๐, ๐) โ (๐ = ๐)))
B. More multiple choice (14 points) In this section, each question will have zero or more correct answers. You are to circle each correct answer and leave uncircled each incorrect answer.
[2 points each, -1 per incorrect circle/non-circle, minimum 0 points per problem]
๏ท 3
๏ท 1
๏ท - ๏ท -
๏ท 10
๏ท Roll two dice A: The first die is a โ1โ B: The second die is a โ1โ
๏ท Flip two coins A: The first coin is a head B: The two coins are the same
๏ท Flip three coins. A: The first coin is a head B: The second and the third are tails
๏ท Draw two cards from a deck of 52 cards without replacement A: The first card is a jack B: The second card is an ace
๏ท It is ฮฉ (n)
๏ท It is ๏(n^2 )
๏ท It is ๏(n log n) ๏ท It is O(nlog(n))
๏ท ๐ด โ (๐ด โฉ ๐ต)
๏ท ๐ด โ ๐
๏ท ๏(N^2 log(N))
๏ท O(N^2 )
๏ท ๏(N^2 log(N)) ๏ท ๏(N^3 )
๏ท ๏(Nlog(N)) ๏ท ๏(Nlog(N))
๏ท ๏(N^2 )
๏ท O(N)
๏ท The shortest path between two vertices in a weighted graph is unique if the weights of edges are distinct. ๏ท It is possible to cross all of the bridges shown exactly once and finish at the place where you started. ๏ท It is possible to cross all of the bridges shown exactly once and not finish to the place where you started. ๏ท Dijkstraโs algorithm does the same thing as the Floyd-Warshall algorithm, but faster.
j:= while(j<N) j=j* for (i:= 1 to 5) if(A[i]>A[j]) A[j]=A[j]+
D. Conditional probability (12 points)
Compute the following values (you can provide an answer that can trivially be input into a calculator): (7 points -1.5 per wrong or blank answer, minimum 0)
E. Public key encryption (8 points)
a. Let n=22, and e=3. What is the decryption key, โdโ? Briefly explain/justify your answer. [5]
b. In your own words, explain why it is that one can find the decryption key in part a, but in general having only โnโ and โeโ wonโt let you easily find the decryption key for โreal- worldโ instances of RSA. [3]
G. Graphs (10 points)
Let G be a simple graph with n vertices. a. What is the maximum number of edges G can have? [2]
b. If G is connected, what is the minimum number of edges G can have? [2]
c. Show that if the minimum degree of any vertex of G is greater than or equal to ๐โ 2 , then G must be connected. [ 6]
H. Solving a recurrence relation (8 points)
Find a closed-form solution to the following recurrence relation:
๐๐ = 2๐๐โ1 + 8๐๐โ2; ๐ 0 = 1, ๐ 1 = 7
J. Last problem (5 points) 20 hockey players have scored a total of 155 points this season. Show that at least two of them must have scored the same number of points.