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

Math 340: Discrete Structures II

Due: Friday, January 30th.

Assignment 1: Matchings
You may work with a couple of friends. As a last resort, you may even use
some other written resources but you must cite them. In all cases you must
write up your own solutions in your own words.
1. Girl-Proposal Algorithm. Run the girl-proposal algorithm to find a set of stable
marriages for the following lists of preferences. Show your work on each step.
What is Girls 3s favourite valid partner? What is Boy 3s least favourite?

Boy 1: G1  G2  G3  G4
Boy 2: G4  G3  G1  G2
Boy 3: G1  G2  G4  G3
Boy 4: G1  G4  G2  G3
Girl 1: B1  B3  B2  B4
Girl 2: B4  B1  B2  B3
Girl 3: B3  B2  B1  B2
Girl 4: B1  B4  B2  B3
2. Stable Paths Problem.
The Border Gateway Protocol is a network protocol to allow subnetworks to
choose how they route packets across neighbhouring (peering) domains (called
autonomous systems). One simplified model for the protocol is to consider
a graph G = (V, E) where elements of V represent the domains and edges
represent peering relationships. For each destination vertex t V , the vertices
of V t must collectively decide how they will route their packets to t. This
is done in a distributed fashion as follows. At any time, each vertex v V t
announces the path Pv (sequence of vertices) it is currently using to route to t. If
some other vertex u prefers to route its packets via v, then it starts announcing
a new path Pu = u, Pv .
A stable paths configuration is one where everyone is happy with their current
path. In other words,
if for some vertex u, it is announcing the path Pu = u, v1 , v2 , . . . , t. Then
every vertex vi along this path has chosen the particular subpath Pvi =
vi , vi+1 , . . . , t.
1

No vertex u prefers another path to its current path Pu . In other words,


if v 6= v1 is a vertex with a peering relationship (edge) to u, then u prefers
Pu over taking the edge uv followed by v 0 s path Pv .
Come up with an example for which there is no stable paths configuration.
(Hence this process may cycle indefinitely.)
3. M -Alternating Tree Algorithm. Run the M -Alternating Tree Algorithm starting from the unsaturated vertex which is circled. Carefully show each step of
your algorithm. Does it find a larger matching? If not, does it find a set A
which violates the Hall Condition? Briefly explain the results.

4. Matchings. Let G = (V = X Y, E) be a bipartite graph. Suppose that the


degree of each vertex d(v) 1. Assume also that for each edge xy with x X,
we have d(x) d(y). Show that G has a matching which matches every vertex
of X.
Hint. It is enough to show that Halls condition holds on the X-side (much like
we did in class with Systems of Distinct Representatives).
5. Nonsingular Matrices
Suppose that A is a non-singular n n matrix. Prove that one may permute
the rows so that the diagonal elements of A are all non-zero.
6. Maximum Stable Matchings.
Suppose that we have a bipartite graph (not necessarily complete) G = (X
Y, E) where each vertex v has a preference order on its neighbhours. In other
words, if v X has d(v) neighbhours {y1 , y2 , . . . yd(v) }, then one may assume
these are ordered so that y1 v y2 v . . . v yd(v) where v prefers earlier
neighbhours to later ones. Similarly for vertices of Y . We may now define a
stable matching similar to before. It is a matching M of G such that there is
no edge xy E(G) such that xy 0 , x0 y M but y x y 0 and x y x0 (x prefers
y to y 0 and y prefers x to x0 ).
Prove that if G contains a matching M of size k, then it contains a stable
matching of size at least k/2.

You might also like