Skip to main content
Log in

Improved Parameterized Algorithms for Network Query Problems

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

In the Partial Information Network Query (PINQ) problem, we are given a host graph H, and a pattern \({\mathcal {P}}\) whose topology is partially known. We seek a connected subgraph of H that resembles\({\mathcal {P}}\). PINQ is a generalization of Subgraph Isomorphism, where the topology of \({\mathcal {P}}\) is known, and Graph Motif, where the topology of \({\mathcal {P}}\) is unknown. This generalization addresses the major challenge of analyzing biological networks in the absence of certain topological data. In this paper, we use a non-standard hybridization of algebraic and combinatorial tools to develop an exact parameterized algorithm as well as an FPT-approximation scheme for PINQ.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4

Similar content being viewed by others

Notes

  1. Roughly speaking, treewidth is a parameter that indicates how close a graph is to being a tree. We give the formal definition in “Appendix A”.

  2. The algorithm presented in this paper relies on a part-algebraic/part-combinatorial hybridization strategy (see Sect. 2), whereas the algorithm in [31] applied divide-and-color [11].

  3. This can be viewed also as applying the color coding technique [1] using only two colors.

  4. For such solutions, the time gained by handling A in a manner similar to ProcedureA prevails the time required for the preceding selection step.

  5. Avoiding all quads where several nodes in \(V({{\mathcal {P}}})\) are mapped to the same node in \(V^H\) is a more difficult task, to which end we employ the full power of the narrow sieves method, and in particular, we use labels introduced in the following subsection.

  6. It holds that \((T,f_{\mathrm {gra}})\equiv (T',f_{\mathrm {gra}}')\) if and only if there is an isomorphism \({{\mathrm{iso}}}\) between the rooted trees T and \(T'\), such that [\(\forall v\in V^T: f_{\mathrm {gra}}(v)=f_{\mathrm {gra}}'({{\mathrm{iso}}}(v))\)].

  7. SimpleFewSingles does not handle indels, and thus the solutions it finds necessarily correspond to \(n_E=|E({{\mathcal {P}}})|+t-1\), and \(n_{{\mathcal {P}}}=t\).

  8. We denote by \({{\mathrm{leaves}}}(T^{\mathrm {free}})\) the set of leaves in \(T^{\mathrm {free}}\)excluding its root (even if \(|V^{\mathrm {free}}|=1\)).

  9. Note that \((T^{\mathrm {free}},f^{\mathrm {free}}_{\mathrm {nod}},f^{\mathrm {free}}_{\mathrm {lea}})\equiv ({T^{\mathrm {free}}}',{f^{\mathrm {free}}_{\mathrm {nod}}}',{f^{\mathrm {free}}_{\mathrm {lea}}}')\) if and only if there is an isomorphism \({{\mathrm{iso}}}'\) between the rooted trees \(T^{\mathrm {free}}\) and \({T^{\mathrm {free}}}'\), such that

    1. i.

      For all \(v\in V^{\mathrm {free}}: f^{\mathrm {free}}_{\mathrm {nod}}(v)={f^{\mathrm {free}}_{\mathrm {nod}}}'({{\mathrm{iso}}}'(v))\).

    2. ii.

      For all \(v\in {{\mathrm{leaves}}}(T^{\mathrm {free}}): f^{\mathrm {free}}_{\mathrm {lea}}(v)=(u,x),\) where \(({{\mathrm{iso}}}(u),x)={f^{\mathrm {free}}_{\mathrm {lea}}}'({{\mathrm{iso}}}'(v))\).

  10. Note that \((T^{\mathrm {free}},f^{\mathrm {free}}_{\mathrm {nod}},f^{\mathrm {free}}_{\mathrm {lea}})\equiv ({T^{\mathrm {free}}}',{f^{\mathrm {free}}_{\mathrm {nod}}}',{f^{\mathrm {free}}_{\mathrm {lea}}}')\) if and only if there is an isomorphism \({{\mathrm{iso}}}'\) between the rooted trees \(T^{\mathrm {free}}\) and \({T^{\mathrm {free}}}'\), such that

    1. i.

      For all \(v\in V^{\mathrm {free}}: f^{\mathrm {free}}_{\mathrm {nod}}(v)={f^{\mathrm {free}}_{\mathrm {nod}}}'({{\mathrm{iso}}}'(v))\).

    2. ii.

      For all \(v\in {{\mathrm{leaves}}}(T^{\mathrm {free}}): f^{\mathrm {free}}_{\mathrm {lea}}(v)=(u,x),\) where \(({{\mathrm{iso}}}(u),x)={f^{\mathrm {free}}_{\mathrm {lea}}}'({{\mathrm{iso}}}'(v))\).

References

  1. Alon, N., Yuster, R., Zwick, U.: Color coding. J. Assoc. Comput. Mach. 42(4), 844–856 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  2. Betzler, N., Bevern, R., Fellows, M.R., Komusiewicz, C., Niedermeier, R.: Parameterized algorithmics for finding connected motifs in biological networks. IEEE/ACM Trans. Comput. Biol. Bioinform. 8(5), 1296–1308 (2011)

    Article  Google Scholar 

  3. Betzler, N., Fellows, M.R., Komusiewicz, C., Niedermeier, R.: Parameterized algorithms and hardness results for graph motif problems. In: CPM, pp. 31–43 (2008)

  4. Björklund, A.: Determinant sums for undirected hamiltonicity. In: FOCS, pp. 173–182 (2010)

  5. Björklund, A., Husfeldt, T., Kaski, P., Koivisto, M.: Narrow sieves for parameterized paths and packings. In: CoRR. arXiv:1007.1161 (2010)

  6. Björklund, A., Kaski, P., Kowalik, L.: Probably optimal graph motifs. In: STACS, pp. 20–31 (2013)

  7. Blin, G., Sikora, F., Vialette, S.: Querying graphs in protein-protein interactions networks using feedback vertex set. IEEE/ACM Trans. Comput. Biol. Bioinform. 7(4), 628–635 (2010)

    Article  Google Scholar 

  8. Bodlaender, H.L.: A linear-time algorithm for finding tree-decompositions of small treewidth. SIAM J. Comput. 25(6), 1305–1317 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  9. Bodlaender, H.L., Koster, A.M.C.A.: Combinatorial optimization on graphs of bounded treewidth. Comput. J. 51(3), 255–269 (2008)

    Article  Google Scholar 

  10. Bruckner, S., Hüffner, F., Karp, R.M., Shamir, R., Sharan, R.: Topology-free querying of protein interaction networks. J. Comput. Biol. 17(3), 237–252 (2010)

    Article  MathSciNet  Google Scholar 

  11. Chen, J., Kneis, J., Lu, S., Molle, D., Richter, S., Rossmanith, P., Sze, S., Zhang, F.: Randomized divide-and-conquer: improved path, matching, and packing algorithms. SIAM J. Comput. 38(6), 2526–2547 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  12. Cygan, M., Fomin, F.V., Kowalik, L., Lokshtanov, D., Marx, D., Pilipczuk, M., Pilipczuk, M., Saurabh, S.: Parameterized Algorithms. Springer, Berlin (2015)

    Book  MATH  Google Scholar 

  13. Dondi, R., Fertin, G., Vialette, S.: Maximum motif problem in vertex-colored graphs. In: CPM, pp. 388–401 (2011)

  14. Dost, B., Shlomi, T., Gupta, N., Ruppin, E., Bafna, V., Sharan, R.: Qnet: a tool for querying protein interaction networks. J. Comput. Biol. 15(7), 913–925 (2008)

    Article  MathSciNet  Google Scholar 

  15. Downey, R.G., Fellows, M.R.: Fixed-parameter tractability and completeness II: on completeness for W[1]. Theor. Comput. Sci. 141(1–2), 109–131 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  16. Fellows, M.R., Fertin, G., Hermelin, D., Vialette, S.: Upper and lower bounds for finding connected motifs in vertex-colored graphs. J. Comput. Syst. Sci. 77(4), 799–811 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  17. Fionda, V., Palopoli, L.: Biological network querying techniques: analysis and comparison. J. Comput. Biol. 18(4), 595–625 (2011)

    Article  MathSciNet  Google Scholar 

  18. Fomin, F.V., Lokshtanov, D., Raman, V., Saurabh, S., Rao, B.V.R.: Faster algorithms for finding and counting subgraphs. J. Comput. Syst. Sci. 78(3), 698–706 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  19. Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. W.H. Freeman, New York (1979)

    MATH  Google Scholar 

  20. Guillemot, S., Sikora, F.: Finding and counting vertex-colored subtrees. Algorithmica 65(4), 828–844 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  21. Harvey, D., Roche, D.S.: An in-place truncated Fourier transform and applications to polynomial multiplication. In: ISSAC, pp. 325–329 (2010)

  22. Hüffner, F., Wernicke, S., Zichner, T.: Algorithm engineering for color-coding with applications to signaling pathway detection. Algorithmica 52(2), 114–132 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  23. Kellerer, H., Pferschy, U., Pisinger, D.: Knapsack Problems. Springer, Berlin (2004)

    Book  MATH  Google Scholar 

  24. Koutis, I.: Faster algebraic algorithms for path and packing problems. In: ICALP, pp. 575–586 (2008)

  25. Koutis, I.: Constrained multilinear detection for faster functional motif discovery. Inf. Process. Lett. 112(22), 889–892 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  26. Koutis, I., Williams, R.: Limits and applications of group algebras for parameterized problems. In: ICALP, pp. 653–664 (2009)

  27. Lacroix, V., Fernandes, C.G., Sagot, M.F.: Motif search in graphs: application to metabolic networks. IEEE/ACM Trans. Comput. Biol. Bioinform. 3(4), 360–368 (2006)

    Article  Google Scholar 

  28. Misra, N., Philip, G., Raman, V., Saurabh, S., Sikdar, S.: FPT algorithms for connected feedback vertex set. J. Comb. Optim. 24(2), 131–146 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  29. Nederlof, J.: Fast polynomial-space algorithms using möbius inversion: improving on Steiner tree and related problems. In: ICALP, pp. 713–725 (2009)

  30. Pinter, R.Y., Rokhlenko, O., Yeger-Lotem, E., Ziv-Ukelson, M.: Alignment of metabolic pathways. Bioinformatics 21(16), 3401–3408 (2005)

    Article  Google Scholar 

  31. Pinter, R.Y., Zehavi, M.: Partial information network queries. In: IWOCA, pp. 362–275 (2013)

  32. Pinter, R.Y., Zehavi, M.: Algorithms for topology-free and alignment network queries. J. Discrete Algorithms 27, 29–53 (2014)

    Article  MathSciNet  MATH  Google Scholar 

  33. Schwartz, J.T.: Fast probabilistic algorithms for verification of polynomial identities. J. Assoc. Comput. Mach. 27(4), 701–717 (1980)

    Article  MathSciNet  MATH  Google Scholar 

  34. Shlomi, T., Segal, D., Ruppin, E., Sharan, R.: Qpath: a method for querying pathways in a protein-protein interaction networks. BMC Bioinform. 7, 199 (2006)

    Article  Google Scholar 

  35. Sikora, F.: An (almost complete) State of the Art Around the Graph Motif Problem. Université Paris-Est Technical reports (2012)

  36. Zippel, R.: Probabilistic algorithms for sparse polynomials. In: EUROSAM, pp. 216–226 (1979)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Meirav Zehavi.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

A preliminary version of this paper appeared in the proceedings of the 9th International Symposium on Parameterized and Exact Computation, Wrocław, September 2014.

Appendix A: Proof of Lemma 4

Appendix A: Proof of Lemma 4

Let \(A\subseteq L\) and \(r\in V^H\). In this proof, when we refer to a variable that is not x, we refer to the value that is assigned to this variable. We also assume an order < on \(\{0\}\cup V^H\), such that 0 is the smallest element.

The proof is organized as follows. We first give some definitions used only in this proof. We then present the matrices of the dynamic programming, and show how to compute their cells. Finally, we conclude the correctness of the lemma.

1.1 A.1 Definitions

Treewidth is a well-studied parameter which intuitively indicates how close a graph is to being a tree. For example, a tree has treewidth 1 and an n-node clique has treewidth \(n-1\). Formally, the treewidth of a graph is defined as follows.

Definition 13

A tree decomposition of a graph \(G=(V^G,E^G)\) is a tree \(T=(V^T,E^T)\), such that

  1. 1.

    Each \(X\in V^T\) represents a subset of \(V^G\), which we denote by \(\mathrm {set}(X)\).

  2. 2.

    For each \(v\in V^G\), there is \(X\in V^T\) such that \(v\in \mathrm {set}(X)\).

  3. 3.

    For each \(\{v,u\}\in E^G\), there is \(X\in V^T\) such that \(\{v,u\}\subseteq \mathrm {set}(X)\).

  4. 4.

    Let \(X,Y\in V^T\). If both \(\mathrm {set}(X)\) and \(\mathrm {set}(Y)\) contain a node \(v\in V^G\), then all nodes \(Z\in V^T\) on the path between X and Y satisfy \(v\in \mathrm {set}(Z)\).

The width of T is \(\hbox {max}_{X\in V^T}\{|\mathrm {set}(X)|\}-1\). The treewidth of G is the minimum width among all possible tree decompositions of G.

A nice tree decomposition is a form of a tree decomposition that is easier to handle in dynamic programming-based algorithms. It is defined as follows.

Definition 14

A tree decomposition \(T=(V^T,E^T)\) of a graph G, rooted at some node, is nice if each node \(X\in V^T\) is of one of the following types.

  1. 1.

    Leaf: X is a leaf of T and \(|\mathrm {set}(X)|=0\).

  2. 2.

    Join: X has exactly two sons Y and Z, and \(\mathrm {set}(X)=\mathrm {set}(Y)=\mathrm {set}(Z)\). We say that X joins Y and Z.

  3. 3.

    Introduce: X has exactly one son Y, and there is a node v such that \(\mathrm {set}(X)=\mathrm {set}(Y)\cup \{v\}\). We say that X introduces v.

  4. 4.

    Forget: X has exactly one son Y, and there is a node v such that \(\mathrm {set}(X)=\mathrm {set}(Y){\setminus }\{v\}\). We say that X forgets v.

For any graph in the pattern \({\mathcal {P}}\), we can compute a minimum width tree decomposition in O(k) time [8]. Then, for any graph in \({\mathcal {P}}\), we can compute a nice tree decomposition with the same width, such that \(\mathrm {set}(\mathrm {root}(T))=\emptyset \), in O(k) time [9]. Thus, for all \(1\le i\le t\), we next assume that we have a minimum width tree decomposition \(TD_i=(VD_i,ED_i)\) of \(P_i\) that is nice.

The following two definitions will be immediately used in defining partial solutions for the dynamic programming.

Definition 15

Let \(1\le i\le t, p^*\in V^P_i, h^*\in V^H\) and \(X\in VD_i\). We say that a function \(\alpha : \mathrm {set}(X)\rightarrow V^H\) is a \((p^*,h^*,X)\)-mapping if:

  1. 1.

    If \(p^*\in \mathrm {set}(X)\), then \(\alpha (p^*)=h^*\).

  2. 2.

    For all \(p\in \mathrm {set}(X){\setminus }\{p^*\}\), we have \(\alpha (p)\ne r\).

  3. 3.

    For all \(p\in \mathrm {set}(X)\), we have \(\varDelta (p,\alpha (p))\ne -\infty \).

  4. 4.

    For all \(p,p'\in \mathrm {set}(X)\) such that \(\{p,p'\}\in E^P_i\), we have \(\{\alpha (p),\alpha (p')\}\in E^H\).

Definition 16

Let \(1\le i\le t\) and \(X\in VD_i\). Define \(P_i(X)\) as the subgraph of \(P_i\) induced by \(\{p\in V^P_i: X\) forgets p or has a descendant in \(TD_i\) that forgets \(p\}\).

We now define the partial solutions. For the sake of clarity, we divide the conditions into three sets. Informally, the first set (i.e., Conditions 1–4) modifies our definition of a quad (see the second paragraph in Sect. 3.1.1); the second set (i.e., Conditions 5–11) modifies Definition 1 (specifically, Conditions 5–6 modify Condition 1 in Definition 1, Conditions 7–8 modify Condition 2 in Definition 1, and Conditions 9–11 are Conditions 3–5 in Definition 1); and the third set (i.e., Condition 12) modifies Definition 3.

Definition 17

Let \(1\le i\le t, p^*\in V^P_i, h^*\in V^H, X\in VD_i,\) a \((p^*,h^*,X)\)-mapping \(\alpha \), \(1\le t^*\le t\) such that \((h^*=r\rightarrow t^*=t)\), and \(1\le k^*\le k\).

A pentuple \((T,f_{\mathrm {gra}},f_{\mathrm {nod}},f_{\mathrm {con}},\ell )\) is a \((p^*,h^*,X,\alpha ,t^*,k^*)\)-solution if:

  1. 1.

    \(T=(V^T,E^T)\) is a rooted tree on \(t^*\) nodes.

  2. 2.

    \(f_{\mathrm {gra}}: V^T\rightarrow {{\mathcal {P}}}\cup P_i(X)\), and \(k^*=\sum _{v\in V^T{\setminus }\mathrm {root}(T)}|V(f_{\mathrm {gra}}(v))|+|V^P_i|\).

  3. 3.

    If \(P_i\ne P_i(X): (\forall v\in V^T\), then \(f_{\mathrm {gra}}(v)=P_i(X)\) if and only if \(v=\mathrm {root}(T))\).

  4. 4.

    \(f_{\mathrm {nod}}: Y\rightarrow V^H\), \(f_{\mathrm {con}}: Y\rightarrow 2^Y\), where \(Y=\{(v,p): v\in V^T,p\in V(f_{\mathrm {gra}}(v))\}\).

  5. 5.

    If \((\mathrm {root}(T),p^*)\in {{\mathrm{dom}}}(f_{\mathrm {nod}})\), then \(f_{\mathrm {nod}}(\mathrm {root}(T),p^*)=h^*\).

  6. 6.

    For all \((v,p)\in {{\mathrm{dom}}}(f_{\mathrm {nod}}){\setminus }\{(\mathrm {root}(T),p^*)\}\), we have \(f_{\mathrm {nod}}(v,p)\ne r\).

  7. 7.

    For all \(v\in V^T, \{p,p'\}\in E(f_{\mathrm {gra}}(v))\), we have \(\{f_{\mathrm {nod}}(v,p),f_{\mathrm {nod}}(v,p')\}\in E^H\).

  8. 8.

    For all p such that \((\mathrm {root}(T),p)\in {{\mathrm{dom}}}(f_{\mathrm {con}})\), \(p'\in \mathrm {set}(X)\) such that \(\{p,p'\}\in E^P_i\): \(\{f_{\mathrm {nod}}(\mathrm {root}(T),p),\alpha (p')\}\in E^H\).

  9. 9.

    For all \((v,p)\in {{\mathrm{dom}}}(f_{\mathrm {nod}})\), we have \(\varDelta (p,f_{\mathrm {nod}}(v,p))\ne -\infty \).

  10. 10.

    For all \((v,p)\in {{\mathrm{dom}}}(f_{\mathrm {con}})\) and \((u,p')\in f_{\mathrm {con}}(v,p):\)

    1. (a)

      v is the father of u in T, and \(\{f_{\mathrm {nod}}(v,p),f_{\mathrm {nod}}(u,p')\}\in E^H\).

    2. (b)

      For all \((u',p'')\in f_{\mathrm {con}}(v,p){\setminus } \{(u,p')\}\), we have \(f_{\mathrm {nod}}(u,p')\ne f_{\mathrm {nod}}(u',p'')\).

  11. 11.

    For all \(u\in V^T{\setminus }\{\mathrm {root}(T)\}\), we have \(|\{(v,p,p'): (u,p')\in f_{\mathrm {con}}(v,p)\}|=1\).

  12. 12.

    \(\ell : (V^T{\setminus }\{\mathrm {root}(T)\})\cup {{\mathrm{dom}}}(f_{\mathrm {nod}}) \rightarrow A\).

The score and the monomial of a \((p^*,h^*,X,\alpha ,t^*)\)-solution are defined as in Definitions 2 and 5.

1.2 A.2 The Matrices

We use the following two matrices.

  1. 1.

    MAP\([i,p^*,h^*,X,\alpha ,t^*,k^*]\) for all \(1\le i\le t, p^*\in V^P_i, h^*\in V^H, X\in VD_i,\) a \((p^*,h^*,X)\)-mapping \(\alpha \), \(1\le t^*\le t\) such that \((r=h^*\rightarrow t^*=t)\), and \(1\le k^*\le k\).

  2. 2.

    CON\([h_0,h^*,t^*,k^*]\) for all \(h_0\in \{0\}\cap V^H,h^*\in V^H\), \(1\le t^*\le t\), and \(0\le k^*\le k\).

MAP\([i,p^*,h^*,X,\alpha ,t^*,k^*]\) holds the polynomial \(\sum \nolimits _{(p^*,h^*,X,\alpha ,t^*)-solution\ sol}m(sol)\), whose only variable is x, and CON\([h_0,h^*,t^*,k^*]\) holds the following polynomial whose only variable is x. This polynomial is the sum of

$$\begin{aligned} \begin{array}{l} \displaystyle {\left[ \sum _{n=1}^{t^*-1}\right] \ \ \left[ \sum _{\mathrm {index}(1),\ldots ,\mathrm {index}(n)\in \{1,\ldots ,t\}}\right] \ \ \left[ \sum _{p_1,\ldots ,p_n\ \mathrm {s.t.\ for\ all}\ i\in \{1,\ldots ,n\},\ p_i\in V^P_{\mathrm {index}(i)}}\right] }\\ \displaystyle {\left[ \sum _{h_1,\ldots , h_n\ \mathrm {s.t.\ for\ all}\ i\in \{1,\ldots ,n\},\ \{h^*,h_i\}\in E^H\ \mathrm {and}\ h_{i-1}<h_i}\right] }\\ \displaystyle {\left[ \sum _{1\le t_1,\ldots ,t_n\ \mathrm {s.t.}\ \sum _{i=1}^nt_i=t^*-1}\right] \ \ \left[ \sum _{1\le k_1,\ldots ,k_n\ \mathrm {s.t.}\ \sum _{i=1}^nk_i=k^*}\right] }\\ \displaystyle {\left[ \sum _{sol_1,\ldots ,sol_n\ \mathrm {s.t.\ for\ all}\ i\in \{1,\ldots ,n\},\ sol_i\ \mathrm {is\ a}\ (p_i,h_i,\mathrm {root}(TD_{\mathrm {index}(i)}), f:\emptyset \rightarrow \emptyset ,t_i,k_i)\mathrm {-solution}}\right] }\\ \displaystyle {\prod _{i=1}^n\left( x^{w(\{h^*,h_i\})}\cdot \left( \sum _{l\in A}z_{P_{\mathrm {index}(i)},l}\right) \cdot y_{h^*,h_i}\cdot m(sol_i)\right) .} \end{array} \end{aligned}$$

1.3 A.3 Computation

Base Cases – MAP:

  1. 1.

    If X is a leaf, \(t^*=1\), and \(k^*=|V^P_i|\): \(\mathrm {MAP}[i,p^*,h^*,X,\alpha ,t^*,k^*] = 1\).

  2. 2.

    If X is a leaf, and \(t^*>1\) or \(k^*\ne |V^P_i|\): \(\mathrm {MAP}[i,p^*,h^*,X,\alpha ,t^*,k^*] = 0\).

Steps–MAP:

  1. 1.

    If X joins Y and Z: \(\mathrm {MAP}[i,p^*,h^*,X,\alpha ,t^*,k^*] = \)

    $$\begin{aligned}&\sum _{t'=1}^{t^*}\sum _{k'=|V^P_i|}^{k^*}(\mathrm {MAP}[i,p^*,h^*,Y,\alpha ,t',k']\cdot \mathrm {MAP}[i,p^*,h^*,Z,\alpha ,t^*\\&\quad -t'+1,k^*-k'+|V^P_i|]). \end{aligned}$$
  2. 2.

    If X introduces p:

    1. (a)

      Denote the (only) son of X in \(TD_i\) by Y.

    2. (b)

      Denote \(\alpha \) restricted to \(\mathrm {set}(Y)\) by \(\beta \).

    3. (c)

      \(\mathrm {MAP}[i,p^*,h^*,X,\alpha ,t^*,k^*] = \mathrm {MAP}[i,p^*,h^*,Y,\beta ,t^*,k^*]\).

  3. 3.

    If X forgets p:

    1. (a)

      Denote the (only) son of X in \(TD_i\) by Y.

    2. (b)

      Denote \(M = \{(p^*,h^*,Y)-\mathrm {mapping}\ \beta : (\forall p'\in X: \alpha (p')=\beta (p'))\}\).

    3. (c)

      Denote \(N = \{p'\in \mathrm {set}(X): \{p,p'\}\in E^P_i\}\).

    4. (d)

      For all \(\beta \in M\): \(\mathrm {poly}(\beta ){=}x^{\varDelta (p,\beta (p))+\sum _{p'\in N}w(\{\beta (p),\beta (p')\})}y_{p,\beta (p)}(\sum _{l\in A}z_{\beta (p),l})\).

    5. (e)

      \(\mathrm {MAP}[i,p^*,h^*,X,\alpha ,t^*,k^*] = \)

$$\begin{aligned} \sum _{\beta \in M}\left[ \mathrm {poly}(\beta )\sum _{t'=1}^{t^*}\sum _{k'=|V^P_i|}^{k^*}(\mathrm {MAP}[i,p^*,h^*,Y,\beta ,t',k']\cdot \mathrm {con}[0,\beta (p),t^*-t'+1,k^*-k'])\right] . \end{aligned}$$

Base Cases—CON:

  1. 1.

    \(t^*=1\), and \(k^*=0\): \(\mathrm {con}[h_0,h^*,t^*,k^*] = 1\).

  2. 2.

    \(t^*=1\), and \(k^*>0\): \(\mathrm {con}[h_0,h^*,t^*,k^*] = 0\).

Step—CON:

$$\begin{aligned}&\mathrm {con}[h_0,h^*,t^*,k^*] \\&\quad = \sum _{i=1}^t\sum _{p\in V^P_i}\sum _{h_0<h\ne r\ \mathrm {s.t.}\ \{h^*,h\}\in E^H}\sum _{t'=1}^{t^*-1}\sum _{k'=|V^P_i|}^{k^*}[x^{w(\{h^*,h\})}\\&\qquad \cdot \left( \sum _{l\in A}z_{P_i,l}\right) \cdot y_{h^*,h}\cdot \mathrm {MAP}[i,p,h, \mathrm {root}(TD_i),f: \emptyset \rightarrow \emptyset ,t',k']\\&\qquad \cdot ~\mathrm {con}[h,h^*,t^*-t',k^*-k']]. \end{aligned}$$

Order:

  1. 1.

    For \(t^*=1,\ldots ,t\), \(k^*=0,\ldots ,k\), \(i=1,\ldots ,t\), each \(p^*\in V^P_i\) and \(h^*\in V^H\):

    1. (a)

      For \(h_0=\mathrm {max}(V^H),\ldots ,0\): Compute CON\([h_0,h^*,t^*,k^*]\).

    2. (b)

      For each \(X\in VD_i\), where \(TD_i\) is traversed by using a postorder:

      1. i.

        For each \((p^*,h^*,X)\)-mapping \(\alpha \): Compute MAP\([i,p^*,h^*,X,\alpha ,t^*,k^*]\).

1.4 A.4 Concluding the Lemma

The correctness of the computation of the matrices can be verified by using induction on its order. We get that \(\displaystyle {P(r)=\sum \nolimits _{1\le i\le t, p\in V^P_i,l\in A}z_{P_i,l}\cdot \mathrm {MAP}}[i,p,r,\mathrm {root}(TD_i),f:\emptyset \rightarrow \emptyset ,t,k]\).

Each cell in the matrices holds a polynomial of degree at most \(W\cdot |V^H|^{O(1)}\) and coefficients polynomial in the input size. Since the matrices contain \(O(|V^H|^{tw+O(1)}\cdot k^{O(1)})\) cells, we get that the space complexity of the entire computation is \(O(W\cdot |V^H|^{tw+O(1)}\cdot k^{O(1)})\). Since we can compute a multiplication of two polynomials, such that each has a degree of at most \(W\cdot |V^H|^{O(1)}\) and coefficients polynomial in the input size, in \(O(W\log W\cdot |V^H|^{O(1)}\cdot k^{O(1)})\) time [21], we get that the running time of the computation of each cell is \(O(W\log W\cdot |V^H|^{O(1)}\cdot k^{O(1)})\). Thus, the running time of the entire computation is \(O(W\log W\cdot |V^H|^{tw+O(1)}\cdot k^{O(1)})\). \(\square \)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Pinter, R.Y., Shachnai, H. & Zehavi, M. Improved Parameterized Algorithms for Network Query Problems. Algorithmica 81, 2270–2316 (2019). https://doi.org/10.1007/s00453-018-00535-8

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-018-00535-8

Keywords

Navigation