This is some functions for Pari/GP calculations on labelled oriented trees (graph theory trees) as "vpar" vector of parent vertex numbers.
Vertices are numbered 1 to n and each vpar[v] is its parent, or 0 if no parent. Such a representation is oriented (in that there is a distinguished root or roots), and labelled in that each vertex has a particular number. There are no other attributes etc.
The main use is to calculate or verify properties of specific trees of interest. Various functions like diameter are the same for any root or labelling so effectively act as on a "free" tree.
vpar.gp(92k, and sig)
vpar-2.tar.gz(69k, and sig)
vpar.gp is enough to run. The
includes some self-tests and some work-in-progress extras (most of which work
but may change wildly). The sig files are Gnu
PG ascii armoured signatures generated from my
This page Copyright 2017 Kevin Ryde, except for the GPLv3 logo which is Copyright Free Software Foundation and used here in accordance with its terms.
(Back to the sitemap, or the Pari/GP section there).