COMP 360 - Winter 2014 - Assignment 1
Due: 6pm Jan 31st.
General rules: In solving these questions you may consult books but you
may not consult with each other. There are in total 120 points, but your
grade will be considered out of 100. You should drop
COMP 360 - Winter 2014 - Assignment 5
Due: 6pm April 11th.
General rules: In solving these questions you may consult books but you
may not consult with each other. There are in total 115 points, but your
grade will be considered out of 100. You should dro
COMP 360 - Winter 2014 - Assignment 5
Due: 6pm April 11th.
General rules: In solving these questions you may consult books but you
may not consult with each other. There are in total 115 points, but your
grade will be considered out of 100. You should dro
COMP 360 - Winter 2014 - Assignment 4
Due: 6pm March 24th.
General rules: In solving these questions can use that SAT, 3SAT, Max
Independent Set, Max Clique, Min Vertex Cover, 3-Colourability, Subset
Sum are NP-complete.
There are in total 110 points, but
COMP 360 - Winter 2014 - Assignment 2
Due: 6pm Feb 17th.
General rules: In solving these questions you may consult books but you
may not consult with each other. There are in total 115 points, but your
grade will be considered out of 100. You should drop
Algorithm Design Techniques
Practice Midterm Exam
Instructions. The exam is 80 minutes long and contains 3 questions. Write
your answers clearly in the notebook provided. You may quote any result/theorem seen in the lectures or in the assignments without
Comp 360, Problem Set #3 Solutions
Liana Yepremyan
Problem 1
Solution: It is easy to see that NumP(Number Paritioning) is in NP, we can check in polynomial time
if the sum of certain numbers is a given number or not. Let us show how to reduce SS(Subset Su
COMP 360: Algorithm Design
Instructor: Yang Cai
Problem Set 3
Due: Mar 16, 2015
General Rules: Follow the collaboration policy. In particular, each of you
should write your own solution even if you have collaborated with your classmates. In solving these
COMP360 Problem Set 4 Solution
1
Backtracking: Vertex Coloring(10pts)
The following is the search process:
1. A: assign color 1.
2. B: B is connected with A, so assign color 2.
3. C: C is connected with B, so assign color 1.
4. D: D is connected with C, s
COMP360 Problem Set 1 Solution
1
Ford-Fulkerson Algorithm(15pts)
(a)(5pts)
1
(b)(5pts)
(c)(5pts) The s-t cut (cfw_s, a, b, c, d, cfw_t) has size 8 matching the size of the
ow we found. This gives a certicate for optimality of our ow.
2
Forward-Edge-Only A
COMP 360 - Winter 2014 - Assignment 3
Solution
General rules: In solving these questions you may consult books but you may not consult with
each other. There are in total 110 points, but your grade will be considered out of 100. You should
drop your solut
COMP 360 - Winter 2014 - Assignment 4
Due: 6pm March 24th.
General rules: In solving these questions can use that SAT, 3SAT, Max
Independent Set, Max Clique, Min Vertex Cover, 3-Colourability, Subset
Sum are NP-complete.
There are in total 110 points, but
COMP 360 - Winter 2014 - Assignment 3
Due: 6pm Feb 28th.
General rules: In solving these questions you may consult books but you
may not consult with each other. There are in total 110 points, but your
grade will be considered out of 100. You should drop
Algorithm Design Techniques
Practice Midterm Exam : Solutions
1. Maximum Flows.
Consider the following maximum ow problem. (Arc capacities are shown.)
(a) Apply the Ford-Fulkerson algorithm (use the shortest augmenting path
method to chose the augmenting
ORIE 633 Network Flows
August 28, 2007
Lecture 2
Lecturer: Anke van Zuylen
1
Scribe: Kathleen King
Applications of the maximum ow problem
This lecture discusses two applications of the maximum ow problem: baseball elimination
and carpool fairness.
1.1
Bas
ORIE 633 Network Flows
August 30, 2007
Lecture 3
Lecturer: David P. Williamson
1
Scribe: Gema Plaza-Mart
nez
Polynomial-time algorithms for the maximum ow problem
1.1
Introduction
Lets turn now to considering polynomial-time algorithms for computing a max
From
s
s
s
a
a
b
c
d
d
e
e
f
f
To
a
b
d
e
t
f
a
b
c
c
t
c
t
Max flow:
Flow
Capacity
3
2
4
2
4
3
3
1
3
0
2
0
3
9
3
2
5
2
4
4
5
3
4
2
3
2
3
Nodes
s
a
b
c
d
e
f
t
Supply/Demand
9
0
0
0
0
0
0
9
0
0
0
0
0
0
COMP 360 - Winter 2014 - Assignment 1
Due: 6pm Jan 31st.
General rules: In solving these questions you may consult books but you
may not consult with each other. There are in total 120 points, but your
grade will be considered out of 100. You should drop
COMP 360 - Winter 2014 - Assignment 2
Due: 6pm Feb 17th.
General rules: In solving these questions you may consult books but you
may not consult with each other. There are in total 115 points, but your
grade will be considered out of 100. You should drop
Comp 360, Problem Set #5 Solutions
1
1.1
Online Bipartite Matching
(a)
The most straightforward algorithm is a greedy algorithm that match the rst valid vertex. The algorithm
is as follow: For every edge (i, j) in the perfect matching of M , either i or j
Comp 360, Problem Set #2 Solutions
Liana Yepremyan
1
Problem 1
Solution:
(a) Note that since there is no restriction on x2 in the original system, we will introduce two new
variables, x2 , x2 (x2 := x2 x2 ), hence in the standard form we have the followin
COMP 360 - Winter 2016 - Assignment 1
Solutions
January 27, 2016
1.
(a) Take c = 2 and n0 = 0. We have
n + n n cn2 for n > 0.
n + n n = n0.5 + n1.5 n2 + n2 = 2n2 . So
(b) We need to show n5 = O(n + log2 n)5 ) and (n + log2 n)5 = O(n5 ). For the first equa
COMP 360 - Winter 2016 - Assignment 1
Due: 6pm Jan 28th.
General rules: In solving these questions you
may consult books but you may not consult with
each other. There are in total 110 points, but
your grade will be considered out of 100. You
should drop
COMP 360 - Winter 2016 - Assignment 4
Due: 6pm Mar 16th.
General rules: In solving these questions you may consult books but you may not consult with
each other. You should drop your solutions in the assignment drop-off box located in the Trottier
Buildin
COMP 360 - Winter 2016 - Assignment 4
Due: 6pm Mar 16th.
General rules: In solving these questions you may consult books but you may not consult with
each other. You should drop your solutions in the assignment drop-off box located in the Trottier
Buildin
COMP 360 - Winter 2016 - Assignment 2
Due: 6pm Feb 10th.
General rules: In solving these questions you
may consult books but you may not consult with
each other. You should drop your solutions in the
assignment drop-off box located in the Trottier
Buildin
Algorithm Design Techniques
Practice Final Exam 2
Instructions. The exam is 3 hours long and contains 6 questions. Write your
answers clearly. You may quote any result/theorem seen in the lectures or in the
assignments without proving it (unless, of cours
Algorithm Design Techniques
Midterm Exam : Solutions
1. Maximum Flows.
(a) Apply the Ford-Fulkerson algorithm (use the maximum capacity augmenting path method to chose the augmenting path in each iteration) to find a
maximum s t flow.
For this question, I
Algorithm Design Techniques
October 21st 2014
Midterm Exam
Instructions. The exam is 80 minutes long and contains 3 questions. Write
your answers clearly in the notebook provided. You may quote any result/theorem seen in the lectures or in the assignments