Chris Pollett> Old Classes> CS255
( Print View )

Student Corner:
[Submit Sec1]
[Grades Sec1]

[Lecture Notes]
[Discussion Board]

Course Info:
[Texts & Links]
[Description]
[Course Outcomes]
[Outcomes Matrix]
[Course Schedule]
[Grading]
[Requirements/HW/Quizzes]
[Class Protocols]
[Exam Info]
[Regrades]
[University Policies]
[Announcements]

HW Assignments:
[Hw1] [Hw2] [Hw3]
[Hw4] [Hw5] [Quizzes]

Practice Exams:
[Midterm] [Final]

CS255 Spring 2019Practice Midterm

Studying for one of my tests does involve some memorization. I believe this is an important skill. Often people waste a lot of time and fail to remember the things they are trying to memorize. Please use a technique that has been shown to work such as the method of loci. Other memorization techniques can be found off the Wiki Page for Moonwalking with Einstein. Given this, to study for the midterm I would suggest you:

  • Know how to do (by heart) all the practice problems.
  • Go over your notes at least three times. Second and third time try to see how much you can remember from the first time.
  • Go over the homework problems.
  • Try to create your own problems similar to the ones I have given and solve them.
  • Skim the relevant sections from the book.
  • If you want to study in groups, at this point you are ready to quiz each other.

The practice midterm is below. Here are some facts about the actual midterm: (a) It is closed book, closed notes. Nothing will be permitted on your desk except your pen (pencil) and test. (b) You should bring photo ID. (c) There will be more than one version of the test. Each version will be of comparable difficulty. (d) One problem (less typos) on the actual test will be from the practice test.

  1. Give an algorithm that can generate a random permutation of an array of `n` elements that has a span of `O(log n)`.
  2. A Martian year is 668 Martial Days. How many Martians (who are equally likely to be born on any day) need to be in a room before there is a 50% chance that two share a Martian Birthday?
  3. Prove on an ideal parallel computer with `P` processors, a greedy scheduler executes a multithreaded computation with work `T_1` and span `T_(infty)` in time
    `T_P le T_1/P + T_(infty)`.
  4. Briefly explain how a parallel for loop can be simulated using spawn and sync.
  5. Give a outline of how the BoxSort algorithm works.
  6. Give an example of a map reduce algorithm, making use of a combiner, for computing word count.
  7. Suppose 4 good processors were running the Byzantine agreement protocol and there were also 4 faulty processor. Show the faulty process could prevent an agreement.
  8. Let `A` be a deterministic online paging algorithm. Prove `C_A \geq k`.
  9. Suppose we have a 3 page cache and 4 pages: 1,2,3,4. The cache initially has 1,2,3 in it. Consider the page request sequence 2,2,4,1,3,3,1,4,2,3. Explain how MIN would process this sequence, and how the Marker algorithm would process the sequence assuming when it generates a random number it always ends up with the smallest possible value.
  10. Show step-by-step the computation of Extended-Euclid(115,120).