Graph Isomorphism (GI) is a fundamental algorithmic problem. Amongst graph classes for which the computational complexity of GI has been resolved, trees are arguably the most fundamental. Tree Isomorphism is complete for deterministic logspace, a tiny subclass of polynomial time, by Lindell's result. Over three decades ago, he devised a deterministic logspace algorithm that computes a string which is a canon for the input tree -- two trees are isomorphic precisely when their canons are identical. Inspired by Miller-Reif's reduction of Tree Isomorphism to Polynomial Identity Testing, we present a new logspace algorithm for tree canonization fundamentally different from Lindell's algorithm. Our algorithm computes a univariate polynomial as canon for an input tree, based on the classical Eisenstein's criterion for the irreducibility of univariate polynomials. This can be implemented in logspace by invoking the well known Buss et al. algorithm for arithmetic formula evaluation. However, we have included in the appendix a simpler self-contained proof showing that arithmetic formula evaluation is in logspace. This algorithm is conceptually very simple, avoiding the delicate case analysis and complex recursion that constitute the core of Lindell's algorithm. We illustrate the adaptability of our algorithm by extending it to a couple of other classes of graphs.
翻译:图同构问题是计算理论中的一个基础算法问题。在计算复杂性已得到解决的图类中,树结构无疑是最具基础性的类别。根据Lindell的研究结果,树同构问题对于确定性对数空间是完全的——这是多项式时间中一个极小的子类。三十多年前,他设计了一种确定性对数空间算法,该算法能为输入树计算一个规范字符串:两棵树同构当且仅当其规范字符串完全相同。受Miller-Reif将树同构问题归约为多项式恒等测试的启发,我们提出了一种全新的树规范化对数空间算法,其原理与Lindell的算法有本质区别。我们的算法基于经典的爱森斯坦不可约多项式判别准则,为输入树计算一个单变量多项式作为规范表示。通过调用Buss等人提出的著名算术公式求值算法,该过程可在对数空间内实现。然而,我们在附录中提供了一种更简洁的独立证明,表明算术公式求值确实属于对数空间。该算法在概念上极为简洁,避免了Lindell算法核心部分中精细的案例分析与复杂递归结构。我们通过将算法扩展至其他几类图结构,展示了其良好的适应性。