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).
翻译:我们在带预测的算法模型下研究动态算法。假设算法拥有关于未来更新的不完美预测,我们探究如何利用这些预测来提升运行时间。此模型可被视为经典在线与离线动态算法之间的插值模型,我们的结果在这两种极端设置之间提供了平滑的权衡。首先,我们针对增量式和减量式传递闭包以及近似APSP问题设计了算法,这些算法额外输入了预测的更新序列(分别为边插入或边删除)。算法以$\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))$最坏情况顶点删除时间内维护全动态精确APSP(其中预测误差$\eta_i$定义同上)。