sol_final - CS 482 FINAL EXAM SOLUTION SET (1) (10 points)...

Info iconThis preview shows pages 1–4. 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

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: CS 482 FINAL EXAM SOLUTION SET (1) (10 points) Each of the following statements is false . Give a counterex- ample to each of them. (1a) (5 points) If G is any graph with non-negative edge costs, and e is any edge such that every minimum-cost spanning tree of G contains e ; and every maximum-cost spanning tree of G contains e then every spanning tree of G must contain e . u v w 2 1 3 Figure 1: Counterexample for Problem 1a. Edge e is the edge from u to v . 1 (1b) (5 points) If G is any flow network and f is any maximum flow in G , then it is always possible to assign an integer label ( v ) to each vertex of G , such that every unit of flow is directed from a lower-numbered to a higher- numbered vertex. (In other words, the labeling ( ) has the property that every edge e = ( u,v ) with positive flow value f ( e ) > 0 satisfies ( u ) < ( v ).) 1 2 1 1 1 1 s t Figure 2: Counterexample for Problem 1b. The flow value on each edge is equal to its capacity, and is displayed alongside that edge. (2) (10 points) Each of the following three questions describes a decision problem. Figure out whether the decision problem has a polynomial-time algorithm or is NP-Complete. (2a) (5 points) You are teaching a class with n teaching assistants (TAs). During the semester, you assigned m homework problems. Each homework problem was graded by two TAs; let a i ,b i be the two TAs who graded homework problem i . For each problem, you want to choose one TA to write up the official solution; for problem i , the official solution must be written by either a i or b i . Given a parameter k , determine whether there exists a way to choose an official solution writer for each homework problem, such that no TA has to write more than k solutions in total. There is a polynomial-time algorithm, via a reduction to network flow. (The flow network has a super-source, super-sink, one vertex for each home- work problem, and one vertex for each TA. The upper bound on the number of solutions each TA may write is enforced by inserting an edge of capacity k from each TA vertex to the super-sink.) (2b) (5 points) At Cornell, it is common for classes to have three exams during the semester: two prelims and a final exam. Lets say these exams are 2 offered in particular time slots, numbered 1 , 2 ,... ,n . The university offers classes, numbered 1 , 2 ,... ,m . For each class i , there is an exam schedule Exam i { 1 , 2 ,... ,n } consisting of at most 3 time slots . Two classes have an exam conflict if there is a time slot slot t { 1 , 2 ,... ,n } which belongs to both of their exam schedules. Given the exam schedule for each class, and a parameter k , determine whether there exists a set of k classes such that no two of them have an exam conflict....
View Full Document

Page1 / 9

sol_final - CS 482 FINAL EXAM SOLUTION SET (1) (10 points)...

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

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