Midterm 2. DO NOT turn this page until you are instructed to do so

Similar documents
University of California Berkeley CS170: Efficient Algorithms and Intractable Problems November 19, 2001 Professor Luca Trevisan. Midterm 2 Solutions

COMPSCI 611 Advanced Algorithms Second Midterm Exam Fall 2017

COMPSCI 611 Advanced Algorithms Second Midterm Exam Fall 2017

Practice Second Midterm Exam I

Design and Analysis of Algorithms April 16, 2015 Massachusetts Institute of Technology Profs. Erik Demaine, Srini Devadas, and Nancy Lynch Quiz 2

Efficient Algorithms and Intractable Problems Spring 2016 Alessandro Chiesa and Umesh Vazirani Midterm 2

CS 170 Algorithms Spring 2009 David Wagner Final

Do not turn this page until you have received the signal to start. Please fill out the identification section above. Good Luck!

CSE548, AMS542: Analysis of Algorithms, Fall 2016 Date: Nov 30. Final In-Class Exam. ( 7:05 PM 8:20 PM : 75 Minutes )

UC Berkeley, CS 174: Combinatorics and Discrete Probability (Fall 2008) Midterm 1. October 7, 2008

University of New Mexico Department of Computer Science. Final Examination. CS 362 Data Structures and Algorithms Spring, 2007

NAME: Be clear and concise. You may use the number of points assigned toeach problem as a rough

CS1800 Discrete Structures Spring 2018 February CS1800 Discrete Structures Midterm Version A

Notes for Lecture 21

CMPSCI 311: Introduction to Algorithms Second Midterm Exam

University of New Mexico Department of Computer Science. Final Examination. CS 561 Data Structures and Algorithms Fall, 2006

CSL302/612 Artificial Intelligence End-Semester Exam 120 Minutes

Econ 172A, Fall 2012: Final Examination (I) 1. The examination has seven questions. Answer them all.

EECS 126 Probability and Random Processes University of California, Berkeley: Fall 2014 Kannan Ramchandran November 13, 2014.

CMPSCI 611 Advanced Algorithms Midterm Exam Fall 2015

Midterm 1 for CS 170

EECS 126 Probability and Random Processes University of California, Berkeley: Spring 2017 Kannan Ramchandran March 21, 2017.

Practice Second Midterm Exam III

Designing Information Devices and Systems I Spring 2018 Midterm 1. Exam Location: 155 Dwinelle Last Name: Cheng - Lazich

Design and Analysis of Algorithms May 12, 2011 Massachusetts Institute of Technology. Practice Final Exam. Problem Title Points Parts Grade Initials

Algebra 2 CP Semester 1 PRACTICE Exam

NATIONAL UNIVERSITY OF SINGAPORE CS3230 DESIGN AND ANALYSIS OF ALGORITHMS SEMESTER II: Time Allowed 2 Hours

Notes for Lecture 14

ACO Comprehensive Exam 19 March Graph Theory

Exam Practice Problems

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016)

MA EXAM 2 Form 01

Computational Complexity and Intractability: An Introduction to the Theory of NP. Chapter 9

Graph-theoretic Problems

CPSC 320 (Intermediate Algorithm Design and Analysis). Summer Instructor: Dr. Lior Malka Final Examination, July 24th, 2009

Algorithms Exam TIN093 /DIT602

Math 54 First Midterm Exam, Prof. Srivastava September 23, 2016, 4:10pm 5:00pm, 155 Dwinelle Hall.

Fall 2017 Qualifier Exam: OPTIMIZATION. September 18, 2017

Quiz 1 Date: Monday, October 17, 2016

November 20, Problem Number of points Points obtained Total 50

Shorts

Chapter 3 Study Guide

Exam 1 MATH 142 Summer 18 Version A. Name (printed):

Designing Information Devices and Systems I Summer 2017 D. Aranki, F. Maksimovic, V. Swamy Midterm 2. Exam Location: 100 Genetics & Plant Bio

a b c d e GOOD LUCK! 3. a b c d e 12. a b c d e 4. a b c d e 13. a b c d e 5. a b c d e 14. a b c d e 6. a b c d e 15. a b c d e

a b c d e GOOD LUCK! 3. a b c d e 12. a b c d e 4. a b c d e 13. a b c d e 5. a b c d e 14. a b c d e 6. a b c d e 15. a b c d e

One side of each sheet is blank and may be used as scratch paper.

(1) Which of the following are propositions? If it is a proposition, determine its truth value: A propositional function, but not a proposition.

NP-Complete Problems and Approximation Algorithms

Data Structures in Java

Determine the size of an instance of the minimum spanning tree problem.

(Practice Version) Midterm Exam 2

Midterm Exam 2 (Solutions)

CS103 Handout 22 Fall 2012 November 30, 2012 Problem Set 9

Midterm II. Introduction to Artificial Intelligence. CS 188 Spring ˆ You have approximately 1 hour and 50 minutes.

U.C. Berkeley Better-than-Worst-Case Analysis Handout 3 Luca Trevisan May 24, 2018

Your exam contains 5 problems. The entire exam is worth 70 points. Your exam should contain 6 pages; please make sure you have a complete exam.

CS483 Design and Analysis of Algorithms

1.225 Transportation Flow Systems Quiz (December 17, 2001; Duration: 3 hours)

Evaluate and simplify.

University of Toronto Department of Electrical and Computer Engineering. Final Examination. ECE 345 Algorithms and Data Structures Fall 2016

Computational Models

UNIVERSITY OF SASKATCHEWAN Department of Physics and Engineering Physics

Math 301 Final Exam. Dr. Holmes. December 17, 2007

University of Ottawa

MAE140 - Linear Circuits - Fall 14 Midterm, November 6

DEPARTMENT OF STATISTICS AND OPERATIONS RESEARCH OPERATIONS RESEARCH DETERMINISTIC QUALIFYING EXAMINATION. Part I: Short Questions

Designing Information Devices and Systems I Spring 2019 Midterm 2. Exam Location: Cory 521 (DSP)

Math 123 Elem. Calculus Fall 2014 Name: Sec.: Exam 4 Bonus Questions

Math 22 Fall 2018 Midterm 2

QUESTIONS 1-46 REVIEW THE OBJECTIVES OF CHAPTER 2.

Do not open this exam until you are told to begin. You will have 75 minutes for the exam.

Mathematical Thinking Exam 2 20 November 2017

Physics 218 Exam II. Spring 2017 (all sections) March 20 th, 2017

Physics 121, Midterm Exam #3 Tuesday April 20, am 9.30 am. Do not turn the pages of the exam until you are instructed to do so.

Algorithms Re-Exam TIN093/DIT600

NP-Completeness. Until now we have been designing algorithms for specific problems

CSE 355 Test 2, Fall 2016

Math 54 Second Midterm Exam, Prof. Srivastava October 31, 2016, 4:10pm 5:00pm, 155 Dwinelle Hall.

6-A2 Problem Solving Using Inequalities Alg 1H

Algorithms Design & Analysis. Approximation Algorithm

Midterm II. Introduction to Artificial Intelligence. CS 188 Spring ˆ You have approximately 1 hour and 50 minutes.

ME C85/CE C30 Fall, Introduction to Solid Mechanics ME C85/CE C30. Final Exam. Fall, 2013

CSE 312 Foundations, II Final Exam

Discrete Wiskunde II. Lecture 5: Shortest Paths & Spanning Trees

Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths

U.C. Berkeley CS294: Spectral Methods and Expanders Handout 11 Luca Trevisan February 29, 2016

MIDTERM: CS 6375 INSTRUCTOR: VIBHAV GOGATE October,

ECS122A Handout on NP-Completeness March 12, 2018

CIS 375 Intro to Discrete Mathematics Exam 3 (Section M004: Blue) 6 December Points Possible

Latitude and Longitude

Kansas City Area Teachers of Mathematics 2018 KCATM Math Competition NUMBER SENSE GRADE 8 NO CALCULATOR

CSCE 750 Final Exam Answer Key Wednesday December 7, 2005

Exam 1 KEY MATH 142 Summer 18 Version A. Name (printed):

Algorithm Design and Analysis (NTU CSIE, Fall 2017) Homework #3. Homework #3. Due Time: 2017/12/14 (Thu.) 17:20 Contact TAs:

CS294: PCP and Hardness of Approximation January 25, Notes for Lecture 3

ECONOMETRICS I. Cheating and the violation of any of the above instructions, lead to the cancellation of the student s paper.

. Section: Your exam contains 4 problems. The entire exam is worth 60 points.

Math 235: Linear Algebra

Midterm 1. Your Exam Room: Name of Person Sitting on Your Left: Name of Person Sitting on Your Right: Name of Person Sitting in Front of You:

Transcription:

University of California Berkeley Handout M2 CS170: Efficient Algorithms and Intractable Problems November 15, 2001 Professor Luca Trevisan Midterm 2 DO NOT turn this page until you are instructed to do so You have 75 minutes to complete this midterm. It is a closed book exam, and you can use one double-sided cheat sheet. Your desk must be clear of notes (other than the cheat sheet), books, calculators, etc. Give your solutions on the empty space after each problem. Use the back of the pages or the white pages at the end for notes or calculations. Write clearly and legibly and be concise. Good luck! Grade Problem 1 /1 Problem 2 /4 Problem 3 /7 Problem 4 /6 Problem 5 /7 Total /25 Graded by Problem 1. [1 point] Provide the following information Your name: Your SID number: Your section number (and/or your TA name): Name of the person on your left (if any): Name of the person on your right (if any):

Handout M2: Midterm 2 2 Problem 2. Consider a undirected graph G = (V, E) with nonnegative weights w(i, j) 0 on its edges (i, j) E. Let s be a node in G. Assume you have computed the shortest paths from s, and minimum spanning tree of the graph. Suppose we change the weights on every edge by adding 1 to each of them. The new weights are w (i, j) = w(i, j) + 1 for every (i, j) E. (a) Would the minimum spanning tree change due to the change in weights? Give an example where it changes or prove that it cannot change. (b) Would the shortest paths change due to the change in weights? Give an example where it changes or prove that it cannot change.

Handout M2: Midterm 2 3 Problem 3. There has been a lot of hype recently about Star Wars Episode II with the release of the newest theatrical trailer. For this problem, suppose you are managing the construction of billboards on the Anakin Skywalker Memorial Highway, a heavily-travelled stretch of road that runs west-east for M miles. The possible sites for billboards are given by numbers x 1, x 2,..., x n, each in the interval [0, M] (specified by their position along the highway measured in miles from its western end). If you place a billboard at location x i, you receive a revenue of r i > 0 You want to place billboards at a subset of the sites in {x 1,..., x n } so as to maximize your total revenue, subject to the following restrictions: 1. Environmental Constraint. You cannot build two billboards within less than 5 miles of one another on the highway. 2. Boundary Constraint. You cannot build a billboard within less than 5 miles of the western or eastern ends of the highway. A subset of sites satisfying these two restrictions will be called valid. Example Suppose M = 20, n = 4 and {x 1, x 2, x 3, x 4 } = {6, 8, 12, 14} {r 1, r 2, r 3, r 4 } = {5, 6, 5, 1} Then the optimal solution would be to place billboards at x 1 and x 3 for a total revenue of 10. Give an algorithm of running time polynomial in n, that takes an instance of this problem as input, and returns the maximum total revenue that can be obtained from any valid subset of sites.

Handout M2: Midterm 2 4

Handout M2: Midterm 2 5 Problem 4. In a country with no antitrust laws, m software companies with values W 1,..., W m are merged as follows. The two least valuable companies are merged, thus forming a new list of m 1 companies. The value of the merged company is the sum of the values of the two companies that merged (we call this value the volume of the merge). this continues until only one company remains. Let V be the total reported volume of the merges. For example if initially we had 4 companies of value (3,3,2,2), the merges yield and V = 4 + 6 + 10 = 20 (3, 3, 2, 2) (4, 3, 3) (6, 4) (10) Let us consider a situation with initial values W 1,..., W m, and let V be the total volume of the merges in the sequence of merges described above. Prove that merging the smallest pair at each step results in the minimum possible total volume after all companies are merged (i.e., V V where V is the result of our algorithm and V is the result of any other algorithm for merging companies).

Handout M2: Midterm 2 6 Problem 5. Given a satisfiable system of linear inequalities a 11 x 1 + + a 1n x n b 1 a m1 x 1 + + a mn x n b m we say that an inequality is forced-equal in the system if for every x that satisfies the system, the inequality is satisfied as an equality. (Equivalently, an inequality i a ijx i b j is not forced-equal in the system if there is an x that satisfies the whole system and such that in that inequality the left-hand side is strictly smaller than the right-hand side, that is i a ijx i < b j.) For example in x 1 + x 2 2 x 1 x 2 2 x 1 1 x 2 0 the first two inequalities are forced-equal, while the third and fourth are not forced-equal. Observe that, in any satisfiable system, there is always a solution where all inequalities that are not forced-equal have a left-hand side strictly smaller than the right-hand side. In the above example, we can set x 1 = 1 and x 2 = 3, so that we have x 1 < 1 and x 2 < 0, as well as x 1 + x 2 = 2 and x 1 x 2 = 2. Given a satisfiable system of linear inequalities, show how to use linear programming to determine which inequalities are forced-equal, and to find a solution where all inequalities that are not forced-equal have a left-hand side strictly smaller than the right-hand side.

Handout M2: Midterm 2 7

Handout M2: Midterm 2 8

Handout M2: Midterm 2 9