This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CMSC 451:Fall 2011 Clyde Kruskal Practice Problems for the Final Exam Disclaimer: These are practice problems for the upcoming final exam. This does NOT reflect the length, difficulty, or coverage of the actual exam. Problem 1. Consider a mergesortlike algorithm that splits a list into three equal sized lists, recursively sorts each list, and merges the three lists into a single sorted list. You may assume that the original list size is a nice number. (a) How fast can you merge the three lists? Count the number of comparisons exactly. (b) Write a recurrence for the number of comparisons your algorithm uses. (c) Solve the recurrence. You may use the master theorem. (d) How does this algorithm compare to standard merge sort? Problem 2. Assume that two teams A and B are playing a tournament where the first team that wins n individual games wins the tournament. Team A has probability p of winning each game (so Team B has probability 1 p of winning each game). At any given point in the tournament Team A has j games left to win, and Team B has k games left to win....
View
Full
Document
This note was uploaded on 01/13/2012 for the course CMSC 451 taught by Professor Staff during the Fall '08 term at Maryland.
 Fall '08
 staff

Click to edit the document details