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

Add AmalgamDigraphs #532

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Add AmalgamDigraphs #532

wants to merge 11 commits into from

Conversation

finnbuck
Copy link
Contributor

@finnbuck finnbuck commented Mar 17, 2022

Based on Issue #428. This pull request adds two functions: AmalgamDigraphs and AmalgamDigraphsIsomorphic.

Description:

The AmalgamDigraphs function takes as input two digraphs and two lists of vertices corresponding to two identical subdigraphs of the two input digraphs. It returns a new digraph which consists of the two input digraphs joined together by their common subdigraph in such a way that the edge connectivity between the vertices in the new digraph matches the edge connectivity of the two input digraphs.

AmalgamDigraphsIsomorphic functions similarly, but the two lists of vertices given as inputs need only describe subdigraphs that are isomorphic to one another rather than have them be precisely equal. AmalgamDigraphsIsomorphic then rearranges the second list of subdigraph vertices so that the induced subdigraphs become equal and then calls AmalgamDigraphs.

Both functions return a tuple of size two, with the first element being the output digraph and the second being a record which maps each vertex number in the second input digraph to its new vertex number in the output digraph. The mapping of the vertices of the first input digraph can be seen as the identity mapping.

@finnbuck finnbuck closed this Mar 17, 2022
@finnbuck finnbuck reopened this Mar 17, 2022
Copy link
Member

@james-d-mitchell james-d-mitchell left a comment

Choose a reason for hiding this comment

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

@finnbuck looks great! Lots of small things to fix, but generally this is good! Some additional things:

  • please also add some tests when the arguments are mutable digraphs, I don't think this'll work quite like you expect (see comments in the PR)
  • Add a version that takes 4 digraphs, D1, D2, and S and a transformation map1 (embedding S in D1), then computes map2 (an embedding of S in D2) and calls DigraphAmalgam(D1, D2, S, map1, map2);
  • Add a version that takes 3 digraphs: D1, D2 and S and computes map1 and map2 (embeddings into D1 and D2 resp), and calls DigraphAmalgam(D1, D2, S, map1, map2);
  • Add a version that takes 2 digraphs D1 and D2, and calls x := MaximumCommonSubdigraph(D1, D2); and then returns DigraphAmalgam(D1, D2, x[1], x[2], x[3]);

gap/oper.gi Outdated Show resolved Hide resolved
gap/oper.gi Outdated Show resolved Hide resolved
gap/oper.gi Outdated Show resolved Hide resolved
gap/oper.gi Outdated Show resolved Hide resolved
gap/oper.gi Show resolved Hide resolved
gap/oper.gi Outdated Show resolved Hide resolved
gap/oper.gi Outdated Show resolved Hide resolved
gap/oper.gi Outdated Show resolved Hide resolved
doc/oper.xml Outdated Show resolved Hide resolved
gap/oper.gi Outdated Show resolved Hide resolved
@finnbuck
Copy link
Contributor Author

@james-d-mitchell thanks for the review, I'll get to work on that!

@finnbuck finnbuck force-pushed the amalgamDigraphs branch 2 times, most recently from a337700 to a604293 Compare April 13, 2022 15:20
@finnbuck finnbuck changed the title Initial version of AmalgamDigraphs and AmalgamDigraphsIsomorphic. AmalgamDigraphs May 11, 2022
@finnbuck finnbuck force-pushed the amalgamDigraphs branch 2 times, most recently from f10e594 to 2528c7b Compare May 11, 2022 07:17
@finnbuck finnbuck changed the title AmalgamDigraphs Add ```AmalgamDigraphs May 11, 2022
@finnbuck finnbuck changed the title Add ```AmalgamDigraphs Add AmalgamDigraphs May 11, 2022
@finnbuck finnbuck changed the title Add AmalgamDigraphs Add <code>AmalgamDigraphs</code> May 11, 2022
@finnbuck finnbuck changed the title Add <code>AmalgamDigraphs</code> Add AmalgamDigraphs May 11, 2022
@finnbuck finnbuck changed the title Add AmalgamDigraphs Add <code>AmalgamDigraphs</code> May 11, 2022
@finnbuck finnbuck changed the title Add <code>AmalgamDigraphs</code> Add AmalgamDigraphs May 11, 2022
@finnbuck finnbuck force-pushed the amalgamDigraphs branch 6 times, most recently from f711d61 to 3f5ce71 Compare May 11, 2022 08:21
@finnbuck finnbuck changed the title Add AmalgamDigraphs Add AmalgamDigraphs May 11, 2022
@james-d-mitchell james-d-mitchell added the new-feature A label for new features. label Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature A label for new features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants