# Interval graph

In graph theory, an interval graph is an undirected graph formed from a set of intervals on the real line, with a vertex for each interval and an edge between vertices whose intervals intersect. It is the intersection graph of the intervals.
Interval graphs are chordal graphs and perfect graphs. They can be recognized in linear time, and an optimal graph coloring or maximum clique in these graphs can be found in linear time. The interval graphs include all proper interval graphs, graphs defined in the same way from a set of unit intervals.
These graphs have been used to model food webs, and to study scheduling problems in which one must select a subset of tasks to be performed at non-overlapping times. Other applications include assembling contiguous subsequences in DNA mapping, and temporal reasoning.

## Definition

An interval graph is an undirected graph G formed from a family of intervals
    $S_{i},\quad i=0,1,2,\dots$
by creating one vertex v$_i$ for each interval S$_i$, and connecting two vertices v$_i$ and v$_j$ by an edge whenever the corresponding two sets have a nonempty intersection. That is, the edge set of G is
    $E(G)=\{(v_{i},v_{j})\mid S_{i}\cap S_{j}\neq \emptyset \}.$
It is the intersection graph of the intervals.

## Characterizations

Three independent vertices form an asteroidal triple (AT) in a graph if, for each two, there exists a path containing those two but no neighbor of the third. A graph is AT-free if it has no asteroidal triple. The earliest characterization of interval graphs seems to be the following:
* A graph is an interval graph if and only if it is chordal and AT-free.
Other characterizations:
* A graph is an interval graph if and only if its maximal cliques can be ordered $M_{1},M_{2},\dots ,M_{k}$ such that each vertex that belongs to two of these cliques also belongs to all cliques between them in the ordering. That is, for every $v\in M_{i}\cap M_{k}$ with Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "http://localhost:6011/en.wikipedia.org/v1/":): {\displaystyle i<k} , it is also the case that $v\in M_{j}$ whenever $i<j<k$.
* A graph is an interval graph if and only if it does not contain the cycle graph $C_{4}$ as an induced subgraph and is the complement of a comparability graph.
Various other characterizations of interval graphs and variants have been described.

## Efficient recognition algorithm

Determining whether a given graph $G=(V,E)$ is an interval graph can be done in $O(|V|+|E|)$ time by seeking an ordering of the maximal cliques of $G$ that is consecutive with respect to vertex inclusion. Many of the known algorithms for this problem work in this way, although it is also possible to recognize interval graphs in linear time without using their cliques.
The original linear time recognition algorithm of Booth & Lueker (1976) is based on their complex PQ tree data structure, but Habib et al. (2000) showed how to solve the problem more simply using lexicographic breadth-first search, based on the fact that a graph is an interval graph if and only if it is chordal and its complement is a comparability graph. A similar approach using a 6-sweep LexBFS algorithm is described in Corneil, Olariu & Stewart (2009).

## Related families of graphs

By the characterization of interval graphs as AT-free chordal graphs, interval graphs are strongly chordal graphs and hence perfect graphs. Their complements belong to the class of comparability graphs, and the comparability relations are precisely the interval orders.
From the fact that a graph is an interval graph if and only if it is chordal and its complement is a comparability graph, it follows that graph and its complement are both interval graphs if and only if the graph is both a split graph and a permutation graph.
The interval graphs that have an interval representation in which every two intervals are either disjoint or nested are the trivially perfect graphs.
A graph has boxicity at most one if and only if it is an interval graph; the boxicity of an arbitrary graph $G$ is the minimum number of interval graphs on the same set of vertices such that the intersection of the edges sets of the interval graphs is $G$.
The intersection graphs of arcs of a circle form circular-arc graphs, a class of graphs that contains the interval graphs. The trapezoid graphs, intersections of trapezoids whose parallel sides all lie on the same two parallel lines, are also a generalization of the interval graphs.
The connected triangle-free interval graphs are exactly the caterpillar trees.

### Proper interval graphs

Proper interval graphs are interval graphs that have an interval representation in which no interval properly contains any other interval; unit interval graphs are the interval graphs that have an interval representation in which each interval has unit length. A unit interval representation without repeated intervals is necessarily a proper interval representation. Not every proper interval representation is a unit interval representation, but every proper interval graph is a unit interval graph, and vice versa. Every proper interval graph is a claw-free graph; conversely, the proper interval graphs are exactly the claw-free interval graphs. However, there exist claw-free graphs that are not interval graphs.
An interval graph is called $q$-proper if there is a representation in which no interval is contained by more than $q$ others. This notion extends the idea of proper interval graphs such that a 0-proper interval graph is a proper interval graph. An interval graph is called $p$-improper if there is a representation in which no interval contains more than $p$ others. This notion extends the idea of proper interval graphs such that a 0-improper interval graph is a proper interval graph. An interval graph is $k$-nested if there is no chain of length $k+1$ of intervals nested in each other. This is a generalization of proper interval graphs as 1-nested interval graphs are exactly proper interval graphs.

## Applications

The mathematical theory of interval graphs was developed with a view towards applications by researchers at the RAND Corporation's mathematics department, which included young researchers—such as Peter C. Fishburn and students like Alan C. Tucker and Joel E. Cohen—besides leaders—such as Delbert Fulkerson and (recurring visitor) Victor Klee. Cohen applied interval graphs to mathematical models of population biology, specifically food webs.
Interval graphs are used to represent resource allocation problems in operations research and scheduling theory. In these applications, each interval represents a request for a resource (such as a processing unit of a distributed computing system or a room for a class) for a specific period of time. The maximum weight independent set problem for the graph represents the problem of finding the best subset of requests that can be satisfied without conflicts. See interval scheduling for more information.
An optimal graph coloring of the interval graph represents an assignment of resources that covers all of the requests with as few resources as possible; it can be found in polynomial time by a greedy coloring algorithm that colors the intervals in sorted order by their left endpoints.
Other applications include genetics, bioinformatics, and computer science. Finding a set of intervals that represent an interval graph can also be used as a way of assembling contiguous subsequences in DNA mapping. Interval graphs also play an important role in temporal reasoning.

## Interval completions and pathwidth

If $G$ is an arbitrary graph, an interval completion of $G$ is an interval graph on the same vertex set that contains $G$ as a subgraph. The parameterized version of interval completion (find an interval supergraph with k additional edges) is fixed parameter tractable, and moreover, is solvable in parameterized subexponential time.
The pathwidth of an interval graph is one less than the size of its maximum clique (or equivalently, one less than its chromatic number), and the pathwidth of any graph $G$ is the same as the smallest pathwidth of an interval graph that contains $G$ as a subgraph.

## Combinatorial enumeration

The number of connected interval graphs on $n$ unlabeled vertices, for $n=1,2,3,\dots$, is:
    1, 1, 2, 5, 15, 56, 250, 1328, 8069, 54962, 410330, 3317302, ... (sequence A005976 in the OEIS)
Without the assumption of connectivity, the numbers are larger. The number of interval graphs on $n$ unlabeled vertices, not necessarily connected, is:
    1, 2, 4, 10, 27, 92, 369, 1807, 10344, 67659, 491347, 3894446, ... (sequence A005975 in the OEIS)
These numbers exhibit faster than exponential growth: the number of interval graphs on $3n$ unlabeled vertices is at least $n!/3^{3n}$. Because of this fast growth rate, the interval graphs do not have bounded twin-width.