{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Computer Science 170 - Spring 1995 - Wolfe - Final

# Computer Science 170 - Spring 1995 - Wolfe - Final -...

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

Solutions to Final Solutions to Final May 18 th 1995 CS170 David Wolfe 1. (30 points) Check one box for each of the following. ALWAYS TRUE SOMETIMES TRUE NEVER TRUE In a connected graph, E= O (V) X In a connected graph, E= (V) X If a directed graph has a depth first forest with no back edges then the graph has n strongly connected components X For a fixed graph G, the Edmonds-Karp algorithm does at least as well as Ford- Fulkerson X TRUE FALSE Log*(m) = O ( α (m,n)) X file:///C|/Documents%20and%20Settings/Jason%20Raft...20Spring%201995%20-%20Wolfe%20-%20Final%20Exam.htm (1 of 8)1/27/2007 5:30:46 PM

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

View Full Document
Solutions to Final For data encryption to be secure against eavesdroppers, two parties must meet in a secure environment to agree on secret keys. X A heap can be designed which takes O ( n ) per INSERT and O (1) per DELETE-MIN X A heap can be designed which takes O (1) per INSERT and O (1) per DELETE-MIN X In a Fibonacci heap, we could assign O (1) amortized cost per DELETEMIN and per DELETE, as long as we assign O (log n) amortized cost per INSERT. X You lost 4 per incorrect answer. If you left "log*(m)= O ( α (m,n))" blank, you lost only 2. (Many students didn't see this question.) 2. (15 points) Alice is deciding between the pseudo-prime test and the randomized primality test. a. What is the strongest reason you can think of to use a pseudo-prime test? b. What is the best reason you can think of to use the randomized pirmality test? a. The pseudo-prime test is good mainly because it is faster. b. By repeating the randomized test many times, Alice has complete control over the probability of success, no matter what number she is testing. 3. (15 points) Hubert is deciding between using binary heaps or Fibonacci heaps. file:///C|/Documents%20and%20Settings/Jason%20Raft...20Spring%201995%20-%20Wolfe%20-%20Final%20Exam.htm (2 of 8)1/27/2007 5:30:46 PM
Solutions to Final a. What is the strongest reason you can think of to use binary heaps? b. One good reason for Fibonacci heaps? a. Binary heaps are simpler, they have guaranteed (rather than amortized) running time for each operation and in practice they work faster since n isn't really that big.

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

Computer Science 170 - Spring 1995 - Wolfe - Final -...

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

View Full Document
Ask a homework question - tutors are online