GraphTheory - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Discrete Mathematics : Graph Theory : GraphTheory Package : GraphTheory/IntervalGraph

GraphTheory

  

IntervalGraph

  

construct an interval graph

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

IntervalGraph( c )

Parameters

c

-

a list or Array of intervals

Description

• 

The IntervalGraph( c ) command returns an interval graph for the collection of intervals c.

• 

An interval graph is the intersection graph of a set of intervals on the real line. For any vertices i, j in the the graph, an edge between i and j exists if and only if the intervals i and j intersect.

Examples

Compute the interval graph for {1..3, 2..4, 3..5}.

withGraphTheory:

GIntervalGraph1..3,2..4,3..5

GGraph 1: an undirected unweighted graph with 3 vertices and 3 edge(s)

(1)

Construct a schedule to distribute a set of business meetings across several conference rooms.

Meetings9..11.5,9.5..10,9.75..15,11.5..15,12.5..13.5,14.5..17,16.5..17.5

Meetings9..11.5,9.5..10,9.75..15,11.5..15,12.5..13.5,14.5..17,16.5..17.5

(2)

RoomNamesSuite Infinity,Geddes Suite,Taylor's Suite

RoomNamesSuite Infinity,Geddes Suite,Taylor's Suite

(3)

ScheduleGreedyColorIntervalGraphMeetings

Schedule3,1,2,0,2,1,1,0

(4)

Roomi→RoomNamesSchedule2ListTools:-Searchi,Meetings+1:

ListTools:-ClassifyRoom,Meetings

tableGeddes Suite=9..11.5,12.5..13.5,14.5..17,Suite Infinity=9.75..15,16.5..17.5,Taylor's Suite=9.5..10,11.5..15

(5)

Visualize the relationships within a set of intervals.

GIntervalGraph0..8,1..Pi,ⅇ..20,7..18,11..14,17..24,23..25

GGraph 2: an undirected unweighted graph with 7 vertices and 10 edge(s)

(6)

DrawGraphG

Compatibility

• 

The GraphTheory[IntervalGraph] command was introduced in Maple 2016.

• 

For more information on Maple 2016 changes, see Updates in Maple 2016.

See Also

GraphTheory