Maximum Flow
Reading: CLRS Sections 26.1-26.3.
CSE 6331 Algorithms
Steve Lai
Flow Network
A flow network G = (V , E ) is a directed graph with
a source node s V ,
a sink node t V ,
a capacity function c.
Each edge (u, v ) E has a nonnegative capacity
Linear Programming
Reading: CLRS, Ch. 29 or reference
CSE 6331 Algorithms
Steve Lai
Linear functions and linear constraints
Let a1 , a2 , , an , b be real numbers and
let x1 , x2 , , xn be variables.
Linear function:
f ( x1 , x2 , , xn )= a1 x1 + a2 x2
CSE 6331 Homework 1
Due Tuesday, September 3 by class time
1. Order the following function by asymptotic dominance. That is, produce an order
f1 (n), f2 (n), . . . such that fi = O(fi+1 ).
(a) f (n) = n! n2
( )
( )n (
1
1+ n .
Hint: use Stirlings formula,
CIS 6331 Homework 8
Due: Friday, March 22 by class time
Note: use the definition of flow that includes the skew-symmetry condition.
1. Consider a flow network in which vertices, as well as edges, have capacities. In addition to the
original edge capacity
Examples of Analysis
Give the asymptotic running time of the following algorithms in notation.
Give your solution in the simplest terms possible. Show how you get the answer.
1.
function func1(n)
s 0;
for i n to n2 do
for j n to i do
s s + j i;
return(s);
CSE 788.10 - Spring 12
EDGE TO ENTERPRISE
Midterm Presentation
Team: Arati Mahimane, Rachit Sood, Cynthea Godwin
Sponsor: Chaitanya Shivade
Partnership for Performance
Idea
Enterprise providing
Service
Partnership for Performance
Bridge
the Gap
!
People v
VISUALIZATION
FOR
DOUBLECHECK LCC
Anil Sunke
Cynthea Godwin
Miao-chen Chou
Yen Nei Lee
Tasks Completed before 1st release
Bar Chart
Click event pops up parameters of the graph when clicked on the
bar .
Highlight highlights the specific bar when the mou
CIS 6331 Homework 7
Due: Friday, March 8 by class time
Note: There are four questions; Q4 is on the other side.
1. Prove or disprove the following statement: v is an articulation of G if and only if
there is no back edge (u, w) such that (in G ) u is a de
CIS 6331 Homework 6
Due: Monday, February 25 by class time
For each problem you should give a complete solution, including a recurrence relation, boundary conditions, and a nonrecursive algorithm. You should also give the
asymptotic running time of your a
CIS 6331 Homework 5
Due: Monday, February 11 by class time
1. [Coin Changing] Let An = cfw_a1 , a2 , . . . , an be a set of distinct coin types (e.g.,
a1 = 50 cents, a2 = 25 cents, a3 = 10 cents, etc). Note that ai may be any
positive integer and a1 > a2
Divide-and-Conquer
Reading: CLRS Sections 2.3, 4.1, 4.2, 4.3, 28.2, 33.4.
CSE 780 Analysis of Algorithms
Steve Lai
Divide and Conquer
Given an instance x of a problem, the divide-and-conquer
method works as follows:
function DAQ(x )
if x is sufficiently
Dynamic Programming
Reading: CLRS Chapter 15 & Section 25.2
CSE 6331: Algorithms
Steve Lai
Optimization Problems
Problems that can be solved by dynamic programming
are typically optimization problems.
Optimization problems: Construct a set or a sequence
Greedy Algorithms
CSE 6331
Reading: Sections 16.1, 16.2, 16.3, Chapter 23.
1
Introduction
Optimization Problem:
Construct a sequence or a set of elements cfw_x1 , . . . , xk that satises
given constraints and optimizes a given objective function.
The Gre
Elementary Graph Algorithms
CSE 6331
Reading Assignment: Chapter 22
1
Basic Depth-First Search
Algorithm
procedure Search(G = (V, E )
/ Assume V = cfw_1, 2, . . . , n /
/ global array visited[1.n] /
visited[1.n] 0;
for i 1 to n
if visited[i] = 0 then cal
Number-Theoretic Algorithms
Chapter 31, CLRS book
p1.
Modular Arithmetic
p2.
Integers
a | b: a divides b, a is a divisor of b.
gcd( a, b): greatest common divisor of a and b.
Coprime or relatively prime: gcd( a, b) =
1.
Euclid's algorithm: compute gcd
CSE 6331 Homework 2
Due: Thursday, September 5, by class time
We proved the following theorem in class.
Theorem 5. If T (n) is asymptotically nondecreasing and f (n) is smooth, then T (n) =
O(f (n)|n a power of b) implies T (n) = O(f (n).
1. Show that The
CSE 6361 Homework 3
Due: Thursday, September 12 by class time
1. A function T (n) satises the following recurrence:
cfw_
T (n) =
if n 1
c,
3T (n/4) + n, if n > 1
where c ia a positive constant. Prove that T (n) is asymptotically nondecreasing.
2. Determin
CSE 6331 Homework 4
Due: Monday, February 4
1. Write a divide-and-conquer algorithm that nds the minimum of n integers. Analyze its time complexity assuming the algorithm is run by (1) one processor and
(2) by n processors.
2. Consider the closest-pair al
Mathematical Foundation
CSE 6331 Algorithms
Steve Lai
Be a Thinker!
2
Complexity of Algorithms
Analysis of algorithm: to predict the running time
required by an algorithm.
Elementary operations:
arithmetic & boolean operations: +, , , /, mod, div,
and,