In the mathematical field of graph theory, a bipartite graph (or bigraph) is a graph whose vertices can be divided into two disjoint and independent sets {\displaystyle U}U and {\displaystyle V}V, that is every edge connects a vertex in {\displaystyle U}U to one in {\displaystyle V}V. Vertex sets {\displaystyle U}U and {\displaystyle V}V are usually called the parts of the graph. Equivalently, a bipartite graph is a graph that does not contain any odd-length cycles.[1][2]
The two sets {\displaystyle U}U and {\displaystyle V}V may be thought of as a coloring of the graph with two colors: if one colors all nodes in {\displaystyle U}U blue, and all nodes in {\displaystyle V}V red, 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 red, the third vertex of the triangle is connected to vertices of both colors, preventing it from being assigned either color.
One often writes {\displaystyle G=(U,V,E)}G=(U,V,E) to denote a bipartite graph whose partition has the parts {\displaystyle U}U and {\displaystyle V}V, with {\displaystyle E}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 {\displaystyle (U,V,E)}(U,V,E) notation is helpful in specifying one particular bipartition that may be of importance in an application. If {\displaystyle |U|=|V|}|U|=|V|, that is, if the two subsets have equal cardinality, then {\displaystyle G}G is called a balanced bipartite graph.[3] If all vertices on the same side of the bipartition have the same degree, then {\displaystyle G}G is called biregular.
Example of a bipartite graph without cycles
A complete bipartite graph with m = 5 and n = 3
The Heawood graph is bipartite.
Contents
1 Examples
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 a set of train stations as small 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]
A third example is in the academic field of numismatics. Ancient coins are made using two positive impressions of the design (the obverse and reverse). The charts numismatists produce to represent the production of coins are bipartite graphs.[8]
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.[9] 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.[10]
The complete bipartite graph on m and n vertices, denoted by Kn,m is the bipartite graph {\displaystyle G=(U,V,E)}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.[11] Closely related to the complete bipartite graphs are the crown graphs, formed from complete bipartite graphs by removing the edges of a perfect matching.[12]
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.[13]
2 Properties
2.1 Characterization
2.2 Kőnig’s theorem and perfect graphs
2.3 Degree
2.4 Relation to hypergraphs and directed graphs
3 Algorithms
3.1 Testing bipartiteness
3.2 Odd cycle transversal
3.3 Matching
4 Additional applications
5 See also
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 hypergraph, a generalization of bipartiteness to hypergraphs.
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
Multipartite graph, a generalization of bipartite graphs to more than two subsets of vertices
Parity graph, a generalization of bipartite graphs in which every two induced paths between the same two points have the same parity
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