diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py index 2ab81f802b2..03850d6fe4b 100644 --- a/src/sage/graphs/generic_graph.py +++ b/src/sage/graphs/generic_graph.py @@ -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(): @@ -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:: @@ -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::