Bipartite graph

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Example of a bipartite graph without cycles

In the mathematical field of graph theory, a bipartite graph (or bigraph) is a graph whose vertices can be divided into two disjoint sets U and V (that is, U and V are each independent sets) such that every edge connects a vertex in U to one in V. Equivalently, a bipartite graph is a graph that does not contain any odd-length cycles.[1][2]

The two sets U and V may be thought of as a coloring of the graph with two colors: if one colors all nodes in U blue, and all nodes in V green, each edge has endpoints of differing colors, as is required in the graph coloring problem.[3][4] In contrast, such a coloring is impossible in the case of a non-bipartite graph, such as a triangle: after one node is colored blue and another green, the third vertex of the triangle is connected to vertices of both colors, preventing it from being assigned either color.

One often writes G=(U,V,E) to denote a bipartite graph whose partition has the parts U and V, with E denoting the edges of the graph. If a bipartite graph is not connected, it may have more than one bipartition;[5] in this case, the (U,V,E) notation is helpful in specifying one particular bipartition that may be of importance in an application. If |U|=|V|, that is, if the two subsets have equal cardinality, then G is called a balanced bipartite graph.[3] If vertices on the same side of the bipartition have the same degree, then G is called biregular.

Examples[edit]

When modelling relations between two different classes of objects, bipartite graphs very often arise naturally. For instance, a graph of football players and clubs, with an edge between a player and a club if the player has played for that club, is a natural example of an affiliation network, a type of bipartite graph used in social network analysis.[6]

Another example where bipartite graphs appear naturally is in the (NP-complete) railway optimization problem, in which the input is a schedule of trains and their stops, and the goal is to find as small a set of train stations as possible such that every train visits at least one of the chosen stations. This problem can be modeled as a dominating set problem in a bipartite graph that has a vertex for each train and each station and an edge for each pair of a station and a train that stops at that station.[7]

More abstract examples include the following:

  • Every tree is bipartite.[4]
  • Cycle graphs with an even number of vertices are bipartite.[4]
  • Every planar graph whose faces all have even length is bipartite.[8] Special cases of this are grid graphs and squaregraphs, in which every inner face consists of 4 edges and every inner vertex has four or more neighbors.[9]
  • The complete bipartite graph on m and n vertices, denoted by Kn,m is the bipartite graph G = (U, V, E), where U and V are disjoint sets of size m and n, respectively, and E connects every vertex in U with all vertices in V. It follows that Km,n has mn edges.[10] Closely related to the complete bipartite graphs are the crown graphs, formed from complete bipartite graphs by removing the edges of a perfect matching.[11]
  • Hypercube graphs, partial cubes, and median graphs are bipartite. In these graphs, the vertices may be labeled by bitvectors, in such a way that two vertices are adjacent if and only if the corresponding bitvectors differ in a single position. A bipartition may be formed by separating the vertices whose bitvectors have an even number of ones from the vertices with an odd number of ones. Trees and squaregraphs form examples of median graphs, and every median graph is a partial cube.[12]

Properties[edit]

Characterization[edit]

Bipartite graphs may be characterized in several different ways:

König's theorem and perfect graphs[edit]

In bipartite graphs, the size of minimum vertex cover is equal to the size of the maximum matching; this is König's theorem.[15][16] An alternative and equivalent form of this theorem is that the size of the maximum independent set plus the size of the maximum matching is equal to the number of vertices. In any graph without isolated vertices the size of the minimum edge cover plus the size of a maximum matching equals the number of vertices.[17] Combining this equality with König's theorem leads to the facts that, in bipartite graphs, the size of the minimum edge cover is equal to the size of the maximum independent set, and the size of the minimum edge cover plus the size of the minimum vertex cover is equal to the number of vertices.

Another class of related results concerns perfect graphs: every bipartite graph, the complement of every bipartite graph, the line graph of every bipartite graph, and the complement of the line graph of every bipartite graph, are all perfect. Perfection of bipartite graphs is easy to see (their chromatic number is two and their maximum clique size is also two) but perfection of the complements of bipartite graphs is less trivial, and is another restatement of König's theorem. This was one of the results that motivated the initial definition of perfect graphs.[18] Perfection of the complements of line graphs of perfect graphs is yet another restatement of König's theorem, and perfection of the line graphs themselves is a restatement of an earlier theorem of König, that every bipartite graph has an edge coloring using a number of colors equal to its maximum degree.

According to the strong perfect graph theorem, the perfect graphs have a forbidden graph characterization resembling that of bipartite graphs: a graph is bipartite if and only if it has no odd cycle as a subgraph, and a graph is perfect if and only if it has no odd cycle or its complement as an induced subgraph. The bipartite graphs, line graphs of bipartite graphs, and their complements form four out of the five basic classes of perfect graphs used in the proof of the strong perfect graph theorem.[19]

Relation to hypergraphs and directed graphs[edit]

The biadjacency matrix of a bipartite graph (U,V,E) is a (0,1)-matrix of size |U|\times|V| that has a one for each pair of adjacent vertices and a zero for nonadjacent vertices.[20] Biadjacency matrices may be used to describe equivalences between bipartite graphs, hypergraphs, and directed graphs.

A hypergraph is a combinatorial structure that, like an undirected graph, has vertices and edges, but in which the edges may be arbitrary sets of vertices rather than having to have exactly two endpoints. A bipartite graph (U,V,E) may be used to model a hypergraph in which U is the set of vertices of the hypergraph, V is the set of hyperedges, and E contains an edge from a hypergraph vertex v to a hypergraph edge e exactly when v is one of the endpoints of v. Under this correspondence, the biadjacency matrices of bipartite graphs are exactly the incidence matrices of the corresponding hypergraphs. As a special case of this correspondence between bipartite graphs and hypergraphs, any multigraph (a graph in which there may be two or more edges between the same two vertices) may be interpreted as a hypergraph in which some hyperedges have equal sets of endpoints, and represented by a bipartite graph that does not have multiple adjacencies and in which the vertices on one side of the bipartition all have degree two.[21]

A similar reinterpretation of adjacency matrices may be used to show a one-to-one correspondence between directed graphs (on a given number of labeled vertices, allowing self-loops) and balanced bipartite graphs, with the same number of vertices on both sides of the bipartition. For, the adjacency matrix of a directed graph with n vertices can be any (0,1)-matrix of size n\times n, which can then be reinterpreted as the adjacency matrix of a bipartite graph with n vertices on each side of its bipartition.[22] In this construction, the bipartite graph is the bipartite double cover of the directed graph.

Algorithms[edit]

Testing bipartiteness[edit]

It is possible to test whether a graph is bipartite, and to return either a two-coloring (if it is bipartite) or an odd cycle (if it is not) in linear time, using depth-first search. The main idea is to assign to each vertex the color that differs from the color of its parent in the depth-first search tree, assigning colors in a preorder traversal of the depth-first-search tree. This will necessarily provide a two-coloring of the spanning tree consisting of the edges connecting vertices to their parents, but it may not properly color some of the non-tree edges. In a depth-first search tree, one of the two endpoints of every non-tree edge is an ancestor of the other endpoint, and when the depth first search discovers an edge of this type it should check that these two vertices have different colors. If they do not, then the path in the tree from ancestor to descendant, together with the miscolored edge, form an odd cycle, which is returned from the algorithm together with the result that the graph is not bipartite. However, if the algorithm terminates without detecting an odd cycle of this type, then every edge must be properly colored, and the algorithm returns the coloring together with the result that the graph is bipartite.[23]

Alternatively, a similar procedure may be used with breadth-first search in place of depth-first search. Again, each node is given the opposite color to its parent in the search tree, in breadth-first order. If, when a vertex is colored, there exists an edge connecting it to a previously-colored vertex with the same color, then this edge together with the paths in the breadth-first search tree connecting its two endpoints to their lowest common ancestor forms an odd cycle. If the algorithm terminates without finding an odd cycle in this way, then it must have found a proper coloring, and can safely conclude that the graph is bipartite.[24]

For the intersection graphs of n line segments or other simple shapes in the Euclidean plane, it is possible to test whether the graph is bipartite and return either a two-coloring or an odd cycle in time O(n\log n), even though the graph itself may have as many as \Omega(n^2) edges.[25]

Odd cycle transversal[edit]

A graph with an odd cycle transversal of size 2: removing the two blue bottom vertices leaves a bipartite graph.

Odd cycle transversal is an NP-complete algorithmic problem that asks, given a graph G=(V,E) and a number k, whether there exists a set of k vertices whose removal from G would cause the resulting graph to be bipartite.[26] The problem is fixed-parameter tractable, meaning that there is an algorithm whose running time can be bounded by a polynomial function of the size of the graph multiplied by a larger function of k.[27] More specifically, the time for this algorithm is O(3^k \cdot mn), although this was not stated in that paper, but later given by Hüffner after a new analysis of the algorithm.[28]

The name odd cycle transversal comes from the fact that a graph is bipartite if and only if it has no odd cycles. Hence, to delete vertices from a graph in order to obtain a bipartite graph, one needs to "hit all odd cycle", or find a so-called odd cycle transversal set. In the illustration, one can observe that every odd cycle in the graph contains the blue (the bottommost) vertices, hence removing those vertices kills all odd cycles and leaves a bipartite graph.

The edge bipartization problem is the algorithmic problem of deleting as few edges as possible to make a graph bipartite.

Matching[edit]

A matching in a graph is a subset of its edges, no two of which share an endpoint. Polynomial time algorithms are known for many algorithmic problems on matchings, including maximum matching (finding a matching that uses as many edges as possible), maximum weight matching, and stable marriage.[29] In many cases, matching problems are simpler to solve on bipartite graphs than on non-bipartite graphs,[30] and many matching algorithms such as the Hopcroft–Karp algorithm for maximum cardinality matching[31] work correctly only on bipartite inputs.

As a simple example, suppose that a set P of people are all seeking jobs from among a set of J jobs, with not all people suitable for all jobs. This situation can be modeled as a bipartite graph (P,J,E) where an edge connects each job-seeker with each suitable job.[32] A perfect matching describes a way of simultaneously satisfying all job-seekers and filling all jobs; the marriage theorem provides a characterization of the bipartite graphs which allow perfect matchings. The National Resident Matching Program applies graph matching methods to solve this problem for U.S. medical student job-seekers and hospital residency jobs.[33]

The Dulmage–Mendelsohn decomposition is a structural decomposition of bipartite graphs that is useful in finding maximum matchings.[34]

Additional applications[edit]

Bipartite graphs are extensively used in modern coding theory, especially to decode codewords received from the channel. Factor graphs and Tanner graphs are examples of this. A Tanner graph is a bipartite graph in which the vertices on one side of the bipartition represent digits of a codeword, and the vertices on the other side represent combinations of digits that are expected to sum to zero in a codeword without errors.[35] A factor graph is a closely related belief network used for probabilistic decoding of LDPC and turbo codes.[36]

In computer science, a Petri net is a mathematical modeling tool used in analysis and simulations of concurrent systems. A system is modeled as a bipartite directed graph with two sets of nodes: A set of "place" nodes that contain resources, and a set of "event" nodes which generate and/or consume resources. There are additional constraints on the nodes and edges that constrain the behavior of the system. Petri nets utilize the properties of bipartite directed graphs and other properties to allow mathematical proofs of the behavior of systems while also allowing easy implementation of simulations of the system.[37]

In projective geometry, Levi graphs are a form of bipartite graph used to model the incidences between points and lines in a configuration. Corresponding to the geometric property of points and lines that every two lines meet in at most one point and every two points be connected with a single line, Levi graphs necessarily do not contain any cycles of length four, so their girth must be six or more.[38]

See also[edit]

  • Bipartite dimension, the minimum number of complete bipartite graphs whose union is the given graph
  • Bipartite double cover, a way of transforming any graph into a bipartite graph by doubling its vertices
  • Bipartite matroid, a class of matroids that includes the graphic matroids of bipartite graphs
  • Bipartite network projection, a weighting technique for compressing information about bipartite networks
  • Convex bipartite graph, a bipartite graph whose vertices can be ordered so that the vertex neighborhoods are contiguous
  • Quasi-bipartite graph, a type of Steiner tree problem instance in which the terminals form an independent set, allowing approximation algorithms that generalize those for bipartite graphs
  • Split graph, a graph in which the vertices can be partitioned into two subsets, one of which is independent and the other of which is a clique
  • Zarankiewicz problem on the maximum number of edges in a bipartite graph with forbidden subgraphs

References[edit]

  1. ^ Diestel, Reinard (2005). Graph Theory, Grad. Texts in Math. Springer. ISBN 978-3-642-14278-9. 
  2. ^ Asratian, Armen S.; Denley, Tristan M. J.; Häggkvist, Roland (1998), Bipartite Graphs and their Applications, Cambridge Tracts in Mathematics 131, Cambridge University Press, ISBN 9780521593458 .
  3. ^ a b c Asratian, Denley & Häggkvist (1998), p. 7.
  4. ^ a b c Scheinerman, Edward R. (2012), Mathematics: A Discrete Introduction (3rd ed.), Cengage Learning, p. 363, ISBN 9780840049421 .
  5. ^ Chartrand, Gary; Zhang, Ping (2008), Chromatic Graph Theory, Discrete Mathematics And Its Applications 53, CRC Press, p. 223, ISBN 9781584888000 .
  6. ^ Wasserman, Stanley; Faust, Katherine (1994), Social Network Analysis: Methods and Applications, Structural Analysis in the Social Sciences 8, Cambridge University Press, pp. 299–302, ISBN 9780521387071 .
  7. ^ Niedermeier, Rolf (2006). Invitation to Fixed Parameter Algorithms (Oxford Lecture Series in Mathematics and Its Applications). Oxford. pp. 20–21. ISBN 978-0-19-856607-6. 
  8. ^ Soifer, Alexander (2008), The Mathematical Coloring Book, Springer-Verlag, pp. 136–137, ISBN 978-0-387-74640-1 . This result has sometimes been called the "two color theorem"; Soifer credits it to a famous 1879 paper of Alfred Kempe containing a false proof of the four color theorem.
  9. ^ Bandelt, H.-J.; Chepoi, V.; Eppstein, D. (2010), "Combinatorics and geometry of finite and infinite squaregraphs", SIAM Journal on Discrete Mathematics 24 (4): 1399–1440, arXiv:0905.4537, doi:10.1137/090760301 .
  10. ^ Asratian, Denley & Häggkvist (1998), p. 11.
  11. ^ Archdeacon, D.; Debowsky, M.; Dinitz, J.; Gavlas, H. (2004), "Cycle systems in the complete bipartite graph minus a one-factor", Discrete Mathematics 284 (1–3): 37–43, doi:10.1016/j.disc.2003.11.021 .
  12. ^ Ovchinnikov, Sergei (2011), Graphs and Cubes, Universitext, Springer . See especially Chapter 5, "Partial Cubes", pp. 127–181.
  13. ^ Asratian, Denley & Häggkvist (1998), Theorem 2.1.3, p. 8. Asratian et al. attribute this characterization to a 1916 paper by Dénes Kőnig.
  14. ^ Biggs, Norman (1994), Algebraic Graph Theory, Cambridge Mathematical Library (2nd ed.), Cambridge University Press, p. 53, ISBN 9780521458979 .
  15. ^ Kőnig, Dénes (1931). "Gráfok és mátrixok". Matematikai és Fizikai Lapok 38: 116–119. .
  16. ^ Gross, Jonathan L.; Yellen, Jay (2005), Graph Theory and Its Applications, Discrete Mathematics And Its Applications (2nd ed.), CRC Press, p. 568, ISBN 9781584885054 .
  17. ^ Chartrand, Gary; Zhang, Ping (2012), A First Course in Graph Theory, Courier Dover Publications, pp. 189–190, ISBN 9780486483689 .
  18. ^ Béla Bollobás (1998), Modern Graph Theory, Graduate Texts in Mathematics 184, Springer, p. 165, ISBN 9780387984889 .
  19. ^ Chudnovsky, Maria; Robertson, Neil; Seymour, Paul; Thomas, Robin (2006), "The strong perfect graph theorem", Annals of Mathematics 164 (1): 51–229, doi:10.4007/annals.2006.164.51 .
  20. ^ Asratian, Denley & Häggkvist (1998), p. 17.
  21. ^ A. A. Sapozhenko (2001), "Hypergraph", in Hazewinkel, Michiel, Encyclopedia of Mathematics, Springer, ISBN 978-1-55608-010-4 
  22. ^ Brualdi, Richard A.; Harary, Frank; Miller, Zevi (1980), "Bigraphs versus digraphs via matrices", Journal of Graph Theory 4 (1): 51–73, doi:10.1002/jgt.3190040107, MR 558453 . Brualdi et al. credit the idea for this equivalence to Dulmage, A. L.; Mendelsohn, N. S. (1958), "Coverings of bipartite graphs", Canadian Journal of Mathematics 10: 517–534, doi:10.4153/CJM-1958-052-0, MR 0097069 .
  23. ^ Sedgewick, Robert (2004), Algorithms in Java, Part 5: Graph Algorithms (3rd ed.), Addison Wesley, pp. 109–111 .
  24. ^ Kleinberg, Jon; Tardos, Éva (2006), Algorithm Design, Addison Wesley, pp. 94–97 .
  25. ^ Eppstein, David (2009), "Testing bipartiteness of geometric intersection graphs", ACM Transactions on Algorithms 5 (2): Art. 15, arXiv:cs.CG/0307023, doi:10.1145/1497290.1497291, MR 2561751 .
  26. ^ Yannakakis, Mihalis (1978), "Node-and edge-deletion NP-complete problems", Proceedings of the 10th ACM Symposium on Theory of Computing (STOC '78), pp. 253–264, doi:10.1145/800133.804355 
  27. ^ Reed, Bruce; Smith, Kaleigh; Vetta, Adrian (2004), "Finding odd cycle transversals", Operations Research Letters 32 (4): 299–301, doi:10.1016/j.orl.2003.10.009, MR 2057781 .
  28. ^ Hüffner, Falk (2005), "Algorithm engineering for optimal graph bipartization", Experimental and Efficient Algorithms: 240–252, doi:10.1007/11427186_22 .
  29. ^ Ahuja, Ravindra K.; Magnanti, Thomas L.; Orlin, James B. (1993), "12. Assignments and Matchings", Network Flows: Theory, Algorithms, and Applications, Prentice Hall, pp. 461–509 .
  30. ^ Ahuja, Magnanti & Orlin (1993), p. 463: "Nonbipartite matching problems are more difficult to solve because they do not reduce to standard network flow problems."
  31. ^ Hopcroft, John E.; Karp, Richard M. (1973), "An n5/2 algorithm for maximum matchings in bipartite graphs", SIAM Journal on Computing 2 (4): 225–231, doi:10.1137/0202019 .
  32. ^ Ahuja, Magnanti & Orlin (1993), Application 12.1 Bipartite Personnel Assignment, pp. 463–464.
  33. ^ Robinson, Sara (April 2003), "Are Medical Students Meeting Their (Best Possible) Match?", SIAM News (3): 36 .
  34. ^ Dulmage & Mendelsohn (1958).
  35. ^ Moon, Todd K. (2005), Error Correction Coding: Mathematical Methods and Algorithms, John Wiley & Sons, p. 638, ISBN 9780471648000 .
  36. ^ Moon (2005), p. 686.
  37. ^ Cassandras, Christos G.; Lafortune, Stephane (2007), Introduction to Discrete Event Systems (2nd ed.), Springer, p. 224, ISBN 9780387333328 .
  38. ^ Grünbaum, Branko (2009), Configurations of Points and Lines, Graduate Studies in Mathematics 103, American Mathematical Society, p. 28, ISBN 9780821843086 .

External links[edit]