Sample3 - CSE 830: Design and Theory of Algorithms Sample...

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: CSE 830: Design and Theory of Algorithms Sample Questions for Final Exam Spring 2008 Algorithmic Theory 1. Suppose you optimize the performance of a program by tuning up the most heavily-used parts of the code. However, you are careful not to alter the underlying algorithm. Would you expect the efficiency gain to be bounded by a constant factor of the speedup, whatever the problem being solved or could it increase proportionally greater as the problem size increases? Justify your answer. 2. By using virtual memory, a programmer can build programs and data structures that are larger than the actual RAM available on a machine. Since hard disks are much cheaper than memory, does this mean that the amount of storage used by an algorithm is not very important in practice? Justify your answer. 3. (a) Give a linear-time reduction from the problem of finding the maximum element in an array to sorting. What does this reduction tell us about the upper and lower bounds for each of these problems? (b) Is it possible that we could reduce the problem of sorting to that of finding the maximum element in linear time? Explain. 4. In class, we showed that any NP-Complete problem can be reduced to any other NP-Complete problem in polynomial time. Is the same true for problems in P? That is, can any polynomial time algorithm be converted into any other polynomial time algorithm in polynomial time and using only a polynomial number of calls? Explain why or give a counter-example. 5. Suppose that you are analyzing the Slithy Toves problem, trying to get some idea of its complexity. You are able to reduce Slithy Toves to the Sorting problem by calling your sort() sub-routine a total of O( n ) times and also do O( n ) additional work. What does this tell you about the algorithmic complexity of the Slithy Toves problem? 6. Give an example of a problem that we know cannot be solved in polynomial time (that is, we are sure that it is not in P). What does it mean about another problem if we can reduce your example to that other problem in polynomial time? Will it always be possible to translate the solution in the other direction in polynomial time? solution in the other direction in polynomial time?...
View Full Document

This note was uploaded on 07/25/2008 for the course CSE 830 taught by Professor Ofria during the Spring '08 term at Michigan State University.

Page1 / 4

Sample3 - CSE 830: Design and Theory of Algorithms Sample...

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