We study the relation between the standard two-way automata andmore powerful devices, namely, two-way finite automata equippedwith some $\ell$
additional “pebbles” that are movable alongthe input tape, but their use is restricted (nested) ina stack-like fashion. Similarly as in the case of the classicaltwo-way machines, it is not known whether there existsa polynomial trade-off, in the number of states, between thenondeterministic and deterministic two-way automata with $\ell$
nested pebbles. However, we show that these two machine modelsare not independent: if there exists a polynomial trade-off forthe classical two-way automata, then, for each $\ell$
≥ 0,there must also exist a polynomial trade-off for the two-wayautomata with $\ell$
nested pebbles. Thus, we have an upwardcollapse (or a downward separation) from the classical two-wayautomata to more powerful pebble automata, still staying withinthe class of regular languages. The same upward collapse holdsfor complementation of nondeterministic two-way machines. These results are obtained by showing that each pebble machinecan be, by using suitable inputs, simulated by a classicaltwo-way automaton (and vice versa), with only a linear number ofstates, despite the existing exponential blow-up between theclassical and pebble two-way machines.