pract-fin - CMSC 451:Fall 2011 Clyde Kruskal Practice...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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 mergesort-like 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.

Page1 / 2

pract-fin - CMSC 451:Fall 2011 Clyde Kruskal Practice...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online