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

Implemented methods concerning removability in a matching covered graph #39433

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

janmenjayap
Copy link
Contributor

The objective of this issue is to implement the methods pertaining to removability in a matching covered graph.

More specifically, this PR aims to implement the following methods:

  • is_removable_edge() | Check whether the edge is removable.
  • is_removable_doubleton() | Check whether the pair of edges constitute a removable doubleton.
  • is_removable_ear() | Check whether the ear is removable.
  • is_removable_double_ear() | Check whether the pair of ears form a removable double ear.
  • removable_edges() | Return a :class:~EdgesView of removable edges.
  • removable_doubletons() | Return a list of removable doubletons.
  • removable_ears() | Return a list of removable ears.
  • removable_double_ears() | Return a list of removable double ears.

This PR shall address the methods related to removable edges, removable ears, removable doubletons and removable double ears of matching covered graphs.

Fixes #38216.
Note that this issue fixes a small part of the mentioned issue.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

This PR depends on the PR #38742.

cc: @dcoudert .

Copy link

github-actions bot commented Feb 2, 2025

Documentation preview for this PR (built with commit 9d1bd4e; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@dcoudert
Copy link
Contributor

dcoudert commented Feb 9, 2025

I'm changing the status to needs work.

This branch is under development and it should not be tested each time you push a small commit like 9d1bd4e. Most of these tests should first be done in your local installation of sagemath and not in the cloud. This is a considerable waste of computing resources.

@janmenjayap
Copy link
Contributor Author

janmenjayap commented Feb 9, 2025

I'm changing the status to needs work.

This branch is under development and it should not be tested each time you push a small commit like 9d1bd4e. Most of these tests should first be done in your local installation of sagemath and not in the cloud. This is a considerable waste of computing resources.

Hi,
I will take care of this from now onwards. I will push the commit provided there is reasonable enough changes that can be tested, after testing them out locally.

# Compute a perfect matching of the graph G - e using the maximal matching M
M.delete_edge(e)

# TODO: Obtain an M alternating uv path in G - e
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
This requires finding an M-augmenting path (yes! I need to update that comment in line 2641) starting and ending with the vertices u and v.

Currently, there is no implementation in sage, that addresses this (as per my knowledge). In fact, the implementation of Edmond's algorithm has been done with the help from networkx.

This implementation will require defining some utility classes like Blossom and Flower, that might be helpful for Micali-Vazirani algorithm as well. So, for now, one possibility would be defining an auxiliary method (namely augment_matching in matching.py that takes a matching and two exposed vertices and returns a matching of higher weight/ cardinality by running a matching swap through the augmenting path joining the two exposed vertices, of course in a different PR).

Please let me know your suggestions in this context.
Thank you.

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

Successfully merging this pull request may close these issues.

On Decompositions, Generation Methods and related concepts in the theory of Matching Covered Graphs
2 participants