Opened 4 years ago

Closed 4 years ago

#27242 closed enhancement (fixed)

py3: strengthen a doctest in vertex_separation.pyx

Reported by: David Coudert Owned by:
Priority: major Milestone: sage-8.7
Component: graph theory Keywords: py3, graph
Cc: Merged in:
Authors: David Coudert Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: 42dc1a5 (Commits, GitHub, GitLab) Commit: 42dc1a54b65323cd86bdf83f2dc353d4320c32e8
Dependencies: Stopgaps:

Status badges

Description

The order in which solutions are found by the branch and bound algorithm depends on the order in which vertices are visited. Hence, this test sometimes answers 10 and some other times 11, and both answers are correct.

sage: from sage.graphs.graph_decompositions import vertex_separation as VS
sage: G = graphs.MycielskiGraph(5)
sage: vs, seq = VS.vertex_separation_BAB(G, cut_off=11); vs
10 or 11

We change it to a robust form

sage: VS.vertex_separation_BAB(G, cut_off=11)[0] <= 11
True

Change History (3)

comment:1 Changed 4 years ago by David Coudert

Branch: u/dcoudert/27242_vertex_separation
Commit: 42dc1a54b65323cd86bdf83f2dc353d4320c32e8
Status: newneeds_review

New commits:

42dc1a5trac #27242: strengthen doctests

comment:2 Changed 4 years ago by Frédéric Chapoton

Reviewers: Frédéric Chapoton
Status: needs_reviewpositive_review

ok

comment:3 Changed 4 years ago by Volker Braun

Branch: u/dcoudert/27242_vertex_separation42dc1a54b65323cd86bdf83f2dc353d4320c32e8
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.