# Half graph

In graph theory, a branch of mathematics, a half graph is a special type of bipartite graph. These graphs are called the half graphs because they have approximately half of the edges of a complete bipartite graph on the same vertices. The name was given to these graphs by Paul Erdős and András Hajnal.

## Definition

To define the half graph on $2n$ vertices $u_{1},\dots u_{n}$ and $v_{1},\dots v_{n}$, connect $u_{i}$ to $v_{j}$ by an edge whenever $i\leq j$.
The same concept can also be defined in the same way for infinite graphs over two copies of any ordered set of vertices. The half graph over the natural numbers (with their usual ordering) has the property that each vertex $v_{j}$ has finite degree, at most $j$. The vertices on the other side of the bipartition have infinite degree.

## Properties
### Distances

In a half graph, every two vertices are at distance one, two, or three. Any two vertices $u_{i}$ and $u_{j}$ are at distance two via a path through $v_{n}$, and any two vertices $v_{i}$ and $v_{j}$ are at distance two via a path through $u_{1}$. If two vertices on opposite sides of the bipartition are not adjacent (at distance one), then they are at distance three via a path through both $u_{1}$ and $v_{n}$. Half-graphs are a special case of the bipartite chain graphs (bipartite graphs in which, on each side of the bipartition, the vertices can be ordered by neighborhood inclusion), which are in turn a special case of the bipartite distance-hereditary graphs. Thus, half-graphs are distance-hereditary. That is, in every connected induced subgraph of a half-graph, the distances are the same as in the half-graph itself.

### Matching

The half graph has a unique perfect matching. This is straightforward to see by induction: $u_{n}$ must be matched to its only neighbor, $v_{n}$, and the remaining vertices form another half graph. More strongly, every bipartite graph with a unique perfect matching is a subgraph of a half graph.

### In graphs of uncountable chromatic number

If the chromatic number of a graph is uncountable, then the graph necessarily contains as a subgraph a half graph on the natural numbers. This half graph, in turn, contains every complete bipartite graph in which one side of the bipartition is finite and the other side is countably infinite.

## Applications
### Regularity

One application for the half graph occurs in the Szemerédi regularity lemma, which states that the vertices of any graph can be partitioned into a constant number of subsets of equal size, such that most pairs of subsets are regular (the edges connecting the pair behave in certain ways like a random graph of some particular density). If the half graph is partitioned in this way into $k$ subsets, the number of irregular pairs will be at least proportional to $k$. Therefore, it is not possible to strengthen the regularity lemma to show the existence of a partition for which all pairs are regular. On the other hand, for any integer $k$, the graphs that do not have a $2k$-vertex half graph as an induced subgraph obey a stronger version of the regularity lemma with no irregular pairs.

### Stability

Saharon Shelah's unstable formula theorem in model theory characterizes the stable theories (complete theories that have few types) by the nonexistence of countably infinite half graphs. Shelah defines a complete theory as having the order property if there exist a model $M$ of the theory, a formula $\phi ({\bar {x}},{\bar {y}})$ on two finite tuples of free variables ${\bar {x}}$ and ${\bar {y}}$, and a system of countably many values ${\bar {x}}_{i}$ and ${\bar {y}}_{i}$ for these variables such that the pairs ${\bigl \({\bar {x}}_{i},{\bar {y}}_{i})\mid M\models \phi ({\bar {x}}_{i},{\bar {y}}_{j}){\bigr \}}$ form the edges of a countable half graph on vertices ${\bar {x}}_{i}$ and ${\bar {y}}_{i}$. Intuitively, the existence of these half graphs allows one to construct infinite ordered sets within the model. The unstable formula theorem states that a complete theory is stable if and only if it does not have the order property.

## Computational complexity

Under a form of the exponential time hypothesis, there is no fixed-parameter tractable algorithm for finding a half-graph of a given size in a larger bipartite graph, either as a subgraph or an induced subgraph, when parameterized by the size of the half-graph.