We study dynamic algorithms in the model of algorithms with predictions. We assume the algorithm is given imperfect predictions regarding future updates, and we ask how such predictions can be used to improve the running time. This can be seen as a model interpolating between classic online and offline dynamic algorithms. Our results give smooth tradeoffs between these two extreme settings. First, we give algorithms for incremental and decremental transitive closure and approximate APSP that take as an additional input a predicted sequence of updates (edge insertions, or edge deletions, respectively). They preprocess it in $\tilde{O}(n^{(3+\omega)/2})$ time, and then handle updates in $\tilde{O}(1)$ worst-case time and queries in $\tilde{O}(\eta^2)$ worst-case time. Here $\eta$ is an error measure that can be bounded by the maximum difference between the predicted and actual insertion (deletion) time of an edge, i.e., by the $\ell_\infty$-error of the predictions. The second group of results concerns fully dynamic problems with vertex updates, where the algorithm has access to a predicted sequence of the next $n$ updates. We show how to solve fully dynamic triangle detection, maximum matching, single-source reachability, and more, in $O(n^{\omega-1}+n\eta_i)$ worst-case update time. Here $\eta_i$ denotes how much earlier the $i$-th update occurs than predicted. Our last result is a reduction that transforms a worst-case incremental algorithm without predictions into a fully dynamic algorithm which is given a predicted deletion time for each element at the time of its insertion. As a consequence we can, e.g., maintain fully dynamic exact APSP with such predictions in $\tilde{O}(n^2)$ worst-case vertex insertion time and $\tilde{O}(n^2 (1+\eta_i))$ worst-case vertex deletion time (for the prediction error $\eta_i$ defined as above).
翻译:我们研究带预测算法模型下的动态算法。假设算法拥有关于未来更新的不完美预测,我们探究如何利用这类预测来优化运行时间。这可视作经典在线动态算法与离线动态算法之间的插值模型,我们的研究在这些极端场景间建立了平滑权衡。首先,针对增量式与减量式传递闭包及近似全源最短路径问题,我们设计了能接收预测更新序列(分别为边插入或边删除)的算法。该算法以$\tilde{O}(n^{(3+\omega)/2})$时间预处理预测序列,随后以$\tilde{O}(1)$最坏情况时间处理更新,并以$\tilde{O}(\eta^2)$最坏情况时间处理查询。其中$\eta$是可误差度量,其值受限于边的预测插入(删除)时间与实际时间的最大偏差,即预测的$\ell_\infty$-误差。第二类成果聚焦于顶点更新的完全动态问题,假设算法可获取后续$n$次更新的预测序列。我们展示了如何在$O(n^{\omega-1}+n\eta_i)$最坏情况更新时间内解决完全动态三角形检测、最大匹配、单源可达性等问题,其中$\eta_i$表示第$i$次更新早于预测发生的时间差。最后,我们提出一种归约方法,能将不含预测的增量式最坏情况算法转化为完全动态算法,该算法在元素插入时即获得其预测删除时间。通过此方法,例如我们可在最坏情况下,以$\tilde{O}(n^2)$的顶点插入时间和$\tilde{O}(n^2 (1+\eta_i))$的顶点删除时间(预测误差$\eta_i$定义同上)维持带此类预测的完全动态精确全源最短路径计算。