0% found this document useful (0 votes)
44 views2 pages

HW 3

This document outlines 4 problems for a written assignment on advanced algorithms due on November 17, 2023. Problem 1 asks to prove that a breadth-first search tree of a graph contains no back edges, while a depth-first search tree contains no cross edges. Problem 2 asks to prove that the minimum spanning tree produced by Kruskal's algorithm has edge weights less than or equal to those of any other spanning tree. Problem 3 instructs running Dijkstra's algorithm on a sample graph. Problem 4 involves running the Ford-Fulkerson maximum flow algorithm on a sample graph and describing how to model a multicommodity flow problem as a maximum flow problem.

Uploaded by

calvinlam12100
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views2 pages

HW 3

This document outlines 4 problems for a written assignment on advanced algorithms due on November 17, 2023. Problem 1 asks to prove that a breadth-first search tree of a graph contains no back edges, while a depth-first search tree contains no cross edges. Problem 2 asks to prove that the minimum spanning tree produced by Kruskal's algorithm has edge weights less than or equal to those of any other spanning tree. Problem 3 instructs running Dijkstra's algorithm on a sample graph. Problem 4 involves running the Ford-Fulkerson maximum flow algorithm on a sample graph and describing how to model a multicommodity flow problem as a maximum flow problem.

Uploaded by

calvinlam12100
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CSIT 5500 Advanced Algorithms

2022 Fall Semester


Written Assignment 3
Handed out: November 3, 2023
Due: 23:59 on November 17, 2023
Please submit a soft copy via the canvas system by the due date and time shown
above. Late assignments will not be graded.

1. (10 points) Let G = (V, E) be an undirected connected graph. Let s be a vertex of G. Let
T be a breadth-first tree obtained by conducting a breadth-first search from s. Recall that
T is a rooted tree with s as the root. For any edge e = {u, v} of G, if e does not belong to
T , there are seemingly two possibilities for e. Either u and v have an ancestor-descendant
relation in T , or u and v have no ancestor-descendant relation in T . In the first case, we call
e a back edge. In the second case, we call e a cross edge. Prove that G does not contain any
back edge with respect to T .
Analogously, if T is the depth-first search tree of G with s as the root, prove that G does not
contain any cross edge with respect to T .

2. (10 points) Let G = (V, E) be an undirected connected graph with weights on the edges.
Let n be the number of vertices in G. Let T be a minimum spanning tree of G computed
by Kruskal’s algorithm. Let c1 ≤ c2 ≤ . . . ≤ cn−1 be the weights of the edges in T in non-
decreasing order. Let T 0 be an arbitrary spanning tree of G. Let c01 ≤ c02 ≤ . . . ≤ c0n−1 be the
weights of the edges in T 0 in non-decreasing order. Prove that ci ≤ c0i for all i ∈ [1, n − 1].

3. (10 points) Run Dijkstra’s algorithm on the following directed graph G. Use vertex a as the
source. Use the same convention and notation as in the lecture notes to show the values of
D[·] and pred[·] for the nodes of G. Show the graph G and the values of D[·] and pred[·] after
removing and processing each vertex from Q as in the lecture notes. Either color the pointer
pred[·] red as in the lecture notes or show the pointer pred[·] as a dashed arrow. A vertex
should be shown shaded if it no longer belongs to Q.

10

30
i
10 1 h
5
2
5 f g
30 1
5
a 30
2
b
20 10 e 8
c
5
1
4 d 1
2
j
40

1
4. (10 points) This question is about the maximum flow algorithm.

(a) Run Ford-Fulkerson’s maximum flow algorithm on the following directed graph G. Use
s as the source and t as the sink. Use the same convention and notation as in the lecture
notes to show:
• The residual graph Gf and the augmenting path selected in Gf .
• The flow values on the edges of G and Gf after using the augmenting path selected
to update the flow.

4
8
d 8 e
10
10 s 5
2 4 t
c 5
a 5 20
4 b 5

(b) Let G = (V, E) be a directed graph. Every edge (u, v) in G is associated with a capacity
c(u, v). There is a subset P of supply vertices in G and another subset Q of demand
vertices in G. The subsets P and Q are disjoint. Each vertex p ∈ P is associated with
a supply s(p) > 0. Each vertex P q ∈ Q is associated
P with a demand d(q) > 0. The
input satisfies the condition that p∈P s(p) = q∈Q d(q). The problem is to determine
whether it is possible to send flows from vertices in P to vertices in Q such that each
vertex p ∈ P produces exactly s(p) units of flow, and each vertex q ∈ Q consumes exactly
d(q) units of flow. Show that this problem can be converted to a maximum flow problem.

You might also like