On the Complexity of

the stConnectivity Problem

by

Chung Keung Po on

A thesis submitted in conformity with the requirements

for the degree of Do ctor of Philosophy

Graduate Department of Computer Science

University of Toronto

c

Copyright by Chung Keung Po on

Abstract

On the complexity of the stconnectivity problem

Chung Keung Po on

Do ctor of Philosophy

Department of Computer Science

University of Toronto

The directed stconnectivity problem is fundamental to computer science There

are many applications which require algorithms to solve the problem in small space

and preferably in small time as well Furthermore its space and timespace complex

ities are related to several longstanding op en problems in complexity theory

Depth and breadthrst search are well known algorithms that solve the problem

in optimal ie O n m time while using O n log n space where n and m are the

numb er of no des and edges in the graph resp ectively It can also b e solved in O log n

O log n

space and time by Savitchs algorithm For space S b etween log n and

O log n log nS

n log n the b est running time is T mn due to Barnes et al

Establishing matching lower b ounds on the Turing machine mo del has b een one of

the ma jor challenges in complexity theory

In this thesis we intro duce the natural structured NNJAG No denamed JAG

mo del which is a generalization of Co ok and Racko s JAG Jumping Automa

ton for Graphs mo del For the Co ok and Racko prove an

log n log log n lower b ound on the JAG mo del This is extended to a ran

domized JAG by Berman and Simon We further extend this to the probabilis

tic NNJAG mo del For the timespace tradeo we prove an upp er b ound of T

O log n log nS O

n on a JAG via a simulation of the Barnes et al algorithm We

p

log n log nS

log log n

also prove a lower b ound of T nS log n on an NNJAG im

proving the previous b ounds of T n S on NNJAGs by Edmonds and

T n S log n on JAGs by Barnes and Edmonds Our result almost matches

the Barnes et al algorithm and seems to suggest that stconnectivity cannot b e de

termined in p olynomial time and p olylogarithmic space simultaneously For example i

when the space is S n for any constant the NNJAG lower b ound implies

a sup erp olynomial running time This lower b ound on timespace tradeo is joint

work with Edmonds ii

acknowledgement

I would like to thank my sup ervisor Allan Boro din for his guidance and supp ort

esp ecially during the last year of my PhD study

I would also like to thank the professors the oce clerks and the graduate students

in the Department of Computer Science who together provided such an enjoyable

environment during my stay Among them I am esp ecially grateful to Je Edmonds

who constantly help ed me along and who is also a coauthor of the result presented

in Chapter

Finally but not the least I thank my parents and family for their supp ort and I

dedicated this b elated thesis to the memory of my father Wah Po on iii

Contents

Intro duction

The imp ortance of stcon

Previous results on random access machines

Previous results on structured computation

mo dels

Contributions and organization of this thesis

Mo dels of Computation

The branching program mo del

The JAG mo del

The nonuniform mo del

The uniform mo del

The NNJAG mo del

Comparisons among the mo dels

Probabilistic NNJAGs

Nondeterministic NNJAGs

A Space Lower Bound

The deterministic case

The skinny trees

Blo cks of p ebbles

k computations

Extension to probabilistic NNJAG with sided error iv

Extension to probabilistic NNJAG with sided error

A Timespace Upp er Bound

The Barnes et al algorithm

The mo died Savitch algorithm

The mo died breadthrst search

Simulation on an NNJAG

Simulation on a JAG

A Timespace Lower Bound

Layered Graphs

Recursive Layered Graphs

Denition of Progress

Viewing NNJAGs as Branching Programs

Pro of Outline

Collapsing an NNJAG

Pro of of Main Lemma

Bounding SUM

The BranchingPro cess Game

The EdgeCollision Game

BranchingPro cess Game vs EdgeCollision Game

Bounding SUM

Probabilistic NNJAGs with sided error

Future Work

Variations of JAGsNNJAGs

Finite Mo del Theory v

Chapter

Intro duction

The imp ortance of stcon

Given a directed graph G and two distinguished no des s and t in G the directed st

connectivity problem stcon is to determine whether there is a directed path from

s to t in G It is a fundamental problem in computer science b ecause it is the natural

abstraction of many search problems In many applications eg in game searching

program verication and some database applications the underlying search graph is

exp onentially large compared with a machines memory Hence we need to nd algo

rithms which require working space much less than the size of the graph Very often

reducing the space blows up the running time b ecause recomputation is necessary

Therefore a more ambitious goal is to nd an algorithm that runs in small time and

space simultaneously These considerations lead to the following two questions

Q How much space is necessary for solving stcon and

Q Given a certain amount of space how fast can stcon b e solved

The theory of computational complexity addresses these questions in a more gen

eral setting Instead of studying individual problems we study classes of problems

Some commonly used notation for denoting complexity classes is listed b elow

DTIMEf n the class of problems solvable in O f n time using a deterministic

O

Turing machine In particular the class DTIMEn is denoted by P

DSPACEf n the class of problems solvable in O f n space using a determin

O

istic Turing machine The class DSPACElog n and DSPACElog n are

denoted by L and Polylogspace resp ectively

NSPACEf n the class of problems solvable in O f n space using a nondeter

ministic Turing machine The class NSPACElog n is denoted by NL

DTISPf n g n the class of problems solvable in O f n time and O g n space

O

simultaneously using a deterministic Turing machine The class DTISPn

O

log n is denoted by SC

With a prop er notion of problem reduction the complexity of a whole class of prob

lems b oils down to the complexity of a prototypical problem in that class Such a

problem is said to b e complete for the class under this typ e of reductions In this

resp ect stcon has an added imp ortance b ecause it is complete for the complexity

class NL under logspace reduction See Jon JLL for more problems complete

for NL and AHV for the relation b etween NL and relational database theory

Two ma jor op en problems concerning NL are

Q Is NL L and

Q Is N L S C

Understanding the space complexity and timespace tradeo of stcon seems to b e

the key to answering the ab ove questions

For example proving that there is no deterministic O log n space algorithm for

stcon would separate the classes L and NL On the other hand devising such

an algorithm would show that NL L By a padding argument Sav such an

algorithm would in fact imply that DSPACEf n NSPACEf n for any space

constructible function f n log n

O

Similarly showing that there is no algorithm for stcon using n time and

O

log n space simultaneously would separate NL and SC while demonstrating such

an algorithm would put NL inside SC As is well known stcon is in P Polylogspace

Therefore proving that stcon is not in SC would also prove that SC ( P

Polylogspace which is another longstanding conjecture in complexity theory Joh

Previous results on random access machines

On a determinstic random access machine depth and breadth rst search are well

known algorithms that solve stcon in O n m time using O n log n space where n

and m are the numb er of no des and edges resp ectively The running time is optimal

b ecause at least n m time is needed to access every edge and every no de in the

graph At the other extreme Savitchs algorithm Sav requires only O log n space

which is currently the smallest space achievable The main drawback is however

O log n

that it takes time Nevertheless these two results imply that stcon is in

P Polylogspace

Tompa Tom shows that a certain natural approach repeated squaring for com

puting stcon has no implementation which runs in p olynomial time and sublinear

space simultaneously However Barnes et al BBRS construct an algorithm which

p

log n

uses only n space which is sublinear while keeping p olynomial running

time This shows that the rep eated squaring metho d is to o restricted Futhermore

O log n log nS

their algorithm implies a general timespace tradeo of T mn

for log n S n log n Note that when the space is n for any constant

O log n

the running time is which is sup erp olynomial Therefore they

still have not exhibited an SC typ e algorithm

For lower b ounds much less progress has b een made It is not known whether

Savitchs algorithm is space optimal and whether the Barnes et al algorithm is time

optimal for restricted space Even attempts to prove sup erlogarithmic space lower

b ounds or sup erlinear time lower b ounds for sublinear space have b een unsuccessful

Hence the questions Q and Q remain op en

Previous results on structured computation

mo dels

For most natural decision problems no nontrivial lower b ound has b een proved

on any general mo del of computation such as branching programs Random Access

Machines or multitap e Turing machines In order to gain more insight into the prob

lems dierent structured mo dels are considered for dierent problems For example

comparisonbased branching programs have b een used to study the timespace trade

o of the element distinctness problem by Boro din et al BFMadH and Yao

Yao See Boro din Bor for a recent survey on timespace tradeos for various

problems on various mo dels

For the stconnectivity problem Co ok and Racko CR intro duce a natural

structured mo del called the Jumping Automaton for Graphs JAG Informally a

JAG has a set of p ebbles which have the dual purp ose of marking the no des in

the input graph and gathering information ab out the input The p ebbles can move

around in the graph by walking along the edges or jumping to other p ebbles A formal

denition will b e given in the next chapter Although the mo del is restricted it is

p owerful enough to express all known deterministic algorithms for graph connectivity

problems with at most a p olynomial factor blowup in time and logarithmic factor

blowup in space For example depth and breadthrst search can b oth b e translated

directly to JAG algorithms Co ok and Racko CR show how to simulate Savitchs

algorithm using eectively the same time and space resources

There has b een much more success in proving lower b ounds on this structured

mo del First Co ok and Racko CR prove a space lower b ound of log n log log n

which almost matches the upp er b ound of O log n This result is then extended

by Berman and Simon BS to a randomized JAG More precisely they show

c

log n

that any randomized JAG solving stcon with at most time requires at least

c log n log log n space where c is a constant dep ending on c

For the timespace tradeo Barnes and Edmonds BE prove a lower b ound of

T n S log n on the JAG mo del On a more general mo del called the NNJAG

mo del No de Named JAG to b e dened in the next chapter Edmonds Edm

proves a lower b ound of T n S However there is still a big gap b etween

the upp er and lower b ounds In particular the ab ove results do not yield any sup er

p olynomial lower b ound on time T no matter how small the space S b ecomes

There are also other approaches to answering question Q It has b een shown

that there is a signicant relationship b etween complexity theory and nite mo del

theory also known as descriptive complexity Many complexity classes can b e char

acterized in terms of logic See Immerman Imm for example In particular

the stconnectivity prop erty of a graph can b e expressed as a FirstOrder logic FO

sentence containing a Transitive Closure TC op erator provided an ordering is im

p osed on the graph Conversely any prop erty expressible in FOTC over ordered

structures can b e checked in NL In the terminology of descriptive complexity NL

FOTC over ordered structures Similarly L FODTC over ordered struc

tures where DTC stands for the Deterministic Transitive Closure op erator Thus sep

arating NL and L amounts to showing that stcon is not expressible in FODTC

over ordered structures Gradel and McColm GM show that stcon is not express

ible in FODTC over unordered structures Recently Etessami and Immerman

EI have extended this result to oneway local ly ordered structures

Contributions and organization of this thesis

In this thesis we take a step further in understanding the space and timespace

complexities of stcon We have not answered the questions Q and Q but

have provided evidence that their answers are negative by proving NNJAG lower

b ounds on the space and timespace tradeo

In Chapter we intro duce the NNJAG No de named JAG mo del which is a

generalization of the JAG mo del It follows from Sav that if we further allow an

NNJAG to p erform the strong jumping op erations then the resulting machine is as

p owerful as a branching program for solving graph theoretic problems Hence the

NNJAG mo del seems to b e a suitable intermediate mo del b etween the JAG mo del

and a general computation mo del for studying graph connectivity problems

We also give some evidence that a nondeterministic NNJAG is actually more p ow

stcon erful than a nondeterministic JAG On one hand we do not know how to solve

which is the complement problem of stcon in O log n space on a nondeterministic

JAG On the other hand we show that a nondeterministic NNJAG can solve stcon

in O log n space by simulating ImmermanSzelep csenyis inductive counting tech

nique Imm Sze Using the same technique we show that a nondeterministic

NNJAG is essentially as p owerful as a nondeterministic branching program in solving

a large class of graphtheoretic problems

In Chapter we extend the space lower b ound of Co ok and Racko CR on

the JAG mo del as well as that of Berman and Simon BS on the randomized JAG

mo del to the probabilistic NNJAG mo del Thus we b elieve we are a step closer

towards separating L from NL

O log n log nS O

In Chapter we show a timespace upp er b ound of T n

on the JAG mo del This result further substantiates our claim that the JAG and

hence the NNJAG mo del is a reasonable structured mo del for graph connectivity

problems

In Chapter we give some evidence that stcon is not in SC and thus that

SC ( P Polylogspace In particular we improve the lower b ounds of Barnes and

p

log n log nS

log log n

Edmonds Edm BE to T nS log n on the probabilistic

NNJAG mo del This is the rst result proved on a probabilistic NNJAG which gives

a sup erp olynomial lower b ound on time when S is suciently small For example

log n

log log n

This lower when S is at most n for any constant T is at least

b ound also closely matches the upp er b ound of Barnes et al BBRS which can

b e implemented on an NNJAG as implied by Chapter The result presented in

Chapter is joint work with Edmonds

Finally in Chapter some future directions for answering questions Q and

Q are discussed

Chapter

Mo dels of Computation

In this chapter we formally dene the JAG mo del of Co ok and Racko CR the

Nodenamed JAG or NNJAG mo del and the r way branching program BP mo del

of Boro din and Co ok BC as they will b e used in the following chapters We also

compare them with the wellknown mo dels of multitap e Turing machines TM and

Random Access Machines RAM We then dene the probabilistic and nondetermin

istic NNJAG mo dels We conclude the chapter by showing that a nondeterministic

NNJAG is nearly as p owerful as a nondeterministic branching program for solving

many graph theoretic problems

The branching program mo del

An r way branching program BC is a general mo del of computation in fact the

most general one among the ve mo dels mentioned in this chapter

It is a nonuniform mo del of computation That is there will b e a dierent

branching program for each input size and these branching programs need not have

any similarity among them For a xed value of input size the corresp onding branch

ing program is a directed acyclic graph with a designated source no de and a numb er

of sink no des Each sink no de in the graph is lab elled with either accept or reject

and each nonsink no de is lab elled with an input variable Furthermore for each

p ossible value of the input variable that lab els a nonsink no de there is a unique

outedge lab elled with that value emanating from that no de Hence the outdegree of

the graph is at most r where r is the maximum numb er of dierent values p ossible

for an input variable

The no des in this graph represent the p ossible states of the machines memory

In particular the source no de represents the initial memory state In each step the

machine queries an input variable dep ending on the current state of its memory and

changes its memory to another state based on the value returned Which variable to

query and which state to go to on each p ossible outcome are sp ecied by the graph

It is easy to see that for every input there will b e a unique path in the graph from

the source no de to a sink no de We call such a path the computation path fol lowed

by the input We say that a branching program accepts an input if and only if the

computation path followed by the input leads to a sink no de lab elled with accept

For stcon an nno de input graph of outdegree at most deg is sp ecied by the

variables X for every u n and every deg Such a variable

h ui

X has value v if there is a directed edge from u to v with lab el or the value

hui

undened if there is no such edge The height of a branching program is dened

as the length of its longest path from the source to a sink The space S is dened as

the logarithm of the numb er of no des in the branching program ie the numb er of

bits needed to sp ecify the current state of the machines memory

The JAG mo del

We rst dene the JAG mo del as a nonuniform computation mo del for solving the

sp ecic decision problem of stcon Then we give the denition of a uniform JAG

for solving more general graph problems

The nonuniform mo del

As the mo del is nonuniform there will b e a JAG for each size n of the input graph

For a xed value of n the corresp onding JAG J is an automaton consisting of a set

of p distinguishable p ebbles a set of q states and a transition function In general

the values of p and q will b e functions of n and the transition function will b e

sp ecically designed to deal with nno de graphs

For stcon the input to J is a triple G s t where G is an nno de graph con

taining no des s and t For every no de in G its outedges are lab elled by consecutive

integers starting at The no des in G are also lab elled from up to n We dene

the instantaneous description id of J as the pair Q where Q is the current state

and is a mapping of p ebbles to no des sp ecifying the current lo cation of each p ebble

in the graph When J is in id Q the transition function determines the next

move for J based on

the state Q and

which p ebbles are on the same no de and which are not according to the mapping

ie for each pair of p ebbles P and P whether P P

A move is either a walk or a jump A walk P i Q consists of moving p ebble P

along the edge lab elled i that comes out of the no de P and then assuming state

Q If there is no such edge the p ebble just remains on the same no de A jump

P P Q consists of moving p ebble P to the no de P and then assuming state

Q The JAG J is initialized to have state Q and with p ebbles P P on no de

p

s and p ebble P on no de t which makes no de t distinguishable from the rest It is

p

said to accept an input G s t if it enters an accepting state on this input It solves

stcon for nno de graphs if for every input G s t where G is an nno de directed

graph it accepts the input if and only if there is a directed path from s to t in G We

dene the space used by the JAG as p log n log q ie the numb er of bits to sp ecify

an id The time used is the numb er of moves it has made

The uniform mo del

To motivate the ab ove denition and to provide a mo del for easier description of

JAG algorithms we dene a uniform JAG mo del called the RAMJAG mo del A

1

In CR the input graph is not lab elled Our denition here is equivalent to theirs b ecause

the machine is only allowed to know the coincidence partition of the p ebbles

RAMJAG is a machine that contains a nite state control a set of ordinary registers

and a set of sp ecial registers called pebble registers Each register has log n bits where

n is the numb er of no des in the input graph The instruction set includes the usual

op erations allowed in a regular RAM but are restricted to op erate on the ordinary

registers only It also includes three sp ecial instructions namely walk jump and

compare The instruction w al k P j replaces the content which is u say of the

th

p ebble register P with the no de p ointed to by the j edge in the adjacency list

of no de u The instruction j umpP P copies the content of p ebble register P to

p ebble register P The instruction compar eP P R p erforms a comparison

on p ebble registers P and P and stores the result in the ordinary register R

For stcon the input graph is represented as an adjacency list and is accessible

only by the ab ove op erations on p ebble registers Two p ebble registers are designated

as the input registers containing the no des s and t For more general graphtheoretic

problems such as computing f u u v v there will b e i input registers

i j

and j output registers for storing the input and output resp ectively Both the set of

input registers and output registers may consist of b oth regular and p ebble registers

The space is dened as the numb er of distinct registers used times log n where n is

the numb er of no des in the graph

The NNJAG mo del

In the JAG mo del the machine can only detect the coincidence partition of p ebbles

ie p erform comparisons on the corresp onding p ebble registers We remove

this restriction in an NNJAG by allowing it to detect the names of the no des that

contain p ebbles In other words the machine is allowed to compute any arbitrary

function based on the whole content of its memory However it is still restricted in

the way it can change its p ebble registers

Formally a No denamed JAG NNJAG is dened in the same way as a JAG

except that the transition function determines the next move based on

the state Q and

the mapping

For simplicity we also make the following technical changes First we assume that

the lab els of no des s and t are always xed say as and n resp ectively Hence

s and t are not part of the input Second there is no need to mark no de t with a

sp ecial p ebble b ecause the p ebbles can see the lab el of the no des they are sitting

on Therefore all the p ebbles are on no de s initially

A RAMNNJAG can also b e dened similarly to a RAMJAG It has the walk

and jump op erations that are present in a RAMJAG as well as the copy instruction

copy P R which copies the content of the p ebble register P to the ordinary register

R Note that the reverse op eration of copying an ordinary register to a p ebble register

is not allowed

There is evidence that the NNJAG mo del may b e strictly stronger than the JAG

mo del For example a more precise statement of a result in BE is that pT

n log n for a JAG that solves stcon with p p ebbles The result holds even if

the JAG has an innite numb er of states and the input is restricted to a particular

class of graphs However an NNJAG with an innite numb er of states can traverse

any graph in this class in linear time Before showing more evidence of this typ e and

extending the mo dels to probabilistic and nondeterministic ones let us rst have a

comparison of all the mo dels in the following section

Comparisons among the mo dels

The relative p ower in terms of generality in denition among branching programs

RAMs multitap e Turing machines JAGs and NNJAGs are depicted in Figure

Branching programs RAMs and TMs are general computation mo dels while NN

JAGs and JAGs are structured mo dels for graph connectivity problems However in

terms of stcon RAMs and TMs are incomparable with NNJAGs and JAGs To ex

plain the diagram in more detail let us consider the main features of a machine mo del

A deterministic sequential machine mo del is usually dened to consist of a control

unit a memory an inputoutput unit and some communication channels b etween the BP

RAM NNJAG

RAM- NNJAG TM JAG

RAM-JAG

Figure Mo dels of Computations

control unit and the other comp onents The content of the accessed memory and the

status of b oth the control unit and communication channels constitute a conguration

ie a full description of the state of a machine The denition of mo del must also

sp ecify the rules for transition from one conguration to another usually in the form

of a transition function The ab ove mo dels can b e compared in the following asp ects

the accessing of inputsmemory and the transition function

Both a branching program and a RAM allow random access to the inputs and

memory In a TM the access of input is restricted according to a linear order imp osed

by an enco ding of the input An NNJAGJAG is also restricted in the order of

accessing of the input but in a dierent way than a TM In order to detect the existence

of an edge the machine has to place a p ebble on the source of the p otential edge

b eforehand In addition there may b e some parts of input which are not accessible

at all

Consider the second asp ect The transition function of a TM is based on and

aects a constant numb er of tap e cells and the nite state control Thus the function

is only from a nite domain to a nite range A RAM is slightly less restricted in

that it can lo ok at a constant numb er of memory cells and compute some function

chosen from a reasonable instruction set In most denitions of RAM mo dels a

memory cell has log n bits where n is the input size As well it changes a constant

numb er of memory cells Both the RAM and TM mo dels are uniform mo dels b ecause

the transition function has to b e dened for all input sizes A branching program is

the most unrestricted among the ve mo dels In one step it computes an arbitrary

function based on the whole conguration and changes the whole conguration Thus

it is often unrealistically fast Therefore it is used primarily for studying space or

timespace tradeos esp ecially lower b ounds Similar to a BP the transition function

of an NNJAG is also based on the whole conguration which consists of the state space

and the p ebble space The p ebbles can b e viewed as a set of registers in a RAM or

a nonconstant numb er of tap e heads in a TM The transition function can change

the whole state space but only the contents of one register in the p ebble space A

JAG is slightly weaker than an NNJAG in the typ e of functions computable More

sp ecically it can only p erform comparisons on the registers in the p ebble

space The BP NNJAG and JAG are all nonuniform mo dels b ecause the transition

function need only work for one input size

Probabilistic NNJAGs

Following BS we intro duce randomness to an NNJAG J by allowing the machine

to access a numb er of fresh random bits at each step The transition function is

then extended so that it dep ends on the random bits as well The random bits R

t

obtained in step t will not b e available for the future steps unless the machine stores

them in its memory Also they cannot b e available b efore step t

For the purp ose of proving lower b ounds it is more convenient to view J as a

distribution of deterministic NNJAGs That is we think of the whole sequence of

random bits R R R as b eing chosen b efore the computation starts Then

for dierent R a dierent deterministic NNJAG is chosen to carry out the compu

tation However not every probabilistic machine M with space S can b e viewed as

a distribution of deterministic machines with the same space S The deterministic

machine somehow has to have a p ointer into the random string R in order to sp ecify

which random bits it is currently using This p ointer requires log T bits if M runs in

O S

time T If T each deterministic machine requires only O S space However

S

if T then each machine requires S space For example Boro din et al

BBR shows that a deterministic WAG a JAG whose p ebbles are not allowed

to jump with p p ebbles and q states satisfying pq O n requires innite time to

traverse undirected cycles in the worst case Thus any distribution of deterministic

WAGs with pq O n will have innite exp ected time for the worst case input How

ever a probabilistic WAG with p ebble and O states can traverse any such graph

in exp ected O n time AKL

Fortunately we shall only b e interested in time b ounded computations When a

probabilistic NNJAG J with p p ebbles and q states has execution time b ounded by T

steps its computation can b e simulated by a distribution of deterministic NNJAGs

J s with p p ebbles and q T states and with T time constructed as follows For

R

each state Q in J each deterministic NNJAG will have the states h Qi h Qi

hT Qi Supp ose R Q P P Q for some t T Then the transition

t

function of J is dened so that ht Qi P P ht Q i The case is

R R R

similar when R Q P i Q From now on we view a probabilistic NNJAG

t

as a distribution of deterministic NNJAGs constructed as describ ed ab ove

A probabilistic NNJAG J is said to solve stcon resp ectively stcon with sided

error if for every input G s t the probability over R of J entering an accepting

state is at least when there is a path resp ectively there is not a path from no de

s to t and otherwise Similarly J is said to solve stcon with sided error if for

every input G s t the probability over R of J entering an accepting state is at

least when there is a path from no de s to t and at most otherwise

2

This is obviously the case for the study of timespace tradeos For proving space lower b ounds

results of Gill Gil show that a probabilistic machine with unb ounded time can actually have

nondeterministic p ower For example given unb ounded time a probabilistic JAG with p ebble

O (1)

and n states can solve directed stcon with high probability Thus we need to put a time

b ound on the machine b efore we can prove any interesting space lower b ounds

Nondeterministic NNJAGs

The extension of a deterministic NNJAG to a nondeterministic one can b e done quite

easily We simply allow the transition function to return more than one move A

stcon if for every nondeterministic NNJAG J is said to solve stcon resp ectively

input G there is a sequence of moves which results in J entering an accepting state

if and only if there is resp ectively there is not a directed path from s to t in G

Now we provide some evidence that a nondeterministic NNJAG is strictly stronger

than a nondeterministic JAG In particular we show that a nondeterministic NN

JAG can solve the stnonconnectivity problem stcon easily by simulating Immer

manSzelep csenyis inductive counting metho d However it is not known how to

solve stcon in O log n space on a nondeterministic JAG

Theorem For every n there is a nondeterministic NNJAG J which solves

O

stcon for al l nnode graphs using O log n space and n time

Pro of Let N b e the set of no des reachable from no de s in at most k steps Let

k

N denote the cardinality of the set N The main idea in ImmermanSzelep csenyis

inductive counting is to calculate N given N For each no de v increment a

k k

counter d if and only if v N To determine if v N do the following

k k

Guess N dierent no des u and verify that each is in N

k k

For each such u test if u v or u v is an edge in the graph If so v N

k

Otherwise v N

k

The detailed algorithm in Figure shows how Steps and can b e carried out

in a clever way so that the space is kept to b e O log n

Note that the ab ove algorithm requires the machine to generate all the p ossible

values for no des u and v Both a JAG and NNJAG can do so by using their state

space However the algorithm further requires the machine to check that u and v

function countk hy p

fcountk N returns N g

k k

b egin

d

for v to n do

c

for u to n do

if we guess u N then

k

verify that u N and increment c

k

f If u is not found to b e in N then halt g

k

if u v or u v is an edge then increment d

if c hy p then halt

return d

end

Figure The pro cedure to compute N given N

k k

satisfy certain prop erties which is b est done in the p ebble space More precisely it

wants to check whether there is a path of length at most k from s to u and if so

whether u v or u v is an edge An NNJAG can do so by nondeterministically

walking a p ebble P from s for at most k edges and see if it hits no de u That is it

compares the part in the p ebble space corresp onding to p ebble P with the part in

the state space storing the value u If so it checks whether P is actually on no de v

or P can reach no de v by walking one more edge Again this is done by comparing a

certain part of the p ebble space with a certain part of the state space However this

kind of comparison is not allowed in a JAG

In the next theorem we show that a nondeterministic NNJAG is nearly as p ow

erful as a nondeterministic Turing machine in solving graph theoretic problems The

inspirations were from Theorem of Boro din et al BBR and a discussion with

Allan Boro din and Stephen Co ok Note that any graphtheoretic decision problem H

on a family of graphs G can b e simply dened as a subset of G Here we are interested

in a family G of graphs called sreachable graphs A graph G is said to b e sreachable

if every no de in G is reachable from the no de s

Theorem Let G be a family of sreachable graphs For any graphtheoretic prob

lem H G if H can be solved by a nondeterministic Turing machine in time T n

and space S n simultaneously then it can also be solved by a nondeterministic NN

JAG in time O nT n and space O S n log n simultaneously provided a pebble

is placed on node s initial ly

Pro of It is shown in Savitch Sav that a nondeterministic JAG with strong jump

ing can simulate an arbitrary nondeterministic Turing machine eciently A strong

jump in a JAG is a move of the form jump p ebble P from its current no de u say

to no de u and assume state Q It suces to show how to simulate a strong

O

jump P Q on a nondeterministic NNJAG with n extra states First we store

the value u using the extra states This takes only one step which changes the

state appropriately while keeping the p ebble lo cations intact Then we nondetermin

istically walk p ebble P for at most n steps using the extra states to count starting

from no de s If P is not on no de u we stop the computation Since every no de

in G is reachable from s P must b e on no de u for some computation path

Remark It can b e shown that an NOJAG a restricted NNJAG which can only

p erform comparisons on the no de names can also simulate the inductive

counting This seems to show that the relative ordering of the input structure is im

p ortant for solving the stcon problem Nisan and TaShmas SLalgorithm NTS

for solving ustcon also seems to rely on the relative ordering of the input structure

For more ab out the ordering on input structures see Etessamis thesis Ete

Chapter

A Space Lower Bound

In this chapter we prove a space lower b ound for stcon on the probabilistic NNJAG

mo del We rst prove the result for the deterministic case and then extend it to a

probabilistic mo del

The deterministic case

Theorem Any NNJAG that solves stcon for every nnode graph requires at

log n

least space

log log n

Pro of Let J b e an NNJAG that solves stcon for every nno de graph with p p ebbles

and q states Since an NNJAG with only one state is not very interesting we shall

assume that pq From Theorem to b e proved b elow there is a tree G with

p

p log pq no des such that there is a path from no de s to no de t and when

G is fed as input to J no de t is never visited by any p ebble That means none of

the inedges of t has b een traversed Let G b e the graph obtained by removing all

the inedges of t in G Then t is an isolated no de in G However J cannot tell

the dierence b etween G and G as none of the inedges of t in G has b een tried

Hence it must give the wrong answer for either G or G It follows that any NNJAG

J solving stcon for all nno de graphs with p p ebbles and q states must satisfy

p

n p log pq or p log n log p log pq If b oth p log n and

log q log n we can show that p log n log log n Therefore the space required

by J is p log n log q log n log log n

Theorem For every NNJAG J with p pebbles and q states such that pq

there is a graph G such that

G is a rooted tree with maximum outdegree

p

G has at most p log pq nodes including two special nodes s and t

there is a directed path from s to t and

if J starts with al l pebbles on node s no pebble wil l ever visit node t during the

computation

Following the pro of technique of CR and BS we prove Theorem by rst

dening a class of graphs called skinny trees from which the worst case graph for the

NNJAG will b e chosen Our graphs are recursively constructed as in CR BS

and are simpler than those in BS Then we characterize a subcomputation of

an NNJAG on this typ e of graph according to the level of co op eration among the

p ebbles during this sub computation Finally we prove an inductive statement on sub

computations of various levels of p ebble co op eration from which Theorem follows

trivially The pro of uses a simpler counting argument than that used in Po o

The skinny trees

d

Let d b e an integer parameter to b e chosen later and let f g Then G is

a binary tree with vertex set V f v g f v v g f v v g and

s hi hdi hi hdi

edge set E E E where E f v v g f v v j i d g and

s

hi hiii hii

E f v v g f v v j i d g Edges in E have lab el and

s

hi hiii hii

edges in E have lab el Lab elling of no des will b e dealt with later The no de v

s

and v are called the start and goal of G resp ectively See Figure for an

hddi

example of G

Vs = start

0 1

V1,0 V1,1

0 1

V2,0 V2,1 0 1

V3,0 V3,1 0 1

V4,0 V4,1 = goal

Figure G with d and

G is obtained by replacing each no de u in the graph G with a copy

k k

u

of G which will b e referred to as G Furthermore each

k k

u

edge u v in G is replaced by the edge u v where u goal of G

k k

v

and v start of G The lab el on u v is the same as that of u v

k

star t g oal

The start of G and the goal of G are chosen as

k k

the start and goal of G resp ectively See Figure for an example of

k

G

k

d

The family of skinny trees is the set of graphs f G j f g g

p p

p

Each graph in this family has d no des which are lab elled from up to

p

d in a way to confuse the NNJAG Supp ose we lab el the no des of a

p

tree by the depthrst ordering Then the tree can b e searched in O log d

space On the contrary lab eling the tree in the breadthrst ordering do es not seem

to help the searching In other words telling the NNJAG the depth of each p ebble

in the tree ie its distance from the start no de do es not seem to b e useful Thus

we shall lab el the graphs so that for every no de lab el l and every edge lab el j

L the distance of the no de with lab el l from start is the same in every skinny tree start

0 1 start

0 1 goal

0 1

0 1

goal

Figure Left a copy of G Right G with d and

k k

k

and

L the lab el on the destination no de of the edge with lab el j from the no de with

lab el l in G is xed for every skinny tree G provided such an edge exists in G

This can b e achieved by many dierent ways of lab elling but one simple way is the

consistent lab elling As a base case a set G of graphs G is said to b e consistently

label led with a set L of lab els if each no de in G has a unique lab el from L and

for all u f v g f v v g f v v g the lab el on no de u of

s hi hdi hi hdi

G is the same as that on no de u of G for all G G in G Recursively

a set G of G is said to b e consistently label led with a set of lab els L if

k

there is a partition of L into d sets L for u f v g f v v g

u s hi hdi

f v v g and for each u f v g f v v g f v v g

s

hi hdi hi hdi hi hdi

u

the set of graphs f G in G j G G g is lab elled

k k k

consistently with the set of lab els L It is easy to verify that a consistently lab elled

u

family of skinny trees satises the ab ove lab elling prop erties L and L

For the deterministic case we shall set d p log pq and nd a dicult input

G s t for J where G is chosen from the family of skinny trees and s t are its start

and goal

Blo cks of p ebbles

To analyse the b ehaviour of an NNJAG on a skinny tree it is more convenient to

consider groups of p ebbles instead of individual p ebbles Since we shall study the

interaction among the p ebbles within an arbitrary sub computation the grouping of

p ebbles will b e chosen according to the particular sub computation in consideration

Consider a sub computation C which starts at time t A set of p ebbles is called

a block of the sub computation C if they lie on the same no de at time t and no other

p ebbles o ccupy that no de at the same time Note that the collection of all blo cks of a

sub computation forms a partition of the p ebbles so that two p ebbles are in the same

blo ck if and only if they are on the same no de b efore the sub computation starts

The continuation of a blo ck B at time t t denoted as B t is dened recursively

as follows B t is just B itself For t t if the move from time t to t causes a

p ebble P of B t to hit either by a walk or jump some p ebbles in the continuation

of another blo ck B t then B t B t nf P g and B t B t f P g

All the other blo ck continuations are unchanged If the move do es not cause any

collision then B t B t for every blo ck B For convenience we shall use

blo ck to stand for continuation of blo ck when the context is clear

Note that the numb er of blo cks remaining at time t is nonincreasing as t increases

Blo cks are dened at the b eginning of a sub computation New blo cks cannot b e

created even if p ebbles in the same blo ck move apart However old blo cks will

disapp ear when all of their p ebbles run into other blo cks If a p ebble in a blo ck B

hits a p ebble of another blo ck it no longer b elongs to blo ck B

An NNJAG may often want to jump the p ebbles of a blo ck to some other blo cks

For example it may want to use all the p ebbles of a blo ck that is trapp ed in some

subtree for traversing other parts of the graph Then the trapp ed blo ck disapp ears

We shall use the numb er of blo cks remaining at a certain time as a measure of the

level of co op eration among the p ebbles up to that moment The smaller the numb er

of blo cks is the higher is the co op eration This is one of the key ingredients in the

pro ofs of CR and BS

k computations

We now consider sub computations of an NNJAG on a skinny tree with various levels

of co op eration among the p ebbles A blo ck B of a sub computation C is said to

v

traverse a copy of G named G say if B lies on or ab ove

k k

v

the start of G at the b eginning of C and there is a step t such that some

k

v

p ebble of B t is on the goal of G A sub computation C on G

k p

is called a k computation if it stops as so on as

C some blo ck of C has traversed a copy of G or

k

C there are fewer than p k blo cks left or

C the NNJAG stops

If the NNJAG lo ops forever without satisfying C while maintaining at least pk

blo cks then the k computation do es not stop

The aim of a k computation is to traverse a copy of G while maintain

k

ing at least p k blo cks Hence it is said to b e successful if it ends with condition

C The lower b ound on the numb er of blo cks limits the p ower of the NNJAG in a

k computation by limiting the level of co op eration among the p ebbles When k

the co op eration is minimal All the p ebbles are isolated and no p ebble collisions are

allowed except p ossibly in the last step of an unsuccessful computation A blo ck

here is simply a p ebble which has to traverse a copy of G As k increases the

co op eration increases and a blo ck is something more than a p ebble However it also

has a harder task of traversing a copy of G At the extreme when k p

k

the NNJAG can work with its full p ower b ecause there is always at least one blo ck

in any computation In fact the whole computation of the NNJAG which starts

at the xed initial state Q and with all p ebbles on the start of G is a

p

pcomputation The task of that single blo ck on the start no de ie no de s is to

traverse the whole graph which is equivalent to sending some p ebble to the goal no de

ie no de t If we can nd a setting of such that any pcomputation fails

p

then Theorem is proved The following lemma shows that we can set the s

i

incrementally so that for any k p any k computation fails

d

Lemma For al l k p there exists f g such that for any

k

d

f g any k computation by J on G is not successful

k p p

We rst prove Theorem using Lemma Consider the pcomputation by J

which starts with all p ebbles on the start of G It follows from Lemma

p

that we can set so that it is not successful ie it do es not end with

p

condition C Since there is always at least one blo ck in any computation the

pcomputation must either end with condition C or never halt Hence the goal of

G is never traversed Finally note that the graph G has size

p p

p p

d p log pq Hence Theorem follows

We now prove Lemma by induction on k Let H k denote the statement of

Lemma for a xed value of k p

Base case H is true

Recall that no p ebble jump is allowed in a computation except p ossibly in the last

step of an unsuccessful computation Therefore each p ebble traces only one path

of a certain length The following lemma shows that not many dierent paths can b e

traced in computations

Lemma The sequence of ids a computation on G goes through can

p

be determined independent of by

p

A the initial id Q of the computation and

A for every pebble P the length of the path traced by P

Pro of Supp ose the computation starts at time t We shall prove by induction on

t t that the id at time t is uniquely determined

Base Case The id at time t is Q as sp ecied by A

Induction Step Supp ose that the id at time t is known to b e Q and that

t t

the computation has not nished at time t If it has already nished then we need

not determine the id at time t at all Then Q determines the next move

t t

and hence the next state Q If the move is a jump then the new p ebble lo cations

t

are also xed Therefore let us assume the move is a walk P i Q Observe

t t

that and tell us the depth of P at time t and time t resp ectively b ecause of

t

the lab elling prop erty L Hence their dierence determines whether P has already

nished the distance sp ecied in A If so P must b e a leaf and hence P will

t

remain on the same no de at time t Otherwise P must b e an internal no de

t

By lab elling prop erty L the edge lab el i and the no de lab el P determines

t

which no de P will go to Therefore in b oth cases can b e determined

t

p

p p

Note that there are d no des in the graph and hence q d

p

choices for A To b ound the numb er of choices for A observe that q d

the path traversed by a p ebble is longest when it starts from a child at the start of

a G In this case it has to traverse d edges to reach the goal of that G

one edge to the start of the next G and then d edges to reach the goal of that

new G In total it traverses as many as d edges b efore it completes traversing a

p

G Hence there are at most d choices for A Consequently there are at

p p

most q d dierent sequences of ids Of course some choices of A or some

combinations of A and A may not constitute a realistic computation but this

only decreases the numb er of p ossible computations In each computation at

p p

most p dierent paths can b e traced It follows that at most pq d s out of

d

the total p ossibilities will have a successful computation for some choice of A

and A When d p log pq there exists an such that the computation is

not successful for any choice of A and A Hence H follows

Induction step H k H k

Throughout this subsection assume H k is true and let b e chosen so

k

that no k computation on G is successful Let us call each copy of

p

G a sup erno de The structure within a sup erno de is xed by

k k

and how the sup erno des are connected in G is determined by

p k p

Note that blo cks cannot jump by denition If a p ebble P in a blo ck B jumps to a

p ebble of another blo ck then P no longer b elongs to blo ck B Therefore each blo ck

can only traverse a numb er of adjacent sup erno des The following lemma shows that

when a blo ck has completed traversing a sup erno de the whole blo ck must b e within

that sup erno de

d

Lemma Suppose H k is true Then there exists f g such that

k

d

for any f g if some block B completed the traversal of a copy of

k p

u

G cal led G say at time t during the k computation

k k

u

on G started at time t then al l pebbles of B t lie within G

p k

at time t

Pro of Let us x such that for any any k computation is not

k k p

u

successful Let P b e the rst p ebble in B t that reaches the goal of G

k

u

Supp ose the path from the start to the goal of G is star t v v

k m

g oal We claim that for every i there exists an earliest time t such that if B is the

i i

set of p ebbles on no de v at time t then p ebble P is in B t the continuation of

i i i

B at time t B can b e viewed as a blo ck of the computation which starts at time

i i

t Obviously we can cho ose t t Supp ose there is a time t such that P is in

i m i

B t where B is the set of p ebbles on no de v at time t Then we can cho ose

i i i i

t to b e the smallest value such that no de v is continuously o ccupied b etween t

i i i

and t Since the only edge going into v is from v the move at time t must b e

i i i i

to walk some p ebble from no de v to v Hence no de v is o ccupied by p ebbles in

i i i

b b b

B t at any time t where t t t and B B t Thus B t B t

i i i i i i i i

and p ebble P is in B t It follows from the claim that p ebble P is in B t

i

Consider B t the continuation of B at t B is the set of p ebbles on one no de

at time t Therefore either B B t or B B t If B B t then

B t B t to o However p ebble P is in B t B t by the claim ab ove Hence

B B t

Let C and C b e the computations b eginning at time t and t resp ectively and

let b and b b e the numb ers of blo cks of C and C resp ectively remaining at time

t Then b p k by denition of a k computation Moreover p k b

b ecause blo ck B traverses a copy of G during C and we x

k k

so that no k computation is successful So b b

For all blo cks B of C at time t if B B t and B B then B t ie

B disapp ears at time t Otherwise B t and B t are nonempty subsets of B t

and hence b b the set of p ebbles in B t are considered as one blo ck at time t in

C but are considered as more than one blo ck at time t in C a contradiction

u

Hence B t B t which lies completely inside G at time t

k

A corollary of Lemma is that a blo ck can only traverse a path of sup erno des

as opp osed to a tree of sup erno des during a k computation For example

u v

supp ose blo ck B is trying to traverse b oth G and G which

k k

w u

are the children of some sup erno de G If B has completed traversing G

k

u

rst then all its p ebbles are in G and it is now imp ossible for B to tra

k

v v

verse G Note that some no des but not the goal within G

k k

u

might have b een touched by p ebbles of B while it is traversing G Now

k

we can analyse the paths of sup erno des traced by blo cks in a k computation

very much like the way we analyse the paths traced by p ebbles in a computation

Lemma The sequence of ids a k computation on G goes through

p

can be specied independent of by

p

B the initial id Q of the k computation and

B for every block B of the computation the number of G s block B has

k

successful ly traversed and whether the goal of the last one is a leaf

Pro of Supp ose the k computation starts at time t We can verify by induction

on t t that the id at time t and the memb ers of B t for each blo ck B of the

computation can b e determined

Base Case The id at time t is Q and the blo cks are dened by

Induction Step Supp ose the id at time t is known to b e Q and we also

t t

know the memb ers of B t for each blo ck B of the computation Supp ose the k

computation has not nished at time t and the next move is a walk P i Q Then

t

again the key is to determine if P is a leaf Once this is known the edge lab el

t

i and the no de lab el P determines which no de P will arrive at b ecause of the

t

lab elling prop erty L Then we can up date the memb ers of the blo cks involved

By lo oking at and which is xed we know whether P is the

t k t

u

goal of a G called G say Case P is not the goal

k k t

of a G Then determines if P is a leaf Case P is

k k t t

the goal of a G Let P b elong to the blo ck B t By Lemma every

k

u u

p ebble of B t must lie within G at time t If the goal of G

k k

ie P is a leaf blo ck B cannot traverse any more G s Therefore if

t k

the numb er of sup erno des traversed by B so far is strictly less than that sp ecied in

B then P must not b e a leaf To know how many sup erno des each blo ck has

t

traversed we lo ok at and B B B t to infer the greatest depth

t

a blo ck has explored using the lab elling prop erty L On the other hand if the

numb er of sup erno des traversed by B is equal to that in B then blo ck B is on

the last copy of G and P is on its goal Hence B determines whether

k

P is a leaf

t

p

There are q d choices for B To b ound the numb er of choices for B

observe that each blo ck can traverse as many as d copies of G s b efore

k

it completes traversing a G That is there are d choices for the

k

numb er of copies of G traversed For each choice there are p ossible cases

k

dep ending on whether the goal of the last copy of G traversed is a leaf

k

p

Finally observe that the numb er of blo cks is at most p Therefore there are d

p p

choices for B Hence by Lemma there are at most q d d dierent

sequences of ids for a xed To traverse a G a blo ck has

k k

to traverse a path of d sup erno des which lie within that copy of G

k

and the sequence of lab els on the edges connecting these sup erno des has to match

p p

Hence at most pq d d s can have a successful k

k k

computation for some choice of B and B and a xed It follows

k

that for d p log pq there exists a choice of such that the k

k

computation is not successful for any choice of B and B Hence H k follows

This also completes the pro of of Lemma

Extension to probabilistic NNJAG with sided

error

For a probabilistic NNJAG that allows sided error we have the following result

Theorem For every c any probabilistic NNJAG that solves stcon with

c

log n

log n

sided error for al l nnode graph within steps requires space at least

c log log n

Pro of Observe that if a probabilistic NNJAG J solves stcon with sided er

ror it cannot accept a graph G unless it has p ebbled no de t during the compu

tation Otherwise we can construct a graph G with isolated no de t and force

J to accept it Therefore the probability that J accepts G is upp erb ounded

by the probability that it has p ebbled no de t Now supp ose J has p p ebbles q

c

log n log n

states and time so that pq By Theorem to b e proved b elow

c

log n

log n p

n p log pq or p If b oth p log n and

c

log log ploglogpq log n

log n

log q log n then p Hence Theorem follows

c log log n

Note that the result can b e restated as a time lower b ound for space b ounded ma

log n

chines For every c any probabilistic NNJAG with at most space

c log log n

c

log n

requires at least time to solve stcon with sided error on nno de graphs This

complements the result obtained in Chapter

Theorem For every T timebounded probabilistic NNJAG J with p pebbles and

q states such that pq T there is a graph G such that

G is a rooted tree with maximum outdegree

p

G has at most p log pq T nodes including two special nodes s and t

there is a directed path from s to t and

if J starts with al l pebbles on node s then the probability that node t is visited

by some pebble is less than

Pro of Again we shall cho ose a dicult graph for J from the set of skinny trees but

with d set to p log pq T As mentioned in Chapter we view J as a distribution

of deterministic NNJAGs each having p p ebbles and q T states Denote the deter

ministic NNJAG asso ciated with random string R by J Let M R b e

R k p

the event over random R that there exists t Q such that the k computation

by J on G from id t Q is successful Lemma b elow shows

R p

that Pr M R for any R assuming are chosen

p p p

p

d

randomly and uniformly from f g By Theorem in Yao Yao there exists

such that Pr M R Hence Theorem follows

p R p p

Lemma For al l R Pr M R k p

k p

p

Pro of By induction on k Let H k b e the statement of the lemma for a xed

value of k p

Base case Since J is deterministic we can apply Lemma with q replaced

R

p p d

by q T and have P r st M R pq T d

p p

p when d p log pq T Hence P r M R p

p

p

Hence H is true

Induction step Assume H k is true and write P r as P r Observe that

p

P r M R

k p

h i

P r M R P r M R j M R

k p k p k p

By H k the rst probability is less than k p Hence we just need to show that

the second probability is less than p Since M R do es not happ en

k p

by Lemma each blo ck can only traverse a path of sup erno des during a k

computation By Lemma

Pr M R

k p

p

Pr st M R

k p k p

k

p p d

pq T d d

p

when d p log pq T Hence H k is true and Lemma follows

Extension to probabilistic NNJAG with sided

error

The ab ove result can b e easily extended from sided error to sided error as follows

Theorem For every c any probabilistic NNJAG J that solves stcon with

c

log n

sided error for al l nnode graphs within steps requires a storage of at least

log n

c log log n

Pro of By Theorem b elow we can construct a graph G so that the probability

of no de t b eing visited is less than Since G is stconnected J has to accept with

probability at least Hence P r J has not p ebbled t but accepts G

Now construct G as b efore by removing all the inedges of no de t With the

same probability ie J has not p ebbled no de t and hence cannot tell the

dierence b etween G and G and will accept G

Theorem For every T timebounded probabilistic NNJAG J with p pebbles and

q states such that pq T there is a graph G such that

G is a rooted tree with maximum outdegree

p

G has at most p log pq T nodes including two special nodes s and t

there is a directed path from s to t and

if J starts with al l pebbles on node s then the probability that node t is visited

by some pebble is less than

The pro of of Theorem is the same as that of Theorem except that we set

d p log pq T

Chapter

A Timespace Upp er Bound

In this chapter we prove the following timespace upp er b ound for stcon on the

JAG mo del

Theorem For al l S such that log n S n log n there is a JAG

O log n log nS O

algorithm that solves stcon for al l nnode graphs in n time and

p

log n

while the O S space simultaneously In particular S can be as smal l as n

running time is stil l bounded by a polynomial

In the following section we describ e the algorithm that runs on a RAM implied by

Barnes et al BBRS In Sections and we describ e the simulations on the

NNJAG mo del and the JAG mo del resp ectively

The Barnes et al algorithm

We rst dene a generalization of stcon as follows Let U and V b e sets of no des

We dene

N U as the set of no des v such that there exists a no de u U and a path

l

from u to v of length ie the numb er of edges in the path at most l

N U N U N U

l l

l

stcon as the problem of computing the set V N U given input U V In

l l

particular stcon is the sp ecial case when l n U f s g and V f t g

The Barnes et al algorithm is constructed by combining a spaceecient breadthrst

search and a timeecient Savitchs algorithm The latter algorithm solves instances

of stcon with l much smaller than n As p ointed out in BBRS such a problem

l

retains a lot of diculties that are present in stcon

We shall describ e the mo died Savitchs algorithm and breadthrst search in

Section and resp ectively In the presentation we assume the input graph

G is represented as an adjacency list and stored in the global memory Hence G do es

not app ear in the input parameters of the algorithms Also we let d dn log nS e

and V V V b e an arbitrary partition of the set of no des in the graph so that

d

each V has size at most dnde

i

The mo died Savitch algorithm

Savitchs algorithm determines whether t is within distance l from s by recursively

checking for each p ossible intermediate no de v whether v is within distance l from

s and whether t is within distance l from v The correctness follows from the fact

that

t N s v such that v N s and t N v

l

l l

Thus the algorithm solves the original instance of stcon by solving n instances of

l

O log l

stcon It runs in n time and O log n log l space We can compute V N U

l

l

by applying this algorithm on all pairs of no des u v U V However when

we have more space we can save some time by considering a set of intermediate

no des V instead of a single no de v and determining connectivity for the whole set

i

simultaneously More precisely we have

d

V N U V N V N U

l i

l l

i

Thus we solve an instance of stcon by solving d instances of stcon This metho d

l

l

n log n

O log l

requires approximately d time and O log l space

d

For our purp ose we are only interested in problem instances where V is of the

form f x y g for some x and y Hence V can b e represented by the pair of no des

x y and memb ership in V can b e tested in constant time Also we cho ose the

partition V s so that v V if and only if bv dc i Here we consider the no de

i i

name v as a numb er in the range n Then the subproblems will also satisfy

Savitch is shown in Figure this condition The pseudo co de for the algorithm mod

function mod Savitchl U V

fInput l is a p ositive integer U is an array of at most dnde no des V f x y g is

sp ecied by x and y

Output no des in V N U stored as an arrayg

l

var k integer Ans X set of no des u v no des

b egin

Ans

if l then f Base Case g

for each u U do

if u V then Ans Ans f u g

for each edge u v G do

if v V then Ans Ans f v g

endfor

else f Recursive Case g

for k to d do

X mod Savitchbl c U V

k

Ans Ans mod Savitch dl e X V

endfor

endif

return Ans

end

Figure mod Savitch

Savitchl U V Let T l and S l b e the time and space used by a call to mod

when jU j jV j O nd For the base case there are O nd no des in U and O m

no des neighb ouring some no des in U We can check whether they are in V in O

time each Adding a no de to Ans can b e done in O time if we represent Ans by

a bit vector of length jV j We simply turn the corresp onding bit on Therefore

T O m nd O m assuming n m Also jV j O nd and hence

n log n

jAnsj O nd Therefore S O For the recursive case there are d

d

recursive calls to mod Savitchl and O n lo cal work to up date Ans Hence T l

d T l O n It requires S l space for the recursive calls and O jV j log n

n log n

lo cal space for the sets of no des X and Ans Hence S l S l O

d

n log n

O log l

Combined with the base case T l d m and S l O log l

d

The mo died breadthrst search

In the breadthrst search we construct the breadthrst search tree layer by layer

storing every single no de we have found so far In the mo died breadthrst search

th

we store only every d layer of no des That is we only store layers i d i bn

i dcd i for some i d Let us denote this set of no des by W

i

Observe that any no de v reachable from no de s must lie within distance d

from s or some no de in W Therefore to determine whether t is reachable from s we

i

just solve an instance of stcon with input W f s g f t g

d i

Obviously there is a set W of size jW j bndc Storing this W requires only

i i i

n log n

O space To nd a small enough W we simply try from i Each

i

d

W will b e computed incrementally in bn i dc stages with W containing the

i

p ortion of W found so far If W ever contains more than bndc no des we discard W

i

and try the next set W

i

We shall maintain the invariant that W contains all the no des in layers i d

i j d i just b efore stage j During stage j W will b e augmented with

no des in layer j d i and hence the invariant is maintained for the next stage The

no des in layer i can b e found by computing N s N s N s Augmenting W

i i

i

W f s g We with no des in layer j d i in stage j can b e done by computing N

d

have to include no de s and the no des in layers i d i j d i b ecause not

all no des at distance exactly d from layer j d i are on layer j d i Some may

lie on some layer k j d i

We construct an algorithm ExactNeighbourl U which computes N U using only

l

O n log nd space Moreover it will only return at most bndc elements in N U

l

if it has size bigger than bndc The idea is to compute V N U and V N U

l l

b oth of size O nd and then take the dierence This is rep eated with the sets

V V and so on until the set V is done or we have found more than bndc no des

d

already The pseudo co de is shown in Figure It only uses O n log nd lo cal

Savitchl U V with space p erforms O n lo cal work and makes O d calls to mod

O log l O log l

jV j O nd Hence if jU j O nd also it will use d d m d m time

n log n n log n n log n

and O log l O O log l space

d d d

function ExactNeighbourl U

fInput l is a p ositive integer U is an array of no des

U j bndcg U where bndc x bndc if jN U or any x no des of N Output N

l l l

var k integer Ans set of no des

b egin

if l then return U

Ans k

while jAnsj bndc and k d do

Ans Ans mod Savitch l U V mod Savitch l U V

k k

k k

endwhile

return Ans

end

Figure ExactNeighbour

bfss t that p erforms the mo died breadthrst search just The algorithm mod

describ ed is shown in Figure It makes O n calls to ExactNeighbourl U with

l d and jU j O nd p erforms O n lo cal work and uses O n log nd lo cal space

O log d O log n log nS

Recall that d dn log nS e Hence it runs in mn mn

O log n log nS O

n time and O n log nd O S space

Simulation on an NNJAG

The previous algorithms can b e simulated on a RAMNNJAG without much change

In a RAMNNJAG the registers are divided into two typ es regular registers and

p ebble registers The input graph can only b e accessed by applying walk or jump

op erations on p ebble registers only Furthermore we can only transfer data from

p ebble registers to regular registers but not the reverse Thus we need to b e careful

with the typ es of registers used to hold the input no des and output no des

For mod Savitchl U V we require that U b e stored in the p ebble registers and

function mod bfss t

fTo determine if there is a directed path from s to tg

var i j integer D one b o olean W set of no des

b egin

i D one false

while i d and not D one do

fCompute W g

i

W ExactNeighbouri f s g

j

while jW j bndc and j d i n do

fW contains layers i d i j d i g

j j

W W ExactNeighbour d W f s g

endwhile

if jW j bndc then

D one true

else fTry the next group W g

i

i i

endwhile

if mod Savitchd W f s g f t g then

return not connected

else return connected

end

Figure mod bfs

the output returned in the p ebble registers Then when l we can apply the walk

op eration to the p ebble registers that store the no des in U to nd out their neighb ours

Savitchbl c U V are When l the output returned by the recursive call mod

k

stored in the p ebble registers and hence can b e used as input to the recursive call

mod Savitchdl e X V The input V can still b e represented by a pair of no des

x y stored in regular registers We can check whether a no de u stored in a p ebble

register is in V by copying it to a regular register and see if x u y

Similarly for ExactNeighbourl U we require that U b e stored in the p ebble

registers and the result returned in the p ebble registers This is b ecause U will b e

used as input to calls to mod Savitch and the result of ExactNeighbour will b e used

bfs as input to subsequent calls to ExactNeighbour by mod

For mod bfss t we can assume that no de s and t are stored in p ebble registers

initially It is easy to see that all the previous three algorithms can run on a RAM

NNJAG using this inputoutput convention The running time and space are the

same as b efore

Simulation on a JAG

Savitchl U V can The ma jor problem in the simulation is that the algorithm mod

not b e simulated directly This is b ecause the set V cannot b e sp ecied as the

input Some no des in V may not b e reachable from no de s and hence V cannot

b e stored in the p ebble registers Furthermore the JAG has no way of comparing

the content of a p ebble register with that of a regular register Hence V cannot

b e stored in the regular registers to o Thus rather than sp ecifying V and asking

the pro cedure to compute V N U we sp ecify an integer k and ask the pro ce

l

th

dure to compute the k group of no des in N U More precisely we construct

l

Savitchl U k which returns a set of no des R N U such that a function mod

k l

jR j max mindnde jN U j k dnde and R R for all i j We

k l i j

rst give the construction of mod Savitchl U k Then we describ e how it can b e

bfs and ExactNeighbour to solve stcon used by mod

Savitchl U k will consist of recursive calls to The pro cedure for mod

Savitchl V i for suitably chosen V s and is We rst explain how to compute mod

th

N U in small space and then how to select the k group of no des from N U

l l

Observe that N U N N U Therefore we can recursively compute

l

blc dle

X N U and then N X Let X b e computed by mod Savitchdl e U i

dle blc i

S S S

N X Let Y b e com X X Also observe that N Then X

i ij i i

blc blc

i i i

S

puted by mod Savitchbl c X j Then N X Y and hence N U

i i ij l

blc

j

S

Y Note that each Y can b e computed by a call to mod Savitchdl e U i

ij ij

ij

which returns X and then mod Savitchbl c X j

i i

th

To select the k group of no des in N U we compute Y in lexicographic order

l ij

S

of i j and count j j To do this whenever we computed Y we Y

ij i j

i j ij

S

b

for all i i and all j and then Y Y recompute Y Then Y

ij ij i j i j

i i

b b b b

for all j j by the prop erty for all i i In addition Y Y Y Y

ij ij ij i j

S P

b

Savitchbl c X j Therefore j j Y j We can jY of mod

i i j i j

i j ij i j ij

st th

then select the k dnde to k dnde element in N U The pseudo co de

l

Savitchl U k is broken into three parts which are shown in Figure of mod

and

function mod Savitchl U k

th

f To compute the k group of no des in N U g

l

var c integer Ans array of p ebble registers

b egin

c f to count the numb er of elements generated so far g

Ans

if l then

Base Case

else

Recursive Case

end

Savitch Figure The outline of mod

for i to jU j do

c c

if k dnde c k dnde then

app end U i to Ans

endfor

for i to jU j do

for each edge U i v G do

f Check if v has already b een discovered b efore g

f ound false

for j to jU j do

if U j v then f ound true

endfor

for j to i do

for each edge U j w G do

if w v then f ound true

endfor

endfor

for each edge U i w G such that w v do

if w v then f ound true

endfor

f Checking completed g

if not f ound then

c c

if k dnde c k dnde then

app end v to Ans

endfor

endfor

return Ans

Figure Base Case

c

rep eat

i i

th

Savitchbl c U i f Compute X the i group of N U g X mod

i

blc

j

rep eat

j j

th

Y mod Savitchdl e X j f Compute Y the j group of N X g

ij i

dle

f To check and remove from Y any no de that has b een found b efore g

i

rep eat

i i

g Savitchbl c U i f Compute X Z mod

i

if i i then

j

rep eat

j j

W mod g Savitchdl e Z j f Compute Y

i j

b

Y Y W f Compute Y g

ij

until W

until i i

f Checking completed g

for j to jY j do

c c

if k dnde c k dnde then

app end Y j to Ans

endfor

until Y

until X

Figure Recursive Case

Let T l and S l b e the time and space used by mod Savitchl U k For the

n log n

For the recursive case there are base case T O n d and S O

d

four nested lo ops each lo oping for at most d times In the deep est lo op there is

log l

a recursive call to mod Savitchl Hence T l d T l d T

O log l

d n Also S l O n log nd S l O n log n log l d

The mo dication of ExactNeighbourl U is rather easy For each group of no des

in N U which is computed and stored in V we compute all the no des in N U

l l

and remove from V any no de that app ears in N U Thus line in Fig

l

ure is replaced by the following The new ExactNeighbours makes O d calls to

O

mod Savitch p erforms n lo cal work and uses O n log nd lo cal space

Ans k

rep eat

k k

Savitchl U k V mod

Ans Ans V

k

rep eat

k k

V mod Savitchl U k

Ans Ans V

until V

until V or jAnsj bndc

The mo dication in mod bfs happ ens only at the end when we test whether t is

within distance d from W f s g More precisely line in Figure is replaced

i

by the following lines

c

rep eat

c c

Savitchd W f s g c T mod

if t T then return connected

until T

return not connected

n log n log d

O log d O

bfs requires d n time and O It is easy to see that the new mod

d

O log n log nS O

space or equivalently n time and O S space

Chapter

A Timespace Lower Bound

In this chapter we prove a timespace lower b ound for stcon on the probabilistic

stcon ie the complement problem NNJAG mo del We rst prove a lower b ound for

of stcon on the probabilistic NNJAG mo del with sided error This implies the

same lower b ound for stcon on a deterministic NNJAG Then we extend it to a

probabilistic NNJAG that allows sided errors

Theorem There is a positive integer n and positive constants and c

log n

n

such that for any n n and any S any probabilistic NNJAG that

log log n log n

solves stcon with sided error on nnode graphs with outdegree at most two using

q

c log n log nS

nS

log log n

walking steps S space requires more than

log n

The pro of of Theorem will require the following theorem

Theorem There is a positive integer n and positive constants and c

n

such that for any n n and any S there is a distribution on nnode

log n

directed graphs G such that

G has maximum outdegree

G is not stconnected and

n log n

q

c log

S

nS

log log n

for any deterministic NNJAG J with S space and at most

log n

walking steps which rejects every stconnected graph

Pr J accepts G

G

S

Note that a deterministic NNJAG with space S cannot run for more than steps

without going into innite lo op Set S c log n log log n for a small enough con

n log n

q

c log

S

nS

S

log log n

Then by Theorem no deterministic stant c so that

log n

NNJAG with space at most S can accept every graph in Therefore any deter

ministic NNJAG that solves stcon and hence stcon requires space more than

S c log n log log n This is an alternative pro of of the deterministic case result

derived in Chapter However the same trick cannot b e applied to get the proba

bilistic case result in Chapter b ecause the machine there is allowed to run for more

S

than steps

stcon for Pro of of Theorem Let J b e a probabilistic NNJAG which solves

all nno de graphs with S space and at most T time where log n log log n S

p

c log n log nS

log log n

n log n and T nS log n By the construction in Chapter J

can b e simulated by a distribution J of deterministic NNJAGs which reject every

nno de stconnected graph Moreover each NNJAG in J uses space at most S log T

and time at most T For the stated ranges on S and T

c log n log nS nS

S log T S log

log log n log n

c log n

S

log log n

S

Let c b e the constants mentioned in Theorem Set and cho ose a

n log n

c log

p

c log n log nS

S

log log n log log n

small enough constant c so that T nS log n

p

n S log n for all n n Then by Theorem the probability that such a

deterministic NNJAG J J accepts a graph G drawn from the distribution on

R

nonstconnected graphs is less than ie Pr J rejects G

G R

For all deterministic NNJAG J and graph G let r J G if and only if J

R R R

rejects G Theorem of Yao Yao implies that for any NNJAG distribution J and

any graph distribution G

X X

min Pr J r J G Pr G r J G max

J J R R GG R

R

J J GG

R

G J

R

or equivalently

min Pr J rejects G max Pr J rejects G

GG R J J R

R

J J GG

R

Hence for some worst case graph G J accepts G with probability less than

stcon for all nno de graphs with the This contradicts the assumption that J solves

stated time and space b ounds

In the rest of this chapter except Section we shall consider a variant of

deterministic NNJAGs that runs in at most S space and rejects every nno de st

connected graph for some S b etween log n and n log n and some n n In

Sections and we rst describ e some distributions of nno de graphs including

the distribution We then dene a notion of progress that measures how much

an NNJAG has done towards solving stcon for graphs chosen from in Section

Section describ es this variant of NNJAGs and the related mo dels used in the

subsequent pro of Section outlines the pro of of Theorem Sections and

give the pro of of the supp orting lemmas used in Section Sections and

contains the pro of of the two required technical lemmas for proving the Main Lemma

Finally Section extends the result to probabilistic NNJAGs that have sided

error

Layered Graphs

A d xlayered graph rst dened in BE is a graph consisting of d layers each

containing x no des The layers are numb ered from to d The width x is the numb er

th

of no des p er layer The j no de in layer i is denoted by u Every no de has at

hij i

most two outgoing edges to some not necessarily distinct no des in the next layer

Intuitively solving stcon for graphs containing a d xlayered graph is dicult

As explained in BE if we connect no de s to every no de in the top layer of a

d

d xlayered graph there may b e as many as x dierent paths from s to no des

in layer d The NNJAG must p otentially check each such path b efore it can b e sure

that s is not connected to t Although these paths will overlap in many places it is

dicult for the machine to rememb er with its limited space which subpaths have

b een traversed already Therefore many subpaths must b e traversed many times

b efore the NNJAG is sure they have all b een traversed In what follows we consider

a distribution of layered graphs on which we can quantitatively measure how much

work an NNJAG has done towards solving stcon

Let D b log n for some constant b to b e determined later The distribution

of base graphs with parameter x denoted as B x is a distribution on D xlayered

graphs Each graph G in B x will have x hard paths to b e dened shortly

of length D and is obtained as follows In each layer i except the top layer we

randomly pick without replacement a sequence of x no des in a way that all the

th

xx x p ossibilities are equally likely Let us denote the j no de picked

as v It is the no de u for some j These no des are called the hard nodes The

hij i hij i

remaining x no des in that layer are called the easy nodes For layer we cho ose

the sequence of no des u u u as the sequence of hard no des Next

hi hi hxi

we shall put in edges so that if an NNJAG moves a p ebble D steps down from

a hard no de in the top layer it is dicult for the p ebble to b e on a hard no de by

the time it reaches layer D In other words it is easy for the p ebble to reach an easy

no de

First the hard no des are connected by the edges v v with lab el l for

hij i hij i hij i

each i D and each j x The path from v to v is called the

hj i hD j i

th th

j hard path The no des v and v are called the root and goal of the j hard

hj i hD j i

path resp ectively Thus there are x hard paths and the same numb er of ro ots and

goals in G The edge lab els l are chosen indep endently and uniformly at random

hij i

from f g We denote the vector of edge lab els on the hard path ro oted at ro ot r

th

by If r is the j ro ot is the sequence of bits l l Clearly is

r r r

hj i hD j i

D

uniformly chosen from f g

For each layer i D each hard no de v will have one more outgoing edge

hij i

lab elled l and each easy no de will have two outgoing edges The destinations

hij i

of these edges are chosen indep endently with replacement at random from the set

of easy no des in layer i In this way the indegree of each hard no de in layer i

is kept to one

As we shall not directly use the distribution B x as an input distribution for the

NNJAG we shall not sp ecify the naming of no des in each graph in B x yet For the

time b eing it is sucient to say that for each i j D x the name of the

no de u is the same for every graph drawn from B x

hij i

Figure shows a graph in B assuming D The no des in each layer are

rearranged so that all the hard no des are on the left hand side

hard easy to reach to reach

D

x

Figure A graph G in B x

A key observation of this distribution of graphs is that each no de in each hard

path has indegree one and outdegree two If a p ebble is to reach a goal starting from

a ro ot it has to decide correctly which edge to take at each no de along the hard path

This is dicult even though an NNJAG can see the names of the no des b ecause

we randomly pick the edge lab els and the no des on the hard path We shall say that

progress is made if a p ebble successfully reaches a goal no de Lemma Main

Lemma shows that with high probability any short sub computation cannot make

much progress Then setting x n log n adding the no des s and t with the

appropriate edge connections and using a standard progress argument as intro duced

in Boro din et al BFK we can obtain a lower b ound of ST n log n To

obtain a larger lower b ound we need to consider layered graphs with height bigger

than log n and develop new techniques We consider distributions on layered

graphs recursively constructed from the distribution B x in the following section

Recursive Layered Graphs

p

nS log n and K blog n log D c Recall that D b log n Dene

logn log nS

One can verify that K when S nb log n and that

log log n

K O log n log log n since S log n We rst recursively construct K distributions

k k

H H H on layered graphs H is a distribution on D layered graphs

K k

k k

hard paths of length D Then G is formed by adding Each such graph has D

k

some more no des and edges to each graph in H Each G will b e an input distribution

k k

of nno de graphs and is more and more dicult for the NNJAG as k increases G

K

will b e chosen as the required distribution in Theorem

The distribution H is simply B For k a graph G in H is formed as

k

follows We cho ose a graph G from H and replace each layer i of G by a graph G

k i

k k k

chosen from B Note that each G has hard paths and each layer

i

th

of G has the same numb er of no des We identify the j hard path in G ie the

i

th

path from v to v of G with the j no de in layer i ie u of G Every

i

hj i hD j i hij i

edge that go es into u of G will now go into v of G and every edge that go es

i

hij i hj i

out of u of G will go out of v of G The easy no des in G are not connected

i i

hij i hD j i

to any no de outside G

i

Since G is uniquely determined by G and G G k we often denote G as

D

a tuple hG G G k G i The graph G is called the col lapsed graph of G

D

denoted by C G The set of hard paths resp ectively ro ots and goals of G is the

union of all the sets of hard paths resp ectively ro ots and goals in G G G k

D

k k

Hence G has D hard paths and the same numb er of ro ots and goals in total

The edges within each of the G s are called the base edges of G The other edges ie

i

those connecting the G s are in corresp ondence with the edges in the collapsed

i

graph C G of G Hence they are called the col lapsed edges

Figure shows a graph G H on the right its collapsed graph C G H

k k

k

and the symb ol for a base graph in B on the left Again we rearranged the

no des so that all the hard no des in the G s app ear on the left half i

hard easy to reach to reach

G 1 G' D k-1

G 2

k G 3 D k-1 2 χ

G k -1 D D k k χ

2 χ 2

k

Figure Left top G H Left b ottom A graph in B Right G

k

hG G G k G i H

k

D

For each k K the distribution G is obtained by augmenting the following

k

auxiliary no des and edges to each graph in H

k

with w s and an edge from w to u of A a directed path w w w

k

j

hj i

k

G for each j

A the isolated no de t

A a sp ecial isolated no de referred to as the lost no de

A a numb er of isolated no des so that the total numb er of no des in the graph is

exactly n

See Figure These auxiliary no des and edges are xed for each graph G G k

k 2 χ s = w 1 w2 w 3

k D

lost t

Figure A graph in G

k

Hence G can still b e sp ecied by a tuple h G G G k G i where G G k

D D

k

are in B and G is in H The col lapsed graph of G denoted by C G is the

k

graph G augmented with the auxiliary no des and edges needed to form a graph in

G from a graph in H Thus C G is in G Note that excluding the no des

k k k

k k

added in A each graph in G consists of a D layered graph a path with

k

k k k

no des the no de t and the lost no de These add up to a total of D

k

D n no des for k K by our choice of the parameters D and K Hence

we are not adding a negative numb er of no des in A

k k

Finally we lab el the no des so that for each i j D the name of

the no de u is xed for every G G Similarly the names of the auxiliary no des

hij i k

added in the ab ove four steps are also xed Furthermore the names of the no des

are drawn from the range n

Denition of Progress

Our pro of will measure at various stages of the computation how much progress an

stcon on an input G For any subcomputation NNJAG J has made towards solving

A and any input G G we dene w G as the numb er of dierent goals in G that

k A

have b een p ebbled at some p oint during the subcomputation A Intuitively w G

A

stcon is the amount of progress made The following lemma shows that if J solves

it must make progress on input G G

Lemma Let J be an NNJAG that rejects every stconnected graph Then for

every graph G G accepted by J w G

J

Pro of Supp ose that G G Therefore it is not stconnected and has goals

Supp ose there is a goal v which is never reached by any p ebble during the computa

tion Let G b e obtained from G by connecting no de v to no de t By denition of

the NNJAG mo del the machine cannot learn whether there is an edge from v to t

Therefore the computations on G and G are the same Since G is stconnected J

rejects G Hence J will also reject G

For k the computation on an input G G is more complicated Each

k

k

B such graph contains some base graphs G G connected by some

k

D

collapsed edges The NNJAG has to learn b oth the structures of the base graphs and

the collapsed edges The following lemma shows that w G is a go o d estimate on

A

the numb er of dierent collapsed edges traversed during a subcomputation A

Lemma The number of dierent col lapsed edges of an input G G that can be

k

traversed during a subcomputation A of an NNJAG is at most w G

A

Pro of An NNJAG can traverse an edge u v only if there is a p ebble on no de u

b efore the traversal If the edge is a collapsed edge u must b e a goal Since every goal

has outdegree at most two p ebbling one such no de allows the NNJAG to traverse

at most two dierent collapsed edges

The next lemma characterizes the only signicant dierence b etween the NNJAG

mo del and a general computation mo del

Lemma If at some step t a particular hard path does not contain any pebble

and at some later step t a pebble arrives at the goal of this path then each edge in

that path must be traversed by some pebble between step t and t

Pro of Observe that every no de in every hard path has indegree one and the NNJAG

mo del do es not allow a p ebble to arrive at a no de unless there is another p ebble to

jump to or it walks there

Viewing NNJAGs as Branching Programs

To facilitate the analysis we shall make some changes and assumptions on the ma

chine mo dels We rst mo dify the NNJAG mo del slightly and dene a variant of

NNJAGs called pebble location redundant NNJAGs We shall see that it is convenient

to construct an NNJAG J for graphs in G from another NNJAG J for certain

k

graphs in G if they are b oth p ebble lo cation redundant We call this the collaps

k

ing of J to J We then construct a branching program from such an NNJAG The

resulting branching program will have structure imp osed on it by the structure of

NNJAGs Lemmas and together with the concept of p ebbles character

ize the required structure Finally we dene a variant of branching programs called

sectioned branching programs The concept of sectioning a branching program will

b e useful for charging the time used by the branching program

First we allow the NNJAG to jump p ebbles to the lost no de the no de w and

j

k

u for any j Also we mo dify a step to b e taken from an id Q to

hj i

consist of the following substeps

Substep Based on Q it either walks a p ebble P along the edge with

lab el or jumps a p ebble P to the lost no de the no de w or u for some

j

hj i

k

j It can also cho ose not to move any p ebble Let sp ecify the new

p ebble lo cations

it p erforms a p ossibly empty sequence of Substep Based on Q and

p ebble jumps and then assume some state Q Here each p ebble jump will only

sp ecify a p ebble to jump to another p ebble rather than to a no de

Note that a sequence of moves in a normal NNJAG can b e group ed as a sequence

of macro steps each of which starts with a walk followed by a p ossibly empty

sequence of jumps Moreover each jump causes the normal NNJAG to enter a

unique next id Thus each macro step can b e p erformed in one step in this new

mo del It follows that a time lower b ound on this new mo del implies the same lower

b ound on the numb er of walking steps on the original mo del

This change in mo del also allows us to dene the following variant of NNJAGs An

NNJAG is said to b e pebble location redundant if the current state always determines

b

the current lo cation of all the p ebbles In other words there is a function such

b

that if the NNJAG is in state Q then Q sp ecies the lo cations of all the p ebbles

For any arbitrary NNJAG J with p p ebbles q states and T time we can construct a

p ebble lo cation redundant NNJAG J so that for any p ossible id Q of J J will

have a state hQ i In this state J will p erform the same action as J do es on id

p

Q Thus J will have p p ebbles and q n states and hence at most times

1

Note that in general a normal NNJAG cannot b e made p ebble lo cation redundant b ecause if

the space of J Moreover it uses the same amount of time as J

Consider an arbitrary NNJAG J which takes inputs from a distribution of nno de

graphs with outdegree We construct the corresp onding branching program A as

follows For every id Q of J there will b e a conguration vertex Q in A

Start accept and reject ids of J translate to start accept and reject conguration

vertices of A resp ectively Recall that an input graph for a branching program is

represented by the variables X where u n is a no de name and f g

hui

is an edge lab el The variable X will have value v if there is an edge u v

hui

lab elled with in the input graph and the value undened if there is no such

edge Thus if in id Q the rst substep of J walks a p ebble from no de u along

the edge with lab el the conguration vertex Q in A will b e lab elled with the

variable X Furthermore the vertex will have a directed edge lab elled with v to

hui

conguration vertex Q if for some input graph X v ie the queried edge

hui

has destination v and the subsequent jumps taken in the second substep by J bring

the machine to the id Q If J do es not walk any p ebble in the rst substep the

conguration vertex will not get any lab el and will have only one unlab elled outedge

p ointing to some conguration vertex Q dep ending on the second substep of

J For an NNJAG with p p ebbles q states and T time the corresp onding branching

program will have space p log n log q and time T

Finally we dene a variant of branching program called sectioned branching

program A branching program is said to b e sectioned if its vertices are partitioned

into sections so that the outedges of a vertex in section i can only go to vertices in

section i or i Thus each computation path will go through each section at most

once A branching program A is said to b e properly sectioned for an input G if A

queries at most S log n dierent edges of G in each section where n and S are the

xed values mentioned at the b eginning of this chapter We dene the sheight of A

on input G denoted by h G as S log n times the numb er of sections A contains

A

the move taken from an id Q is a walk the new p ebble lo cation will dep end on the input

1 1 2

b

graph Hence the NNJAG cannot know which new state Q to move to so that Q In

2 2 2

contrast in the mo died NNJAG the p ebble lo cation after substep is uniquely determined

2

0

b

by Q and Hence it is p ossible for the NNJAG to cho ose a state Q so that Q

1 1 2 2 2

1

if A is prop erly sectioned for G and innity otherwise Thus there may b e more than

one query to the same edge of the input graph within a section but they are only

charged as one query in the sheight measure

Note that every branching program can b e levelled by at most doubling the space

and without increasing the time Also every levelled branching program of height T

can b e viewed as a sectioned branching program with T log nS sections each of

which queries at most S log n dierent input edges

In summary we can construct from a p ebble lo cation redundant NNJAG J with

S space and T time to a sectioned branching program A with at most S space and

S

O T sections where S p log n log q All our subsequent lemmas and claims

log n

are proved on those sectioned branching programs derived from some p ebble lo cation

redundant NNJAGs with at most S space Moreover if J takes T time on input G

A will have sheight O T on G We shall also o ccasionally mention p ebbles in the

context of such a branching program

Pro of Outline

In the rest of this chapter we denote a directed edge from u to v with lab el by

the triple hu v i Also we denote by G O the induced distribution obtained by

selecting those graphs in G that satisfy O where O is some condition on the edge

connections on graphs chosen from a distribution G

We rst state two supp orting lemmas The rst one mainly concerns ab out the

traversing of base edges of graphs in G It b ounds the probability of a subbranching

k

program making a lot of progress within a short p erio d of time

Lemma Main Lemma For any k K and any subbranching program

A of a sectioned branching program derived from some NNJAG with at most S log n

pebbles

S

Pr w G S log n and h G

GG A A

k

The intuition is as follows When h G A queries at most dierent edges

A

in G Consider the probability of p ebbling the goal corresp onding to an arbitrary ro ot

r assuming that the hard path ro oted at r do es not contain any p ebble initially There

D

are p ossibilities for the vector of edge lab els on this hard path To remind

r

us of its dep endency on G let us use the symb ol G instead of for the rest

r r

of this chapter An NNJAG can move a p ebble down from r following some vector

D

f g of edge lab els hoping that G For G drawn from G this

r k

D

probability is The NNJAG can dynamically cho ose based on the names of

the no des on the path it has traced so far However this will not help much b ecause

the no des on the hard path are chosen randomly Recall that D b log n where b

p

D

and that nS log n Since S O n log n it follows that

Clearly by querying at most dierent edges in the input graph the NNJAG

cannot try many dierent s Hence the probability of having at least one of them

b eing successful is still small

On the other hand the NNJAG can eliminate some of the p ossibilities by detecting

collision of edges and hence increasing the probability of success For example when

it learns that two dierent edges have the same destination no de v it learns that this

no de v is not on the hard path since its indegree is bigger than one Hence any

path continuing from no de v need not b e traversed However within steps the

probability that an edge traversed by the NNJAG collided with some other traversed

edges can b e shown to b e at most By analysing a variant of branching pro cesses

AN we can show that the probability of eliminating a large numb er of vectors

D

f g in this way is small In other words with high probability the NNJAG

still has a lot of p ossible s to try out

The ab ove discussion considers only a single ro ot When there are many ro ots

we need to take care of the dep endencies among them b efore we can apply some

Chernotyp e b ounds The detailed pro of is delayed until Sections and

The second lemma concerns ab out the traversing of collapsed edges of graphs in

G It relates the computation of a p ebble lo cation redundant NNJAG J on inputs in

k

G E to that of a faster p ebble lo cation redundant NNJAG J on inputs in G

k k

k

where E is some complete setting of the base graphs G G k B and

D

G E represents the distribution of G conditional on these xed graphs For any

k k

k

complete setting E of base graphs G G k B dene a function C from

E

D

no des in G G E to no des in C G G as follows

k k

k

C w w for all i

E i i

k k

C w l ost for all i

E i

C l ost l ost

E

C v l ost for all easy no de v and

E

th

C v u for all no de v on the j hard path in G

E i

hij i

Note that the function is welldened b ecause for input G G E whether a no de

k

u is a hard no de an easy no de or an auxiliary no de is xed

Lemma Collapsing Lemma For any k K any complete setting E of

k

and any pebble location redundant NNJAG the base graphs G G k B

D

J with p pebbles and q states there exists a pebble location redundant NNJAG J with

p pebbles and q states such that there is a correspondence between the states and

pebbles of J and J and for any G G E J is in state Q with a pebble on node u

k

in G in a step if and only if J is in the corresponding state with the corresponding

pebble on node C u in C G in the same step In particular J traverses a col lapsed

E

edge hu l v i in G if and only if J traverses the corresponding edge hC u l C v i

E E

in C G and J accepts G if and only if J accepts C G

The pro of is given in Section

With the two lemmas we can prove the following inductive statement

Lemma For any k K and any sectioned branching program A with at most

S

T sections derived from a pebble location redundant NNJAG J with at most

k

log n

S space that rejects every stconnected graphs

S

Pr A accepts G and h G T k

GG A k

k

k

log n

where T and G is the distribution of graphs dened in Section

k k

S

We shall prove the lemma by induction on k Let H k denote the statement for any

S

sections derived from a p ebble sectioned branching program A with at most T

k

log n

lo cation redundant NNJAG J with at most S space that rejects every stconnected

S

A accepts G and h G T k graphs Pr Then H implies that for

A k GG

k

any deterministic NNJAG J with at most S space the probability that J accepts

log n

S

for graph G randomly drawn from G is less than Note that G in time O

S

S

for big enough n since S log n As each graph in G has at most D

no des excluding those added in A we could set n log n rather than

p

nS log n as mentioned in Section while keeping the size of the graph

at n Then we have ST n log n In itself this is a new result extending the

JAG result in BE to probabilistic NNJAGs

The statement H K however gives a stronger lower b ound It implies that

for any deterministic NNJAG J with space at most S the probability that J

S

accepts G in time O T for graph G randomly drawn from G is less than K

K K

p

log n log nS

log log n

nS log n Substituting and K as dened in Section T

K

S

Also K for big enough n since K O log n log log n from Section

and S log n Hence Theorem follows for some suitably chosen constants c and

We now prove Lemma

Pro of of Lemma

Base Case

The pro of follows the same line of argument as intro duced in BFK and also

used in Boro din and Co ok BC Beame Bea Boro din et al BFMadH and

S

Yao Yao Let A b e a sectioned branching program with at most T sections

log n

derived from some p ebble lo cation redundant NNJAG with at most S space Consider

a graph G G such that A accepts G and h G T By Lemma w G

A A

log n

That is A makes progress on G Now break A into at most slices such that

S

log n

S

slice i consists of the p ortion of the branching program from section iT

log n S

log n

S

to section i T inclusively We count sections and slices from

log n S

log n

S log n progress Since There exists a slice i that makes at least

S

A is sectioned G passes through each slice at most once Consider the maximal

b

subbranching program A which lies within slice i and is ro oted at the no de through

which G rst enters slice i Then any subbranching program that G passes through

b b

in slice i is contained in A Therefore A has to make at least S log n progress on

b

G The fact that h G is nite means that A and hence A is prop erly sectioned

A

for G Therefore h G

A

Applying Lemma Main Lemma with k we have

S S

Pr w G S log n and h G Since there are at most

GG

A A

ro ots for such subbranching programs the probability that at least one of the sub

branching program makes at least S log n progress and at the same time has s

S S S

height at most on G is less than Hence the probability that A

log n

S

accepts G and h G T is less than

A

S

Induction Step

Assume H k is true Consider a sectioned branching program A with at most

S

T sections derived from some p ebble lo cation redundant NNJAG J with at most

k

log n

S space Supp ose by way of contradiction Pr A accepts G and h G T

GG A k

k

S

k We shall show that there exists some sectioned branching program A with at

S

sections corresp onding to some p ebble lo cation redundant NNJAG most T

k

log n

G T J with at most S space such that Pr A accepts G and h

k G G A

k

S

k This contradicts H k

S

We break A into at most T slices so that slice i consists of section iT T

k k k

log n

to section i T T inclusively Let F b e the set of G G such that

k k k

b

h G T and at least one subbranching program A which lies within a slice has

A k

b

w G S log n Since h G b eing nite implies A is prop erly sectioned for G

A

A

S

h G T T By Lemma Main Lemma and the fact that

k k

A

log n

S S

there are at most ro ots of subbranching programs in A Pr G F

GG

k

S

Therefore Pr A accepts G and h G T and G F k

GG A k

k

Let us cho ose a setting E of the base graphs G G k so that

D

S

Pr A accepts G and h G T and G F k By Lemma

GG E A k

k

we can construct from the p ebble lo cation redundant NNJAG J another p ebble

lo cation redundant NNJAG J that runs on G with the same numb er of p ebbles

k

and states as J

S

From J we can construct a sectioned branching program A with at most T

k

log n

sections The partitioning of vertices in A into sections is done as follows We put a

conguration vertex of A in section i if and only if the corresp onding conguration

vertex of A is in slice i In A outedges will only go out from vertices in slice i to

vertices in slice i or i Therefore in A outedges will only go out from vertices

in section i to vertices in section i or i Hence it is a legal way of partitioning the

vertices in A into sections Now consider an arbitrary graph G G E F At

k

most S log n progress is made in the unique maximal subbranching program that

G passes through in each slice of A By Lemma each such subbranching program

can query at most S log n dierent collapsed edges in G Hence each corresp onding

subbranching program in A queries at most S log n dierent edges in C G There

S

fore A is prop erly sectioned for C G for all G G E F Since A has T

k k

log n

C G T for all slices A has the same numb er of sections It follows that h

k A

G G E F

k

Since C G and the G s are chosen indep endently the distribution G E is iso

i k

morphic to the distribution G Therefore

k

C G T A accepts C G and h Pr

k A

C GG

k

Pr A accepts C G and G F

GG E

k

Pr A accepts G and G F

GG E

k

2 0

There is a corresp ondence b etween states of J and J It is not hard to see that there is also

0

a corresp ondence b etween conguration vertices of A and A

Pr A accepts G and h G T and G F

A k

GG E

k

S

k

Collapsing an NNJAG

Lemma For any k K any complete setting E of the base graphs G

k

G k B and any pebble location redundant NNJAG J with p pebbles and q

D

states there exists a pebble location redundant NNJAG J with p pebbles and q states

such that there is a correspondence between the states and pebbles of J and J

and for any G G E J is in state Q with a pebble on node u in G in a step if and

k

only if J is in the corresponding state with the corresponding pebble on node C u

E

in C G in the same step In particular J traverses a col lapsed edge hu l v i in G

if and only if J traverses the corresponding edge hC u l C v i in C G and J

E E

accepts G if and only if J accepts C G

b

Pro of J will have the same set of states as J Let b e the function that maps

b

states of J to its p ebble lo cations ie Q is the p ebble lo cations of J in state Q

Consider an arbitrary state Q The move of J in state Q will b e determined by

the action of J in state Q

In the rst substep of J there are three cases according to the rst substep of J

Case J do es nothing

Then J also do es nothing

Case J walks p ebble P along edge lab el l in the rst substep

Let P b e on no de u in state Q There are sub cases based on what u is

k

a If u is the lost no de or the no de w for some j then the

j

destination v P will reach is xed and C v is either the lost no de the

E

k

no de w or u for some j Hence J jumps p ebble P to C v

j E

hj i

b If u is a hard no de in layer D of some G ie u is a goal no de then the

i

outedges of u are collapsed edges In this case J walks p ebble P along

edge l

c If u is not a goal no de and not an auxiliary no de then the destination v

is xed for all G G E If C u C v then u must b e a hard no de

k E E

and v must b e an easy no de Hence J jumps p ebble P to C v which is

E

the lost no de If C u C v then J do es nothing

E E

Case J jumps p ebble P to no de v

k

Then v must b e either the lost no de or w or u for some j Hence

j

hj i

k

C v is either the lost no de w or u for some j J just jumps

E j

hj i

p ebble P to C v

E

Let b e the p ebble lo cations of J after the rst substep and let J assume state

Q in the second substep In the second substep J simulates the sequence of jumps

in the second substep of J That is if J jumps p ebble P to P J do es the same

Then it assumes state Q if and only if its p ebble lo cation after the rst substep is

where C denotes the p ebble lo cations so that C P C P for C

E E E E

any p ebble P and any p ebble lo cation

We claim that J has the prop erties stated in the lemma ie if J is in state Q

in step t on input G G E J is in the same state in step t on input C G G

k k

b

and C Q sp ecies the lo cations of its p ebbles in that step We shall prove the

E

claim by induction on the numb er of steps taken

b b

Initially J and J start with state Q Both Q and C Q sp ecify that

E

all p ebbles are on no de s

Supp ose at step t J is in state Q on input G and at the same step J is in state

b

Q on C G and its p ebble lo cations are sp ecied by C Q In particular

E

p ebble P of J is on no de C u Let us check that in all the ab ove cases the p ebble

E

lo cations of J after the rst substep is C Since J only moves p ebble P from

E

no de u to v in the rst substep we just need to show that J moves P from no de

C u to C v in the rst substep This is obviously true in all the ab ove cases

E E

except b In Case b h u l v i is a collapsed edge in G By the denitions of

G and G h C u l C v i is an edge in C G Hence p ebble P of J will b e on

k k E E

no de C v after the rst substep It follows that J will also assume state Q in

E

the second substep Moreover in the second substep J changes the p ebble lo cations

b

to Q by p ebble jumps By construction J will also change the p ebble from

b

lo cations from C to C Q

E E

Pro of of Main Lemma

Lemma For any k K and any subbranching program A of a sectioned

branching program derived from some NNJAG with at most S log n pebbles

S

Pr w G S log n and h G

GG A A

k

k

Pro of of Lemma Recall that every G G consists of D graphs G

k

k

a graph G chosen from H and G G k chosen indep endently from B

k

D

k

ro ots Therefore there are some xed auxiliary no des and edges Each G has

i

k

ro ots D

Our pro of will concentrate on the traversing of the base edges in G Thus we

assume that G is xed and known to A Hence the probability is only over the

k

graphs G G k B Let B b e the distribution

k

D

k

f h G G k i j G G k B g We allow the NNJAG to jump p ebbles

D D

to any no de in the top layer of any G Moreover each time a variable X is queried

i huli

the followings are returned the value v of X whether v is a goal no de

huli

and if so its corresp onding ro ot no de With these changes we assume that the

branching program do es not query any collapsed edge as there is no such need

k

Finally we assume that A is a ary decision tree ie it will not forget

any previous query A will not rep eat any previous query each computation

path in A queries at most dierent base edges since any graph G following a

computation path that queries more than dierent edges cannot satisfy h G

A

each in A discovers at most S log n dierent goal no des With all the

S

ab ove assumptions we just need to show that Pr w G S log n

GB A

k

Just b efore A starts each of the S log n p ebbles may already b e part way down a

hard path or even on a goal no de Therefore we assume that the goals of those hard

paths containing p ebbles initially are discovered by A There are at most S log n

such goals To p ebble the other goals we know by Lemma that the entire hard

path must b e traversed by the NNJAG In other words every edge in the hard path

has to b e queried by A Let w G b e the numb er of ro ots such that every edge on

A

its hard path in G has b een queried by A To prove the lemma it suces to show

S

G S log n that Pr w

GB

A

k

Consider an arbitrary computation path in A It can b e sp ecied by the sequence

of base edges E it has queried and the sequence of no de names R sp ecifying

whether a goal no de is discovered in each step and if applicable its corresp onding

ro ot For example supp ose queries the variable X which has the value v and

h uli

then the variable X which has the value v Supp ose v is not a goal but v is the

hu l i

goal no de of ro ot r then E hu l v i h u l v i and R r assuming no ro ot

has name

First let us understand what we can deduce ab out G the sequence of edge

r

lab els on the hard path in G ro oted at r given that G B E Note that G may

k

not actually follow We say that a no de v is a col lision node with resp ect to E

if E contains two distinct edges h u v i and h u v i with the same destination v

Since v has indegree at least two it is known to b e an easy no de This is useful

information As an extreme example supp ose that u is known to b e on the hard

path of r and hu w i is the other edge coming out from u then the NNJAG

learns that w is on the hard path of r to o This could b e rep eated D times learning

the entire hard path See Figure

D

In general we can classify f g according to and r as follows Supp ose

we trace out a path through the edges in E starting at the ro ot r and following

hard u u' w v

hard

Figure Using collisions to learn the hard path

the sequence of edge lab els until the next edge to b e taken is not contained in E

Then one of the following three p ossibilities will o ccur

The path passes through some collision no de with resp ect to E

The path reaches layer D without passing through any collision no de with

resp ect to E

The path stops b efore reaching layer D and do es not pass through any collision

no de with resp ect to E

D

We dene Y and Z to contain the vectors f g such that when the

h r i h r i

ab ove pro cedure is applied the second and third outcomes will o ccur resp ectively

Claim For any computation path in A any input graph G B E and any

k

root r G Y Z

r h r i h r i

Pro of For any Y Z and any input G B E the path from the ro ot

k

h r i h r i

r lab elled with in G contains a collision no de Since collision no des have indegree

at least two in E they do not lie on the hard path Therefore G

r

For all G B E dene Prog G as the random variable indicating that

k

h r i

all the edges in the hard path in G ro oted at r are mentioned in E Obviously

Prog G is true if G Y and false if G Z If G actually follows

r r

h r i h r i

h r i

and Prog G is true the goal of ro ot r is discovered Let y jY j and z

h r i h r i h r i

h r i

jZ j Intuitively the probability that Prog G is true given that G B E

k

h r i

h r i

y

h r i

is approximately

y z

h r i h r i

Let b b b e some constant to b e determined We say that ro ot r is a high col lision

b log n

root with resp ect to the computation path if y z Otherwise

h r i h r i

we say that it is a low col lision root with resp ect to We say that is a high

col lision computation if there are at least S log n high collision ro ots with resp ect to

Otherwise we say that it is a low col lision computation Let C b e the set of all

high collision computation paths Then

S

Pr w G

GB

k A

log n

X X

S

G w Pr G follows Pr and G follows

GB GB

A

k k

log n

C

C

SUM SUM

P

where SUM Pr G follows and

GB

k

C

P

SUM G S log n and G follows By Claim in Section Pr w

GB

A

k

C

S

SUM is at most

Consider SUM If b oth events w G S log n and happ en there

G

A

exists at least S log n ro ots r such that Prog G is true ie all the edges on

h r i

the hard path ro oted at r in G are in E For C at least S log n of these are

G low collision ro ots with resp ect to E For any and any G B E dene w

k

as the numb er of ro ots r such that r is a low collision ro ot with resp ect to and

Prog G is true Then

h r i

X

S

and G follows w G Pr SUM

GB

k

log n

C

Since G follows implies G B E

k

X

S

Pr w G SUM and G B E

GB k

k

log n

C

X

Pr G B E max Pr w G S log n j G B E

GB k GB k

k k

C

C

Consider a xed graph G B Since every computation path in A queries at most

k

dierent base edges and discovers at most S log n dierent goal no des there

S log n S

S log n n dierent values of R Hence there are at are at most

S

most dierent computation paths such that G satises E Otherwise there

and G satises exists two dierent computation paths and such that R R

For and to b e dierent there must b e an edge hu l v i in E b oth E and E

such that v v Then G cannot satises b oth E and and an edge in hu l v i in E

P

S

a contradiction Hence E Pr G B E and thus

GB k

k

C

S

w G S log n j G B E SUM max Pr

k GB

k

C

G S log n j G B E is at most w Claim of Section shows that Pr

k GB

k

S

for any in A In conclusion

S S S

SUM SUM

S

S

for big enough n Hence Lemma Main Lemma follows

Bounding SUM

This section b ounds the rst sum SUM at the end of the pro of for Lemma

Main Lemma

P

S

Claim Pr G fol lows

GB

k

C

Pro of We rst dene two games called the branchingprocess game and the edge

col lision game Let S and S b e the random variables indicating the success of the

br ed

P

corresp onding games Then we shall show that Pr G follows Pr S

GB ed

k

C

S

Pr S

br

The BranchingPro cess Game

Our branchingprocess game is a variant of a standard branching pro cess We rst

give an alternative denition of a branching pro cess For more standard denitions

see Athreya and Ney AN for example

In the branching pro cess there is an innite complete binary tree in which each

edge has probability of dying indep endent of the outcomes of the other edges A

no de u in the tree is said to b e alive if and only if all the edges along the unique path

from the ro ot to u are alive We are interested in the numb er of living no des in a

layer d We count the layers from onwards ie the ro ot is on layer

k

In our branching pro cess game there are D complete binary trees of height

D The ro ots are at layer and the leaves are at layer D For each tree there will b e

a particular path whose edges are alive Each of the other edges dies with probability

indep endent of the other edges A no de u in a tree ro oted at r is alive if and only

if all the edges on the path from r to u are alive A ro ot r is said to b e a high col lsion

b log n

ro ot if the subtree ro oted at r has at most living no des at layer D Let S

br

b e the random variable indicating the event that there are more than S log n high

collision ro ots

Let p b e the probability that r is a high collsion ro ot For i D let v b e

r i

the no de on layer i which is on the path whose edges are guaranteed to live and let

u b e the sibling of v If u is alive then the subtree of height D i ro oted at u

i i i i

can b e thought of as resulting from the rst D i layers of a standard branching

b e the probability pro cess Let I b e the numb er of live u s for i D and let p

i

r

b log n

that each subtree ro oted at an alive u has at most living no des in layer D

i

The exp ected conditional on the event that I D Then p Pr I D p

r

r

D

value of I is D D and hence Pr I D e by the Cherno

b ound

The value of p can b e estimated as follows Let N b e the numb er of living no des

d

r

at layer d in a standard branching pro cess Lemma of Pipp enger Pip says

u ud

Pr N O provided b oth u and d u tend to innity

d

Recall that D b log n and that the subtree ro oted at u where i D has

i

b log n b log n log b log n

height D i D Let us rewrite as and

set b b so b log n D Then b oth D and D b log n tend

to innity as n tends to innity The probability that the subtree ro oted at u has

i

b log n D b log n

living no des in layer D is at most O There at most

D b log n

D b log n bb log n

fore we have p O O and

r

b log n

b log n bb log n b log n

consequently p e O for some

r

constant b dep ending on b

b log n

The exp ected numb er of high collision ro ots is n b ecause there are

at most n ro ots By cho osing big enough b can b e made arbitrarily small As each

tree is grown indep endent of the others we can apply the Cherno b ound and prove

that

Pr S

br

S

Pr numb er of high collsion ro ots

log n

S S

ln

log n log n

S

provided b is big enough

The EdgeCollision Game

k

The edgecol lision game is dened as follows D graphs G G G k are

D

k

chosen randomly and indep endently from B The player is informed of the hard

path of each ro ot in each G He then cho oses at most S log n no des in the G s

i i

called the seeds After this initialization he queries edges of G one at a time When

i

the player queries an edge he sp ecies hu i where u is a no de and f g is

an edge lab el The destination no de v of the edge h u v i is then revealed to the

player Based on the result of the query he cho oses the next edge to query There

are however restrictions on the order in which the player is allowed to query the

edges For each query he can either query a no de at the top layer of any graph G

i

or one of the seeds or a no de that he has already learned to b e the destination of

another edge As well he is allowed to query at most edges in total

We shall measure the p erformance of the game player by two sets of parameters

y s and z s to b e dened shortly The parameters are very similar to the y

r r h r i

z s dened in Section Let E b e the set of base edges of the input graph G

h r i

that the player has queried during the game Recall that in Section a no de v

is called a col lision node with resp ect to E if it is the destination of more than one

edge in E Here each edge in E will b e assigned one of the two conditions alive or

dead An edge is said to b e dead if its destination no de is a collision no de or one of

the S log n seeds Otherwise it is alive We shall construct from E a collection of

binary trees by the following steps

Step Delete from G all the no des v together with all its inoutedges if E do es

not contain a path from any ro ot r to v

Step Delete all no des together with all their inoutedges which are prop er

descendents in E of the destinations of the dead edges The dead edges and

their destinations themselves are kept

The remaining edges in E that are alive are called the y edges and their desti

nation no des are called the y nodes Each such no de has a unique path from

a ro ot to it and the path contains no dead edges Hence the y edges form a

collection of disjoint binary trees ro oted at the ro ots r

Step Fill up the ab ove trees so that each no de has exactly two child edges More

precisely for each y no de that do es not have exactly two child edges counting

the dead edges add the missing edges and attach to each such edge a complete

binary tree down to layer D The no des and edges that are added in this way

are referred to as the z nodes and the z edges They do not corresp ond to actual

no des and edges in the input graph G Note that each z no de also has a unique

path from a ro ot to it and the path contains no dead edges

Deney andz as the numb er of y and z no des that are descendents of the ro ot no de

r r

b log n

r in layer D Again a ro ot r is said to b e a high col lision ro ot ify z The

r r

goal of the player is to make as many high collision ro ots as p ossible More precisely

the player wins if there are more than S log n high collision ro ots Let S b e the

e

indicator variable for this event

We now relate the edgecollision game to a sub computation by an NNJAG Both

the edgecollision game player and the NNJAG query edges in the G s The game

i

player is not told whether each no de v discovered is a goal and its corresp onding ro ot

but he can deduce this information b ecause he knows all the hard paths Moreover

he has more exibility in cho osing which edges of the input graph to query In the

NNJAG computation the machine starts computing from some initial id The game

player can cho ose the no des that contain p ebbles initially as the seeds in the game

In each step the NNJAG moves a p ebble from some no de u along an edge with some

lab el Note that no de u must contain a p ebble b efore the NNJAG can make this

move Hence a necessary but may b e not sucient condition for the walk from no de

u to b e a legal move by the NNJAG is either u contains some p ebbles b efore the

sub computation starts or u has b een p ebbled b efore the current move However

this condition is already sucient to allow the game player to query the edge h u l i

Therefore whenever the NNJAG queries an edge the edgecollision game player can

always query the same edge provided he has queried all the edges queried by the

NNJAG so far Hence for all G the game player can always ensure that E E

Now consider the conditions for a ro ot to b e a high collsion one In the NNJAG

computation a ro ot r is a high collision ro ot with resp ect to E if y z

h r i h r i

b log n D

Note that a vector f g is not in Y Z if the path obtained by

h r i h r i

following from r contains a collision no de In the edgecollision game if the set E of

edges queried by the game player includes E the same no de will b e a collision no de

with resp ect to E Hence the same ro ot r is also a high collsion ro ot by denition of

the game It follows that Pr C Pr S

G ed

BranchingPro cess Game vs EdgeCollision Game

This subsection proves the second inequality

Lemma The success of the edgecol lision game is probabilistical ly dominated by

the success of the branching processes game ie Pr S Pr S

ed br

Pro of The edgecollision game starts by randomly cho osing the graph G G G k

D

k k

in B For each i D the rst step in cho osing G according to the dis

i

k k k

easy no des at each layer into is to randomly partition the tribution B

k

no des and hard no des and to cho ose the hard path ro oted at each ro ot r This

information is revealed to the player The edges in these paths corresp ond to the

edges in the branching pro cess game that are guaranteed to live

k

is to cho ose The next step in cho osing G according to the distribution B

i

k

for each remaining edge its destination among the easy no des at the next

layer This only needs to b e done for those edges queried by the player For each

k

i D for each layer d D and for each dene the variable

k

Supp ose that the v to uniformly and indep endently take on a value from

hid i

player is querying hu i where u is a no de at layer d in the graph G and this is the

i

k

th

query to easy edges at this layer in this graph Then the variable v

hid i

k

easy no des at the next layer this edge hu i will b e sp ecies which of the

connected to

Because the player is able to cho ose dynamically which edges hu i to query we

do not know in advance which edges h u i will b e queried However the random

variables v do tell us the resulting destinations of all the edges queried Hence

hid i

without knowing which edges h u i the player will cho ose we do know which of the

th

queried edges will die Sp ecically the edge queried at layer d in G will die if

i

either there is another query at this layer with the same destination

ie v v for some or the destination is one of the chosen seeds

hid i hid i

In order to compare the success probability of the edgecollision game and the

branchingpro cess game let us dene random variables that will indicate which edges

die in the branchingpro cess game For each ro ot r in each of the graphs G there is

i

a corresp onding ro ot in the branchingpro cess game Consider the complete binary

tree of height D ro oted at such a ro ot r A sp ecic edge in this tree can b e sp ecied

by a string f g For each such edge let x f g b e the random variable

hr i

indicating whether this edge dies If the edge is one of the edges that are guaranteed

to live in the branchingpro cess game ie the xed hard path in the input graph then

Pr x Otherwise Pr x indep endent of the other x variables

hr i hr i

Now consider a xed algorithm for the edgecollision game For each intermediate

th

time step t we dene the t game as follows The game starts with t

time steps of the xed algorithm for the edgecollision game Let E b e the resulting

t

th

base edges queried We want these edges to die in the t game if and only if they

die in the edgecollision game As previously mentioned the edge asso ciated with

with v is dead if and only if there is another query at this layer

hid i

the same destination ie v v or the destination is one of the S log n

hid i hid i

seeds The query asso ciated with v can o ccur either b efore or after time step t

hid i

Either way we consider the edge asso ciated with v dead Given which edges in

hid i

E have died the set E can b e transformed as describ ed in Steps to into a

t t

collection of binary trees made up of y no des and y edges the living ones z no des

th

and z edges as well as some collision no des and dead edges The t game is completed

by completing the branching pro cess on the z edges Namely each such edge will live

or die according to the corresp onding random variable x f g A no de u in

hr i

the resulting collection of trees is said to b e alive if all the edges on the path from

the ro ot of the tree to u are alive A ro ot is said to b e a high col lision ro ot if it has

b log n th

at most living no des in layer D The t game succeeds if there are more than

S log n high collision ro ots Let S b e the random variable indicating the success of

t

the game

th

Observe that the game is simply the branchingpro cess game and hence S

br

th

S The game diers from the edgecollision game only in that in the edge

collision game all the z no desedges added in Step are treated as alive while in

th

the game some of the z edges may die according to the x variables

hr i

The additional children at layer D only hurt the edgecollision game player There

fore Pr S Pr S What remains to prove is that for every t

ed

Pr S Pr S

t t

st

Let V sp ecify a p ossible computation up to and including the t query It

t

will sp ecify the values of t of the v variables Which of them are sp ecied will

hid i

dep end dynamically on the computation The computation V will also sp ecify the

t

set of queried edges in the graph E and the next query hu i made by the player

t

th

Let the no de u b e on layer d of G and the query b e the one at this layer in this

i

graph

By the rules of the edgecollision game no de u can only b e either a ro ot a seed

or a no de that he has already learned to b e the destination of another edge There

are three cases In the rst case E do es not contain a unique path with no dead

t

edges from a ro ot to u In this case the descendant no des and edges of no de u will b e

st th

deleted from the y no de tree b oth in the t game and in the t game Hence

whether this edge dies has no eect on either game In the second case hu i is on a

hard path and for b oth games the edge is guaranteed to live

In the third case E contains a unique path with no dead edges from a ro ot

t

to u and hu i is not on a hard path Let r and sp ecify the ro ot and the lab els

st

in this path In the t game whether the edge from h u i dies is sp ecied by

th

the variable x f g In the t game the destination of the edge from h u i

hr i

is sp ecied by the variable v Consider one setting V of all the v variables

hid i t

other than those set by V and other than the variable v Consider as well one

t hid i

setting X of all the x variables other than x

t hr i

i i h h

V V X In b oth V V X and Pr S Compare Pr S

t t

t t t t t t

cases the probability is only over the values of v and x Everything else is

hid i hr i

xed by V V and X For every value of v and x which edges die

t t t hid i hr i

st

b efore time step t and which die after time step t is the same for b oth the t and

th

the t game The only change in the game is whether or not the edge from hu i dies

i h

st

In the t game this edge dies with probability Pr x V V X

hr i t t t

th

In the t game this edge dies if there exists a for which

v v or v hits one of the S log n seeds V and V x at most

hid i hid i hid i t t

dierent values of the variables v and the S log n seeds x at most another

hid i

p

k

nS log n S log n S log n S log n dierent values in Since

k

Therefore the probability that The value for v is chosen uniformly from

hid i

S

v collides with one of these values given V V X is at most

hid i t t t

log n

th

Having a smaller probability of this edge dying can only hurt the t game player We

can conclude that

i i h h

V V X V V X Pr S Pr S

t t

t t t t t t

and hence

Pr S

t

i h i h

X

V V X V V X Pr Pr S

t

t t t t t t

V V X

t t t

i h i h

X

V V X V V X Pr Pr S

t

t t t t t t

V V X

t t t

Pr S

t

Bounding SUM

This section b ounds the third sum at the end of the pro of of Lemma

Claim For any computation path in A

S

Pr G S log n j G B E w

GB k

k

Pro of Recall that w G is the numb er of ro ots r in G such that r is a low collision

ro ot with resp ect to and Prog G is true By Claim b elow the exp ected value

h r i

of w G is

X

Pr Prog G j G B E

GB k

h r i

k

low collision ro ots r

X

y

h r i

y z

h r i h r i

low collision ro ot r

P

y

h r i

low collision ro ot r

b log n

b log n

P

b ecause y At most dierent edges are queried by By cho osing

h r i

r

big enough b which implies cho osing big enough b can b e made arbitrarily small

By Lemma in Edmonds Edm

S

Pr w G j G B E

GB k

k

log n

S S

ln

log n log n

S

provided b is big enough

Claim For any computation path in A any root r and any subset O of roots

indicating for which roots r other than r Prog G is true

h r i

y

h r i

Prog G j G B E and O Pr

k GB

h r i

k

y z

h r i h r i

Pro of Let us consider a xed and r Recall that G is the random variable

r

indicating the vector of edge lab els on the hard path ro oted at r in graph G drawn

from B and that G Y Z Recall as well that Prog G is true

k r

h r i h r i

h r i

if and only if G Y We shall drop the subscripts in Y Z y

r h r i h r i h r i h r i

z G Prog G and E when there is no confusion We shall also write

r

h r i

h r i

Pr j G B E as Pr j E Note that

GB k

k

Pr Prog G j E and O

Pr Prog G j E and O

Pr Prog G j E and O Pr Prog G j E and O

P

Pr G j E and O

Y

P P

Pr G j E and O Pr G j E and O

Z Y

Consider the denominator Let b e the vector in Y that maximizes

y

Pr G j E and O over Y and let b e the vector in Z that minimizes

z

Pr G j E and O over Z Then the ab ove probability is at most

y Pr G j E and O

y

y Pr G j E and O z Pr G j E and O

y z

y

Pr G jE and O

z

y z

Pr G jE and O

y

What remains to b e proven is that

Pr G jE and O

z

Pr G jE and O

y

Let N G and N G b e resp ectively the set of edges on the path with lab el and

y z y

from ro ot r in G Let H G b e the random variable sp ecifying the hard path ro oted

z

at r in G ie b oth the no des and the lab els G The fact that Y means that

y

the path following the edge lab els in is totally contained in E Therefore N G

y y

is equal to some xed value N determined by E Then the statements G

y y

and G are equivalent to H G N and H G N G resp ectively The

z y z

p ossible values N for the random variable N G ie the path in G ro oted at r with

z z

edge lab els can b e divided into two sets Let N A if and only if some edge

z z z

in N collides with some edge in E In this case N cannot b e the hard path That

z z

is for N A Pr H G N j E and O Now consider an N A Given

z z z z z

that G contains E N and satises O it is equally likely for H G to b e N or

z y

N b ecause b oth xed paths N and N are contained in E N and neither have

z y z z

collisions with other edges in E N That is

z

Pr H G N j N G N and E and O

y z z

Pr H G N j N G N and E and O

z z z

Note as well that H G N implies N G N Therefore

z z z

Pr H G N and N G N j E and O

y z z

Pr H G N and N G N j E and O

z z z

Pr H G N j E and O

z

The ab ove ratio then b ecomes

Pr G j E and O

z

Pr G j E and O

y

P

Pr H G N j E and O

z

N A

z z

Pr H G N j E and O

y

P

Pr H G N and N G N j E and O

y z z

N A

z z

Pr H G N j E and O

y

Pr N G A j H G N and E and O

z z y

The input distribution B rst cho oses the hard paths Then every other edges is

k

added indep endently at random If N G is not a hard path at each level i D

z

k

its no de is chosen from the easy no des at this level For N G not to b e in

z

A its edges must not collide with the edges in E Let h b e the numb er of no des

z i

mentioned in E at level i that N G must avoid It follows that

z

Pr N G A j H G N and E and O

z z y

h

i

iD

k

P

h

i

iD

k k

P

b ecause h as E contains at most dierent edges This completes

i

iD

the pro of of the claim

Probabilistic NNJAGs with sided error

The ab ove can b e extended to sided error but not as straightforward as in Chapter

Here we use a similar technique as used in Edmonds Edm

Theorem There is a positive integer n and positive constants and c

o

such that for any n n and any S n log n there is a distribution on nnode

directed graphs G such that

G has maximum outdegree

n log n

q

c log

S

nS

log log n

for any deterministic NNJAG J with S space and at most

log n

time

J is correct for G Pr

G

Pro of We shall construct for each k the distribution G from G as follows First

k

k

we dene the concept of sup erhard path and sup ergoal for graphs in H and

k

th

G For k we dene the j sup erhard path of a graph G H simply as the

k

th th

j hard path in G The no de of the j sup erhard path in layer D is called the

th

j sup ergoal There are sup erhard paths and the same numb er of sup ergoals

k

in every graph in H For k each graph G H is obtained by picking D

k

k th

graphs G G k from B and a graph G from H Recall that the j

k

D

th

hard path of G is identied with u of G Supp ose the j sup erhard path of G

i

hij i

th

Then the j sup erhard path of G is obtained by is u u u

k

h i h i

D

i h

k

D

th th

replacing each no de u with the hard path of G The j sup ergoal of G is

hi i i i

i

th k

the no de of the j sup erhard path of G in layer D Thus each graph in H also has

k

only sup erhard paths and the same numb er of sup ergoals The sup erhard paths

and sup ergoals of the graphs in G are dened similarly Now the graph G G is

k

k

formed by picking a graph G G and cho osing with probability whether G is

k

stconnected If so cho ose one of sup ergoals of G to b e connected to t uniformly

at random The distribution is then G For each graph G which is not

K

stconnected denote by G the graph formed by adding an edge from the sup ergoal

v

v to t in G For each G and any sub computation A we dene w G as the

A

numb er of sup ergoals of G p ebbled during the sub computation A We divide the

domain of the p ossible graphs in into ve disjoint sub domains Let

A f G j G is not stconnected and w G g

J

B f G j G is not stconnected and w G g

J

b

A f G j G A g

v

b

B f G j G B and v is visited during the computation by J on G g

v

b

B f G j G B and v is not visited during the computation by J on G g

v

Then

J is correct for G Pr

G

h i i h

b b

Pr G A A Pr G B

G G

h i

b

Pr J is correct for G and G B B

G

Consider the rst probability

h i

b

Pr G A A

G

G A Pr

G

w G and G is not stconnected Pr

J G

w G j G is not stconnected Pr

J G

By Lemma b elow we can prove that this probability is at most for big

enough n

i h

b

G B Pr For the second probability Pr G B

G G

h i

b

For the third probability Pr J is correct for G and G B B

G

h i

b b

Pr J is correct for G j G B B For G B the computations of J on G

G v v

and on G which is in B are the same b ecause no de v is not visited Therefore J must

give the same answer to G and G If it accepts it is correct for G but wrong for G

v v

If it rejects it is correct for G but wrong for G Since for each G B some of the

v

i h

b b

the b est b et G B G B Pr corresp onding G s may b e in B Pr

G v G

h i

b

of J is to reject Hence Pr G B J is correct for G j G B B Pr

G G

J is correct for G Hence Pr

G

The following lemma is similar to Lemma

Lemma There exists a constant b such that for any k K and any sec

S

tioned branching program A with at most T sections derived from some pebble

k

log n

location redundant NNJAG with at most S space

S

Pr w G j G is not stconnected k

GG

A

k

log n

k

where T

k

S

Pro of Note that when conditioned on graphs not stconnected the distribution G

k

is the same as G for all k K Thus we can replace the probability stated in the

k

lemma by the probability Pr w G

GG

k A

The only dierence b etween the two lemmas is that in Lemma the machine has

to p ebble all the sup ergoals while the machine here has to p ebble only sup er

log n log n

k k

goals Thus we change the time b ound from T to T

k

k

S S

Base Case

The pro of is similar to that of the base case of Lemma We cut the sectioned

log n

slices such that slice i consists of the p ortion of the branching program A into

S

log n log n

S S

branching program from section iT to section i T

S log n S log n

inclusively Then we can argue as b efore that for each graph G G such that

b

w G and h G T there is a subbranching program A that lies within

A

A

a slice such that w G S log n and h G Then the rest of the pro of is

A

A

the same

Induction Step

S

slices so that Supp ose H k is true As in Lemma we cut A into T

k

log n

slice i consists of section iT T to i T T inclusively We argue

k k k k

S

that if Pr w G and h G T k then there exists a sectioned

GG A

k A k

S

branching program A with at most T sections derived from some p ebble lo ca

k

log n

G tion redundant NNJAG J with at most S space so that Pr w

GG

k A

S

k This contradicts H k A key observation in the construction of J is

that its computation on graph C G completely mirrors that of J on G Thus J

visits a sup ergoal v in G if and only if J visits the corresp onding sup ergoal C v

E

in C G

Chapter

Future Work

Although we have proved almost matching space and timespace lower b ounds the

b ounds are not exactly tight It would b e interesting to close these gaps On the

other hand it is more interesting in my opinion to prove similar lower b ounds on a

general mo del of computation To achieve that one p ossible approach is to start with

a JAGNNJAGlike mo del and add more and more p ower pushing our way towards

the ultimate mo del of the branching program The other approach is to work on the

nite mo del theory In the following sections we describ e some new thoughts in these

two directions

Variations of JAGsNNJAGs

The main weakness of a JAG or NNJAG is its restricted access to the inputs As

p ointed out in EI the space lower b ounds of CR BS and that in Chapter

are proved on a tree However it is easy for a RAM to solve stcon on trees in

O log n space All it needs to do is to walk a p ebble from no de t backward and

see if it hits no de s

However if we give the machine the ability to access any no de it wants proving

lower b ounds b ecomes to o dicult with our current techniques For example we

dene a strong jump NNJAG as an NNJAG with the extra strong jump move P v Q

which consists of jumping p ebble P to no de v and assuming state Q This mo del is

essentially as p owerful as a branching program Whenever a branching program asks

whether there is an edge from no de u to v the strong jumping NNJAG can jump

a p ebble to no de u and try out all the outedges of u to see if any of these edges is

p ointing at v This requires only O n time and O log n space to keep track of which

outedges have b een tried In other words a strong jumping NNJAG can simulate

each step of a branching program with O n time and O log n space overhead

Similarly we dene a strong jump JAG as a JAG that can jump a p ebble P from

its current no de say no de i to the no de i mod n Note that the JAG do es not

know the lab el on the no des However it is easy for the JAG to assign names to the

no des itself Supp ose it always has a p ebble on no de s Then it can consider the no de

reached by jumping a p ebble to no de s and followed by i n strong jumps as

th

the i no de Using the same argument as for strong jump NNJAGs a strong jump

JAG can simulate each step of a branching program with O n time and O log n

space overhead

Another interesting mo del is the way NNJAG In this mo del the inedges of the

input graph are also lab elled like the outedges and the machine can walk a p ebble

backward along an edge Again this mo del is as p owerful as a branching program

The machine can view the graph as an undirected one and access whatever no de it

wants by means of a universal traversal sequence Once it is able to access an arbitrary

no de i it can simulate an arbitrary step of a branching program as describ ed b efore

Since p olynomial length universal traversal sequences are known the simulation takes

O

O log n space and n time overhead

There is however a mo del called the Stack NNJAG that can solve stcon for

trees in O log n space and yet on this mo del we can still prove the same space lower

b ound as in Chapter and timespace lower b ound as in Chapter In this mo del

there is a constant numb er of stack p ebbles in addition to those regular p ebbles Each

stack p ebble has a stack which can rememb er the path that it has traversed since its

last jump More precisely all the p ebbles whether the regular or the stack ones are

initially on no de s The stack of each stack p ebble is empty initially Whenever a stack

p ebble walks along an edge u v the no de u is pushed onto the stack Whenever a

stack p ebble jumps to another p ebble P it empties its stack If P is also a stack

p ebble then P copies the stack of P to its own stack A stack p ebble can also

backtrack along the path ie to move to the no de v if v is the top of the stack and

then p op the stack Note that the p ebble is not allowed to visit any arbitrary no de

Any no de reachable by a stack p ebble must b e reachable from s by a directed path

The space for storing the stacks is given for free

To prove the lower b ound in Chapter observe that the height of the graph

p p

nS log n If nS log n S log n each stack can only store at most is O

O S log n no des Since a Stack NNJAG has a constant numb er of Stack p ebbles it

can b e simulated by a normal NNJAG with at most S log n extra p ebbles The

extra p ebbles simply jump to and remain on each no de that a stack p ebble reaches

p

This increases the space used by the algorithm by at most S If nS log n

S log n then S n log n The b ound we have for a normal NNJAG is T

log n

log log n

Now observe that the height of each stack is at most the height of the

p

n log n Hence any Stack NNJAG with space S can b e graph ie at most O

p p

simulated by a normal NNJAG with space O S n log n O n log n Hence

the same lower b ound applies

At last we suggest another mo del called random jump JAG In this mo del the

machine is allowed to jump a p ebble to a random no de The no de is chosen uniformly

from the set of all no des and the machine do es not know which no de the p ebble has

landed on Although the machine has access to all parts of the input and can solve

O

stcon for trees in n time and O log n space with high probability it do es not

seem p ossible for it to simulate a branching program eciently Proving lower b ounds

on this mo del may still b e p ossible

Finite Mo del Theory

As mentioned in Chapter another approach to separating NL and L is to show that

stcon is not expressible in FODTC over ordered structure Following the recent

work by EI which extended the result of GM by adding way lo cal ordering to

an unordered structure one can think of ways to add more to a way lo cally ordered

structure and prove a similar result For more details please see Etessami Ete

Bibliography

AHV Serge Abiteb oul Richard Hull and Victor Vianu Foundations of

Databases Addison Wesley

AKL R Aleliunas R M Karp R J Lipton L Lovasz and C Racko

Random walks universal traversal sequences and the complexity of

maze problems In th Annual Symposium on Foundations of Com

puter Science pages San Juan Puerto Rico Octob er

IEEE

AN K B Athreya and P E Ney editors Branching Processes Springer

verlag Berlin

BBR P Beame A Boro din P Raghavan W L Ruzzo and M Tompa

Timespace tradeos for undirected graph connectivity In st An

nual Symposium on Foundations of Computer Science pages

St Louis MO Octob er IEEE Full version submitted for journal

publication

BBRS Greg Barnes Jonathan F Buss Walter L Ruzzo and Baruch

Schieb er A sublinear space p olynomial time algorithm for directed

st connectivity In Proceedings Structure in Complexity Theory Sev

enth Annual Conference pages Boston MA June IEEE

BC A Boro din and S A Co ok A timespace tradeo for sorting on a gen

eral sequential mo del of computation SIAM Journal on Computing

May

BE Greg Barnes and Je Edmonds Timespace lower b ounds for di

rected st connectivity on JAG mo dels In th Annual Symposium

on Foundations of Computer Science pages Palo Alto CA

Novemb er

Bea P Beame A general timespace tradeo for nding unique elements

SIAM Journal on Computing

BFK A Boro din M J Fischer D G Kirkpatrick N A Lynch and

M Tompa A timespace tradeo for sorting on nonoblivious ma

chines Journal of Computer and System Sciences

June

BFMadH A Boro din F Fich F Meyer auf der Heide E Upfal and

A Wigderson A timespace tradeo for element distinctness SIAM

Journal on Computing February

Bor Allan Boro din Timespace tradeos getting closer to the barrier

pages LNCS

BS Piotr Berman and Janos Simon Lower b ounds on graph threading by

probabilistic machines In th Annual Symposium on Foundations

of Computer Science pages Tucson AZ Novemb er

IEEE

CR S A Co ok and C W Racko Space lower b ounds for maze

threadability on restricted machines SIAM Journal on Computing

August

Edm Je Edmonds TimeSpace Lower Bounds for Undirected and Directed

STConnectivity on JAG Models PhD thesis University of Toronto

EI Kousha Etessami and Neil Immerman Reachability and the p ower

of lo cal ordering In th Annual Symposium on Theoretical Aspects

of Computer Science pages February SpringerVerlag

LNCS

Ete Kousha Etessami Ordering and Descriptive Complexity PhD thesis

University of MassachusettsAmherst

Gil J Gill Computational complexity of probabilistic Turing machines

SIAM Journal on Computing Decemb er

GM E Gradel and G McColm Deterministic vs nondeterministic tran

sitive closure logic In th IEEE Conference on Logic in Computer

Science

Imm Neil Immerman Languages that capture complexity classes SIAM

Journal on Computing

Imm Neil Immerman Nondeterministic space is closed under complemen

tation SIAM Journal on Computing Octob er

JLL N D Jones Y E Lien and W T Laaser New problems complete for

nondeterministic log space Mathematical Systems Theory

Joh David S Johnson A catalog of complexity classes In Jan van

Leeuwan editor Handbook of Theoretical Computer Science vol

ume A Algorithms and Complexity chapter pages MIT

PressElsevier

Jon N D Jones Spaceb ounded reducibility among combinatorial prob

lems Journal of Computer and System Sciences

NTS and Amnon TaShma Symmetric logspace is closed un

der complement In Proceedings of the Twenty Seventh Annual ACM

Symposium on Theory of Computing pages Las Vegas NV

May

Pip Nicholas Pipp enger The asymptotic optimality of spiderweb net

works Discrete Applied Mathematics

Po o CK Po on Space b ounds for graph connectivity problems on no de

named JAGs and no deordered JAGs In th Annual Symposium

on Foundations of Computer Science pages Palo Alto CA

Novemb er

Sav W J Savitch Relationships b etween nondeterministic and determin

istic tap e complexities Journal of Computer and System Sciences

Sav W J Savitch Maze recognizing automata and nondeterministic tap e

complexity Journal of Computer and System Sciences

Sze Rob ert Szelep csenyi The metho d of forcing for nondeterministic au

tomata Acta Informatica

Tom Martin Tompa Two familiar transitive closure algorithms which ad

mit no p olynomial time sublinear space implementations SIAM

Journal on Computing February

Yao A C Yao Probabilistic computations Toward a unied measure of

complexity In th Annual Symposium on Foundations of Computer

Science pages Providence RI Octob er IEEE

Yao A C Yao Nearoptimal timespace tradeo for element distinct

ness In th Annual Symposium on Foundations of Computer Sci

ence pages White Plains NY Octob er IEEE