# Indifference graph

In graph theory, a branch of mathematics, an indifference graph is an undirected graph constructed by assigning a real number to each vertex and connecting two vertices by an edge when their numbers are within one unit of each other. Indifference graphs are also the intersection graphs of sets of unit intervals, or of properly nested intervals (intervals none of which contains any other one). Based on these two types of interval representations, these graphs are also called unit interval graphs or proper interval graphs; they form a subclass of the interval graphs.

## Equivalent characterizations

The finite indifference graphs may be equivalently characterized as
* The intersection graphs of unit intervals,
* The intersection graphs of sets of intervals no two of which are nested (one containing the other),
* The claw-free interval graphs,
* The graphs that do not have an induced subgraph isomorphic to a claw K$_{1,3}$, net (a triangle with a degree-one vertex adjacent to each of the triangle vertices), sun (a triangle surrounded by three other triangles that each share one edge with the central triangle), or hole (cycle of length four or more),
* The incomparability graphs of semiorders,
* The undirected graphs that have a linear order such that, for every three vertices ordered $u$–$v$–$w$, if $uw$ is an edge then so are $uv$ and $vw$
* The graphs with no astral triple, three vertices connected pairwise by paths that avoid the third vertex and also do not contain two consecutive neighbors of the third vertex,
* The graphs in which each connected component contains a path in which each maximal clique of the component forms a contiguous sub-path,
* The graphs whose vertices can be numbered in such a way that every shortest path forms a monotonic sequence,
* The graphs whose adjacency matrices can be ordered such that, in each row and each column, the nonzeros of the matrix form a contiguous interval adjacent to the main diagonal of the matrix.
* The induced subgraphs of powers of chordless paths.
* The leaf powers having a leaf root which is a caterpillar.
For infinite graphs, some of these definitions may differ.

## Properties

Because they are special cases of interval graphs, indifference graphs have all the properties of interval graphs; in particular they are a special case of the chordal graphs and of the perfect graphs. They are also a special case of the circle graphs, something that is not true of interval graphs more generally.
In the Erdős–Rényi model of random graphs, an $n$-vertex graph whose number of edges is significantly less than $n^{2/3}$ will be an indifference graph with high probability, whereas a graph whose number of edges is significantly more than $n^{2/3}$ will not be an indifference graph with high probability.
The bandwidth of an arbitrary graph $G$ is one less than the size of the maximum clique in an indifference graph that contains $G$ as a subgraph and is chosen to minimize the size of the maximum clique. This property parallels similar relations between pathwidth and interval graphs, and between treewidth and chordal graphs. A weaker notion of width, the clique-width, may be arbitrarily large on indifference graphs. However, every proper subclass of the indifference graphs that is closed under induced subgraphs has bounded clique-width.
Every connected indifference graph has a Hamiltonian path. An indifference graph has a Hamiltonian cycle if and only if it is biconnected.
Indifference graphs obey the reconstruction conjecture: they are uniquely determined by their vertex-deleted subgraphs.

## Algorithms

As with higher dimensional unit disk graphs, it is possible to transform a set of points into their indifference graph, or a set of unit intervals into their unit interval graph, in linear time as measured in terms of the size of the output graph. The algorithm rounds the points (or interval centers) down to the nearest smaller integer, uses a hash table to find all pairs of points whose rounded integers are within one of each other (the fixed-radius near neighbors problem), and filters the resulting list of pairs for the ones whose unrounded values are also within one of each other.
It is possible to test whether a given graph is an indifference graph in linear time, by using PQ trees to construct an interval representation of the graph and then testing whether a vertex ordering derived from this representation satisfies the properties of an indifference graph. It is also possible to base a recognition algorithm for indifference graphs on chordal graph recognition algorithms. Several alternative linear time recognition algorithms are based on breadth-first search or lexicographic breadth-first search rather than on the relation between indifference graphs and interval graphs.
Once the vertices have been sorted by the numerical values that describe an indifference graph (or by the sequence of unit intervals in an interval representation) the same ordering can be used to find an optimal graph coloring for these graphs, to solve the shortest path problem, and to construct Hamiltonian paths and maximum matchings, all in linear time. A Hamiltonian cycle can be found from a proper interval representation of the graph in time $O(n\log n)$, but when the graph itself is given as input, the same problem admits linear-time solution that can be generalized to interval graphs.
List coloring remains NP-complete even when restricted to indifference graphs. However, it is fixed-parameter tractable when parameterized by the total number of colors in the input.

## Applications

In mathematical psychology, indifference graphs arise from utility functions, by scaling the function so that one unit represents a difference in utilities small enough that individuals can be assumed to be indifferent to it. In this application, pairs of items whose utilities have a large difference may be partially ordered by the relative order of their utilities, giving a semiorder.
In bioinformatics, the problem of augmenting a colored graph to a properly colored unit interval graph can be used to model the detection of false negatives in DNA sequence assembly from complete digests.