@@ -2227,3 +2227,83 @@ true
22272227 </Description >
22282228</ManSection >
22292229<#/GAPDoc>
2230+
2231+ <#GAPDoc Label="AmalgamDigraphs">
2232+ <ManSection >
2233+ <Oper Name =" AmalgamDigraphs" Arg =" D1, D2,
2234+ subdigraphVertices1, subdigraphVertices2" />
2235+ <Returns >An immutable digraph and a record.</Returns >
2236+ <Description >
2237+
2238+ <C >AmalgamDigraphs</C > takes as input two digraphs <A >D1</A > and <A >D2</A >
2239+ and two lists of vertices <A >subdigraphVertices1</A > and
2240+ <A >subdigraphVertices2</A >, which correspond to two identical subdigraphs
2241+ of <A >D1</A > and <A >D2</A >. It returns a new digraph, the <E >amalgam
2242+ digraph</E > <C >AD</C >, which consists of <A >D1</A > and <A >D2</A > joined
2243+ together by their common subdigraph in such a way that the edge connectivity
2244+ between the vertices of <C >AD</C > matches the edge connectivity of
2245+ <A >D1</A > and <A >D2</A >.<P />
2246+
2247+ It returns a <E >tuple</E > of size two, with the first element being
2248+ <C >AD</C > and the second element being <C >map</C >, which is a record which
2249+ maps each vertex's number in <A >D2</A > to the corresponding vertex's number
2250+ in <C >AD</C >. The mapping of the vertices of <A >D1</A > can be seen as the
2251+ <E >identity mapping</E >.
2252+
2253+ <Example ><![CDATA[
2254+ gap> T := Digraph([[2, 3], [1, 3], [1, 2]]);;
2255+ gap> A := AmalgamDigraphs(T, T, [1, 2], [1, 2]);
2256+ [ <immutable digraph with 4 vertices, 10 edges>,
2257+ rec( 1 := 1, 2 := 2, 3 := 4 ) ]
2258+ gap> A := AmalgamDigraphs(A[1], T, [1, 2], [1, 2]);
2259+ [ <immutable digraph with 5 vertices, 14 edges>,
2260+ rec( 1 := 1, 2 := 2, 3 := 5 ) ]
2261+ gap> P := PetersenGraph();;
2262+ gap> G := Digraph([[2, 3, 4], [1, 3], [1, 2, 5],
2263+ > [1, 6], [3, 6], [4, 5]]);;
2264+ gap> A := AmalgamDigraphs(P, G, [1, 2, 7, 10, 5], [1, 3, 5, 6, 4]);
2265+ [ <immutable digraph with 11 vertices, 34 edges>,
2266+ rec( 1 := 1, 2 := 11, 3 := 2, 4 := 5, 5 := 7, 6 := 10 ) ]
2267+ ]]> </Example >
2268+ </Description >
2269+ </ManSection >
2270+ <#/GAPDoc>
2271+
2272+ <#GAPDoc Label="AmalgamDigraphsIsomorphic">
2273+ <ManSection >
2274+ <Oper Name =" AmalgamDigraphsIsomorphic" Arg =" D1, D2,
2275+ subdigraphVertices1, subdigraphVertices2" />
2276+ <Returns >An immutable digraph and a record.</Returns >
2277+ <Description >
2278+
2279+ <C >AmalgamDigraphsIsomorphic</C > is meant to function very similarly to
2280+ <C >AmalgamDigraphs</C >. The difference is that in <C >AmalgamDigraphs</C >
2281+ <A >subdigraphVertices1</A > and <A >subdigraphVertices2</A > need not
2282+ necessarily describe identical subdigraphs of <A >D1</A > and <A >D2</A >,
2283+ but need only describe subdigraphs that are isomorphic to one another.
2284+ <C >AmalgamDigraphsIsomorphic</C > rearranges the entries of
2285+ <A >subdigraphVertices2</A > to obtain <C >newSubdigraphVertices2</C >
2286+ in such a way that the induced subdigraph in <A >D2</A > with the
2287+ vertices <C >newSubdigraphVertices2</C > is identical to the induced
2288+ subdigraph in <A >D1</A > with the vertices <C >subdigraphVertices1</C >.
2289+ <C >AmalgamDigraphsIsomorphic</C > then calls <C >AmalgamDigraphs</C >
2290+ with <C >newSubdigraphVertices2</C > in the place of
2291+ <A >subdigraphVertices2</A >.
2292+
2293+ <Example ><![CDATA[
2294+ gap> P := PetersenGraph();;
2295+ gap> G := Digraph([[2, 3, 4], [1, 3],
2296+ > [1, 2, 5], [1, 6], [3, 6], [4, 5]]);;
2297+ gap> A := AmalgamDigraphs(P, G, [1, 2, 7, 10, 5], [1, 3, 5, 6, 4]);
2298+ [ <immutable digraph with 11 vertices, 34 edges>,
2299+ rec( 1 := 1, 2 := 11, 3 := 2, 4 := 5, 5 := 7, 6 := 10 ) ]
2300+ gap> A := AmalgamDigraphsIsomorphic(P, G,
2301+ > [1, 2, 7, 10, 5], [1, 4, 6, 3, 5]);
2302+ [ <immutable digraph with 11 vertices, 34 edges>,
2303+ rec( 1 := 1, 2 := 11, 3 := 5, 4 := 2, 5 := 10, 6 := 7 ) ]
2304+ gap> A := AmalgamDigraphs(P, G, [1, 2, 7, 10, 5], [1, 4, 6, 3, 5]);
2305+ Error, the two subdigraphs must be equal.
2306+ ]]> </Example >
2307+ </Description >
2308+ </ManSection >
2309+ <#/GAPDoc>
0 commit comments