Он
содержит обширное количество функций,
используемых в теории Графов:
acycpoly addedge
addvertex adjacency
allpairs
ancestor arrivals
bicomponents charpoly
chrompoly
complement complete
components connect
connectivity
contract countcuts
counttrees cube cycle
cyclebase daughter
degreeseq delete departures
diameter dinic
djspantree dodecahedron
draw
duplicate edges
ends eweight flow
flowpoly fundcyc
getlabel girth graph
graphical gsimp
gunion head icosahedron
incidence incident
indegree induce isplanar
maxdegree mincut
mindegree neighbors
new
octahedron outdegree
path petersen random
rank rankpoly
shortpathtree show
shrink
span spanpoly
spantree tail tetrahedron
tuttepoly vdegree
vertices void vweight
Пример построения графа.
> restart;with(networks):
Создаем новый граф g.
> new(g):
Добавляем вершины 1, 2, .. 6.
> addvertex({1,2,3,4,5,6},g);
Соединяем вершины 1,2 c вершинами 3,4,5,6.
> connect({1,2},{3,4,5,6},g);
Строим граф (рис. 76)
> draw(g);
Строим граф (рис. 76)
> draw(g);
Рис. 76
Связность графа
> connectivity(g);
Минимальное число разрезов
> countcuts(g);
|