GraphTheory
IntervalGraph
construct an interval graph
IsIntervalGraph
test if graph is an interval graph
Calling Sequence
Parameters
Description
Definition
Examples
Compatibility
IntervalGraph(C)
IsIntervalGraph(G)
C
-
a list, Vector, or 1-D Array of intervals
G
an undirected graph
IntervalGraph(c) returns an interval graph for the collection of intervals C.
Each element of the input C must be a range or a RealRange expression. A range a..b is interpreted as the closed real interval from a to b. To specify open or half-open intervals, you can use RealRange.
The vertices of the resulting graph correspond to the intervals given in C. An edge between vertices exists if the corresponding intervals have non-empty intersection.
IsIntervalGraph(G) tests whether the graph G could be expressed as an interval graph for some collection of intervals.
An interval graph is the intersection graph of a set of intervals on the real line. For any vertices , in the graph, an edge between and exists if and only if the intervals and have non-empty intersection.
Compute the interval graph for {1..3, 2..4, 3..5}.
Construct a schedule to distribute a set of business meetings across several conference rooms.
The following interval graph has only one edge because the intervals 0..1 and 1..2 intersect at 1, but the half-open interval does not intersect 0..1.
Visualize the relationships within a set of intervals.
Verify this is an interval graph
The GraphTheory[IntervalGraph] command was introduced in Maple 2016.
For more information on Maple 2016 changes, see Updates in Maple 2016.
The GraphTheory[IntervalGraph] command was updated in Maple 2020.
The GraphTheory[IsIntervalGraph] command was introduced in Maple 2022.
For more information on Maple 2022 changes, see Updates in Maple 2022.
See Also
IntersectionGraph
Download Help Document