eseq {PairViz} | R Documentation |
Constructs an eulerian
on the complete graph where nodes are integers 1..n. The result in an euler tour for odd n
. For even n
the result is not exactly an euler tour or path because (n-2)/2 edges must be visited twice.
eseq(n) eseqa(n) kntour_drop(e) kntour_add(e)
n |
a positive integer. |
e |
an euler tour on Kn where n is odd. |
The algorithm used for eseq builds up an euler tour on 1..n by appending extra edges on to the tour on 1..(n-2).
The function eseqa constructs tours on 1..n using an alternative algorithm.
The function kntour_drop removes instances of n from the euler tour, creating an open approximately eulerian path on the complete graph with n-1 nodes.
The function kntour_add inserts an extra node n+1 into an euler tour on the complete graph on n nodes. It adds a detour to the tour visiting all edges joining nodes 1..n to n+1. The result is an open approximately eulerian path on the complete graph with n+1 nodes.
a numeric vector.
C.B. Hurley and R.W. Oldford
see overview
require(PairViz) eseq(5) eseq(6)