We consider the fundamental task of graph exploration. An n-node graph has unlabeled nodes, and all ports at any node of degree d are arbitrarily numbered 0,…, d−1. A mobile agent, initially situated at some starting node v, has to visit all nodes and stop. The time of the exploration is the number of edge traversals. We consider the problem of how much knowledge the agent has to have a priori, to explore the graph in a given time, using a deterministic algorithm. Following the paradigm of algorithms with advice, this a priori information (advice) is provided to the agent by an oracle, in the form of a binary string, whose length is called the size of advice. We consider two types of oracles. The instance oracle knows the entire instance of the exploration problem, i.e., the port-numbered map of the graph and the starting node of the agent in this map. The map oracle knows the port-numbered map of the graph but does not know the starting node of the agent. What is the minimum size of advice that must be given to the agent by each of these oracles, so that the agent explores the graph in a given time?

We first determine the minimum size of advice to achieve exploration in polynomial time. We prove that some advice of size log log log n − c, for any constant c, is sufficient for polynomial exploration, and that no advice of size log log log n −φ (n), where φ is any function diverging to infinity, can help to do this. These results hold both for the instance and for the map oracles.

On the other side of the spectrum, when advice is large, there are two natural time thresholds: Θ (n^{2}) for a map oracle, and Θ (n) for an instance oracle. This is because, in both cases, these time benchmarks can be achieved with sufficiently large advice (advice of size O(nlog n) suffices). We show that, with a map oracle, time Θ (n^{2}) cannot be improved in general, regardless of the size of advice. What is then the smallest advice to achieve time Θ (n^{2}) with a map oracle? We show that this smallest size of advice is larger than n^{δ}, for any δ < 1/3.

For large advice, the situation changes significantly when we allow an instance oracle instead of a map oracle. In this case, advice of size O(nlog n) is enough to achieve time O(n). Is such a large advice needed to achieve linear time? We answer this question affirmatively. Indeed, we show more: with any advice of size o(nlog n), the time of exploration must be at least n^{ε}, for any ε < 2, and with any advice of size O(n), the time must be Ω(n^{2}).

We finally look at Hamiltonian graphs, as for them it is possible to achieve the absolutely optimal exploration time n−1, when sufficiently large advice (of size o(nlog n)) is given by an instance oracle. We show that a map oracle cannot achieve this: regardless of the size of advice, the time of exploration must be Ω(n^{2}), for some Hamiltonian graphs. However, even for the instance oracle, with advice of size o(nlog n), optimal time n−1 cannot be achieved: Indeed, we show that the time of exploration with such advice must sometimes exceed the optimal time n−1 by a summand n^{ε}, for any ε < 1.