@@ -2227,3 +2227,80 @@ true
2227
2227
</Description >
2228
2228
</ManSection >
2229
2229
<#/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], [1, 6], [3, 6], [4, 5]]);;
2263
+ gap> A := AmalgamDigraphs(P, G, [1, 2, 7, 10, 5], [1, 3, 5, 6, 4]);
2264
+ [ <immutable digraph with 11 vertices, 34 edges>,
2265
+ rec( 1 := 1, 2 := 11, 3 := 2, 4 := 5, 5 := 7, 6 := 10 ) ]
2266
+ ]]> </Example >
2267
+ </Description >
2268
+ </ManSection >
2269
+ <#/GAPDoc>
2270
+
2271
+ <#GAPDoc Label="AmalgamDigraphsIsomorphic">
2272
+ <ManSection >
2273
+ <Oper Name =" AmalgamDigraphsIsomorphic" Arg =" D1, D2,
2274
+ subdigraphVertices1, subdigraphVertices2" />
2275
+ <Returns >An immutable digraph and a record.</Returns >
2276
+ <Description >
2277
+
2278
+ <C >AmalgamDigraphsIsomorphic</C > is meant to function very similarly to
2279
+ <C >AmalgamDigraphs</C >. The difference is that in <C >AmalgamDigraphs</C >
2280
+ <A >subdigraphVertices1</A > and <A >subdigraphVertices2</A > need not
2281
+ necessarily describe identical subdigraphs of <A >D1</A > and <A >D2</A >,
2282
+ but need only describe subdigraphs that are isomorphic to one another.
2283
+ <C >AmalgamDigraphsIsomorphic</C > rearranges the entries of
2284
+ <A >subdigraphVertices2</A > to obtain <C >newSubdigraphVertices2</C >
2285
+ in such a way that the induced subdigraph in <A >D2</A > with the
2286
+ vertices <C >newSubdigraphVertices2</C > is identical to the induced
2287
+ subdigraph in <A >D1</A > with the vertices <C >subdigraphVertices1</C >.
2288
+ <C >AmalgamDigraphsIsomorphic</C > then calls <C >AmalgamDigraphs</C >
2289
+ with <C >newSubdigraphVertices2</C > in the place of
2290
+ <A >subdigraphVertices2</A >.
2291
+
2292
+ <Example ><![CDATA[
2293
+ gap> P := PetersenGraph();;
2294
+ gap> G := Digraph([[2, 3, 4], [1, 3], [1, 2, 5], [1, 6], [3, 6], [4, 5]]);;
2295
+ gap> A := AmalgamDigraphs(P, G, [1, 2, 7, 10, 5], [1, 3, 5, 6, 4]);
2296
+ [ <immutable digraph with 11 vertices, 34 edges>,
2297
+ rec( 1 := 1, 2 := 11, 3 := 2, 4 := 5, 5 := 7, 6 := 10 ) ]
2298
+ gap> A := AmalgamDigraphsIsomorphic(P, G, [1, 2, 7, 10, 5], [1, 4, 6, 3, 5]);
2299
+ [ <immutable digraph with 11 vertices, 34 edges>,
2300
+ rec( 1 := 1, 2 := 11, 3 := 5, 4 := 2, 5 := 10, 6 := 7 ) ]
2301
+ gap> A := AmalgamDigraphs(P, G, [1, 2, 7, 10, 5], [1, 4, 6, 3, 5]);
2302
+ Error, the two subdigraphs must be equal.
2303
+ ]]> </Example >
2304
+ </Description >
2305
+ </ManSection >
2306
+ <#/GAPDoc>
0 commit comments