






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!







CS 1501 Spring 2006 Midterm Exam 3 Name____________________________________
b) Give an example of a well defined problem, for which there is provably no algorithm that can solve this problem. Explain the problem by stating what the input to the problem is, and what would constitute correct output. c) It is known that if any one NP-complete algorithm has a polynomial time algorithm, then every NP-complete problem has a polynomial time algorithm. To establish this fact, computer scientists had to show that if a particular problem A had an efficient (polynomial time) algorithm, then another problem B would also have an efficient (polynomial time) algorithm. Explain how you could show such a fact. HINT: What sort of program would you have to demonstrate? d) What can be said about the man that each woman gets in the standard stable marriage algorithm? That is, from the woman’s point of view, what can be said about how good the man is that she is married to?
Low value
e
integers. You may assume that you have a data type to hold 500 bit integers, and that you have operations for adding, multiplying and mod’ing such integers.
Students: Do not write on this page. Total Score: _________________________________