We present algorithms that compute the terminal configurations for sandpile instances in $O(n \log n)$ time on trees and $O(n)$ time on paths, where $n$ is the number of vertices. The Abelian Sandpile model is a well-known model used in exploring self-organized criticality. Despite a large amount of work on other aspects of sandpiles, there have been limited results in efficiently computing the terminal state, known as the sandpile prediction problem. Our algorithm improves the previous best runtime of $O(n \log^5 n)$ on trees [Ramachandran-Schild SODA '17] and $O(n \log n)$ on paths [Moore-Nilsson '99]. To do so, we move beyond the simulation of individual events by directly computing the number of firings for each vertex. The computation is accelerated using splittable binary search trees. In addition, we give algorithms in $O(n)$ time on cliques and $O(n \log^2 n)$ time on pseudotrees. Towards solving on general graphs, we provide a reduction that transforms the prediction problem on an arbitrary graph into problems on its subgraphs separated by any vertex set $P$. The reduction gives a time complexity of $O(\log^{|P|} n \cdot T)$ where $T$ denotes the total time for solving on each subgraph. We also give algorithms that works well with this reduction scheme.
翻译:我们提出了在树上以$O(n \log n)$时间、在路径上以$O(n)$时间计算沙堆实例终态构型的算法,其中$n$为顶点数。阿贝尔沙堆模型是探索自组织临界性的经典模型。尽管沙堆现象的其他方面已有大量研究,但高效计算终态(即沙堆预测问题)的结果仍十分有限。我们的算法将树上问题的最优运行时间从先前的$O(n \log^5 n)$[Ramachandran-Schild SODA '17] 和路径上的$O(n \log n)$[Moore-Nilsson '99] 分别改进至$O(n \log n)$与$O(n)$。为此,我们突破了单事件模拟的范式,直接计算每个顶点的爆发次数,并利用可分裂二叉搜索树加速计算。此外,我们还给出了团上的$O(n)$时间算法和伪树上的$O(n \log^2 n)$时间算法。针对一般图问题,我们提出了一种归约方法,可将任意图的预测问题转化为由其顶点集$P$分隔的子图上的子问题。该归约的时间复杂度为$O(\log^{|P|} n \cdot T)$,其中$T$为各子图求解总时间。我们还给出了与该归约方案高效配合的算法。