.\" Text automatically generated by txt2man .TH Regul 1 "2023-02-25" "" "" .SH NAME \fBRegul \fP- Generating Labeled Graphs with Fixed Degree Sequences .SH SYNPOSIS java \fB-cp\fP . org.nevec.rjm.Regul [\fB-t\fP] [\fB-d\fP] [\fB-v\fP] [\fB-m\fP] [\fB-f\fP] degreeseq .SH OPTIONS \fB-t\fP If the option is used, only traceless incidence matrices are considered. Otherwise (by default) graphs with loops are included. .PP \fB-d\fP If the option is used, all edges of the graphs are directed. Otherwise (by default) edges are undirected. .PP \fB-v\fP If the option is included, the edge lists of the graphs are printed to standard output. Otherwise (by default) on the total count of graphs is printed. .PP \fB-m\fP If the option is included, multigraphs are allowed. If absent (the default) only a single edge is allowed between pairs of nodes (or two edges with opposite heading for the digraphs). .PP \fB-f\fP This creates only incidence matrices where the elements in the top row are nonincreasing starting from the second column on. This supports some speed-up in case the graphs generated here will later on be subjected to elimination by row-column permutations. To avoid misinterpretations a total of generated graphs is not printed if that option is used. .RE .PP .SH ARGUMENTS The arguments must follow the options and are blank-separated lists of pairs (if \fB-d\fP is absent, undirected) or triples (if \fB-d\fP is present, directed) of multiplicities of degree sequences of the graphs that are created. These are lists of non-negative numbers. For the undirected case the list has the format f1 d1 [f2 d2 \.\.\.] so each first number is a frequency and each second number a degree, which means "graphs with f1 nodes of degree d1, f2 nodes of degree d2,\.\.\." For the directed case the list has the format f1 i1 o1 [f2 i2 o2 \.\.\.] which means "graphs with f1 nodes of indegree i1 and oudegree o1, f2 nodes of indegree i2 and outdegree o2\.\.\.". The number of nodes is the sum of the fi. .SH DESCRIPTION The program generates incidence matrices recursively in a CRT type of scan order (top to bottom, left to right) using some sort of pruning of the recurrence if partial sums along rows and columns exceed the degrees specified by the degree sequence. .PP If the option \fB-v\fP is present, each graph is printed as a list of edges, each edge the labels of two nodes, nodes counted from 0 up to one less than the total number of nodes. For digraphs the order of the two nodes matters; for undirected graphs the pairs are considered not sorted. For multigraphs the node pairs appear as often as there are edges. Loops have the same label for the two nodes. .PP The graphs are generated irrespective of connectivity. .PP The program is tailored to generate regular graphs. Graphs of specified node number but unspecified degree sequence can only be generated by running the program repeatedly for the set of degree sequences (i.e. all permutations of twice the edge count.) .SH EXAMPLE java \fB-cp\fP . org.nevec.rjm.Regul \fB-t\fP 5 2 generates undirected 2-regular labeled graphs with 5 nodes, see OEIS sequence A001205 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-m\fP \fB-t\fP 5 2 generates undirected 2-regular labeled multigraphs with 5 nodes, see OEIS sequence A002137 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-d\fP \fB-t\fP 5 2 2 generates directed 2-regular labeled graphs with 5 nodes, see OEIS sequence A007107 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-d\fP \fB-t\fP 6 1 1 generates directed 1-regular labeled graphs with 6 nodes, see OEIS sequence A000166 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-t\fP 8 3 generates cubic labeled graphs with 8 nodes, see OEIS sequence A002829 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-t\fP \fB-v\fP 4 1 # 1+1+1+1 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-t\fP \fB-v\fP 2 1 2 2 # 1+1+2+2 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-t\fP \fB-v\fP 3 1 1 3 # 1+1+1+3 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-t\fP \fB-v\fP 4 2 # 2+2+2+2 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-t\fP \fB-v\fP 1 1 2 2 1 3 # 1+2+2+3 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-t\fP \fB-v\fP 2 1 2 3 # 1+1+3+3 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-t\fP \fB-v\fP 2 1 1 2 1 4 # 1+1+2+4 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-t\fP \fB-v\fP 3 1 1 5 # 1+1+1+5 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-t\fP \fB-v\fP 2 2 2 3 # 2+2+3+3 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-t\fP \fB-v\fP 1 1 3 3 # 1+3+3+3 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-t\fP \fB-v\fP 3 2 1 4 # 2+2+2+4 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-t\fP \fB-v\fP 2 2 2 4 # 2+2+4+4 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-t\fP \fB-v\fP 4 3 # 3+3+3+3 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-t\fP \fB-v\fP 1 2 2 3 1 4 # 2+3+3+4 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-t\fP \fB-v\fP 2 2 2 4 # 2+2+4+4 .PP java \fB-cp\fP . org.nevec.rjm.Regul \fB-t\fP \fB-v\fP 1 1 1 3 2 4 # 1+3+4+4 .PP generates the labeled graphs (not necessarily connected) with 4 nodes (none isolated) by considering all partitions of even numbers (handshake lemma) with 4 parts. The maximum for the partitions is settled by the complete graph. .SH AUTHOR Richard J. Mathar .SH SEE ALSO https://arxiv.boxedpaper.com/abs/1903.12477 https://oeis.org