We devise an algorithm that approximately computes the number of paths of length k in a given directed graph with n vertices up to a multiplicative error of 1 ± ε. Our algorithm runs in time ε −2 4 k (n + m) poly(k). The algorithm is based on associating with each vertex an element in the exterior (or, Grassmann) algebra, called an extensor, and then performing computations in this algebra. This connection to exterior algebra generalizes a number of previous approaches for the longest path problem and is of independent conceptual interest. Using this approach, we also obtain a deterministic 2 k · poly(n) time algorithm to find a k-path in a given directed graph that is promised to have few of them. Our results and techniques generalize to the subgraph isomorphism problem when the subgraphs we are looking for have bounded pathwidth. Finally, we also obtain a randomized algorithm to detect k-multilinear terms in a multivariate polynomial given as a general algebraic circuit. To the best of our knowledge, this was previously only known for algebraic circuits not involving negative constants.
arXiv:1804.09448v1 [cs.DS] 25 Apr 2018Longest Path. The Longest Path problem is the optimization problem to find a longest (simple) path in a given graph. Clearly, this problem generalizes the NP-hard Hamiltonian path problem [30]. We consider the decision version, the k-path problem, in which we wish to find a path of length k in a given graph G. It was proved fixed-parameter tractable avant la lettre [50], and a sequence of both iterative improvements and conceptual breakthroughs [11,4,7,40,16,27,63] have lead to the current state-of-the-art for undirected graphs: a randomized algorithm by Björklund et al. [9] in time 1.66 k · poly(n). For directed graphs, the fastest known randomized algorithm is by Koutis and Williams [43] in time 2 k · poly(n), whereas the fastest deterministic algorithm is due to Zehavi [66] in time 2.5961 k · poly(n).Subgraph isomorphism. The subgraph isomorphism problem generalizes the k-path problem and is one of the most fundamental graph problems [19,60]: Given two graphs H and G, decide whether G contains a subgraph isomorphic to H. This problem and its variants have a vast number of applications, covering areas such as statistical physics, probabilistic inference, and network analysis [49]. For example, such problems arise in the context of discovering network motifs, small patterns that occur more often in a network than would be expected if it was random. Thus, one is implicitly interested in the counting version of the subgraph isomorphism problem: to compute the number of subgraphs of G that are isomorphic to H. Through network motifs, the problem of counting subgraphs has found applications in the study of gene transcription networks, neural networks, and social networks [49]. Consequently, there is a large body of work dedicated to algorithmic discovery of network motifs [32,1,52,37,57,18,38,62,55]. For example, Kibriya and Ramon [39,53] use the ideas of Koutis and Williams [43] to enumerate...