Example BFS Traversal Breadth-First Search Forest Bipartite Graphs Bipartite Graphs Bipartite Graphs

Total Page:16

File Type:pdf, Size:1020Kb

Example BFS Traversal Breadth-First Search Forest Bipartite Graphs Bipartite Graphs Bipartite Graphs 11/3/16 Breadth-First Search using a FIFO Queue Example BFS Traversal BFS-Init (G): BFS (G, s): 1. for all nodes v in V 1. s.d = 0 G H 2. if v is white 2. s.c = gray 3. BFS(G, v) 3. for each node v != s 4. v.d = ∞ A E 5. v.c = white An initialization 6. Q.enqueue (s) C F algorithm like that 7. while Q ≠ ∅ 8. u = Q.dequeue() D B shown above would 9. for each v adjacent to u ensure that all nodes 10. if v.c == white are visited, even in 11. v.c = gray J I disjoint sets of nodes. 12. v.d = u.d + 1 13. v.π = u 14. Q.enqueue(v) Order of visiting: a1 c2 d3 e4 f5 b6 g7 h8 i9 j10 15. u.c = black Distance of vertex : 0 1 1 1 2 3 ∞ ∞ ∞ ∞ Breadth-first Search Forest Bipartite Graphs G A A graph is bipartite if all its vertices can be partitioned into two disjoint subsets X and Y so H that every edge connects a vertex in X with a E C D vertex in Y, i.e., if its vertices can be colored in I B 2 colors so that every edge has its end points colored in different colors. J F A C E Tree edges are solid lines and dashed lines are cross D F B edges. Bipartite Graphs Bipartite Graphs Explain how BFS could be used to detect Is this graph bipartite? No. The edge a bipartite graph. (B,C) would have to connect nodes of the same color A C E Mark the source, A, with color1, mark the nodes at level 1 with A B D F B color2, and so on. Every node on an C D A F E even numbered level will be color1 and every odd color2 D C B 1 11/3/16 Depth-First Traversal Depth-First Search DFS algorithm maintains the following information for each Depth-First Traversal is another algorithm for traversing a vertex u: graph. - u.c (white, gray, or black) : indicates status Called depth-first because it searches "deeper" in the graph white = not discovered yet whenever possible. gray = discovered, but not finished black = finished Edges are explored out of the most recently discovered vertex v that still has unexplored edges. When all of v's edges have - u.d : discovery time of node u been explored, the search "backtracks" to explore the edges incident on the vertex from which v was discovered. - u.f : finishing time of node u We will use an algorithm with a stack, S, to manage the set of - u.π : predecessor of u in Depth-First tree nodes. DFS node Depth-First Search Each node has fields for predecessor (π), discovery time (d), finish time (f) and color (c). Each node also has an associated DFS-Init (G, s): Initialize global timer to 0. adjacency list with pointers to neighboring nodes. 1. time = 0 2. for all nodes v Set discovery time and finish 3. v.d = v.f = ∞ 4. v.c = white times of all nodes to infinity 5. v.π = NONE and color them white. 6. S = ∅ 7. DFS (G, s) d π Initialize stack S to ∅. Adjacency NAME List Call DFS (G, s) f c Depth-First Search Using a Stack Depth-First Search (recursive version) DFS (G,s) Initially, time (counter) = 0 1. S.push(s) DFS-Visit (G,u) 2. while S is not empty Complexity is based on 1. u.c = gray 3. u = S.peek() After execution, for every number of edges |E| 2. u.d = time 4. if u.c == WHITE vertex u, u.d < u.f 5. u.c = GRAY 3. time = time + 1 6. u.d = time 4. for each v adjacent to u DFS (G) 7. time = time + 1 5. if v.c == white 8. for all white neighbors v of u 1. for each w ∈ G 6. v.π = u 9 v.π = u 2. if w.c == white 10. S.push(v) 7. DFS-Visit(G,v) Complexity (Adjacency List) 3. DFS-Visit (G,w) 11. else if u.c == GRAY 8. end if 12. S.pop() • check all edges 13. u.c = BLACK adjacent to each node Note: If G = (V, E) is not 9. end for 14. u.f = time from both directions - connected, then DFS will still 10. u.c = black 15. time = time + 1 O(E) time visit the entire graph with the 11. u.f = time 16. else // u is BLACK • total = O(V + E) = 17. S.pop() additional code above. 12. time = time + 1 2 18. end while O(V ) (w.c.) 2 11/3/16 Example DFS Traversal Depth-first Search Forest The first subscript G H G indicates A A E the time at which each H C F node is C discovered F D B I and pushed onto stack; the B J I J second D e7,8 indicates the time at which E b6,9 j 16,17 the node was d3,4 f i 5,10 15,18 finished. Tree edges are solid lines and dashed lines are back c2,11 h14,19 edges. a 1,12 g13,20 Breadth-first Search Forest Facts about DFS and BFS on undirected graph G A DFS BFS H E Data Structure Stack Queue C D No. of vertex 2 orderings 1 ordering I orderings B Edge Types tree and back tree and cross edges edges J Applications connectivity, connectivity, F acyclicity, acyclicity, articulation minimum-edge points paths Tree edges are solid lines and dashed lines are cross Efficiency for θ(|V| + |E|) θ(|V| + |E|) edges. adjacency lists Depth-First Search Depth-First Search Theorem 22.7 (parenthesis theorem) For any two vertices u and v, exactly one of the following three conditions hold: Theorem 22.7 (parenthesis theorem) For any two vertices u and v, 1. Either the intervals [u.d, u.f] and [v.d, v.f] are entirely disjoint, or exactly one of the following three conditions hold: 2. the interval [u.d, u.f] is contained entirely within the interval [v.d, 1. Either the intervals [u.d, u.f] and [v.d, v.f] are entirely disjoint, or v.f], (and u is a descendant of v), or 2. the interval [u.d, u.f] is contained entirely within the interval [v.d, 3. the interval [v.d, v.f] is contained entirely within the interval [u.d, v.f], (and u is a descendant of v), or u.f], (and v is a descendant of u). 3. the interval [v.d, v.f] is contained entirely within the interval [u.d, u.f], (and v is a descendant of u). Proof: Case 1 – u.d < v.d. If v.d < u.f, then v was discovered when u was still gray, implying v is a descendant of u. Since v was discovered Proof: Case 2 – v.d < u.d. Similar argument to case 1 on last slide before u is finished, all of v's outgoing edges will have been explored (condition 2 if u.f < v.f or condition 1 if v.f < u.f). n before u is finished. Therefore, the interval [v.d,v.f ] is contained within the interval [u.d,u.f] (condition 3 holds, v is descendant of u). Corollary 22.8 (nesting of descendant’s intervals): Vertex v is a If u.d < v.d and u.f < v.d, then u was discovered and finished before v descendant of vertex u in the DFS forest for a graph G iff was discovered (condition 1 holds, intervals are disjoint). u.d < v.d < v.f < u.f. 3 11/3/16 Depth-First Search Theorem 22.9 (White-Path theorem): In a depth-first forest of a graph G, vertex v is a descendant of vertex u Theorem 22.9 (White-Path theorem): iff at the time u.d that the search discovers u, vertex v can be reached In a depth-first forest of a graph G, vertex v is a descendant from u along a path consisting entirely of white vertices. of vertex u iff at the time u.d that the search discovers u, Proof: vertex v can be reached from u along a path consisting Backward Direction of iff: (by contradiction) Assume vertex v is entirely of white vertices. reachable from u along a path consisting of white vertices at time u.d, but v does not become a descendant of u in the DFS. Assume, wlog, that every other vertex between u and v becomes a descendant of u. Proof: Let w be the immediate predecessor of v on a path from u. Then by corollary 22.8, w.f ≤ u.f (or w.f=u.f if w=u). Forward direction of iff: Assume v is a descendant of u in a depth-first tree. Let w be any vertex on the path between u Since v is reachable from u via a path of white vertices by assumption, v and v in the depth-first tree, so that w is also a descendant must be discovered after u, but before w is finished. So u.d < v.d < w.f ≤ of u. By Corollary 22.8, u.d < w.d, and so w is white at time u.f. So by the parenthesis theorem (22.7), [v.d, v.f] must be contained within [u.d,u.f] and v must be a descendant of u, a contradiction.
Recommended publications
  • Counting Independent Sets in Graphs with Bounded Bipartite Pathwidth∗
    Counting independent sets in graphs with bounded bipartite pathwidth∗ Martin Dyery Catherine Greenhillz School of Computing School of Mathematics and Statistics University of Leeds UNSW Sydney, NSW 2052 Leeds LS2 9JT, UK Australia [email protected] [email protected] Haiko M¨uller∗ School of Computing University of Leeds Leeds LS2 9JT, UK [email protected] 7 August 2019 Abstract We show that a simple Markov chain, the Glauber dynamics, can efficiently sample independent sets almost uniformly at random in polynomial time for graphs in a certain class. The class is determined by boundedness of a new graph parameter called bipartite pathwidth. This result, which we prove for the more general hardcore distribution with fugacity λ, can be viewed as a strong generalisation of Jerrum and Sinclair's work on approximately counting matchings, that is, independent sets in line graphs. The class of graphs with bounded bipartite pathwidth includes claw-free graphs, which generalise line graphs. We consider two further generalisations of claw-free graphs and prove that these classes have bounded bipartite pathwidth. We also show how to extend all our results to polynomially-bounded vertex weights. 1 Introduction There is a well-known bijection between matchings of a graph G and independent sets in the line graph of G. We will show that we can approximate the number of independent sets ∗A preliminary version of this paper appeared as [19]. yResearch supported by EPSRC grant EP/S016562/1 \Sampling in hereditary classes". zResearch supported by Australian Research Council grant DP190100977. 1 in graphs for which all bipartite induced subgraphs are well structured, in a sense that we will define precisely.
    [Show full text]
  • Density Theorems for Bipartite Graphs and Related Ramsey-Type Results
    Density theorems for bipartite graphs and related Ramsey-type results Jacob Fox Benny Sudakov Princeton UCLA and IAS Ramsey’s theorem Definition: r(G) is the minimum N such that every 2-edge-coloring of the complete graph KN contains a monochromatic copy of graph G. Theorem: (Ramsey-Erdos-Szekeres,˝ Erdos)˝ t/2 2t 2 ≤ r(Kt ) ≤ 2 . Question: (Burr-Erd˝os1975) How large is r(G) for a sparse graph G on n vertices? Ramsey numbers for sparse graphs Conjecture: (Burr-Erd˝os1975) For every d there exists a constant cd such that if a graph G has n vertices and maximum degree d, then r(G) ≤ cd n. Theorem: 1 (Chv´atal-R¨odl-Szemer´edi-Trotter 1983) cd exists. 2αd 2 (Eaton 1998) cd ≤ 2 . βd αd log2 d 3 (Graham-R¨odl-Ruci´nski2000) 2 ≤ cd ≤ 2 . Moreover, if G is bipartite, r(G) ≤ 2αd log d n. Density theorem for bipartite graphs Theorem: (F.-Sudakov) Let G be a bipartite graph with n vertices and maximum degree d 2 and let H be a bipartite graph with parts |V1| = |V2| = N and εN edges. If N ≥ 8dε−d n, then H contains G. Corollary: For every bipartite graph G with n vertices and maximum degree d, r(G) ≤ d2d+4n. (D. Conlon independently proved that r(G) ≤ 2(2+o(1))d n.) Proof: Take ε = 1/2 and H to be the graph of the majority color. Ramsey numbers for cubes Definition: d The binary cube Qd has vertex set {0, 1} and x, y are adjacent if x and y differ in exactly one coordinate.
    [Show full text]
  • Constrained Representations of Map Graphs and Half-Squares
    Constrained Representations of Map Graphs and Half-Squares Hoang-Oanh Le Berlin, Germany [email protected] Van Bang Le Universität Rostock, Institut für Informatik, Rostock, Germany [email protected] Abstract The square of a graph H, denoted H2, is obtained from H by adding new edges between two distinct vertices whenever their distance in H is two. The half-squares of a bipartite graph B = (X, Y, EB ) are the subgraphs of B2 induced by the color classes X and Y , B2[X] and B2[Y ]. For a given graph 2 G = (V, EG), if G = B [V ] for some bipartite graph B = (V, W, EB ), then B is a representation of G and W is the set of points in B. If in addition B is planar, then G is also called a map graph and B is a witness of G [Chen, Grigni, Papadimitriou. Map graphs. J. ACM, 49 (2) (2002) 127-138]. While Chen, Grigni, Papadimitriou proved that any map graph G = (V, EG) has a witness with at most 3|V | − 6 points, we show that, given a map graph G and an integer k, deciding if G admits a witness with at most k points is NP-complete. As a by-product, we obtain NP-completeness of edge clique partition on planar graphs; until this present paper, the complexity status of edge clique partition for planar graphs was previously unknown. We also consider half-squares of tree-convex bipartite graphs and prove the following complexity 2 dichotomy: Given a graph G = (V, EG) and an integer k, deciding if G = B [V ] for some tree-convex bipartite graph B = (V, W, EB ) with |W | ≤ k points is NP-complete if G is non-chordal dually chordal and solvable in linear time otherwise.
    [Show full text]
  • Graph Theory
    1 Graph Theory “Begin at the beginning,” the King said, gravely, “and go on till you come to the end; then stop.” — Lewis Carroll, Alice in Wonderland The Pregolya River passes through a city once known as K¨onigsberg. In the 1700s seven bridges were situated across this river in a manner similar to what you see in Figure 1.1. The city’s residents enjoyed strolling on these bridges, but, as hard as they tried, no residentof the city was ever able to walk a route that crossed each of these bridges exactly once. The Swiss mathematician Leonhard Euler learned of this frustrating phenomenon, and in 1736 he wrote an article [98] about it. His work on the “K¨onigsberg Bridge Problem” is considered by many to be the beginning of the field of graph theory. FIGURE 1.1. The bridges in K¨onigsberg. J.M. Harris et al., Combinatorics and Graph Theory , DOI: 10.1007/978-0-387-79711-3 1, °c Springer Science+Business Media, LLC 2008 2 1. Graph Theory At first, the usefulness of Euler’s ideas and of “graph theory” itself was found only in solving puzzles and in analyzing games and other recreations. In the mid 1800s, however, people began to realize that graphs could be used to model many things that were of interest in society. For instance, the “Four Color Map Conjec- ture,” introduced by DeMorgan in 1852, was a famous problem that was seem- ingly unrelated to graph theory. The conjecture stated that four is the maximum number of colors required to color any map where bordering regions are colored differently.
    [Show full text]
  • Lecture 12 — October 10, 2017 1 Overview 2 Matchings in Bipartite Graphs
    CS 388R: Randomized Algorithms Fall 2017 Lecture 12 | October 10, 2017 Prof. Eric Price Scribe: Shuangquan Feng, Xinrui Hua 1 Overview In this lecture, we will explore 1. Problem of finding matchings in bipartite graphs. 2. Hall's Theorem: sufficient and necessary condition for the existence of perfect matchings in bipartite graphs. 3. An algorithm for finding perfect matching in d-regular bipartite graphs when d = 2k which is based on the idea of Euler tour and has a time complexity of O(nd). 4. A randomized algorithm for finding perfect matchings in all d regular bipartite graphs which has an expected time complexity of O(n log n). 5. Problem of online bipartite matching. 2 Matchings in Bipartite Graphs Definition 1 (Bipartite Graph). A graph G = (V; E) is said to be bipartite if the vertex set V can be partitioned into 2 disjoint sets L and R so that any edge has one vertex in L and the other in R. Definition 2 (Matching). Given an undirected graph G = (V; E), a matching is a subset of edges M ⊆ E that have no endpoints in common. Definition 3 (Maximum Matching). Given an undirected graph G = (V; E), a maximum matching M is a matching of maximum size. Thus for any other matching M 0, we have that jMj ≥ jM 0j. Definition 4 (Perfect Matching). Given an bipartite graph G = (V; E), with the bipartition V = L [ R where jLj = jRj = n, a perfect matching is a maximum matching of size n. There are several well known algorithms for the problem of finding maximum matchings in bipartite graphs.
    [Show full text]
  • Lecture 9-10: Extremal Combinatorics 1 Bipartite Forbidden Subgraphs 2 Graphs Without Any 4-Cycle
    MAT 307: Combinatorics Lecture 9-10: Extremal combinatorics Instructor: Jacob Fox 1 Bipartite forbidden subgraphs We have seen the Erd}os-Stonetheorem which says that given a forbidden subgraph H, the extremal 1 2 number of edges is ex(n; H) = 2 (1¡1=(Â(H)¡1)+o(1))n . Here, o(1) means a term tending to zero as n ! 1. This basically resolves the question for forbidden subgraphs H of chromatic number at least 3, since then the answer is roughly cn2 for some constant c > 0. However, for bipartite forbidden subgraphs, Â(H) = 2, this answer is not satisfactory, because we get ex(n; H) = o(n2), which does not determine the order of ex(n; H). Hence, bipartite graphs form the most interesting class of forbidden subgraphs. 2 Graphs without any 4-cycle Let us start with the ¯rst non-trivial case where H is bipartite, H = C4. I.e., the question is how many edges G can have before a 4-cycle appears. The answer is roughly n3=2. Theorem 1. For any graph G on n vertices, not containing a 4-cycle, 1 p E(G) · (1 + 4n ¡ 3)n: 4 Proof. Let dv denote the degree of v 2 V . Let F denote the set of \labeled forks": F = f(u; v; w):(u; v) 2 E; (u; w) 2 E; v 6= wg: Note that we do not care whether (v; w) is an edge or not. We count the size of F in two possible ways: First, each vertex u contributes du(du ¡ 1) forks, since this is the number of choices for v and w among the neighbors of u.
    [Show full text]
  • Hypergraph Packing and Sparse Bipartite Ramsey Numbers
    Hypergraph packing and sparse bipartite Ramsey numbers David Conlon ∗ Abstract We prove that there exists a constant c such that, for any integer ∆, the Ramsey number of a bipartite graph on n vertices with maximum degree ∆ is less than 2c∆n. A probabilistic argument due to Graham, R¨odland Ruci´nskiimplies that this result is essentially sharp, up to the constant c in the exponent. Our proof hinges upon a quantitative form of a hypergraph packing result of R¨odl,Ruci´nskiand Taraz. 1 Introduction For a graph G, the Ramsey number r(G) is defined to be the smallest natural number n such that, in any two-colouring of the edges of Kn, there exists a monochromatic copy of G. That these numbers exist was proven by Ramsey [19] and rediscovered independently by Erd}osand Szekeres [10]. Whereas the original focus was on finding the Ramsey numbers of complete graphs, in which case it is known that t t p2 r(Kt) 4 ; ≤ ≤ the field has broadened considerably over the years. One of the most famous results in the area to date is the theorem, due to Chvat´al,R¨odl,Szemer´ediand Trotter [7], that if a graph G, on n vertices, has maximum degree ∆, then r(G) c(∆)n; ≤ where c(∆) is just some appropriate constant depending only on ∆. Their proof makes use of the regularity lemma and because of this the bound it gives on the constant c(∆) is (and is necessarily [11]) very bad. The situation was improved somewhat by Eaton [8], who proved, by using a variant of the regularity lemma, that the function c(∆) may be taken to be of the form 22c∆ .
    [Show full text]
  • THE CRITICAL GROUP of a LINE GRAPH: the BIPARTITE CASE Contents 1. Introduction 2 2. Preliminaries 2 2.1. the Graph Laplacian 2
    THE CRITICAL GROUP OF A LINE GRAPH: THE BIPARTITE CASE JOHN MACHACEK Abstract. The critical group K(G) of a graph G is a finite abelian group whose order is the number of spanning forests of the graph. Here we investigate the relationship between the critical group of a regular bipartite graph G and its line graph line G. The relationship between the two is known completely for regular nonbipartite graphs. We compute the critical group of a graph closely related to the complete bipartite graph and the critical group of its line graph. We also discuss general theory for the critical group of regular bipartite graphs. We close with various examples demonstrating what we have observed through experimentation. The problem of classifying the the relationship between K(G) and K(line G) for regular bipartite graphs remains open. Contents 1. Introduction 2 2. Preliminaries 2 2.1. The graph Laplacian 2 2.2. Theory of lattices 3 2.3. The line graph and edge subdivision graph 3 2.4. Circulant graphs 5 2.5. Smith normal form and matrices 6 3. Matrix reductions 6 4. Some specific regular bipartite graphs 9 4.1. The almost complete bipartite graph 9 4.2. Bipartite circulant graphs 11 5. A few general results 11 5.1. The quotient group 11 5.2. Perfect matchings 12 6. Looking forward 13 6.1. Odd primes 13 6.2. The prime 2 14 6.3. Example exact sequences 15 References 17 Date: December 14, 2011. A special thanks to Dr. Victor Reiner for his guidance and suggestions in completing this work.
    [Show full text]
  • CS675: Convex and Combinatorial Optimization Spring 2018 Introduction to Matroid Theory
    CS675: Convex and Combinatorial Optimization Spring 2018 Introduction to Matroid Theory Instructor: Shaddin Dughmi Set system: Pair (X ; I) where X is a finite ground set and I ⊆ 2X are the feasible sets Objective: often “linear”, referred to as modular Analogues of concave and convex: submodular and supermodular (in no particular order!) Today, we will look only at optimizing modular objectives over an extremely prolific family of set systems Related, directly or indirectly, to a large fraction of optimization problems in P Also pops up in submodular/supermodular optimization problems Optimization over Sets Most combinatorial optimization problems can be thought of as choosing the best set from a family of allowable sets Shortest paths Max-weight matching Independent set ... 1/30 Objective: often “linear”, referred to as modular Analogues of concave and convex: submodular and supermodular (in no particular order!) Today, we will look only at optimizing modular objectives over an extremely prolific family of set systems Related, directly or indirectly, to a large fraction of optimization problems in P Also pops up in submodular/supermodular optimization problems Optimization over Sets Most combinatorial optimization problems can be thought of as choosing the best set from a family of allowable sets Shortest paths Max-weight matching Independent set ... Set system: Pair (X ; I) where X is a finite ground set and I ⊆ 2X are the feasible sets 1/30 Analogues of concave and convex: submodular and supermodular (in no particular order!) Today, we will look only at optimizing modular objectives over an extremely prolific family of set systems Related, directly or indirectly, to a large fraction of optimization problems in P Also pops up in submodular/supermodular optimization problems Optimization over Sets Most combinatorial optimization problems can be thought of as choosing the best set from a family of allowable sets Shortest paths Max-weight matching Independent set ..
    [Show full text]
  • Matroid Intersection
    EECS 495: Combinatorial Optimization Lecture 8 Matroid Intersection Reading: Schrijver, Chapter 41 • colorful spanning forests: for graph G with edges partitioned into color classes fE1;:::;Ekg, colorful spanning forest is Matroid Intersection a forest with edges of different colors. Define M1;M2 on ground set E with: Problem: { I1 = fF ⊂ E : F is acyclicg { I = fF ⊂ E : 8i; jF \ E j ≤ 1g • Given: matroids M1 = (S; I1) and M2 = 2 i (S; I ) on same ground set S 2 Then • Find: max weight (cardinality) common { these are matroids (graphic, parti- independent set J ⊆ I \I 1 2 tion) { common independent sets = color- Applications ful spanning forests Generalizes: Note: In second two examples, (S; I1 \I2) not a matroid, so more general than matroid • max weight independent set of M (take optimization. M = M1 = M2) Claim: Matroid intersection of three ma- troids NP-hard. • matching in bipartite graphs Proof: Reduction from directed Hamilto- For bipartite graph G = ((V1;V2);E), let nian path: given digraph D = (V; E) and Mi = (E; Ii) where vertices s; t, is there a path from s to t that goes through each vertex exactly once. Ii = fJ : 8v 2 Vi; v incident to ≤ one e 2 Jg • M1 graphic matroid of underlying undi- Then rected graph { these are matroids (partition ma- • M2 partition matroid in which F ⊆ E troids) indep if each v has at most one incoming edge in F , except s which has none { common independent sets = match- ings of G • M3 partition :::, except t which has none 1 Intersection is set of vertex-disjoint directed = r1(E) +r2(E)− min(r1(F ) +r2(E nF ) paths with one starting at s and one ending F ⊆E at t, so Hamiltonian path iff max cardinality which is number of vertices minus min intersection has size n − 1.
    [Show full text]
  • 1 Bipartite Matching and Vertex Covers
    ORF 523 Lecture 6 Princeton University Instructor: A.A. Ahmadi Scribe: G. Hall Any typos should be emailed to a a [email protected]. In this lecture, we will cover an application of LP strong duality to combinatorial optimiza- tion: • Bipartite matching • Vertex covers • K¨onig'stheorem • Totally unimodular matrices and integral polytopes. 1 Bipartite matching and vertex covers Recall that a bipartite graph G = (V; E) is a graph whose vertices can be divided into two disjoint sets such that every edge connects one node in one set to a node in the other. Definition 1 (Matching, vertex cover). A matching is a disjoint subset of edges, i.e., a subset of edges that do not share a common vertex. A vertex cover is a subset of the nodes that together touch all the edges. (a) An example of a bipartite (b) An example of a matching (c) An example of a vertex graph (dotted lines) cover (grey nodes) Figure 1: Bipartite graphs, matchings, and vertex covers 1 Lemma 1. The cardinality of any matching is less than or equal to the cardinality of any vertex cover. This is easy to see: consider any matching. Any vertex cover must have nodes that at least touch the edges in the matching. Moreover, a single node can at most cover one edge in the matching because the edges are disjoint. As it will become clear shortly, this property can also be seen as an immediate consequence of weak duality in linear programming. Theorem 1 (K¨onig). If G is bipartite, the cardinality of the maximum matching is equal to the cardinality of the minimum vertex cover.
    [Show full text]
  • Towards a Characterization of Bipartite Switching Classes by Means of Forbidden Subgraphs
    Discussiones Mathematicae Graph Theory 27 (2007 ) 471–483 TOWARDS A CHARACTERIZATION OF BIPARTITE SWITCHING CLASSES BY MEANS OF FORBIDDEN SUBGRAPHS Jurriaan Hage Department of Information and Computing Sciences, University Utrecht P.O. Box 80.089, 3508 TB Utrecht, Netherlands e-mail: [email protected] and Tero Harju Department of Mathematics University of Turku FIN–20014 Turku, Finland Abstract We investigate which switching classes do not contain a bipartite graph. Our final aim is a characterization by means of a set of critically non-bipartite graphs: they do not have a bipartite switch, but every induced proper subgraph does. In addition to the odd cycles, we list a number of exceptional cases and prove that these are indeed critically non-bipartite. Finally, we give a number of structural results towards proving the fact that we have indeed found them all. The search for critically non-bipartite graphs was done using software written in C and Scheme. We report on our experiences in coping with the combinatorial explosion. Keywords: switching classes, bipartite graphs, forbidden subgraphs, combinatorial search. 2000 Mathematics Subject Classification: 05C22, 05C75. 472 J. Hage and T. Harju 1. Introduction For a finite undirected graph G = (V, E) and a set σ ⊆ V , the switch of G by σ is defined as the graph Gσ = (V, E′), which is obtained from G by removing all edges between σ and its complement σ and adding as edges all nonedges between σ and σ. The switching class [G] determined by G consists of all switches Gσ for subsets σ ⊆ V . A switching class is an equivalence class of graphs under switching.
    [Show full text]