Close
Close window
Condensation - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

GraphTheory

Condensation

condense graph to its strongly connected components

Calling Sequence

Condensation(G)

Parameters

G

-

graph

Description

Condensation(G) returns the condensation of G.

The vertices of the resulting graph are integers corresponding to the index of the strongly connected component returned by StronglyConnectedComponents .

Definition

The condensation of a graph G is a graph C whose vertices correspond to the strongly connected components of G. An edge exists in C from u to v if there exists an edge from a to b in G for a a vertex in the strongly connected component corresponding to u, and b a vertex in the strongly connected component corresponding to v.

Note if G is undirected, the condensation has no edges. This operation is therefore generally most interesting for directed graphs.

Examples

The graph below is connected but not strongly connected since vertex 1 is not reachable from vertices 2 or 3.

>

withGraphTheory:

>

TDigraph1,2,3,1,2,1,3,2,3,3,2

TGraph 1: a directed graph with 3 vertices and 4 arcs

(1)
>

DrawGraphT

>

IsConnectedT

true

(2)
>

CondensationT

Graph 2: a directed graph with 2 vertices and 1 arc

(3)
>

GDigraph1,2,2,3,3,4

GGraph 3: a directed graph with 4 vertices and 3 arcs

(4)
>

CondensationG

Graph 4: a directed graph with 4 vertices and 3 arcs

(5)

Compatibility

The GraphTheory[Condensation] command was introduced in Maple 2024.

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


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /