You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh-36354: added induced minor function to graph algorithms
### Description
Fixes#36353
This pull request introduces the "induced_minor" function to the
SageMath library for graph theory. The function allows users to find an
induced minor isomorphic to a given target graph `H` in a graph `G`. It
utilizes Mixed Integer Linear Programming (MILP) to solve this problem
efficiently.
### Motivation
The "induced_minor" function is a valuable addition to SageMath as it
addresses the need to find induced minors, a fundamental concept in
graph theory. Users often encounter scenarios where they need to
identify an induced minor isomorphic to a specific target graph, and
this function streamlines the process.
Issue: #36353
Documentation Issue: ----
### Implementation
#### Logic
An existing minor function had several constraints for finding an
induced minor isomorphic to a given target graph `H` in a graph`G:
1. Representative Sets: Ensure that each vertex `v` in `G` represents a
vertex `h` in `H` using binary variables `rs[h, v]`.
2. Connected Representative Sets: Enforce that the representative sets
in `G` form a connected tree structure using binary variables `edges[h,
fuv]` for edges `(u, v)` in `G`.
3. Tree Structure: Ensure that the number of edges in the tree for each
`h` in `H` is exactly one less than the cardinality of its
representative set.
4. Acyclic Trees: Maintain acyclic tree structures for representative
sets using `r_edges[h, (u, v)]` variables and constraints.
5. Edges Correspondence: Ensure that edges between representative sets
in `G` correspond to edges in `H` using `h_edges` variables.
For induced minor, we just had to add an additional constraint:
6. Induced Subgraph Condition: Checks for the existence of edges `(h1,
h2)` in target graph `H`. If no such edge exists in `H`, it ensures that
there is no edge between the representative sets of vertices `h1` and
`h2` in graph `G`.
#### Algorithm and Complexity
The "induced_minor" function uses MILP to find the minor and follows the
algorithm described in [KKT2006]. The complexity of this operation is
discussed in the docstring.
#### Example Usage
The PR includes examples demonstrating how to use the "induced_minor"
function to find induced minors isomorphic to specific target graphs in
various scenarios.
#### Tests
The code includes tests to ensure the correctness of the "induced_minor"
function. These tests cover different use cases, including scenarios
where no induced minor exists.
#### Documentation
The documentation will be updated in a separate PR to include
information about the new "induced_minor" function.
### 📝 Checklist
- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked the relevant issue #36353.
- [x] I have created tests covering the changes.
- [x] I will update the documentation in a separate PR, if required.
### ⌛ Dependencies
N/A (There are no open PRs that this PR depends on.)
URL: #36354
Reported by: saatvikraoIITGN
Reviewer(s): David Coudert, saatvikraoIITGN
0 commit comments