Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
wilfwilson authored Sep 21, 2021
1 parent 7dd6b92 commit b7ae02c
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions doc/examples.xml
Original file line number Diff line number Diff line change
Expand Up @@ -863,17 +863,17 @@ gap> BinaryTree(IsMutableDigraph, 8);
<Returns>A digraph.</Returns>
<Description>
If <A>n</A> is an integer greater than 0, then this operation returns the
<M>n</M>th <E>Andrasfai graph</E>. The Andrasfai graph is a circulant graph
with <M>3n - 1</M> vertices. The indices of the Andrasfai graph are given by
the numbers between <M>1</M> and <M>3n - 1</M> that are congruent to
<M>1 mod 3</M> (that is, for each index <M>j</M>, vertex <M>i</M> is
<A>n</A>th <E>Andrasfai graph</E>. The Andrasfai graph is a circulant graph
with <C>3 * <A>n</A> - 1</C> vertices. The indices of the Andrasfai graph are given by
the numbers between <C>1</C> and <C>3<A>n</A> - 1</C> that are congruent to
<C>1</C> mod <C>3</C> (that is, for each index <M>j</M>, vertex <M>i</M> is
adjacent to the <M>i + j</M>th and <M>i - j</M> vertices). The graph has
<M>6(3n - 1)</M> edges. The graph is triangle free.<P/>
<C>6(3<A>n</A> - 1)</C> edges. The graph is triangle free.<P/>

As a circulant graph, the Andrasfai graph is biconnected, cyclic,
Hamiltonian, regular, and vertex transitive.<P/>

See <URL>https://mathworld.wolfram.com/OddGraph.html</URL> for further
See <URL>https://mathworld.wolfram.com/AndrasfaiGraph.html</URL> for further
details.

&STANDARD_FILT_TEXT;
Expand All @@ -896,11 +896,11 @@ true]]></Example>
<Returns>A digraph.</Returns>
<Description>
If <A>n</A> is a positive integer then this operation returns the
<M>n</M>th <E>binomial tree graph</E>. The binomial tree graph has <M>n</M>
vertices and <M>n-1</M> undirected edges. The vertices of the binomial tree
graph are the numbers from 1 to <M>n</M> in binary representation, with a
vertex <M>v</M> having as a direct parent the vertex with binary
representation the same as <M>v</M> but with the lowest 1-bit cleared. For
<A>n</A>th <E>binomial tree graph</E>. The binomial tree graph has <A>n</A>
vertices and <C><A>n</A>-1</C> undirected edges. The vertices of the binomial tree
graph are the numbers from 1 to <A>n</A> in binary representation, with a
vertex <C>v</C> having as a direct parent the vertex with binary
representation the same as <C>v</C> but with the lowest 1-bit cleared. For
example, the vertex <M>011</M> has parent <M>010</M>, and the vertex
<M>010</M> has parent <M>000</M>.<P/>

Expand All @@ -925,11 +925,11 @@ gap> D := BinomialTreeGraph(9);
<Returns>A digraph.</Returns>
<Description>
If <A>n</A> is a non-negative integer then this operation returns the
<M>n</M>th <E>Bondy graph</E>. The Bondy graphs are a family of
<C>n</C>th <E>Bondy graph</E>. The Bondy graphs are a family of
hypohamiltonian graphs: a graph which is not Hamiltonian itself but the
removal of any vertex produces a Hamiltonian graph. The Bondy graphs are
the <M>(3 * (2 * n + 1) + 2, 2)</M>th Generalised Petersen graphs, and have
<M>12n + 10</M> vertices and <M>15 + 18n</M> undirected edges.<P/>
the <C>(3 * (2 * <A>n</A> + 1) + 2, 2)</C>th Generalised Petersen graphs, and have
<C>12<A>n</A> + 10</C> vertices and <C>15 + 18<A>n</A></C> undirected edges.<P/>

See <URL>https://mathworld.wolfram.com/HypohamiltonianGraph.html</URL> for
further details.
Expand All @@ -954,16 +954,16 @@ true]]></Example>
<Returns>A digraph.</Returns>
<Description>
If <A>n</A> is an integer greater than 1, and <A>par</A> is a list of
integers that are contained in <M>[1 .. n]</M> then this operation returns
integers that are contained in <C>[1..<A>n</A>]</C> then this operation returns
a <E>circulant graph</E>. The circulant graph is a graph on <A>n</A>
vertices, where for each element <M>j</M> of <A>par</A>, the <M>i</M>th
vertex is adjacent to the <M>(i + j)</M>th and <M>(i - j)</M>th
vertices.<P/>

If <A>par</A> is <M>[1]</M>, then the graph is the <M>n</M>th cyclic graph.
If <A>par</A> is <M>[1, 2, . . ., Int(n / 2)]</M>, then the graph is the
If <A>par</A> is <M>[1]</M>, then the graph is the <A>n</A>th cyclic graph.
If <A>par</A> is <C>[1,2,...,Int(<A>n</A>/2)]</C>, then the graph is the
complete graph on <A>n</A> vertices. If <A>n</A> is at least 4 and
<A>par</A> is <M>[1, n]</M> then the graph is the <M>n</M>th Mobius ladder
<A>par</A> is <C>[1,<A>n</A>]</C> then the graph is the <A>n</A>th Mobius ladder
graph.<P/>

A circulant graph is biconnected, cyclic, Hamiltonian, regular, and vertex
Expand All @@ -990,9 +990,9 @@ true]]></Example>
<Returns>A digraph.</Returns>
<Description>
If <A>n</A> is an integer greater than 2 then this operation returns the
<M>n</M>th <E>cycle graph</E>, consisting of the cycle on <M>n</M> vertices.
<A>n</A>th <E>cycle graph</E>, consisting of the cycle on <A>n</A> vertices.
The cycle graph, unlike the cycle digraph, is symmetric. The cycle graph
has <M>n</M> vertices and <M>n</M> undirected edges. The cycle graph is
has <A>n</A> vertices and <A>n</A> undirected edges. The cycle graph is
simple so the non-simple graphs with a single vertex and single loop and
with two vertices and two edges between them are excluded.<P/>

Expand All @@ -1014,8 +1014,8 @@ gap> D := CycleGraph(7);
<Returns>A digraph.</Returns>
<Description>
If <A>n</A> is a positive integer at least 3, then this operation
returns the <E>gear graph</E> with <M>2n + 1</M> vertices and
<M>3n</M> undirected edges. The <M>n</M>th gear graph is the <M>2n</M>th
returns the <E>gear graph</E> with <C>2<A>n</A> + 1</C> vertices and
<C>3<A>n</A></A> undirected edges. The <A>n</A>th gear graph is the <C>2<A></A></C>th
cycle graph with one additional central vertex, to which every other
vertex of the cycle is connected. The gear graph is a symmetric digraph.
A gear graph is a Matchstick graph, that is it is simple with a planar
Expand Down Expand Up @@ -1045,11 +1045,11 @@ false]]></Example>
<Returns>A digraph.</Returns>
<Description>
If <A>n</A> is a positive integer at least 1, then this operation returns
the <M>n</M>th <E>halved cube graph</E>, the graph of the <M>n</M>-
demihypercube. The vertices of the graph are those of the <M>n</M>th-
the <A>n</A>th <E>halved cube graph</E>, the graph of the <A>n</A>-
demihypercube. The vertices of the graph are those of the <A>n</A>th-
hypercube, with two vertices adjacent if and only if they are at distance
1 or 2 from each other. Equivalent constructions are as the second graph
power of the <M>n-1</M>th hypercube graph, or as with vertices labelled as
power of the <C><A>n</A>-1</C>th hypercube graph, or as with vertices labelled as
the binary numbers where two vertices are adjacent if they differ in a
single bit, or with vertices labelled with the subset of binary numbers
with even Hamming weight, with edges connecting vertices with Hamming
Expand Down Expand Up @@ -1078,11 +1078,11 @@ true]]></Example>
<Oper Name="HanoiGraph" Arg="[filt, ]n"/>
<Returns>A digraph.</Returns>
<Description>
If <A>n</A> is positive integer then this operation returns the <M>n</M>th
If <A>n</A> is positive integer then this operation returns the <A>n</A>th
<E>Hanoi graph</E>. The Hanoi graph's vertices represent the possible states
of the 'Tower of Hanoi' puzzle on three 'towers', while its edges represent
possible moves. The Hanoi graph has <M>3^n</M> vertices, and
<M>(1/2) * Binomial(3, 3) * (3^n - 1)</M> undirected edges.<P/>
possible moves. The Hanoi graph has <C>3^<A>n</A></C> vertices, and
<C>Binomial(3, 3) * (3^<A>n</A> - 1) / 2</C> undirected edges.<P/>

The Hanoi graph is Hamiltonian. The graph superficially resembles the
Sierpinski triangle. The graph is also a 'penny graph' - a graph whose
Expand Down Expand Up @@ -1111,7 +1111,7 @@ true]]></Example>
<Returns>A digraph.</Returns>
<Description>
If <A>n</A> is a positive integer at least 3, then this operation returns
the <M>n</M>th <E>helm graph</E>. The helm graph is the <A>n</A>-1th wheel
the <A>n</A>th <E>helm graph</E>. The helm graph is the <A>n</A>-1th wheel
graph with, for each external vertex of the 'wheel', adjoining a new vertex
incident only to the first vertex. That is, the graph looks similar to
a ship's helm.<P/>
Expand All @@ -1134,9 +1134,9 @@ gap> D := HelmGraph(4);
<Returns>A digraph.</Returns>
<Description>
If <A>n</A> is a non-negative integer, then this operation returns the
<M>n</M>th <E>hypercube graph</E>. The graph has <M>2^n</M> vertices and
<M>2^(n-1)n</M> edges. It is formed from the vertices and edges of the
<M>n</M>-dimensional hypercube. Alternatively, the graph can be constructed
<A>n</A>th <E>hypercube graph</E>. The graph has <C>2^<A>n</A></C> vertices and
<C>2^(<A>n</A>-1)<A>n</A></C> edges. It is formed from the vertices and edges of the
<A>n</A>-dimensional hypercube. Alternatively, the graph can be constructed
by labelling each vertex with the binary numbers, with two vertices
adjacent if they have Hamming distance exactly one. The hypercube graphs
are Hamiltonian, distance-transitive and therefore distance-regular, and
Expand All @@ -1161,21 +1161,21 @@ mponent sizes 16 and 16>
<Oper Name="KellerGraph" Arg="[filt, ]n"/>
<Returns>A digraph.</Returns>
<Description>
If <A>n</A> is an integer at least 0 then this operation returns the
<M>n</M>th or <M>n</M>-dimensional <E>Keller graph</E>. The graph has
vertices given by the <M>n</M>-tuples on the set <M>[0, 1, 2, 3]</M>.
If <A>n</A> is a nonnegative integer then this operation returns the
<A>n</A>th or <A>n</A>-dimensional <E>Keller graph</E>. The graph has
vertices given by the <A>n</A>-tuples on the set <M>[0, 1, 2, 3]</M>.
Two vertices are adjacent if their respective tuples are such that they
differ in at least two coordinates and in at least one coordinate the
difference between the two is <M>2 mod 4</M>. The Keller graph has
<M>4 ^ n</M> vertices.<P/>
<C>4 ^ <A>n</A></C> vertices.<P/>

The Keller graphs were constructed with the intention of finding
counterexamples to Keller's conjecture
(<URL>https://mathworld.wolfram.com/KellersConjecture.html</URL>), and has
been used since for testing maximum clique algorithms.<P/>

If <M>n</M> is 1 then the graph is empty, for <M>n</M> greater than 1 the
chromatic number of the Keller graph is <M>2^n</M> and the graph is
If <A>n</A> is 1 then the graph is empty, for <A>n</A> greater than 1 the
chromatic number of the Keller graph is <C>2^<A>n</A></C> and the graph is
Hamiltonian.<P/>

See <URL>https://mathworld.wolfram.com/KellerGraph.html</URL> for further
Expand Down

0 comments on commit b7ae02c

Please sign in to comment.