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

Size: px
Start display at page:

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

Transcription

1 University of Toronto Department of Electrical and Computer Engineering Final Examination ECE 345 Algorithms and Data Structures Fall 2016 Print your first name, last name, UTORid, and student number neatly in the space provided below; print your name at the upper right corner of every page. The exam is thirteen (13) pages including the cover page; if not, report it to the instructor or TA. First Name: Last Name: UTORid: Student Number: This is an open book exam. You are permitted to use the textbook for the course, but nothing else is permissible. Non-native English speakers may use a dictionary. Do all five problems in this booklet. Try not to spend too much time on one problem. Use terminology from the textbook. You must define any different terms before you use them. Write clearly and only in the space provided. Ask the proctor if you need more paper. Do not write on the back of the page. You have 150 minutes for this exam. Raise your hand if you have a question. Do not give C code! Write pseudocode, if asked, and explain your algorithm in English! Analyze time/memory requirements of your algorithms when asked to receive full credit. Happy holidays! Question Points Score Grader Total 100

2 ECE 345 Final Fall Name: 1. (Multiple Choice and True/False, 20 points). Each question is worth 2 points and it has only one correct answer. Write clearly! If we cannot understand your answer, you will receive no credit. 1) Using the Master Theorem, T (n) = 3T ( n 2 ) + n = Θ(nlog 2 3 ) Solution: True. 2) Given an array of n integers, each belonging to { π, 0, π}, we can sort the array in O(n) time in the worst case. Solution: True. We can simply map π to index 2, 0 to index 1 and π to index 0, then run counting sort. 3) An inorder traversal of a Min-Heap will output the values in sorted order. Solution: False. 4) A cycle in a graph G can be detected in O( V ) time. Solution: True. Depth-first search can detect cycles in O( V ) time. Simply stop, once it finds a back edge for the fist time. 5) Prim s algorithm for finding a minimum spanning tree uses dynamic programming. Solution: False. Greedy. 6) All minimum-weight edges in a graph must be in every minimum spanning tree. Solution: False. This only applies to uniquely-minimum-weight edges. 7) The regular expression (a + b) will reject the string aabab. Solution: False. It will match. 8) For any flow network and any maximum flow on G, there exists an edge such that increasing its capacity increases the maximum flow of the network. Solution: False. A counterexample is a graph with two unit capacity edges in a chain. Increasing the capacity of a single edge will not increase the max flow, since the other edge is at capacity. 9) Proving NP-hardness of a decision problem A is done by showing that A can be reduced to a known NP-hard problem in polynomial time. Solution: False. The known problem is reduced to A. 10) Some NPC problems cannot be solved in exponential time. Solution: False. NPC NP-hard.

3 ECE 345 Final Fall Name: 2. (Short Answers, points). Answer only in the space provided. There are four independent questions. (a) Given a sorted array of n elements, write a recursive version of the binary search algorithm modified so that it locates the leftmost occurrence of the search key x found in the array (in the event that there are several occurrences). For example, for the following array A[0... 8], a search on key 4 should return index 2: A = [1, 3, 4, 4, 4, 7, 11, 15, 30]. Solution: Check if x A[mid] and go left or right accordingly, rather than just checking if x = A[mid] and then going left or right if it is strictly bigger or smaller. (b) Let G(V, E) be a connected weighted undirected graph that is not a clique, and let T be a minimum spanning tree in G. Choose u, v V such that u and v have no edge between them. Add edge (u, v) to construct a new graph G (V, E + {(u, v)}), where the weight of (u, v), denoted w(u, v), is set to be strictly larger than all the weights of the edges in E. Prove that T is also a minimum spanning tree of G. Solution: T is a spanning tree in G. Adding any other edge e T from G to T will create a cycle. For every cycle created, the heaviest edge should be removed. We prove that this procedure will not change T. There are two cases: If e = (u, v), then e will be the heaviest edge in the cycle and should be the one to remove because otherwise, the resulting tree will be heavier than T. If e (u, v), then the cycle will be part of G, and hence e must be the heaviest edge in the cycle, because otherwise, one can remove the edge e in the cycle that is heavier than e and obtain a better spanning tree than T in G. Therefore, e must be the edge to remove in G.

4 ECE 345 Final Fall Name: (c) We want to find a feasible solution or determine that no solution exists for the following system of difference constraints using the Bellman-Ford algorithm: x 1 x 4 1 x 1 x 5 4 x 2 x 3 = 9 x 3 x 1 5 x 3 x 5 2 x 4 x 3 3 x 5 x 1 5 x 5 x 4 1 i. Observe that one of the constraints is an equality. Transform the system so that it becomes a set of difference constraints such as the one described in class. Solution: x 1 x 4 1 x 1 x 5 4 x 2 x 3 9 x 3 x 2 9 x 3 x 1 5 x 3 x 5 2 x 4 x 3 3 x 5 x 1 5 x 5 x 4 1 ii. Draw a directed graph representing the system of difference constraints above. Once done, label the source vertex v 0, and other vertices v 1, v 2, v 3, v 4, and v 5 representing variables x 1, x 2, x 3, x 4, and x 5, respectively. Solution: Straightforward. Concerning the equality constraint, it can be replaced by two inequalities: x 2 x 3 9 and x 2 x 3 9, which correspond to the two edges (v 3, v 2 ) and (v 2, v 3 ) of weights 9 and -9 respectively.

5 ECE 345 Final Fall Name: iii. Use the resulting graph to check if there exists an assignment of the variables x 1, x 2, x 3, x 4, and x 5 that satisfies all the constraints. If such assignment exists, find it and give the integer values for each of x 1, x 2, x 3, x 4, and x 5. Otherwise, prove that no solution exists. Solution: The resulting graph has a negative cycle: v 1 v 3 v 4 v 5 v 1 with weight = 1 < 0. Therefore, no feasible solution exists.

6 ECE 345 Final Fall Name: (d) i. Compute the max flow for the graph below. Use Edmonds-Karp algorithm. For each iteration of the algorithm, show the residual graphs with residual capacities on each edge, the augmenting path that the algorithm selects, and how much flow is pushed along that augmenting path. Solution: 3 iterations of Edmonds-Karp suffice. Max flow is 5. ii. Draw the min-cut corresponding to the max flow you found in part (i) below. Solution:

7 ECE 345 Final Fall Name: 3. (Greedy Algorithms, points). Alice is studying Electrical and Computer Engineering at the University of Otnorot. She is taking several classes, each of which have assignments and tests. Given the large workload, Alice must manage her time wisely. At any given day during the semester, she can either work on a single task (i.e. work on an assignment or study for a test) or do nothing. Each task has a release date and due date. In order for Alice to get full marks on a particular task, she must spend every day from the task s release date to its due date working on it. If she puts in part work, she will get part marks: for example, if her ECE345 midterm is due five (5) days after being announced and she studies two (2) days, she will get 40% on it. Some tasks have more weight than others (exams are worth more than assignments). Alice s goal is to maximize her final (weighted) mark. Let T = {t 1, t 2,..., t n } be the set of tasks Alice is assigned throughout the semester. Let B = {b 1, b 2,..., b n } be the release dates (begin dates) of tasks T. Let E = {e 1, e 2,..., e n } be the due dates (end dates) of tasks T. Let W = {w 1, w 2,..., w n } be the weights of tasks T. Assume that for each task t i, 1 i n, b i < e i. Let D be the number of days in the semester (days are units of time). Note: If needed, you can let task 0 be a procrastination task that lasts all semester long (i.e. w 0 = 0, b 0 = 0, e 0 = D). (Of course, choosing to procrastinate for the whole semester will have Alice fail every class!) (a) Describe a greedy algorithm to solve this problem. Solution: This is a variation of the fractional knapsack problem, disguised as a scheduling problem. Start by getting each task s weight/day. At each day throughout the semester, work on the task that has the most weight/day, for tasks that can be worked on (current day is between start and end). For all t i T, v ti = w ti /(e ti b ti )

8 ECE 345 Final Fall Name: (b) Prove that your algorithm yields an optimal solution. Solution: Greedy choice: Let O = {o 1, o 2,..., o D } be an optimal solution. Let G = {g 1, g 2,..., g D } be the greedy solution. If o 1 = g 1, we are done. Otherwise, we know what a) g 1 can replace o 1 since G will pick g 1 among tasks that are scheduled on day 1, and b) v g1 v o1. Swap o 1 with g 1 to get O. value(o ) = value(o) v o1 +v g1. By (b) above, value(o ) value(o), but since O is optimal, value(o ) = value(o) Optimal substructure: Copy-paste argument as in factional knapsack.

9 ECE 345 Final Fall Name: 4. (Shortest Paths, 20 points). Consider the following generalization of the SP problem: Given a directed graph G = (V, E), suppose that in addition to having edge weights {w e : e E}, the graph also has vertex costs {c v : v V }. Now define the cost of a path to be the sum of its edge weights plus the costs of all vertices on the path (including the endpoints). Give a O(( V + E ) log V ) algorithm for the following problem. Input: A directed graph G = (V, E) with positive edge weights w e, positive vertex costs c v, and a source node s. Output: An array cost[ ], such that for every vertex u, cost[u] is the least cost of any path from s to u, based on the definition above. Assume that cost[s] = c s. Solution: For each edge e = (u, v), increase w e by c v. Then run Dijkstra s. The final shortest path has length equal to the sum of the length found by Dijkstra s plus c s (cost of the source).

10 ECE 345 Final Fall Name: 5. (NP-Completeness, 6+14 points). Consider the Minimum Leaf Spanning Tree problem: MIN-LEAF-TREE: Given an undirected graph G, and an integer k is a there a spanning tree in G that contains at most k leaves? (a) Show that MIN-LEAF-TREE is in NP. Clearly explain the form of the certificate, as well as, how to verify it in polynomial time. Solution: Ensure it is spanning tree and it has at most k leaves. It s poly-time to do so. Note: many students assumed the certificate is a tree. This is not correct. We need to verify it is a tree (connected, acyclic). Or equivalently, that it is connected and E = V 1, which implies a tree. (b) Consider the Hamiltionian path problem: HAM-PATH: Given an undirected graph G = (V, E) and two vertices u and v, is a there a simple path between u and v that visits each vertex in V exactly once? Note: This is not the HAM-CYCLE problem seen in class. You may assume that HAM-PATH is NP-Complete (no need to prove it). Show that MIN-LEAF-TREE is NP-hard by reducing it from HAM-PATH. In other words, show that HAM-PATH p MIN-LEAF-TREE. Make sure to show that your reduction takes polynomial time. Solution A (partial marks 16/20): Given an instance of Hamiltonian Path on a graph G = (V, E) we create an instance of the minimum leaf spanning tree problem G, k as follows. We use exactly the same graph, i.e G = G but now we set k = 2. A tree with 2 leaves is a path, so a spanning tree with two leaves is a Hamiltonian path in the graph. So there exists a Hamiltonian path iff there exists a spanning tree with 2 leaves. Note: some students set k = 1. Strictly speaking this is not correct, but we did not penalize, if the student specifically stated that one of the nodes plays the role of the root. Solution B (full marks 20/20): This solution corresponds to the proper interpretation of the HAM-PATH problem as given in this context. That is, u and v are GIVEN as parameters to the problem, and MUST be the endpoints of the hamiltonian path in G. Given an instance of Hamiltonian Path on a graph G = (V, E) we create an instance of the minimum leaf spanning tree problem G, k as follows. Create G by adding one node attached to u (call it u ), and one node attached to v (call it v ). Also set k = 2. If u v hamiltonian path in G, then a spanning tree with at most 2 leaves in G.

11 ECE 345 Final Fall Name: Proof: clearly the hamiltonian path has u and v as endpoints, has no cycles and it is a path that spans all vertices in G apart from u and v. But, if the path is extended to include u and v it remains acyclic, it spans all vertices and still has at most 2 leaves. Thus it is a spanning tree with at most 2 leaves in G. Q.E.D If a spanning tree with at most 2 leaves in G, then u v hamiltonian path in G. Proof: The spanning tree in G has to visit u and v. But then, these two nodes are necessarily leaves in the tree. Thus, no other nodes can be leaves in the tree, since this is a spanning tree with at most 2 leaves. This implies that u and v are included in a hamiltonian path of G that has u and v as endpoints in G. Assume towards a contradiction that u has degree 3 in that hamiltonian path. Consider any of the two edges, but not (u, u ). This edge must connect to a non-leaf node in the spanning tree, unless it is v, or the tree would have more than 2 leaves. In turn, the non-leaf node must connect to another non-leaf node, unless it is v, or the tree would have more than 2 leaves, e.t.c. This implies, that the path from u using the edge we picked must end at v. Similarly, if we consider the other edge, but not (u, u ) (remember we assumed u has degree 3, so it has 3 edges), we conclude that there is another path from u to v. But then, we have a cycle in the spanning tree; a contradiction. Thus u has degree 2 in the spanning tree, and thus it has degree 2 in the hamiltonian path of G. Symmetrically, we prove that v also has degree 2. Therefore, both u and v have degree 2 in the hamiltonian path of G. Now, in G, if we exclude u and v, since they are not part of G, we get a hamiltonian path where u and v have degree 2 1 = 1. Thus, we get a hamiltonian path in G with u and v as its endpoints. Q.E.D Note: the proof is of course much harder here. We had a few students that got it completely right with very very similar proofs. For example, in the second half of the left-to-right direction (the contradiction part), if you just say that the hamiltonian path is acyclic and this implies all non-leaf nodes, like u and v, have degree 2, then the proof gets full marks.

12 ECE 345 Final Fall Name: (this page left intentionally blank)

13 ECE 345 Final Fall Name: (this page left intentionally blank)

14 ECE 345 Final Fall Name: (this page left intentionally blank)

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016)

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016) FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016) The final exam will be on Thursday, May 12, from 8:00 10:00 am, at our regular class location (CSI 2117). It will be closed-book and closed-notes, except

More information

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

University of New Mexico Department of Computer Science. Final Examination. CS 561 Data Structures and Algorithms Fall, 2006 University of New Mexico Department of Computer Science Final Examination CS 561 Data Structures and Algorithms Fall, 2006 Name: Email: Print your name and email, neatly in the space provided above; print

More information

CSI 4105 MIDTERM SOLUTION

CSI 4105 MIDTERM SOLUTION University of Ottawa CSI 4105 MIDTERM SOLUTION Instructor: Lucia Moura Feb 6, 2010 10:00 am Duration: 1:50 hs Closed book Last name: First name: Student number: There are 4 questions and 100 marks total.

More information

CMPSCI 311: Introduction to Algorithms Second Midterm Exam

CMPSCI 311: Introduction to Algorithms Second Midterm Exam CMPSCI 311: Introduction to Algorithms Second Midterm Exam April 11, 2018. Name: ID: Instructions: Answer the questions directly on the exam pages. Show all your work for each question. Providing more

More information

Examination paper for TDT4120 Algorithms and Data Structures

Examination paper for TDT4120 Algorithms and Data Structures Examination paper for TDT4120 Algorithms and Data Structures Academic contact during examination Magnus Lie Hetland Phone 91851949 Examination date December 7, 2013 Examination time (from to) 0900 1300

More information

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

NATIONAL UNIVERSITY OF SINGAPORE CS3230 DESIGN AND ANALYSIS OF ALGORITHMS SEMESTER II: Time Allowed 2 Hours NATIONAL UNIVERSITY OF SINGAPORE CS3230 DESIGN AND ANALYSIS OF ALGORITHMS SEMESTER II: 2017 2018 Time Allowed 2 Hours INSTRUCTIONS TO STUDENTS 1. This assessment consists of Eight (8) questions and comprises

More information

CS 320, Fall Dr. Geri Georg, Instructor 320 NP 1

CS 320, Fall Dr. Geri Georg, Instructor 320 NP 1 NP CS 320, Fall 2017 Dr. Geri Georg, Instructor georg@colostate.edu 320 NP 1 NP Complete A class of problems where: No polynomial time algorithm has been discovered No proof that one doesn t exist 320

More information

CSCE 750 Final Exam Answer Key Wednesday December 7, 2005

CSCE 750 Final Exam Answer Key Wednesday December 7, 2005 CSCE 750 Final Exam Answer Key Wednesday December 7, 2005 Do all problems. Put your answers on blank paper or in a test booklet. There are 00 points total in the exam. You have 80 minutes. Please note

More information

CSE 202 Homework 4 Matthias Springer, A

CSE 202 Homework 4 Matthias Springer, A CSE 202 Homework 4 Matthias Springer, A99500782 1 Problem 2 Basic Idea PERFECT ASSEMBLY N P: a permutation P of s i S is a certificate that can be checked in polynomial time by ensuring that P = S, and

More information

Essential facts about NP-completeness:

Essential facts about NP-completeness: CMPSCI611: NP Completeness Lecture 17 Essential facts about NP-completeness: Any NP-complete problem can be solved by a simple, but exponentially slow algorithm. We don t have polynomial-time solutions

More information

CS 170 Algorithms Spring 2009 David Wagner Final

CS 170 Algorithms Spring 2009 David Wagner Final CS 170 Algorithms Spring 2009 David Wagner Final PRINT your name:, (last) SIGN your name: (first) PRINT your Unix account login: Your TA s name: Name of the person sitting to your left: Name of the person

More information

CSE 421 Introduction to Algorithms Final Exam Winter 2005

CSE 421 Introduction to Algorithms Final Exam Winter 2005 NAME: CSE 421 Introduction to Algorithms Final Exam Winter 2005 P. Beame 14 March 2005 DIRECTIONS: Answer the problems on the exam paper. Open book. Open notes. If you need extra space use the back of

More information

More on NP and Reductions

More on NP and Reductions Indian Institute of Information Technology Design and Manufacturing, Kancheepuram Chennai 600 127, India An Autonomous Institute under MHRD, Govt of India http://www.iiitdm.ac.in COM 501 Advanced Data

More information

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

CPSC 320 (Intermediate Algorithm Design and Analysis). Summer Instructor: Dr. Lior Malka Final Examination, July 24th, 2009 CPSC 320 (Intermediate Algorithm Design and Analysis). Summer 2009. Instructor: Dr. Lior Malka Final Examination, July 24th, 2009 Student ID: INSTRUCTIONS: There are 6 questions printed on pages 1 7. Exam

More information

NP Completeness and Approximation Algorithms

NP Completeness and Approximation Algorithms Winter School on Optimization Techniques December 15-20, 2016 Organized by ACMU, ISI and IEEE CEDA NP Completeness and Approximation Algorithms Susmita Sur-Kolay Advanced Computing and Microelectronic

More information

1. (a) Explain the asymptotic notations used in algorithm analysis. (b) Prove that f(n)=0(h(n)) where f(n)=0(g(n)) and g(n)=0(h(n)).

1. (a) Explain the asymptotic notations used in algorithm analysis. (b) Prove that f(n)=0(h(n)) where f(n)=0(g(n)) and g(n)=0(h(n)). Code No: R05220502 Set No. 1 1. (a) Explain the asymptotic notations used in algorithm analysis. (b) Prove that f(n)=0(h(n)) where f(n)=0(g(n)) and g(n)=0(h(n)). 2. (a) List some of the relative advantages

More information

1. Introduction Recap

1. Introduction Recap 1. Introduction Recap 1. Tractable and intractable problems polynomial-boundness: O(n k ) 2. NP-complete problems informal definition 3. Examples of P vs. NP difference may appear only slightly 4. Optimization

More information

Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths

Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths Matroids Shortest Paths Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths Marc Uetz University of Twente m.uetz@utwente.nl Lecture 2: sheet 1 / 25 Marc Uetz Discrete Optimization Matroids

More information

Summer School on Introduction to Algorithms and Optimization Techniques July 4-12, 2017 Organized by ACMU, ISI and IEEE CEDA.

Summer School on Introduction to Algorithms and Optimization Techniques July 4-12, 2017 Organized by ACMU, ISI and IEEE CEDA. Summer School on Introduction to Algorithms and Optimization Techniques July 4-12, 2017 Organized by ACMU, ISI and IEEE CEDA NP Completeness Susmita Sur-Kolay Advanced Computing and Microelectronics Unit

More information

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

University of New Mexico Department of Computer Science. Final Examination. CS 362 Data Structures and Algorithms Spring, 2007 University of New Mexico Department of Computer Science Final Examination CS 362 Data Structures and Algorithms Spring, 2007 Name: Email: Print your name and email, neatly in the space provided above;

More information

Combinatorial Optimization

Combinatorial Optimization Combinatorial Optimization Problem set 8: solutions 1. Fix constants a R and b > 1. For n N, let f(n) = n a and g(n) = b n. Prove that f(n) = o ( g(n) ). Solution. First we observe that g(n) 0 for all

More information

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

Design and Analysis of Algorithms April 16, 2015 Massachusetts Institute of Technology Profs. Erik Demaine, Srini Devadas, and Nancy Lynch Quiz 2 Design and Analysis of Algorithms April 16, 2015 Massachusetts Institute of Technology 6.046J/18.410J Profs. Erik Demaine, Srini Devadas, and Nancy Lynch Quiz 2 Quiz 2 Do not open this quiz booklet until

More information

Limitations of Algorithm Power

Limitations of Algorithm Power Limitations of Algorithm Power Objectives We now move into the third and final major theme for this course. 1. Tools for analyzing algorithms. 2. Design strategies for designing algorithms. 3. Identifying

More information

Algorithms Exam TIN093 /DIT602

Algorithms Exam TIN093 /DIT602 Algorithms Exam TIN093 /DIT602 Course: Algorithms Course code: TIN 093, TIN 092 (CTH), DIT 602 (GU) Date, time: 21st October 2017, 14:00 18:00 Building: SBM Responsible teacher: Peter Damaschke, Tel. 5405

More information

COMP Analysis of Algorithms & Data Structures

COMP Analysis of Algorithms & Data Structures COMP 3170 - Analysis of Algorithms & Data Structures Shahin Kamali Computational Complexity CLRS 34.1-34.4 University of Manitoba COMP 3170 - Analysis of Algorithms & Data Structures 1 / 50 Polynomial

More information

CS60007 Algorithm Design and Analysis 2018 Assignment 1

CS60007 Algorithm Design and Analysis 2018 Assignment 1 CS60007 Algorithm Design and Analysis 2018 Assignment 1 Palash Dey and Swagato Sanyal Indian Institute of Technology, Kharagpur Please submit the solutions of the problems 6, 11, 12 and 13 (written in

More information

IS 709/809: Computational Methods in IS Research Fall Exam Review

IS 709/809: Computational Methods in IS Research Fall Exam Review IS 709/809: Computational Methods in IS Research Fall 2017 Exam Review Nirmalya Roy Department of Information Systems University of Maryland Baltimore County www.umbc.edu Exam When: Tuesday (11/28) 7:10pm

More information

University of New Mexico Department of Computer Science. Midterm Examination. CS 361 Data Structures and Algorithms Spring, 2003

University of New Mexico Department of Computer Science. Midterm Examination. CS 361 Data Structures and Algorithms Spring, 2003 University of New Mexico Department of Computer Science Midterm Examination CS 361 Data Structures and Algorithms Spring, 2003 Name: Email: Print your name and email, neatly in the space provided above;

More information

NP-Complete Reductions 2

NP-Complete Reductions 2 x 1 x 1 x 2 x 2 x 3 x 3 x 4 x 4 12 22 32 CS 447 11 13 21 23 31 33 Algorithms NP-Complete Reductions 2 Prof. Gregory Provan Department of Computer Science University College Cork 1 Lecture Outline NP-Complete

More information

Greedy Algorithms My T. UF

Greedy Algorithms My T. UF Introduction to Algorithms Greedy Algorithms @ UF Overview A greedy algorithm always makes the choice that looks best at the moment Make a locally optimal choice in hope of getting a globally optimal solution

More information

CS 70 Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1 Solutions

CS 70 Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1 Solutions CS 70 Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1 Solutions PRINT Your Name: Answer: Oski Bear SIGN Your Name: PRINT Your Student ID: CIRCLE your exam room: Dwinelle

More information

CSEP 521 Applied Algorithms. Richard Anderson Winter 2013 Lecture 1

CSEP 521 Applied Algorithms. Richard Anderson Winter 2013 Lecture 1 CSEP 521 Applied Algorithms Richard Anderson Winter 2013 Lecture 1 CSEP 521 Course Introduction CSEP 521, Applied Algorithms Monday s, 6:30-9:20 pm CSE 305 and Microsoft Building 99 Instructor Richard

More information

COMPSCI 611 Advanced Algorithms Second Midterm Exam Fall 2017

COMPSCI 611 Advanced Algorithms Second Midterm Exam Fall 2017 NAME: COMPSCI 611 Advanced Algorithms Second Midterm Exam Fall 2017 A. McGregor 15 November 2017 DIRECTIONS: Do not turn over the page until you are told to do so. This is a closed book exam. No communicating

More information

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

Design and Analysis of Algorithms May 12, 2011 Massachusetts Institute of Technology. Practice Final Exam. Problem Title Points Parts Grade Initials Design and Analysis of Algorithms May 12, 2011 Massachusetts Institute of Technology 6.046J/18.410J Profs. Dana Moshkovitz and Bruce Tidor Practice Final Exam Practice Final Exam Do not open this quiz

More information

NAME (1 pt): SID (1 pt): TA (1 pt): Name of Neighbor to your left (1 pt): Name of Neighbor to your right (1 pt):

NAME (1 pt): SID (1 pt): TA (1 pt): Name of Neighbor to your left (1 pt): Name of Neighbor to your right (1 pt): CS 170 First Midterm 26 Feb 2010 NAME (1 pt): SID (1 pt): TA (1 pt): Name of Neighbor to your left (1 pt): Name of Neighbor to your right (1 pt): Instructions: This is a closed book, closed calculator,

More information

CS 170 Algorithms Fall 2014 David Wagner MT2

CS 170 Algorithms Fall 2014 David Wagner MT2 CS 170 Algorithms Fall 2014 David Wagner MT2 PRINT your name:, (last) SIGN your name: (first) Your Student ID number: Your Unix account login: cs170- The room you are sitting in right now: Name of the

More information

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:

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: CS70 Discrete Mathematics and Probability Theory, Fall 2018 Midterm 1 8:00-10:00pm, 24 September Your First Name: SIGN Your Name: Your Last Name: Your Exam Room: Name of Person Sitting on Your Left: Name

More information

Data Structures in Java

Data Structures in Java Data Structures in Java Lecture 21: Introduction to NP-Completeness 12/9/2015 Daniel Bauer Algorithms and Problem Solving Purpose of algorithms: find solutions to problems. Data Structures provide ways

More information

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

University of New Mexico Department of Computer Science. Final Examination. CS 561 Data Structures and Algorithms Fall, 2013 University of New Mexico Department of Computer Science Final Examination CS 561 Data Structures and Algorithms Fall, 2013 Name: Email: This exam lasts 2 hours. It is closed book and closed notes wing

More information

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

NP-Completeness. Until now we have been designing algorithms for specific problems NP-Completeness 1 Introduction Until now we have been designing algorithms for specific problems We have seen running times O(log n), O(n), O(n log n), O(n 2 ), O(n 3 )... We have also discussed lower

More information

Lecture 18: P & NP. Revised, May 1, CLRS, pp

Lecture 18: P & NP. Revised, May 1, CLRS, pp Lecture 18: P & NP Revised, May 1, 2003 CLRS, pp.966-982 The course so far: techniques for designing efficient algorithms, e.g., divide-and-conquer, dynamic-programming, greedy-algorithms. What happens

More information

CS 6901 (Applied Algorithms) Lecture 3

CS 6901 (Applied Algorithms) Lecture 3 CS 6901 (Applied Algorithms) Lecture 3 Antonina Kolokolova September 16, 2014 1 Representative problems: brief overview In this lecture we will look at several problems which, although look somewhat similar

More information

VIII. NP-completeness

VIII. NP-completeness VIII. NP-completeness 1 / 15 NP-Completeness Overview 1. Introduction 2. P and NP 3. NP-complete (NPC): formal definition 4. How to prove a problem is NPC 5. How to solve a NPC problem: approximate algorithms

More information

CS325: Analysis of Algorithms, Fall Final Exam

CS325: Analysis of Algorithms, Fall Final Exam CS: Analysis of Algorithms, Fall 0 Final Exam I don t know policy: you may write I don t know and nothing else to answer a question and receive percent of the total points for that problem whereas a completely

More information

CS 6783 (Applied Algorithms) Lecture 3

CS 6783 (Applied Algorithms) Lecture 3 CS 6783 (Applied Algorithms) Lecture 3 Antonina Kolokolova January 14, 2013 1 Representative problems: brief overview of the course In this lecture we will look at several problems which, although look

More information

Advanced Analysis of Algorithms - Midterm (Solutions)

Advanced Analysis of Algorithms - Midterm (Solutions) Advanced Analysis of Algorithms - Midterm (Solutions) K. Subramani LCSEE, West Virginia University, Morgantown, WV {ksmani@csee.wvu.edu} 1 Problems 1. Solve the following recurrence using substitution:

More information

Unit 1A: Computational Complexity

Unit 1A: Computational Complexity Unit 1A: Computational Complexity Course contents: Computational complexity NP-completeness Algorithmic Paradigms Readings Chapters 3, 4, and 5 Unit 1A 1 O: Upper Bounding Function Def: f(n)= O(g(n)) if

More information

Problem set 1. (c) Is the Ford-Fulkerson algorithm guaranteed to produce an acyclic maximum flow?

Problem set 1. (c) Is the Ford-Fulkerson algorithm guaranteed to produce an acyclic maximum flow? CS261, Winter 2017. Instructor: Ashish Goel. Problem set 1 Electronic submission to Gradescope due 11:59pm Thursday 2/2. Form a group of 2-3 students that is, submit one homework with all of your names.

More information

Midterm Exam 2 Solutions

Midterm Exam 2 Solutions Algorithm Design and Analysis November 12, 2010 Pennsylvania State University CSE 565, Fall 2010 Professor Adam Smith Exam 2 Solutions Problem 1 (Miscellaneous). Midterm Exam 2 Solutions (a) Your friend

More information

P is the class of problems for which there are algorithms that solve the problem in time O(n k ) for some constant k.

P is the class of problems for which there are algorithms that solve the problem in time O(n k ) for some constant k. Complexity Theory Problems are divided into complexity classes. Informally: So far in this course, almost all algorithms had polynomial running time, i.e., on inputs of size n, worst-case running time

More information

Computer Science 385 Analysis of Algorithms Siena College Spring Topic Notes: Limitations of Algorithms

Computer Science 385 Analysis of Algorithms Siena College Spring Topic Notes: Limitations of Algorithms Computer Science 385 Analysis of Algorithms Siena College Spring 2011 Topic Notes: Limitations of Algorithms We conclude with a discussion of the limitations of the power of algorithms. That is, what kinds

More information

10.3 Matroids and approximation

10.3 Matroids and approximation 10.3 Matroids and approximation 137 10.3 Matroids and approximation Given a family F of subsets of some finite set X, called the ground-set, and a weight function assigning each element x X a non-negative

More information

Algorithms Re-Exam TIN093/DIT600

Algorithms Re-Exam TIN093/DIT600 Algorithms Re-Exam TIN093/DIT600 Course: Algorithms Course code: TIN 093 (CTH), DIT 600 (GU) Date, time: 7th January 2016, 8:30 12:30 Building: M Responsible teacher: Peter Damaschke, Tel. 5405. Examiner:

More information

Lecture 4: NP and computational intractability

Lecture 4: NP and computational intractability Chapter 4 Lecture 4: NP and computational intractability Listen to: Find the longest path, Daniel Barret What do we do today: polynomial time reduction NP, co-np and NP complete problems some examples

More information

CS 241 Analysis of Algorithms

CS 241 Analysis of Algorithms CS 241 Analysis of Algorithms Professor Eric Aaron Lecture T Th 9:00am Lecture Meeting Location: OLB 205 Business Grading updates: HW5 back today HW7 due Dec. 10 Reading: Ch. 22.1-22.3, Ch. 25.1-2, Ch.

More information

ECS122A Handout on NP-Completeness March 12, 2018

ECS122A Handout on NP-Completeness March 12, 2018 ECS122A Handout on NP-Completeness March 12, 2018 Contents: I. Introduction II. P and NP III. NP-complete IV. How to prove a problem is NP-complete V. How to solve a NP-complete problem: approximate algorithms

More information

NP-completeness. Chapter 34. Sergey Bereg

NP-completeness. Chapter 34. Sergey Bereg NP-completeness Chapter 34 Sergey Bereg Oct 2017 Examples Some problems admit polynomial time algorithms, i.e. O(n k ) running time where n is the input size. We will study a class of NP-complete problems

More information

Chapter 34: NP-Completeness

Chapter 34: NP-Completeness Graph Algorithms - Spring 2011 Set 17. Lecturer: Huilan Chang Reference: Cormen, Leiserson, Rivest, and Stein, Introduction to Algorithms, 2nd Edition, The MIT Press. Chapter 34: NP-Completeness 2. Polynomial-time

More information

Lecture 13, Fall 04/05

Lecture 13, Fall 04/05 Lecture 13, Fall 04/05 Short review of last class NP hardness conp and conp completeness Additional reductions and NP complete problems Decision, search, and optimization problems Coping with NP completeness

More information

Lecture 2: Divide and conquer and Dynamic programming

Lecture 2: Divide and conquer and Dynamic programming Chapter 2 Lecture 2: Divide and conquer and Dynamic programming 2.1 Divide and Conquer Idea: - divide the problem into subproblems in linear time - solve subproblems recursively - combine the results in

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 7 Greedy Graph Algorithms Shortest paths Minimum Spanning Tree Sofya Raskhodnikova 9/14/016 S. Raskhodnikova; based on slides by E. Demaine, C. Leiserson, A. Smith,

More information

Complexity, P and NP

Complexity, P and NP Complexity, P and NP EECS 477 Lecture 21, 11/26/2002 Last week Lower bound arguments Information theoretic (12.2) Decision trees (sorting) Adversary arguments (12.3) Maximum of an array Graph connectivity

More information

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University NP-Completeness CptS 223 Advanced Data Structures Larry Holder School of Electrical Engineering and Computer Science Washington State University 1 Hard Graph Problems Hard means no known solutions with

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 26 Computational Intractability Polynomial Time Reductions Sofya Raskhodnikova S. Raskhodnikova; based on slides by A. Smith and K. Wayne L26.1 What algorithms are

More information

CMPSCI 611 Advanced Algorithms Midterm Exam Fall 2015

CMPSCI 611 Advanced Algorithms Midterm Exam Fall 2015 NAME: CMPSCI 611 Advanced Algorithms Midterm Exam Fall 015 A. McGregor 1 October 015 DIRECTIONS: Do not turn over the page until you are told to do so. This is a closed book exam. No communicating with

More information

NP-Complete Problems. More reductions

NP-Complete Problems. More reductions NP-Complete Problems More reductions Definitions P: problems that can be solved in polynomial time (typically in n, size of input) on a deterministic Turing machine Any normal computer simulates a DTM

More information

CS 583: Algorithms. NP Completeness Ch 34. Intractability

CS 583: Algorithms. NP Completeness Ch 34. Intractability CS 583: Algorithms NP Completeness Ch 34 Intractability Some problems are intractable: as they grow large, we are unable to solve them in reasonable time What constitutes reasonable time? Standard working

More information

Easy Problems vs. Hard Problems. CSE 421 Introduction to Algorithms Winter Is P a good definition of efficient? The class P

Easy Problems vs. Hard Problems. CSE 421 Introduction to Algorithms Winter Is P a good definition of efficient? The class P Easy Problems vs. Hard Problems CSE 421 Introduction to Algorithms Winter 2000 NP-Completeness (Chapter 11) Easy - problems whose worst case running time is bounded by some polynomial in the size of the

More information

Quiz 1 Solutions. Problem 2. Asymptotics & Recurrences [20 points] (3 parts)

Quiz 1 Solutions. Problem 2. Asymptotics & Recurrences [20 points] (3 parts) Introduction to Algorithms October 13, 2010 Massachusetts Institute of Technology 6.006 Fall 2010 Professors Konstantinos Daskalakis and Patrick Jaillet Quiz 1 Solutions Quiz 1 Solutions Problem 1. We

More information

NP and Computational Intractability

NP and Computational Intractability NP and Computational Intractability 1 Polynomial-Time Reduction Desiderata'. Suppose we could solve X in polynomial-time. What else could we solve in polynomial time? don't confuse with reduces from Reduction.

More information

NP-Completeness. Andreas Klappenecker. [based on slides by Prof. Welch]

NP-Completeness. Andreas Klappenecker. [based on slides by Prof. Welch] NP-Completeness Andreas Klappenecker [based on slides by Prof. Welch] 1 Prelude: Informal Discussion (Incidentally, we will never get very formal in this course) 2 Polynomial Time Algorithms Most of the

More information

COMPSCI 611 Advanced Algorithms Second Midterm Exam Fall 2017

COMPSCI 611 Advanced Algorithms Second Midterm Exam Fall 2017 NAME: COMPSCI 611 Advanced Algorithms Second Midterm Exam Fall 2017 A. McGregor 15 November 2017 DIRECTIONS: Do not turn over the page until you are told to do so. This is a closed book exam. No communicating

More information

8. INTRACTABILITY I. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley. Last updated on 2/6/18 2:16 AM

8. INTRACTABILITY I. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley. Last updated on 2/6/18 2:16 AM 8. INTRACTABILITY I poly-time reductions packing and covering problems constraint satisfaction problems sequencing problems partitioning problems graph coloring numerical problems Lecture slides by Kevin

More information

CMPSCI611: The Matroid Theorem Lecture 5

CMPSCI611: The Matroid Theorem Lecture 5 CMPSCI611: The Matroid Theorem Lecture 5 We first review our definitions: A subset system is a set E together with a set of subsets of E, called I, such that I is closed under inclusion. This means that

More information

Algorithms: Lecture 12. Chalmers University of Technology

Algorithms: Lecture 12. Chalmers University of Technology Algorithms: Lecture 1 Chalmers University of Technology Today s Topics Shortest Paths Network Flow Algorithms Shortest Path in a Graph Shortest Path Problem Shortest path network. Directed graph G = (V,

More information

CS 598RM: Algorithmic Game Theory, Spring Practice Exam Solutions

CS 598RM: Algorithmic Game Theory, Spring Practice Exam Solutions CS 598RM: Algorithmic Game Theory, Spring 2017 1. Answer the following. Practice Exam Solutions Agents 1 and 2 are bargaining over how to split a dollar. Each agent simultaneously demands share he would

More information

NP-Completeness. Algorithmique Fall semester 2011/12

NP-Completeness. Algorithmique Fall semester 2011/12 NP-Completeness Algorithmique Fall semester 2011/12 1 What is an Algorithm? We haven t really answered this question in this course. Informally, an algorithm is a step-by-step procedure for computing a

More information

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

Computational Complexity and Intractability: An Introduction to the Theory of NP. Chapter 9 1 Computational Complexity and Intractability: An Introduction to the Theory of NP Chapter 9 2 Objectives Classify problems as tractable or intractable Define decision problems Define the class P Define

More information

Class Note #20. In today s class, the following four concepts were introduced: decision

Class Note #20. In today s class, the following four concepts were introduced: decision Class Note #20 Date: 03/29/2006 [Overall Information] In today s class, the following four concepts were introduced: decision version of a problem, formal language, P and NP. We also discussed the relationship

More information

NP-complete problems. CSE 101: Design and Analysis of Algorithms Lecture 20

NP-complete problems. CSE 101: Design and Analysis of Algorithms Lecture 20 NP-complete problems CSE 101: Design and Analysis of Algorithms Lecture 20 CSE 101: Design and analysis of algorithms NP-complete problems Reading: Chapter 8 Homework 7 is due today, 11:59 PM Tomorrow

More information

CSE 431/531: Analysis of Algorithms. Dynamic Programming. Lecturer: Shi Li. Department of Computer Science and Engineering University at Buffalo

CSE 431/531: Analysis of Algorithms. Dynamic Programming. Lecturer: Shi Li. Department of Computer Science and Engineering University at Buffalo CSE 431/531: Analysis of Algorithms Dynamic Programming Lecturer: Shi Li Department of Computer Science and Engineering University at Buffalo Paradigms for Designing Algorithms Greedy algorithm Make a

More information

Algorithm Design Strategies V

Algorithm Design Strategies V Algorithm Design Strategies V Joaquim Madeira Version 0.0 October 2016 U. Aveiro, October 2016 1 Overview The 0-1 Knapsack Problem Revisited The Fractional Knapsack Problem Greedy Algorithms Example Coin

More information

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

Efficient Algorithms and Intractable Problems Spring 2016 Alessandro Chiesa and Umesh Vazirani Midterm 2 CS 170 Efficient Algorithms and Intractable Problems Spring 2016 Alessandro Chiesa and Umesh Vazirani Midterm 2 Name: SID: GSI and section time: Write down the names of the students around you as they

More information

Design and Analysis of Algorithms

Design and Analysis of Algorithms CSE 0, Winter 08 Design and Analysis of Algorithms Lecture 8: Consolidation # (DP, Greed, NP-C, Flow) Class URL: http://vlsicad.ucsd.edu/courses/cse0-w8/ Followup on IGO, Annealing Iterative Global Optimization

More information

Dynamic Programming: Shortest Paths and DFA to Reg Exps

Dynamic Programming: Shortest Paths and DFA to Reg Exps CS 374: Algorithms & Models of Computation, Spring 207 Dynamic Programming: Shortest Paths and DFA to Reg Exps Lecture 8 March 28, 207 Chandra Chekuri (UIUC) CS374 Spring 207 / 56 Part I Shortest Paths

More information

Greedy Algorithms. Kleinberg and Tardos, Chapter 4

Greedy Algorithms. Kleinberg and Tardos, Chapter 4 Greedy Algorithms Kleinberg and Tardos, Chapter 4 1 Selecting breakpoints Road trip from Fort Collins to Durango on a given route. Fuel capacity = C. Goal: makes as few refueling stops as possible. Greedy

More information

Algorithms. NP -Complete Problems. Dong Kyue Kim Hanyang University

Algorithms. NP -Complete Problems. Dong Kyue Kim Hanyang University Algorithms NP -Complete Problems Dong Kyue Kim Hanyang University dqkim@hanyang.ac.kr The Class P Definition 13.2 Polynomially bounded An algorithm is said to be polynomially bounded if its worst-case

More information

1 T 1 = where 1 is the all-ones vector. For the upper bound, let v 1 be the eigenvector corresponding. u:(u,v) E v 1(u)

1 T 1 = where 1 is the all-ones vector. For the upper bound, let v 1 be the eigenvector corresponding. u:(u,v) E v 1(u) CME 305: Discrete Mathematics and Algorithms Instructor: Reza Zadeh (rezab@stanford.edu) Final Review Session 03/20/17 1. Let G = (V, E) be an unweighted, undirected graph. Let λ 1 be the maximum eigenvalue

More information

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

CS1800 Discrete Structures Spring 2018 February CS1800 Discrete Structures Midterm Version A CS1800 Discrete Structures Spring 2018 February 2018 CS1800 Discrete Structures Midterm Version A Instructions: 1. The exam is closed book and closed notes. You may not use a calculator or any other electronic

More information

CS 350 Algorithms and Complexity

CS 350 Algorithms and Complexity 1 CS 350 Algorithms and Complexity Fall 2015 Lecture 15: Limitations of Algorithmic Power Introduction to complexity theory Andrew P. Black Department of Computer Science Portland State University Lower

More information

ICS 252 Introduction to Computer Design

ICS 252 Introduction to Computer Design ICS 252 fall 2006 Eli Bozorgzadeh Computer Science Department-UCI References and Copyright Textbooks referred [Mic94] G. De Micheli Synthesis and Optimization of Digital Circuits McGraw-Hill, 1994. [CLR90]

More information

CS675: Convex and Combinatorial Optimization Fall 2014 Combinatorial Problems as Linear Programs. Instructor: Shaddin Dughmi

CS675: Convex and Combinatorial Optimization Fall 2014 Combinatorial Problems as Linear Programs. Instructor: Shaddin Dughmi CS675: Convex and Combinatorial Optimization Fall 2014 Combinatorial Problems as Linear Programs Instructor: Shaddin Dughmi Outline 1 Introduction 2 Shortest Path 3 Algorithms for Single-Source Shortest

More information

CHAPTER 3 FUNDAMENTALS OF COMPUTATIONAL COMPLEXITY. E. Amaldi Foundations of Operations Research Politecnico di Milano 1

CHAPTER 3 FUNDAMENTALS OF COMPUTATIONAL COMPLEXITY. E. Amaldi Foundations of Operations Research Politecnico di Milano 1 CHAPTER 3 FUNDAMENTALS OF COMPUTATIONAL COMPLEXITY E. Amaldi Foundations of Operations Research Politecnico di Milano 1 Goal: Evaluate the computational requirements (this course s focus: time) to solve

More information

Outline. 1 NP-Completeness Theory. 2 Limitation of Computation. 3 Examples. 4 Decision Problems. 5 Verification Algorithm

Outline. 1 NP-Completeness Theory. 2 Limitation of Computation. 3 Examples. 4 Decision Problems. 5 Verification Algorithm Outline 1 NP-Completeness Theory 2 Limitation of Computation 3 Examples 4 Decision Problems 5 Verification Algorithm 6 Non-Deterministic Algorithm 7 NP-Complete Problems c Hu Ding (Michigan State University)

More information

Algorithms and Data Structures (COMP 251) Midterm Solutions

Algorithms and Data Structures (COMP 251) Midterm Solutions Algorithms and Data Structures COMP 251) Midterm Solutions March 11, 2012 1. Stable Matching Problem a) Describe the input for the stable matching problem. Input: n men and n women. For each man, there

More information

CSCI3390-Second Test with Solutions

CSCI3390-Second Test with Solutions CSCI3390-Second Test with Solutions April 26, 2016 Each of the 15 parts of the problems below is worth 10 points, except for the more involved 4(d), which is worth 20. A perfect score is 100: if your score

More information

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

NAME: Be clear and concise. You may use the number of points assigned toeach problem as a rough CS170 Final Examination 20 May 1998 NAME: TA: Be clear and concise. You may use the number of points assigned toeach problem as a rough estimate for the number of minutes you want to allocate to the problem.

More information

Dynamic Programming. Data Structures and Algorithms Andrei Bulatov

Dynamic Programming. Data Structures and Algorithms Andrei Bulatov Dynamic Programming Data Structures and Algorithms Andrei Bulatov Algorithms Dynamic Programming 18-2 Weighted Interval Scheduling Weighted interval scheduling problem. Instance A set of n jobs. Job j

More information

Morning Time: 1 hour 30 minutes

Morning Time: 1 hour 30 minutes ADVANCED SUBSIDIARY GCE 477/0 MATHEMATICS (MEI) Decision Mathematics THURSDAY 2 JUNE 2008 Morning Time: hour 30 minutes *CUP/T44383* Additional materials: Printed Answer Book (enclosed) MEI Examination

More information