Skip to content

Commit

Permalink
Trac #32667: Fix incorrect documentation from #32498
Browse files Browse the repository at this point in the history
The (symmetric) edge polytope of the disjoint union of graphs is the
subdirect sum of the polytopes and **not** the product.

URL: https://trac.sagemath.org/32667
Reported by: gh-kliem
Ticket author(s): Jonathan Kliem
Reviewer(s): Michael Orlitzky
  • Loading branch information
Release Manager committed Oct 13, 2021
2 parents 391111f + 8eb9c50 commit 0bede01
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions src/sage/graphs/generic_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -3492,7 +3492,7 @@ def antisymmetric(self):
True
"""
if not self._directed:
# An undirected graph is antisymmetric only if all it's edges are
# An undirected graph is antisymmetric only if all its edges are
# loops
return self.size() == len(self.loop_edges())
if self.has_loops():
Expand Down Expand Up @@ -23560,18 +23560,18 @@ def edge_polytope(self, backend=None):
sage: P.is_combinatorially_isomorphic(polytopes.cross_polytope(3))
True

The EP of a graph with edges is isomorphic
to the product of it's connected components with edges::
The EP of a graph is isomorphic to the subdirect sum of
its connected components EPs::

sage: n = randint(5, 12)
sage: G = Graph()
sage: while not G.num_edges():
....: G = graphs.RandomGNP(n, 0.2)
sage: n = randint(3, 6)
sage: G1 = graphs.RandomGNP(n, 0.2)
sage: n = randint(3, 6)
sage: G2 = graphs.RandomGNP(n, 0.2)
sage: G = G1.disjoint_union(G2)
sage: P = G.edge_polytope()
sage: components = [G.subgraph(c).edge_polytope()
....: for c in G.connected_components()
....: if G.subgraph(c).num_edges()]
sage: P.is_combinatorially_isomorphic(product(components))
sage: P1 = G1.edge_polytope()
sage: P2 = G2.edge_polytope()
sage: P.is_combinatorially_isomorphic(P1.subdirect_sum(P2))
True

All trees on `n` vertices have isomorphic EPs::
Expand Down Expand Up @@ -23662,18 +23662,18 @@ def symmetric_edge_polytope(self, backend=None):
sage: P.dim() == n - G.connected_components_number()
True

The SEP of a graph with edges is isomorphic
to the product of it's connected components with edges::
The SEP of a graph is isomorphic to the subdirect sum of
its connected components SEP's::

sage: n = randint(5, 12)
sage: G = Graph()
sage: while not G.num_edges():
....: G = graphs.RandomGNP(n, 0.2)
sage: n = randint(3, 6)
sage: G1 = graphs.RandomGNP(n, 0.2)
sage: n = randint(3, 6)
sage: G2 = graphs.RandomGNP(n, 0.2)
sage: G = G1.disjoint_union(G2)
sage: P = G.symmetric_edge_polytope()
sage: components = [G.subgraph(c).symmetric_edge_polytope()
....: for c in G.connected_components()
....: if G.subgraph(c).num_edges()]
sage: P.is_combinatorially_isomorphic(product(components))
sage: P1 = G1.symmetric_edge_polytope()
sage: P2 = G2.symmetric_edge_polytope()
sage: P.is_combinatorially_isomorphic(P1.subdirect_sum(P2))
True

All trees on `n` vertices have isomorphic SEPs::
Expand Down

0 comments on commit 0bede01

Please sign in to comment.