networks[graphical] - tests whether a list of integers is graphical
|
Calling Sequence
|
|
graphical(intlist)
graphical(intlist, 'MULTI')
|
|
Parameters
|
|
intlist
|
-
|
list of non-negative integers
|
'MULTI'
|
-
|
specifies that multigraph is permitted
|
|
|
|
|
Description
|
|
•
|
This procedure tests whether intlist is the degree sequence of a simple graph (or multigraph with no loops if 'MULTI' is specified).
|
•
|
If intlist is graphical (multigraphical) the procedure call returns a list of edges for one realization of intlist as a graph. Otherwise it returns FAIL.
|
•
|
This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[graphical](...).
|
|
|
Examples
|
|
Important: The networks package has been deprecated. Use the superseding package GraphTheory instead.
>
|
|
>
|
|
>
|
|
>
|
|
![[{1, 7}, {1, 3}, {1, 5}, {1, 4}, {1, 6}, {1, 2}, {3, 7}, {6, 7}, {4, 7}, {5, 7}, {2, 7}, {2, 3}, {3, 5}, {3, 4}, {3, 6}, {2, 6}, {4, 5}]](/support/helpjp/helpview.aspx?si=8226/file07418/math114.png)
| (1) |
>
|
|
>
|
|
| (2) |
>
|
|
>
|
|
>
|
|
| (3) |
>
|
|
>
|
|
| (4) |
>
|
|
| (5) |
|
|