Hostname: page-component-cd9895bd7-p9bg8 Total loading time: 0 Render date: 2024-12-23T09:39:52.761Z Has data issue: false hasContentIssue false

Logic Programming with Graph Automorphism: Integrating nauty with Prolog (Tool Description)*

Published online by Cambridge University Press:  14 October 2016

MICHAEL FRANK
Affiliation:
Department of Computer Science, Ben-Gurion University of the Negev, Beer-Sheva, Israel (e-mail: [email protected], [email protected])
MICHAEL CODISH
Affiliation:
Department of Computer Science, Ben-Gurion University of the Negev, Beer-Sheva, Israel (e-mail: [email protected], [email protected])

Abstract

This paper presents the pl-nauty library, a Prolog interface to the nauty graph-automorphism tool. Adding the capabilities of nauty to Prolog combines the strength of the “generate and prune” approach that is commonly used in logic programming and constraint solving, with the ability to reduce symmetries while reasoning over graph objects. Moreover, it enables the integration of nauty in existing tool-chains, such as SAT-solvers or finite domain constraints compilers which exist for Prolog. The implementation consists of two components: pl-nauty, an interface connecting nauty's C library with Prolog, and pl-gtools, a Prolog framework integrating the software component of nauty, called gtools, with Prolog. The complete tool is available as a SWI-Prolog module. We provide a series of usage examples including two that apply to generate Ramsey graphs.

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2016 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Footnotes

*

Supported by the Israel Science Foundation, grant 182/13.

References

Abelson, D., Hong, S.-H. and Taylor, D. E. 2002. A Group-Theoretic Method for Drawing Graphs Symmetrically, Springer Berlin Heidelberg, Berlin, Heidelberg, 8697.Google Scholar
Aloul, F. A., Ramani, A., Markov, I. L. and Sakallah, K. A. 2003. Solving difficult instances of boolean satisfiability in the presence of symmetry. IEEE Trans. on CAD of Integrated Circuits and Systems 22, 9, 11171137.Google Scholar
Babai, L. 2015. Graph isomorphism in quasipolynomial time. CoRR abs/1512.03547.CrossRefGoogle Scholar
Codish, M., Cruz-Filipe, L., Frank, M. and Schneider-Kamp, P. 2016. Sorting nine inputs requires twenty-five comparisons. J. Comput. Syst. Sci. 82, 3 (May), 551563.Google Scholar
Codish, M., Frank, M., Itzhakov, A. and Miller, A. 2016. Computing the ramsey number r(4,3,3) using abstraction and symmetry breaking. Constraints, 1–19. Also In Proceedings of the Thirteenth International Conference on Integration of Artificial Intelligence and Operations Research Techniques in Constraint Programming.Google Scholar
Codish, M., Miller, A., Prosser, P. and Stuckey, P. J. 2013. Breaking symmetries in graph representation. In Proceedings of the 23rd International Joint Conference on Artificial Intelligence, Beijing, China, Rossi, F., Ed. IJCAI/AAAI.Google Scholar
Crawford, J., Ginsberg, M., Luks, E. and Roy, A. 1996. Symmetry-breaking predicates for search problems. Morgan Kaufmann, 148–159.Google Scholar
Darga, P. T., Liffiton, M. H., Sakallah, K. A. and Markov, I. L. 2004. Exploiting structure in symmetry detection for CNF. In Proceedings of the 41st Design Automation Conference.Google Scholar
Hartke, S. G. and Radcliffe, A. J. 2009. McKay's canonical graph labeling algorithm. Contemporary Mathematics 479, 99111.CrossRefGoogle Scholar
Junttila, T. and Kaski, P. 2007. Engineering an efficient canonical labeling tool for large and sparse graphs. In Proceedings of the Ninth Workshop on Algorithm Engineering and Experiments, SIAM, 135149.Google Scholar
Kouri, T. M., Pascua, D. and Mehta, D. P. 2015. Random models and analyses for chemical graphs. Int. J. Found. Comput. Sci. 26, 2, 269.Google Scholar
McKay, Brendan D. and Piperno, A. 2016. nauty and Traces Users Guide (Version 2.6).Google Scholar
McKay, B. The graph6 format. (web pages describing the format).Google Scholar
McKay, B. 1990. nauty user's guide (version 1.5). Tech. Rep. TR-CS-90-02, Australian National University, Computer Science Department.Google Scholar
McKay, B. D. 1981. Practical graph isomorphism. Congressus Numerantium 30, 4587.Google Scholar
McKay, B. D. and Piperno, A. 2014. Practical graph isomorphism, II. Journal of Symbolic Computation 60, 94112.CrossRefGoogle Scholar
Metodi, A. and Codish, M. 2012. Compiling finite domain constraints to SAT with BEE. Theory and Practice of Logic Programming 12, 4–5, 465483.Google Scholar
Metodi, A., Codish, M. and Stuckey, P. J. 2013. Boolean equi-propagation for concise and efficient SAT encodings of combinatorial problems. J. Artif. Intell. Res. (JAIR) 46, 303341.Google Scholar
Radziszowski, S. P. 1994. Small Ramsey numbers. Electronic Journal of Combinatorics. Revision #14: January, 2014.Google Scholar
Royle, G. 2015. Spectacular graph automorphisms. https://symomega.wordpress.com/2015/06/26/spectacular-graph-automorphisms/. Blog. Viewed July 2016.Google Scholar
Wielemaker, J., Schrijvers, T., Triska, M. and Lager, T. 2012. SWI-Prolog. Theory and Practice of Logic Programming 12, 1–2, 6796.Google Scholar