Ask Your Question
0

Mapping isomorphism for posets or graphs

asked 2021-02-11 18:59:45 +0200

sunflower gravatar image

I know that we can check if two posets/graphs are isomorphic using is_isomorphic(), but is there any way that I can get Sage to output a possible mapping between the two posets/graphs that are isomorphic?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2021-02-13 09:08:20 +0200

Sébastien gravatar image

According to the documentation of is_isomorphic, you can use the argument certificate=True:

sage: G = Graph([(0,1),(1,2)])     
sage: H = Graph([(8,9), (9,10)])                                                 
sage: G.is_isomorphic(H)                                                        
True
sage: G.is_isomorphic(H, certificate=True)                                      
(True, {0: 10, 1: 9, 2: 8})

If the automorphism group of G is non trivial, there are more than one such map. You can deduce all of them from the automorphism group of G:

sage: G.automorphism_group()                                                    
Permutation Group with generators [(0,2)]
edit flag offensive delete link more

Comments

in other words, always read the manual first !

FrédéricC gravatar imageFrédéricC ( 2021-02-14 10:35:52 +0200 )edit

Ah, thank you so much! This is helpful, don't know how I missed that.

sunflower gravatar imagesunflower ( 2021-02-25 18:57:18 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2021-02-11 18:59:45 +0200

Seen: 427 times

Last updated: Feb 13 '21