CO 250 Spring 2024: Tutorial 2 Problems: 1 K 1 K 1 2 2 3 K 1 K e

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

CO 250 Spring 2024: Tutorial 2 problems

T2-1. A directed graph G = (V, E) consists of a vertex set V and a collection E ⊆ (V × V ) of


ordered pairs that represent directed edges which we will refer to as arcs. We say e enters a
vertex v if e is of the form e = − → for some u ∈ V . We say e leaves a vertex u if e is of the
uv
form e = − → for some v ∈ V . A directed s − t path in G is an ordered list of distinct vertices
uv
v1 , . . . , vk ∈ V with k ≥ 2, such that v1 = s, vk = t and −v− → −−→ −−−−→
1 v2 , v2 v3 , . . . , vk−1 vk ∈ E. For each
arc e ∈ E, let ce denote a positive arc-weight. The length of an s − t path is the sum of the
weights of the arcs along it. Below is an example directed graph with positive arc weights.
Marked in blue and in thicker arrows is an example s − t path with length 5 + 3 + 12 + 8 = 28.

d 17 c
5 2
s 3 4 t
1 8
a 12 b

Consider the following integer program:


X
min {ce xe : e ∈ E}
X
{xe : e leaves s} = 1
X
{xe : e enters t} = 1
X
{xe : e leaves v} ≤ 1 (∀v ∈ V \ {s, t})
X X
{xe : e enters v} = {xe : e leaves v} (∀v ∈ V \ {s, t})
0 ≤ xe ≤ 1 (∀e ∈ E)
xe integer (∀e ∈ E)

(a) Give an example directed graph where no arc enters s and no arc leaves t and moreover
the above integer program specialized to your example graph G has a feasible solution
that does not correspond exclusively to an s − t path (where we associate a subgraph
of G to a feasible solution x by considering the set of arcs e such that xe = 1).
(b) Assume there is at least one s − t path in G and that G has no self-loops (i.e. arcs of the
form vv). Assume further that s has no entering arcs and t has no leaving arcs. Prove
that the above integer program captures the problem of finding the shortest directed
s − t path in G.
(c) If we replace the constraints 0 ≤ xe ≤ 1 by the constraint xe ≥ 0 for every e ∈ E, does
the integer program still capture the shortest directed s − t path problem? Explain why
or why not.

8jJUrTR5xXP3Vw

You might also like