COMP-360 Homework 3 Solutions
1. Edmonds-Karp (10 points) (a) See the graphs shown on the next page. The left column shows the original ow network, and the ows after each iteration. The maximum ow is shown at the bottom of the left column. The right colum
Algorithm Design Techniques
Assignment 4: Solutions
(1) Backtracking: Vertex Colouring
The search tree is drawn below. We need only consider the cases where A is
colored 1 and B is colored 2 (by symmetry). Any (child) nodes which give an
improper colourin
Algorithm Design Techniques
Due: Thursday 6th November
Assignment 4: Heuristics
(1) Backtracking: Vertex Colouring
We can use the following state-space tree T for a backtracking algorithm to
test whether a graph is 3-colourable. The root node of T gives v
COMP 360 - Fall 2015 - Sample Final Exam
There are in total 105 points, but your grade will be considered out of 100.
1. (10 points) Prove that the following problem belongs to P : Given a graph G, we want to know
whether G has an independent set of size
Algorithm Design Techniques
Assignment 3: Solutions
(1) Hamiltonian Path.
(a) Longest Path Problem
The Longest Path Problem is in NP. Given a solution path P , we just
check that P consists of at least k edges, and that these edges form a
path (where no v
Algorithm Design Techniques
Due: Tuesday December 2nd
Assignment 6: Assorted Topics
(1) Hitting Set. Kleinberg and Tardos, p594, Qu. 10.1.
(2) 3-SAT. Kleinberg and Tardos p594, Qu. 10.8.
(3) Claws.
A claw is the complete bipartite graph K1,3 ; that is, a
COMP 360 - Fall 2015 - Assignment 4
Due: 6:00 pm Nov 24th.
General rules: In solving these questions you may collaborate with other students but each student
has to write his/her own solution. There are in total 110 points, but your grade will be consider
COMP 360 - Fall 2015 - Assignment 5
Due: 6pm Dec 8th.
Guildenstern: The law of probability, as it has been oddly asserted, is something to do with the
proposition that if six monkeys (he has surprised himself). if six monkeys were.
Guildenstern: [.] The l
COMP 360 - Fall 2015 - Midterm
1. Consider a flow network G. Prove or Disprove each one of the following statements.
(10 points) If e has the lowest capacity among all edges of G, then e is in a minimum cut.
(10 points) If the capacity of e is strictly
COMP 360 - Fall 2015 - Assignment 2
Due: 6:00 pm Oct 13th.
General rules: In solving these questions you may consult books but you may not consult with
each other. There are in total 105 points, but your grade will be considered out of 100. You should
dro
COMP 360 - Fall 2015 - Assignment 3
Due: 6:00 pm Nov 10th.
General rules: In solving these questions you may collaborate with other students but each student
has to write his/her own solution. There are in total 105 points, but your grade will be consider
COMP 360 - Some duality examples
1
Questions
Let G = (V, E, cfw_ce ) be a graph where every edge e has a cost ce . Write the
duals of the following Linear Programs:
1.
P
min PuvE cuv xuv
s.t.
1 for every cycle C in G
uvC xuv
xuv
0 uv E
2.
P
max PuvE cuv
Solutions to the COMP-360 Winter 2006 Midterm
1. Selling cars (10 points) (a) The objects to be chosen are customer-car pairs. For example, selling Car B to Curly would be represented by the pair (Curly, Car B). There are thus N 2 objects to choose from.
Problem 1 We define our supermarket problem as an NP problem: Problem: SUPER Input: A list of customers, and the items they have purchased, and an integer l. Question: Is there a subset S of customers of size l such that no two customers in S have bought