`posets/text/connected` := TEXT(
` `,
`FUNCTION:  connected - connected components and poset connectivity test`,
` `,
`CALLING SEQUENCE:  connected(P);    connected(P,'C');`,
`                   connected(P,X);  connected(P,X,'C');`,
`                   connected(P,n);  connected(P,n,'C');`,
`                   `,
`PARAMETERS:  P = a poset`,
`             X = a set (the vertex set)`,
`             n = a positive integer (the number of vertices)`,
`             C = a name (optional)`,
`   `,
`SYNOPSIS:`,
`  If P is a poset with vertex set X, then connected(P,X) returns true or`,
`  false according to whether P is connected. More generally, if P is the`,
`  edge set of any directed graph, connected(P,X) determines whether the`,
`  graph is weakly connected.`,
`   `,
`  connected(P,n) does the same, if the vertex set of P is {1,...,n}.`,
`  connected(P) does the same, assuming that P has no isolated vertices.`,
`   `,
`  Optionally, if the last argument is an unassigned name, such as C,`,
`  then in addition to testing the weak connectivity of P, the procedure`,
`  assigns to C the set of vertex sets of the connected components of P.`,
`   `,
`  For extracting the subposet of P induced by one of its connected`,
`  components, use the 'subposet' function.`,
`   `,
`EXAMPLES:`,
`  P:=chain(2) &u chain(3);`,
`  connected(P,'C'),C;          yields     false, {{1,2}, {3,4,5}}`,
`  P:=chain(2) &* chain(3);`,
`  connected(P);                yields             true`,
`  connected(P,7);              yields             false`,
`  `,
`SEE ALSO:  ranked, subposet`,
NULL):

if `+`(0)=0 then # Maple V.4 or later
  print(INTERFACE_HELP(insert, topic=`posets/connected`,
  helpfile=HomeLib, text=`posets/text/connected`))
elif ceil(0)=0 then # Maple V.2 or V.3
  `help/posets/text/connected`:=`posets/text/connected`:
  save `help/posets/text/connected`, cat(HomeLib,`/help/posets/text/connected.m`)
fi:
