Abstract
We study the complexity of the problem of enumerating all graphs with frequency at least 1 and computing their support. We show that there are hereditary classes of graphs for which the complexity of this problem depends on the order in which the graphs should be enumerated (e.g. from frequent to infrequent or from small to large). For instance, the problem can be solved with polynomial delay for databases of planar graphs when the enumerated graphs should be output from large to small but it cannot be solved even in incremental-polynomial time when the enumerated graphs should be output from most frequent to least frequent (unless P=NP).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
\(\mathsf {ALL}_{F \rightarrow I}\) stands for ’frequent to infrequent’, \(\mathsf {ALL}_{I \rightarrow F}\) stands for ’infrequent to frequent’, \(\mathsf {ALL}_{S \rightarrow L}\) stands for ’small to large’ and \(\mathsf {ALL}_{L \rightarrow S}\) stands for ’large to small’.
- 2.
The hardness for the \(\mathsf {ALL}_{F \rightarrow I}\) problem follows from Theorem 1 together with Remark 1, whereas hardness of the \(\mathsf {ALL}_{S \rightarrow L}\) problem follows from a simple modification of the proof of Theorem 1 where we use a hypothetic incr.-poly.-time algorithm for solving the \(\mathsf {ALL}_{S \rightarrow L}\) problem and stop it after printing the first graph with more edges than H (or more vertices than H in the case of induced subgraph mining).
- 3.
The complexity of the \(\mathsf {ALL}_{S \rightarrow L}\) problem in these cases remains an interesting open problem.
- 4.
Here, IDs are just some identifiers given to the database graphs.
- 5.
The reason why the function \(\mathsf {KEYS}\) does not just return all the key graphs but rather a pointer to the linked list is that if it did otherwise, Algorithm 1 could never run with polynomial delay.
- 6.
Note that we just remove the pointer and do not actually “free” the memory occupied by the graphs. For the practical implementation, we used a programming language with a garbage collector.
- 7.
For homeomorphism, for instance, we could allow the subdivided edges to have different labels or, to the contrary, we could require them all to have the same label etc. Then another question could be how we should treat labels of vertices etc. While these considerations are interesting even for practice, they are out of the scope of this paper.
- 8.
The latter constraint on degrees would not probably be very relevant for bounded-treewidth graphs or planar graphs. This is because any graph of treewidth k must always have at least one vertex of degree at most k and because any planar graph must always have at least one vertex of degree at most 5. However, isomorphism algorithms are extremely fast in practice, despite not being polynomial in the worst case, so the algorithm that we would obtain for general graphs could still be practical.
References
Flum, J., Grohe, M.: Parameterized Complexity Theory. Springer, Berlin (2006)
Garey, M.R., Johnson, D.S., Tarjan, R.E.: The planar hamiltonian circuit problem is np-complete. SIAM J. Comput. 5(4), 704–714 (1976)
Grohe, M., Marx, D.: Structure theorem and isomorphism test for graphs with excluded topological subgraphs. CoRR, abs/1111.1109 (2011)
Horváth, T., Otaki, K., Ramon, J.: Efficient frequent connected induced subgraph mining in graphs of bounded tree-width. In: Blockeel, H., Kersting, K., Nijssen, S., Železný, F. (eds.) ECML PKDD 2013, Part I. LNCS, vol. 8188, pp. 622–637. Springer, Heidelberg (2013)
Horváth, T., Ramon, J.: Efficient frequent connected subgraph mining in graphs of bounded tree-width. Theoret. Comput. Sci. 411(31–33), 2784–2797 (2010)
Johnson, D.S., Yannakakis, M., Papadimitriou, C.H.: On generating all maximal independent sets. Inf. Process. Lett. 27(3), 119–123 (1988)
Lokshtanov, D., Pilipczuk, M., Pilipczuk, M., Saurabh, S.: Fixed-parameter tractable canonization and isomorphism test for graphs of bounded treewidth. In: 55th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2014, pp. 186–195 (2014)
Luks, E.M.: Isomorphism of graphs of bounded valence can be tested in polynomial time. J. Comput. Syst. Sci. 25(1), 42–65 (1982)
Marx, D., Pilipczuk, M.: Everything you always wanted to know about the parameterized complexity of subgraph isomorphism (but were afraid to ask). In: 31st International Symposium on Theoretical Aspects of Computer Science, STACS 2014, pp. 542–553 (2014)
Matoušek, J., Thomas, R.: On the complexity of finding iso- and other morphisms for partial k-trees. Discrete Math. 108(1–3), 343–364 (1992)
Robertson, N., Seymour, P.D.: Graph minors. XIII. the disjoint paths problem. J. Comb. Theory Ser. B 63(1), 65–110 (1995)
Torán, J., Wagner, F.: The complexity of planar graph isomorphism. Bull. EATCS 97, 60–82 (2009)
Acknowledgement
This work has been supported by ERC Starting Grant 240186 “MiGraNT: Mining Graphs and Networks, a Theory-based approach”. The first author is supported by a grant from the Leverhulme Trust (RPG-2014-164).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing Switzerland
About this paper
Cite this paper
Kuželka, O., Ramon, J. (2016). Mine ’Em All: A Note on Mining All Graphs. In: Inoue, K., Ohwada, H., Yamamoto, A. (eds) Inductive Logic Programming. ILP 2015. Lecture Notes in Computer Science(), vol 9575. Springer, Cham. https://doi.org/10.1007/978-3-319-40566-7_8
Download citation
DOI: https://doi.org/10.1007/978-3-319-40566-7_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-40565-0
Online ISBN: 978-3-319-40566-7
eBook Packages: Computer ScienceComputer Science (R0)