In this paper, we study the problem of fast dynamic pointer following: given a directed graph G where each vertex has outdegree 1, efficiently support the operations of i) changing the outgoing edge of any vertex, and ii) find the vertex k vertices `after' a given vertex. We exhibit a solution to this problem based on link-cut trees that requires O(lgn) time per operation, and prove that this is optimal in the cell-probe complexity model.
@article{arxiv.1405.3739,
title = {Fast Dynamic Pointer Following via Link-Cut Trees},
author = {Erik Demaine and Nathan Pinsker and Jon Schneider},
journal= {arXiv preprint arXiv:1405.3739},
year = {2014}
}