The Kronecker product-based algorithm for context-free path querying (CFPQ) was proposed by Orachev et al. (2020). We reduce this algorithm to operations over Boolean matrices and extend it with the mechanism to extract all paths of interest. We also prove $O(n^3/\log{n})$ time complexity of the proposed algorithm, where n is a number of vertices of the input graph. Thus, we provide the alternative way to construct a slightly subcubic algorithm for CFPQ which is based on linear algebra and incremental transitive closure (a classic graph-theoretic problem), as opposed to the algorithm with the same complexity proposed by Chaudhuri (2008). Our evaluation shows that our algorithm is a good candidate to be the universal algorithm for both regular and context-free path querying.
翻译:Orachev等人(2020年)提出了无上下文路径查询的基于Kronecker产品的算法(CFPQ) 。 我们将这一算法简化为布尔基矩阵的操作, 并使用提取所有感兴趣路径的机制扩展此算法。 我们还证明了提议的算法的时间复杂性$O( {3/\log{n}) $( $), 其中 n 是输入图中的一些顶点 。 因此, 我们提供了为CFPQ 构建一个略微子立方算法的替代方法, 该算法基于线性代数和递增过渡封闭( 典型的图形理论问题), 而不是Chaudhuri (2008年) 提议的同样复杂的算法。 我们的评估表明, 我们的算法是正常和无背景路径查询的通用算法的好选择方。