Quantcast
Channel: Uncategorized – Lukas' Weblog
Viewing all articles
Browse latest Browse all 38

When is Tutte’s theorem in K₅ violated?

$
0
0
Theorem

A graph, G = (V, E), has a perfect matching if and only if for every subset U of V, the subgraph induced by V − U has at most |U| connected components with an odd number of vertices.
Tutte’s theorem

Illustration
tutte_theorem_examples
Figure 1. Tutte theorem examples

Consider the two examples given in Figure 1. G is a bipartite graph and we consider two possible subsets U the induced subgraph of G-U is given on the right side.

  1. For U₁ the number of odd components in G-U is 1 and the size of U is given with 3. Because 1 ≤ 3, the Tutte theorem holds.
  2. For U₂ the number of odd components in G-U is also 1 and the size of U is also given with 3. Again, the Tutte theorem holds.

For any U, this condition will hold. Underneath the perfect matching is given (vertex 1 is associated to vertex 2, etc).

Problem setting

planar graph K5
Figure 2. Planar graph K5 and a reduced variant

Consider graph K₅. A perfect matching clearly cannot exist for K₅, because a perfect matching can only exist if the number of vertices is even (as every vertex is associated to another vertex). Because the Tutte theorem provides a necessary and sufficient condition for the existence of a perfect matching, it should yield

For some subset U of V, the subgraph induced by V − U
has less than |U| connected components with an odd number of vertices.

Question

What is U for K₅? The solution is equivalent for its incomplete variant, which was originally given to me.

Solution

I wasn’t able to come up with a solution. So I wrote a program to try all combinations:

#!/usr/bin/env python3

import itertools

def component_sizes(G):
    """component sizes in an undirected graph"""
    comps = list(set([v]) for v in G[0])
    for e in G[1]:
        s, t = e[0], e[1]
        idx_s, idx_t = -1, -1
        for i, comp in enumerate(comps):
            if s in comp:
                idx_s = i
            if t in comp:
                idx_t = i
        if idx_s == idx_t:
            continue
        else:
            for item in comps[idx_t]:
                comps[idx_s].add(item)
            comps.remove(comps[idx_t])
    return tuple(sorted(len(comp) for comp in comps))

assert component_sizes(([1], [])) == (1,)
assert component_sizes(([1, 2], [])) == (1, 1)
assert component_sizes(([1, 2], [(1, 2)])) == (2,)
assert component_sizes(([1, 2, 3], [(1, 2)])) == (1, 2)

def subgraph(G, excl_vs):
    """Subgraph induces by excluding vertices"""
    red_V = tuple(filter(lambda v: v not in excl_vs, G[0]))
    red_E = tuple(filter(lambda e: e[0] not in excl_vs and e[1] not in excl_vs, G[1]))
    return (red_V, red_E)

assert subgraph(([1], []), [1]) == (tuple(), tuple())
assert subgraph(([1, 2], [(1, 2)]), [1]) == ((2,), tuple())
assert subgraph(([1, 2, 3], [(1, 2), (2, 3), (3, 1)]), [1]) == ((2, 3), ((2, 3),))

if __name__ == '__main__':
    def excl_vs_selection(G):
        for size in range(len(G[0])):
            for sel in itertools.combinations(G[0], r=size):
                yield set(sel)

    K5 = ((1, 2, 3, 4, 5), list(itertools.combinations(range(1,6), r=2)))
    reduced_K5 = ((1, 2, 3, 4, 5), [(1, 2), (2, 3), (3, 4), (4, 5), (5, 1)])

    G = K5
    for excl_vs in excl_vs_selection(G):
        sub = subgraph(G, excl_vs)
        sizes = component_sizes(sub)
        odd_sized_comps = len(list(map(lambda v: v % 2 == 0, sizes)))
        if odd_sized_comps > len(excl_vs):
            print(excl_vs)
            #raise ValueError("Tutte theorem violated with exclusion vertices {}".format(excl_vs))

The program yields set(). Hence the only solution is the empty set.

Consider U = {}. Then the induced graph is K₅ itself. The number of connected components in K₅ is 1 (all pairs of vertices are reachable from each other) and this component has an odd number of vertices (namely 5). The size of U is 0. And 1 > 0, so the Tutte theorem is violated and no perfect matching exists indeed.


Viewing all articles
Browse latest Browse all 38

Latest Images

Trending Articles



Latest Images