Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.edge_cut(algorithm='LP') returns edges without labels #38713

Open
2 tasks done
maxale opened this issue Sep 25, 2024 · 1 comment · May be fixed by #38725
Open
2 tasks done

.edge_cut(algorithm='LP') returns edges without labels #38713

maxale opened this issue Sep 25, 2024 · 1 comment · May be fixed by #38725

Comments

@maxale
Copy link
Contributor

maxale commented Sep 25, 2024

Steps To Reproduce

sage: g = graphs.PetersenGraph()

sage: g.edge_cut(0, 3, vertices=True, use_edge_labels=True)
[3,
 [(0, 1, None), (0, 4, None), (0, 5, None)],
 [[0], [1, 2, 3, 4, 5, 6, 7, 8, 9]]]

sage: g.edge_cut(0, 3, vertices=True, use_edge_labels=True, algorithm="FF")
[3,
 [(0, 1, None), (0, 4, None), (0, 5, None)],
 [[0], [1, 2, 3, 4, 5, 6, 7, 8, 9]]]

sage: g.edge_cut(0, 3, vertices=True, use_edge_labels=True, algorithm="LP")
(3, [(2, 3), (3, 4), (3, 8)], [[0, 1, 2, 4, 5, 6, 7, 8, 9], [3]])

Expected Behavior

.edge_cut(algorithm='LP') should return edges with labels, consistently with other algorithms.

Actual Behavior

Edges are reported as tuples of vertices without labels.

Additional Information

It breaks other methods that depend on .edge_cut such as .gomory_hu_tree(algorithm="LP"), which fails with an error:

ValueError: not enough values to unpack (expected 3, got 2)

as reported at https://ask.sagemath.org/question/79320/

Environment

  • OS: Ubuntu 24.04.1 LTS
  • Sage Version: 10.5.beta3

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide
@maxale maxale added the t: bug label Sep 25, 2024
@dcoudert dcoudert linked a pull request Sep 27, 2024 that will close this issue
5 tasks
@dcoudert
Copy link
Contributor

I pushed a fix in #38725.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants