A Human Computation Approach to Graph Isomorphism
Total Page:16
File Type:pdf, Size:1020Kb
A Human Computation Approach to Graph Isomorphism Sriswetha Rajagopal Master of Science School of Computer Science McGill University Montreal,Quebec 2016-02-12 Requirements Statement Copyright Statement ACKNOWLEDGEMENTS Firstly, I would like to express my sincere gratitude to my Professor J´er^ome Waldisp¨uhlfor his continuous support throughout the course of my degree and re- search. This thesis could not have been complete without his knowledge and guid- ance. I would like to extend my gratitude to Olivier Tremblay-Savard for his helpful comments, for answering questions related to my research and for helping me with the french translation of my abstract. I would also like to thank my sister, Charana, my friends, Aman, Mohana and Jaskaran for their participation in testing and playing the game, as well as their helpful feedback. Special thanks to all my friends who played the game. Finally, I take this opportunity to thank my parents whose unwavering faith in me made this thesis possible. ii ABSTRACT Statistics note that people spend an average 8 to 10 hours per week on mo- bile/computer games. Human computation research has already tapped the potential in this area. Games such as Phylo and FoldIt have successfully combined a scien- tific purpose with doing something fun. In this thesis, we aim to present a strategic puzzle as a two player game to approach the problem of graph isomorphism. Graph isomorphism is a well-known computational problem due to its uncertain complexity. We aim to study how humans perform when the problem of graph isomorphism is presented as a game. We introduce \Isorcise", adapted from the mathematical Ehrenfeucht-Fra¨ıss´egame as an interactive two player game called playable on PCs. We conducted experiments on a small group of players (6 players) playing on different graph pairs (11 graph pairs). We show that humans are able to perform reasonably well on small and medium sized graphs as well as some large graphs. We also show that humans can successfully pinpoint non-isomorphism without exploring the whole graph. Finally, we note that our game can be used for other related problems such as maximum common subgraph isomorphism and the counting problem of graph isomorphism. iii ABREG´ E´ Les statistiques d´emontrent qu'en moyenne, les gens jouent de 8 `a10 heures par semaine `ades jeux vid´eossur diff´erentes plateformes (mobile, ordinateur). La recherche en calcul humain exploite d´ej`ace potentiel. Des jeux comme Phylo et FoldIt ont r´eussi`acombiner la r´ealisationd'un objectif scientifique avec une ac- tivit´eplaisante pour le joueur. Dans ce m´emoire,nous pr´esentons un casse-t^ete strat´egiquesous la forme d'un jeu `adeux joueurs dans le but de r´esoudreun probl`eme d'isomorphisme de graphes. L'isomorphisme de graphes est un probl`emebien connu en informatique `acause de sa complexit´eincertaine. Nous introduisons Isorcise, un jeu-avec-propos inspir´edu jeu math´ematiqued'Ehrenfeucht- Fra¨ıss´e,dont l'objectif est de d´ecidersi 2 graphes sont isomorphes. Isorcise est impl´ement´ecomme un jeu interactif `adeux joueurs jouable sur PCs. Nous avons men´eune s´eried'exp´eriencessur un petit groupe de joueurs (6 joueurs) et diff´erentes paires de graphes (11 paires de graphes). Nos r´esultatsmontrent que les humains sont obtiennent des performances raisonnables sur des graphes de petite et moyenne tailles, m^emequelques grands graphes. Nous montrons aussi que les humains peuvent r´eussirrelativement efficacement `aidentifier une absence d'isomorphisme sans explorer l'ensemble du graphe. Enfin, nous notons que notre jeu peut ^etreutilis´epour d'autres probl`emesconnexes tels que l'isomorphisme de sous- graphe commun maximale et le probl`emede comptage du graphe isomorphisme. iv TABLE OF CONTENTS ACKNOWLEDGEMENTS . ii ABSTRACT . iii ABREG´ E......................................´ iv LIST OF TABLES . vii LIST OF FIGURES . ix 1 Introduction . .1 1.1 Introduction . .1 1.1.1 Graph Isomorphism : An overview . .4 1.1.2 Contributions of this Thesis . .5 1.1.3 Thesis Overview . .6 2 Related Work and Literature . .7 2.1 Human computation: Previous work . .7 2.2 Graph isomorphism : Complexity . 13 2.2.1 Practical Algorithms for Graph Isomorphism . 14 3 Isorcise - A two-player graph isomorphism game . 16 3.1 Ehrenfeucht-Fra¨ıss´egame : A brief introduction . 16 3.2 Isorcise - The implementation . 18 3.2.1 The basic setup . 19 3.2.2 Networking . 23 3.2.3 The Algorithm behind Isorcise . 26 4 Isorcise : How to play . 29 4.1 The basic game play . 29 4.1.1 Starting the game . 29 v 4.1.2 Playing the game . 31 4.1.3 Scoring points . 31 4.1.4 Winning the game . 31 4.2 Making smart moves . 33 4.2.1 Sorcerer's perspective . 33 4.2.2 Dweller's perspective . 36 5 Experiments and Results . 39 5.1 Results . 41 5.1.1 Non-isomorphic graphs . 45 5.1.2 Isomorphic graphs . 52 5.1.3 How smart moves help . 58 5.2 Factors affecting game results . 60 5.3 Summary of results . 61 6 Conclusion . 62 6.1 Future Work . 63 Appendix A . 64 References . 68 vi LIST OF TABLES Table page 5{1 The table shows a summary of the various isomorphic graph pairs used. 40 5{2 The table shows a summary of the various non-isomorphic graph pair used. 40 5{3 This table shows results of all levels played in some game instances for isomorphic graphs. The full tables (6{1, 6{2) are in Appendix A. 43 5{4 The table shows results of all levels played on some game instances on non-isomorphic graphs. The full table (6{3) is in Appendix A. 44 5{5 This table shows the average success rate taken from column Game Result of Table 5{3 and column Error of Table 5{4. The last column refers to the total number of levels played on each graph pair by all pairs of players. 46 5{6 Table showing the quickest solution (in terms of number of nodes) found in each pair of non-isomorphic graphs and the time taken to find it. The fraction of graph covered column is defined as the fraction of the Minimum nodes over the total number of Nodes. 48 5{7 Table showing the maximum common subgraph isomorphism (in terms of number of nodes) found in each pair of non-isomorphic graphs. 49 5{8 Isomorphism mapping on 17-node subgraph of 20-node Praust graph. Each row in the table denotes the round in the game, the node number of the node selected in Graph A (according to fig 5{4) on the left, and the node number of the node selected Graph B (according to fig 5{4), on the right, in a given round. 51 5{9 The table shows the minimum time taken to find isomorphism and the average time along with the standard deviation over all correctly played instances on each pair of isomorphic graphs (except for the 30-node graph pair which had only one correctly played instance). 53 vii 5{10 Two different isomorphism mappings on 8-node graph . 57 5{11 Example of unsuccessful case . 57 5{12 Table showing the two attempts made on the 30-node graph by one pair of players. 59 6{1 The complete version of Table 5{3 in section 5.2 . 64 6{2 Table 6{1 continued . 65 6{3 The complete version of Table 5{4 from section 5.2 . 66 viii LIST OF FIGURES Figure page 3{1 Left: Figure 3{1a shows a sample input text file showing a graph containing 6 nodes and 10 edges. Right: Figure 3{1b shows the graph corresponding to the input text in 3{1a. The node is numbered in black from n0 to n5 to show how the nodes are arranged. This numbering is not visible during the game. 20 3{2 Top row : The board of the game before the game starts (3{2a). Bottom row : From left to right, the icons for a node (3{2b), the Dweller's icons (3{2c), the Sorcerer's icon (3{2d) and an edge between two nodes (3{2e) . 22 3{3 The Level indicator (highlighted in red) shows the current level. The Round indicator shows which round is currently being played and the total number of rounds in the current level. The play/pause button (highlighted in blue) must be clicked at the start of every game. The close button closes the application. 23 3{4 The first player to join the game, registers the game and takes the role of server. The server tells MasterServer its IP, port and other game information like the game name etc. The second player joins as the client. The MasterServer provides the information given by the server and the second player can join the game. 24 3{5 The figure on the top (3{5a) shows a flow chart of the server side events happening in the game and the figure on the bottom (3{5b) shows the client side version. 25 4{1 Top : The figure on the top row (4{1a) shows the game scene as the Sorcerer player views. Bottom : The figure on the bottom row (4{1b) shows the game scene as the Dweller player views. The player indicator (circled in red and blue respectively) on the top left corner indicates this role. 30 ix 4{2 Top : The figure 4{2a shows the game scene after the Dweller has made the second move. The Round indicator (bottom left) shows that the current round is the last round : 3.