## Abstract

We consider a class of pattern graphs on \(q\ge 4\) vertices that have \(q-2\) distinguished vertices with equal neighborhood in the remaining two vertices. Two pattern graphs in this class are siblings if they differ by some edges connecting the distinguished vertices.

In particular, we show that if induced copies of siblings to a pattern graph in such a class are rare in the host graph then one can detect the pattern graph relatively efficiently. For example, we infer that if there are \(N_d\) induced copies of a diamond (i.e., a graph on four vertices missing a single edge to be complete) in the host graph, then an induced copy of the complete graph on four vertices, \(K_4,\) as well as an induced copy of the cycle on four vertices, \(C_4,\) can be deterministically detected in \(O(n^{2.75}+N_d)\) time. Note that the fastest known algorithm for \(K_4\) and the fastest known deterministic algorithm for \(C_4\) run in \(O(n^{3.257})\) time. We also show that if there is a family of siblings whose induced copies in the host graph are rare then there are good chances to determine the numbers of occurrences of induced copies for all pattern graphs on *q* vertices relatively efficiently.

## Access this chapter

Tax calculation will be finalised at checkout

Purchases are for personal use only

### Similar content being viewed by others

## References

Alon, N., Dao, P., Hajirasouliha, I., Hormozdiari, F., Sahinalp, S.C.: Biomolecular network motif counting and discovery by color coding. Bioinformatics (ISMB 2008)

**24**(13), 241â€“249 (2008)BlÃ¤ser, M., Komarath, B., Sreenivasaiah, K.: Graph Pattern Polynomials. CoRR.abs/1809.08858 (2018)

Corneil, D.G., Perl, Y., Stewart, L.K.: A linear recognition algorithm for cographs. SIAM J. Comput.

**14**(4), 926â€“934 (1985)Dalirrooyfard, M., Duong Vuong, T., Virginia Vassilevska Williams, V.: Graph pattern detection: hardness for all induced patterns and faster non-induced cycles. In: Proceedings of STOC 2019 (2019, to appear)

Eisenbrand, F., Grandoni, F.: On the complexity of fixed parameter clique and dominating set. Theor. Comput. Sci.

**326**, 57â€“67 (2004)Floderus, P., Kowaluk, M., Lingas, A., Lundell, E.-M.: Detecting and counting small pattern graphs. SIAM J. Discrete Math.

**29**(3), 1322â€“1339 (2015)Floderus, P., Kowaluk, M., Lingas, A., Lundell, E.-M.: Induced subgraph isomorphism: are some patterns substantially easier than others? Theor. Comput. Sci.

**605**, 119â€“128 (2015)GÄ…sieniec, L., Kowaluk, M., Lingas, A.: Faster multi-witnesses for Boolean matrix product. Inf. Process. Lett.

**109**, 242â€“247 (2009)Itai, A., Rodeh, M.: Finding a minimum circuit in a graph. SIAM J. Comput.

**7**, 413â€“423 (1978)Kloks, T., Kratsch, D., MÃ¼ller, H.: Finding and counting small induced subgraphs efficiently. Inf. Process. Lett.

**74**(3â€“4), 115â€“121 (2000)Kowaluk, M., Lingas, A., Lundell, E.-M.: Counting and detecting small subgraphs via equations and matrix multiplication. SIAM J. Discrete Math.

**27**(2), 892â€“909 (2013)Kowaluk, M., Lingas, A.: A fast deterministic detection of small pattern graphs in graphs without large cliques. In: Poon, S.-H., Rahman, M.S., Yen, H.-C. (eds.) WALCOM 2017. LNCS, vol. 10167, pp. 217â€“227. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-53925-6_17

Le Gall, F.: Faster algorithms for rectangular matrix multiplication. In: Proceedings of 53rd Symposium on Foundations of Computer Science (FOCS), pp. 514â€“523 (2012)

Le Gall, F.: Powers of tensors and fast matrix multiplication. In: Proceedings of 39th International Symposium on Symbolic and Algebraic Computation, pp. 296â€“303 (2014)

NesÌ†etrÌ†il, J., Poljak, S.: On the complexity of the subgraph problem. Comment. Math. Univ. Carol.

**26**(2), 415â€“419 (1985)Olariu, S.: Paw-free graphs. Inf. Process. Lett.

**28**, 53â€“54 (1988)Schank, T., Wagner, D.: Finding, counting and listing all triangles in large graphs, an experimental study. In: Proceedings of WEA, pp. 606â€“609 (2005)

Sekar, V., Xie, Y., Maltz, D.A., Reiter, M.K., Zhang, H.: Toward a framework for internet forensic analysis. In: Third Workshop on Hot Topics in Networking (HotNets-HI) (2004)

Wolinski, C., Kuchcinski, K., Raffin, E.: Automatic design of application-specific reconfigurable processor extensions with UPaK synthesis kernel. ACM Trans. Des. Autom. Electron. Syst.

**15**(1), 1â€“36 (2009)Vassilevska Williams, V., Wang, J.R., Williams, R., Yu H.: Finding four-node subgraphs in triangle time. In: Proceedings of SODA, pp. 1671â€“1680 (2015)

Vassilevska Williams, V.: Multiplying matrices faster than Coppersmith-Winograd. In: Proceedings of 44th Annual ACM Symposium on Theory of Computing (STOC), pp. 887â€“898 (2012)

## Acknowledgments

The authors are thankful to anonymous referees for valuable comments. The research has been supported in part by Swedish Research Council grant 621-2017-03750.

## Author information

### Authors and Affiliations

### Corresponding author

## Editor information

### Editors and Affiliations

## Appendix: Proof of Lemma 1

### Appendix: Proof of Lemma 1

### 1.1 Notation

A set of single representatives of all isomorphism classes for graphs on *k* vertices is denoted by \( \mathcal {H}_k\) while its subset consisting of graphs having an independent set on at least \(k-l\ge 1\) vertices is denoted by \( \mathcal {H}_k(l).\)

Let *H* be a graph on *k* vertices and let \(H_{sub}\) be an induced subgraph of *H* on *l* vertices such that the \(k-l\) vertices in \(H\setminus H_{sub}\) form an independent set. Consider the family of all supergraphs \(H'\) of *H* (including *H*) in \(\mathcal {H}_k\) such that \(H'\) has the same vertex set as *H*, \(H_{sub}\) is also an induced subgraph of \(H'\), and the set of edges between \(H_{sub}\) and \(H'\setminus H_{sub}\) is the same as that between \(H_{sub}\) and \(H\setminus H_{sub}.\) This family is denoted by \(\mathcal {H}_k(H_{sub},H),\) and its intersection with \(\mathcal {H}_k\) is denoted by \(\mathcal {SH}_k(H_{sub},H)\).

For a graph \(H\in \mathcal {H}_k\) and a host graph *G* on at least *k* vertices, the number of sets of *k* vertices in *G* that induce a subgraph of *G* isomorphic to *H* is denoted by *NI*(*H*,Â *G*).

For \(H\in \mathcal {H}_k(l),\) the set *Eq*(*H*,Â *l*) consists of the following equations in one-to-one correspondence with induced subgraphs \(H_{sub}\) of *H* on *l* vertices

where \(H\setminus H_{sub}\) is an independent set in *H*,Â and \(B(H_{sub},H')\) are easily computable coefficients. For our purposes, we need to define the coefficients only when \(H\in \mathcal {H}_k(k-2),\) \(H\setminus H_{sub}\) consists of two independent vertices and \(H'\in \mathcal {SH}_k(H_{sub},H)\). Then, the coefficient \(B(H_{sub},H')\) is just the number of automorphisms of \(H'\) divided by the number of automorphisms of \(H'\) that are identity on \(H_{sub}\) by Lemma 3.6 in [11]. By Lemma 3.5 in [11], for \(H\in \mathcal {H}_k(l),\) the right-hand side of an equation in *Eq*(*H*,Â *l*) can be evaluated in time \(O(n^{l}(k-l)+T_l(n))\), where \(T_l(n)\) stands for the time required to solve the so called *l*-neighborhood problem. By Theorem 6.1 in [11], \(T_l(n)=O(n^{\omega (\lceil (k-l)/2 \rceil ,1,\lfloor (k-l)/2 \rfloor })\).

By *SEq*(*G*,Â *k*,Â *l*), we shall denote the system of equations obtained by picking, for each *H* in \(\mathcal {H}_k(l),\) an arbitrary equation from *Eq*(*H*,Â *l*). By Lemma 3.7 in [11], the resulting system of \(|\mathcal {H}_k(l)|\) equations is linearly independent.

### 1.2 5.2 Proof

Consider Theorem 4.1 in [11] with fixed \(k=q\), \(l=q-2\), and \(O(n^{\omega (\lceil (q-2)/2 \rceil ,1,\lfloor (q-2)/2 \rfloor })\) substituted for \(T_{q-2}(n)\) according to Theorem 6.1 in [11]. Then, the theorem states that if for all \(H\in \mathcal {H}_{q-2}\setminus \mathcal {H}_{q-2}(q-2)\) the values *NI*(*H*,Â *G*) are known then for all \(H'\in \mathcal {H}_{q-2},\) the numbers \(NI(H',G)\) and \(N(H',G)\) can be determined in time \(O(n^{\omega (\lceil (q-2)/2 \rceil ,1,\lfloor (q-2)/2 \rfloor })\). Since \(H_q\setminus H_q(q-2)=\{K_q\}\), it follows directly from Theorem 4.1 in [11] that if the number of (induced) subgraphs isomorphic to \(K_q\) in the host graph is known then for all the pattern graphs on *q* vertices the corresponding numbers can be computed in the time specified in the lemma statement. The argumentation given in the proof of Theorem 4.1 in [11] works equally well when the number of induced copies of an arbitrary pattern graph *H* on *q* vertices is known.

Namely, following the proof of Theorem 4.1 in [11] with \(k=q\) and \(l=q-2,\) we form \(SEq(G,q,q-2).\) Since we assume that *q* is fixed, the coefficients \(B(H_{sub},H')\) on the left-sides of the equations in \(SEq(G,q,q-2)\) can be computed in *O*(1) time. By Lemma 3.5 and Theorem 6.1 in [11], the right-sides of the equations can be computed in time \(O(n^{\omega (\lceil (q-2)/2 \rceil ,1,\lfloor (q-2)/2 \rfloor }) .\) Let us the graphs in \(\mathcal {H}_k\) so that the number of edges is non-decreasing and the graphs in \(\mathcal {H}_k(l)\) form a prefix of the sorted sequence. Let *B* be the \(|\mathcal {H}_k(l)|\times |\mathcal {H}_k|\) matrix corresponding to the left-hand sides of the equations in \(SEq(G,q,q-2)\), with the rows of *B* corresponding to \(H\in \mathcal {H}_k(q-2)\) and the columns of *B* corresponding to \(H'\in \mathcal {H}_{q}\) sorted in the aforementioned way. Consider the leftmost maximal square submatrix *M* of the matrix *B*. Since *M* has zeros below the diagonal starting from the leftmost top-left corner, we infer that the resulting \(|H_q(q-2)|\) equations with \(|H_q|\) unknowns are also linearly independent. Hence, when we substitute the known number of induced copies of *H* for the variable \(x_{H,G}\) corresponding to *H* in the equations, we obtain a system *S* of \(|H_q(q-2)|\) equations with \(|H_q|-1\) unknowns. Since \(H_q\setminus H_q(q-2)=\{K_q\}\), the number of unknowns is equal to the number of equations. It follows from RemarkÂ 1 that the system *S* of equations resulting from the substitution is independent. Also, none of the resulting equations can disappear after the substitution. Hence, we can solve them in \(O(|H_q(q-2)|^3)=O(1)\) time. Â Â Â \(\square \)

## Rights and permissions

## Copyright information

Â© 2019 Springer Nature Switzerland AG

## About this paper

### Cite this paper

Kowaluk, M., Lingas, A. (2019). Rare Siblings Speed-Up Deterministic Detection and Counting of Small Pattern Graphs. In: GÄ…sieniec, L., Jansson, J., Levcopoulos, C. (eds) Fundamentals of Computation Theory. FCT 2019. Lecture Notes in Computer Science(), vol 11651. Springer, Cham. https://doi.org/10.1007/978-3-030-25027-0_22

### Download citation

DOI: https://doi.org/10.1007/978-3-030-25027-0_22

Published:

Publisher Name: Springer, Cham

Print ISBN: 978-3-030-25026-3

Online ISBN: 978-3-030-25027-0

eBook Packages: Computer ScienceComputer Science (R0)