We know that every node v also has an integer capacity cv0 and that fin(v) cv. In
order to be able to solve this problem using the original max flow problem, we could in
theory try to replacing each node v by two nodes, x and y. x would be the first node
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
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
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
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 - 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
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
The Simplex Algorithm: Technicalities1
Adrian Vetta
1
1/45
This presentation is based upon the book Linear Programming by Vasek Chvatal
Two Issues
Here we discuss two potential problems with the simplex
method and how to avoid them.
Termination.
How can w
Algorithm Design Techniques
Due: Thursday 23rd October
Assignment 3: NP-Completeness
(1) Hamiltonian Path.
[10 marks]
The Hamiltonian Path problem is: Given a graph G = (V, E), is there
a path P in G that uses every vertex exactly once?
This problem is NP
Algorithm Design Techniques
Due: Tuesday 7th October
Assignment 2: Linear Programming
(1) Standard Form.
(a) Write the following linear programming problem in standard form.
5x1 7x2 + 2x3 x4
min
s.t.
8x1 + x2 x3 3x4 6
2x2 + x4 10
x1 + 3x3 + x4 3
x2 5x3 2x
Algorithm Design Techniques
Assignment 1: Solutions
(1) Ford Fulkerson Algorithm.
4
2
a
3
e
t
3
2
5
s
5
4
d
b
3
2
3
2
c
4
f
Initial digraph G
(a) For the shortest augmenting path implementation of the Ford Fulkerson
algorithm, we start with initial labels
Algorithm Design Techniques
Due Tuesday September 23rd
Assignment 1: Network Flows
(1) Ford Fulkerson Algorithm.
Consider the following maximum ow problem. (Arc capacities are shown.)
t
3
3
f
e
2
2
2
d
4
c
4
4
3
5
5
b
a
3
2
s
(a) Apply the Ford-Fulkerson
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
Shortest augmenting path: overview of analysis
L1. Throughout the algorithm, length of the shortest path never decreases.
L2. Every edge can be removed from the residual graph for at most n/2
times.
Theorem. The shortest augmenting path algorithm runs in
COMP 360
Course Notes
McGill Lurker Original
0 Dynamic Programming
Until now, we have studied, in detail, greedy algorithms and divide-and-conquer algorithms.
However, we will soon see that there are many problems for which the real difficulty is not in
Linear Programming II
Linear Programming
Lecture II
!
!
!
!
LP duality
Strong duality theorem
Bonus proof of LP duality
Applications
Kevin Wayne
Computer Science Department
Princeton University
COS 523
Fall 2007
1
LP Duality
Primal problem.
(P)
LP Duality
COMP 360: Algorithm Design
Instructor: Yang Cai
Problem Set 3
Due: 5pm, Nov 14, 2016
General Rules: Follow the collaboration policy. In solving these questions
you may consult books but you may not search on the web for solutions.
You should drop your sol
COMP 360: Algorithm Design
Instructor: Yang Cai
Problem Set 4
Due: 5pm, Nov 24, 2016
General Rules: Follow the collaboration policy. In solving these questions
you may consult books but you may not search on the web for solutions.
You should drop your sol