aa r X i v : . [ c s . CC ] M a r Arithmetic Branching Programs withMemory
Stefan Mengel ∗ Institute of MathematicsUniversity of PaderbornD-33098 Paderborn, Germany [email protected]
November 2, 2018
We extend the well known characterization of VP ws as the class of polyno-mials computed by polynomial size arithmetic branching programs to othercomplexity classes. In order to do so we add additional memory to the com-putation of branching programs to make them more expressive. We showthat allowing different types of memory in branching programs increases thecomputational power even for constant width programs. In particular, thisleads to very natural and robust characterizations of VP and VNP by branch-ing programs with memory.
1. Introduction
Arithmetic Branching Programs (ABPs) are a well studied model of computation in al-gebraic complexity: They were already used by Valiant in the
VNP -completeness proofof the permanent [13] and have since then contributed to the understanding of arith-metic circuit complexity (see e.g. [10, 7]). The computational power of ABPs is wellunderstood: They are equivalent to both skew and weakly skew arithmetic circuits andthus capture the determinant, matrix power and other natural problems from linear al-gebra [8]. The complexity of bounded width ABPs is also well understood: In a parallelto Barrington’s Theorem [1], Ben-Or and Cleve [2] proved that polynomial size ABPs ofbounded width are equivalent to arithmetic formulas.We modify ABPs by giving them memory during their computations and ask how thischanges their computational power. There are several different motivations for doing ∗ Partially supported by DFG grants BU 1371/2-2 and BU 1371/3-1.
LOGCFL has been very successful in the studyof this class and has contributed a lot to its understanding. We give a characterizationof VP – a class that is well known for its apparent lack of natural characterizations. Inthe Boolean setting graph connectivity problems on edge-labeled graphs that are similarto our ABPs with stacks have been shown to be complete for LOGCFL [11, 14]. Onemotivation for adapting these results to the arithmetic circuit setting is the hope thatone can apply techniques from the NAuxPDA setting to arithmetic circuits. We showthat this is indeed applicable by presenting an adaption of a proof of Niedermeier andRossmanith [9] to give a straightforward proof of the classical parallelization theoremfor VP first proved by Valiant et al. [12].Another motivation is that our modified branching programs in different settings givevarious very similar characterizations of different arithmetic circuit classes. This allowsus to give a new perspective on problems like VP vs. VP ws , VP vs. VNP that are classicalquestion from arithmetic circuit complexity. This is similar to the motivation thatKintali [6] has for studying similar graph connectivity problems in the Boolean setting.Finally, all modifications we make to ABPs are straightforward and natural. The basicquestion is the following: ABPs are in a certain sense a memoryless model of compu-tation. At each point of time during the computation we do not have any informationabout the history of the computation sofar apart from the state we are in. So whathappens if we allow memory during the computation? Intuitively, the computationalpower should increase, and we will see that it indeed does (under standard complexityassumptions of course). How do different types of memory compare? What is the roleof the width of the branching programs if we allow memory? In the remainder we willanswer several of these questions.The structure of the paper is a follows: After some preliminaries we start off with ABPsthat may use a stack during their computation. We show that they characterize VP ,consider several restrictions and give a proof of the parallelization theorem for VP . Nextwe consider ABPs with random access memory, show that they characterize VNP andconsider some restrictions of them, too.
2. Preliminaries
We briefly recall the relevant definitions from arithmetic circuit complexity. A more thor-ough introduction into arithmetic circuit classes can be found in the book by B¨urgisser [5].Newer insights into the nature of VP and especially VP ws are presented in the excellentpaper of Malod and Portier [8].An arithmetic circuit over a field F is a labeled directed acyclic graph (DAG) consistingof vertices or gates with indegree or fanin 0 or 2. The gates with fanin 0 are called inputgates and are labeled with constants from F or variables X , X , . . . . The gates withfanin 2 are called computation gates and are labeled with × or +.2he polynomial computed by an arithmetic circuit is defined in the obvious way: Aninput gates computes the value of its label, a computation gate computes the productor the sum of its childrens’ values, respectively. We assume that a circuit has only onesink which we call the output gate. We say that the polynomial computed by the circuitis the polynomial computed by the output gate. The size of an arithmetic circuit is thenumber of gates. The depth of a circuit is the length of the longest path from an inputgate to the output gate in the circuit.We also consider circuits in which the +-gates may have unbounded fanin. We callthese circuits semi-unbounded circuits . Observe that in semi-unbounded circuits × -gatesstill have fanin 2. A circuit is called multiplicatively disjoint if for each × -gate v thesubcircuits that have the children of v as output-gates are disjoint. A circuit is called skew , if for all of its × -gates one of the children is an input gate.We call a sequence ( f n ) of multivariate polynomials a family of polynomials or poly-nomial family . We say that a polynomial family is of polynomial degree, if there is aunivariate polynomial p such that deg( f n ) ≤ p ( n ) for each n . VP is the class of polyno-mial families of polynomial degree computed by families of polynomial size arithmeticcircuits. We will use the following well known characterizations of VP : Theorem 2.1. ([12, 8]) Let ( f n ) be a family of polynomials. The following statementsare equivalent:1. ( f n ) ∈ VP ( f n ) is computed by a family of multiplicatively disjoint polynomial size circuits.3. ( f n ) is computed by a family of semi-unbounded circuits of logarithmic depth andpolynomial size. VP e is defined analogously to VP with the circuits restricted to trees. By a classicalresult of Brent [3], VP e equals the class of polynomial families computed by arithmeticcircuits of depth O (log( n )). VP ws is the class of families of polynomials computed by fam-ilies of skew circuits of polynomial size. Finally, a family ( f n ) of polynomials is in VNP ,if there is a family ( g n ) ∈ VP and a polynomial p such that f n ( X ) = P e ∈{ , } p ( n ) g n ( e, X )for all n where X denotes the vector ( X , . . . , X q ( n ) ) for some polynomial q .A polynomial f is called a projection of g (symbol: f ≤ g ), if there are values a i ∈ F ∪ { X , X , . . . } such that f ( X ) = g ( a , . . . , a q ). A family ( f n ) of polynomials is a p -projection of ( g n ) (symbol: ( f n ) ≤ p ( g n )), if there is a polynomial r such that f n ≤ g r ( n ) for all n . As usual we say that ( g n ) is hard for an arithmetic circuit class C if for every( f n ) ∈ C we have ( f n ) ≤ p ( g n ). If further ( g n ) ∈ C we say that ( g n ) is C -complete.The following criterion by Valiant [13] for containment in VNP is often helpful:
Lemma 2.2 (Valiant’s criterion) . Let φ : { , } ∗ → N be a function in P / poly , Thenthe family ( f n ) of polynomials defined by f n = X e ∈{ , } n φ ( e ) n Y i =1 X e i i is in VNP . .2. Arithmetic branching programs The second common model of computation in arithmetic circuit complexity are arith-metic branching programs.
Definition 2.3. An arithmetic branching program (ABP) G is a DAG with two vertices s and t and an edge labeling w : E → F ∪ { X , X , . . . } . A path P = v v . . . v r in G hasthe weight w ( P ) := Q r − i =1 w ( v i v i +1 ). Let v and u be two vertices in G , then we define f v,u = X P w ( P ) , where the sum is over all v - u -paths P . The ABP G computes the polynomial f G = f s,t .The size of G is the number of vertices of G .Malod and Portier proved the following theorem: Theorem 2.4. ([8]) ( f n ) ∈ VP ws , iff ( f n ) is computed by a family of polynomialsize ABPs. Definition 2.5.
An ABP of width k is an ABP in which all vertices are organized intolayers L i , i ∈ N , there are only edges from layer L i to L i +1 and the number of verticesin each layer L i is at most k .The computational power of ABPs of constant width was settled by Ben-Or and Cleve: Theorem 2.6. ([2]) ( f n ) ∈ VP e , iff ( f n ) is computed by a family of polynomial sizeABPs of constant width.
3. Stack branching programs
Let S be a set called symbol set . For a symbol s ∈ S we define two stack operations : push ( s ) and pop ( s ). Additionally we define the stack operation nop without any argu-ments. A sequence of stack operations on S is a sequence op op . . . op r , where either op i = ¯ op i ( s i ) for ¯ op i ∈ { push, pop } and s i ∈ S or op i = nop . Realizable sequences ofstack operations are defined inductively: • The empty sequence is realizable. • If P is a realizable sequence of stack operations, then push ( s ) P pop ( s ) is realizablefor all s ∈ S . Also nop P and P nop are realizable sequences. • If P and Q are realizable sequences of stack operations, then P Q is a realizablesequence. 4 efinition 3.1. A stack branching program (SBP) G is an ABP with an additional edgelabeling σ : E → { op ( s ) | op ∈ { push, pop } , s ∈ S } ∪ { nop } . A path P = v v . . . v r in G has the sequence of stack operations σ ( P ) := σ ( v v ) σ ( v v ) . . . σ ( v r − v r ). If σ ( P ) isrealizable we call P a stack-realizable path . The SBP G computes the polynomial f G = X P w ( P ) , where the sum is over all stack-realizable s - t -paths P .It is helpful to interpret the stack operations as operations on a real stack that happenalong a path through G . On an edge uv with the stack operation σ ( uv ) = push ( s ) wesimply push s onto the stack. If uv has the stack operation σ ( uv ) = pop ( s ) we pop thetop symbol of the stack. If it is s we continue the path, but if it is different from s thepath is not stack realizable and we abort it. nop stands for “no operation” and thusas this name suggests the stack is not changed on edges labelled with nop . Realizablepaths are exactly the paths on which we can go from s to t in this way without abortingwhile starting and ending with an empty stack.To ease notation we sometimes call edges e with σ ( e ) = push ( s ) for an s ∈ S simply push -edges. pop -edges and nop -edges are defined in the obvious analogous way.It will sometimes be convenient to consider only SBPs that have no nop -edges. Thefollowing easy proposition shows that this is not a restriction. Proposition 3.2.
Let G be an SBP of size s . There is an SBP G ′ of size O ( s ) suchthat f G = f G ′ and G ′ does not contain any nop -edges. If G is layered with width k , then G ′ is layered, too, and has width at most k .Proof. The idea of the construction is to subdivide every edge of G . So let G be anSBP with vertex set V and edge set E . Let σ and w be the stack symbol labeling andthe weight function, respectively. G ′ will have the vertex set V ∪ { v e | e ∈ E } , stacksymbol labeling σ ′ and weight function w ′ . The construction goes as follows: For eachedge e = uv ∈ E the SBP G ′ has the edges uv e , v e v . We set w ′ ( uv e ) := w ( uv ) and w ′ ( v e v ) := 1. If e is a nop -edge we set σ ′ ( uv e ) := push ( s ) and σ ′ ( v e v ) = pop ( s ) for anarbitrary stack symbol s . Otherwise, both uv e and v e v get the stack operation σ ( uv ).It is easy to verify that G ′ has all desired properties. In this section we show that stack branching programs of polynomial size characterize VP . Theorem 3.3. ( f n ) ∈ VP , iff ( f n ) is computed by a family of polynomial size SBPs. We the two direction of Theorem 3.3 independently.
Lemma 3.4. If ( f n ) is computed by a family of polynomial size SBPs, then ( f n ) ∈ VP . roof. Let ( G n ) be a family of SBPs computing ( F n ), of size at most p ( n ) for a polyno-mial p . Observe that deg( G n ) ≤ p ( n ), so we only have to show that we can compute the G n by polynomial size circuits C n .Let G = G n be an SBP with m vertices, source s and sink t . The construction of C = C n uses the following basic observation: Every stack-realizable path P of length i between two vertices v and u can be uniquely decomposed in the following way. Thereare vertices a, b, c ∈ V ( G ) and a symbol s ∈ S such that there are edges va and bc with σ ( va ) = push ( s ) and σ ( bc ) = pop ( s ). Furthermore there are stack-realizable paths P ab from a to b and P cu from c to u such that length ( P ab ) + length ( P cu ) = i − P = vaP ab bcP cu . The paths P ab and P cu may be empty. We define w ( u, v, i ) := P P w ( P )where the sum is over all stack-realizable s - t -paths of length i .The values w ( v, u, i ) can be computed efficiently with a straightforward dynamic pro-gramming approach. First observe that w ( v, u, i ) = 0 for odd i . For i = 0 we set w ( v, u,
0) = 0 for v = u and w ( v, v,
0) = 1. For even i > w ( v, u, i ) = X a,b,c,j,s w ( v, a ) w ( a, b, j ) w ( b, c ) w ( c, u, i − j − , where the sum is over all s ∈ S , all j ≤ i − a, b, c such that σ ( va ) = push ( s )and σ ( bc ) = pop ( s ). With this recursion formula we can compute alNote that Kintaliproved a similar result for the Turing machine setting.l w ( v, u, i ) with a polynomial number of arithmetic operations. Having computed all w ( v, u, i ) we get f G = P i ∈ [ m ] w ( s, t, i ).The more involved direction of the proof of Theorem 3.3 will be the second direction.To prove it it will be convenient to slightly relax our model of computation. A relaxedSBP G is an SBP where the underlying directed graph is not necessarily acyclic. Tomake use of cyclicity we do not consider paths in a relaxed SBP G but walks , i.e. verticesand edges of G may be visited several times. Realizable walks are defined completelyanalogously to realizable paths. Also the weight w ( P ) of a walk is defined in the obviousway. Clearly, we cannot define the polynomial computed by a relaxed ABP by summingover the weight of all realizable walks, because there may be infinitely many of themand they may be arbitrarily long. Hence, we define for each pair u, w of vertices and foreach integer m the polynomial f u,v,m := X P w ( P ) , where the sum is over all stack-realizable u - v -walks P in G that have length m . Further-more, we say that for each m the relaxed SBP G computes the polynomial f G,m := f s,t,m .The connection to SBPs is given by the following straight-forward lemma. Lemma 3.5.
Let G be a relaxed SBP and m ∈ N . Then for each m there is an SBP G ′ m of size m | G | that computes f G,m . roof. The idea is to unwind the computation of the relaxed SBP into m layers. Let G = ( V, E, w, σ ), then for each v ∈ V the SBP G ′ has m copies { v , . . . , v m } . For each uv ∈ E the SBP G ′ had the edges u i v i +1 for i ∈ [ m −
1] with weight w ( u i v i +1 ) := w ( uv )and stack operation σ ( u i v i +1 ) := σ ( uv ). This completes the construction of G ′ .Clearly, G ′ indeed computes f G,m and has size m | G | .To prove the characterization of VP we show the following rather technical proposition: Proposition 3.6.
Let C be a multiplicatively disjoint arithmetic circuit. For each v ∈ V we denote by C v the subcircuit of C with output v and we denote by f v the polynomialcomputed by C v . Then there is a relaxed SBP G = ( V, E, w, σ ) of size at most | C | ( | C | +1)+ 3( | C | ) such that for each v ∈ V there is a pair v − , v + ∈ V and an integer m v ≤ | C v | with • f v = f v − ,v + ,m v , and • there is no stack-realizable walk from v − to v + in G that is shorter than m v .Proof. We construct G iteratively along a topological order of C by adding new verticesand edges, starting from the empty relaxed SBP.Let first v be an input of C with label X . We add two new vertices v − , v + to G and the edge v − v + with weigth w ( v − v + ) = X and stack-operation σ ( v − v + ) := nop .Furthermore, m v := 1. Clearly, none of the polynomials computed before change andthe size of the relaxed SBP grows only by 2. Thus all statements of the proposition offulfilled.Let now v be an addition gate with children u, w . By induction G contains vertices u − , u + , w − , w + and there are m u , m v such that f u − ,u + ,m u = f u and f w − ,w + ,m w = f w .Assume w.l.o.g. m u ≥ m w . We add two new vertices v − , v + to G . Furthermore, weadd a directed path of length m u − m w with start vertex v s and end vertex v t to G .We add the edges v − u − , v − v s , v t w − , u + v + and w + v + . All edges we add get weight 1.Furthermore, we set σ ( v − u − ) := push ( vu ), σ ( u + v + ) := pop ( vu ), σ ( v − v s ) := push ( vw )and σ ( w + v + ) := pop ( vw ) for new stack symbols vu and vw . All other edges we addedare nop -edges. Finally, set m v := m u + 2.Let us first check that G computes the correct polynomials. First observe that theedges we added do not allow any new walks between old vertices, so we still compute allold polynomials by induction. Thus we only have to consider the realizable v − - v + -walksof length m v . Each of these either starts with the edge v − u − or the edge v − v s . In thefirst case, because of the stack symbols the walk must end with the edge u + v + . Thus therealizable v − v + -walks of length m v that start with v − u − contribute exactly the sameweight as the realizable u − - u + -walks of length m u which is exactly f u by induction.Moreover, every v − v + -walks of length m v that start with v − v s first makes m u − m w unweighted steps to w − and ends with the edge w + v + . Thus, these walks contributeexactly the same as the stackrealizable w − - w + walks of length m v − − ( m u − m w ) = m w ,so they contribute f w . Combining all walks we get f v − ,v + ,m v = f u + f w = f v as desired.We have m v = m u + 2 ≤ | C u | + 2 ≤ | C v | where the first inequality is by inductionand the second inequality follows from the fact that v is not contained in C u and thus7 C v | > | C u | . To see the bound on | G | let s be the size of G before adding the new edgesand vertices. By induction s ≤ | C v | − | C v | − | C v | − m u − m v + 1 vertices and thus G has now size s + 3 + m u − m v ≤ s + 3 + m u .But we have m u ≤ | C u | ≤ | C v | and thus the number of vertices in G is at most2( | C v | − | C v | + 3( | C v | −
1) + 3 + 4 | C v | ≤ | C | ( | C | + 1) + 3( | C v | ). This completes thecase that v is an addition gate.Let now v be a multiplication gate with children u, w . As before, G already contains u − , u + , w − , w + and there are m u , m v with the desired properties. We add three vertices v − , v + and v i and the edges v − u − , u + v i , v i w − and w + v + all with weight 1. The newedges have the stack symbols σ ( v − u − ) := push ( vu ), σ ( u + v i ) := pop ( vu ), σ ( v i w − ) := push ( vw ) and σ ( w + v + ) := pop ( vw ) for new stack symbols vu and vw . Finally, set m v := m u + m w + 4.Clearly, no stack-realizable walk between any pair of old vertices can traverse v − , v + or v i and thus these walks still compute the same polynomials as before. Thuswe only have to analyse the v − - v + -walks of length m v in G . Let P be such a walk.Because of the stack symbols vu and vw the walk P must have the structure P = v − u − P u + v i w − P w + v + where P and P are a stack-realizable u − - u + -walk and a stack-realizable w − - w + -walk, respectively. The walk P is of length m v and thus P and P must have the combined length m u + m w . But by induction P must at least have length m u and P must have at least length m w , so it follows that P has length exactly m u and P has length exactly m w . The walks P and P are independent and thus we have f v − ,v + ,m v = f u − ,u + ,m u f w − ,w + ,m w = f u f w as desired.The circuit C is multiplicatively disjoint and thus we have | C v | = | C u | + | C w | + 1. Itfollows that m v = m u + m w + 4 ≤ | C u | + 4 | C w | + 4 = 4 | C v | where we get the inequalityby induction. The relaxed SBP grows only by 3 vertices which gives the bound on thesize of G . This completes the proof for the case that v is an addition gate and hence theproof of the lemma.Now the second direction of Theorem 3.3 is straight-forward. Lemma 3.7.
Every family ( f n ) ∈ VP can be computed by a family of SBPs of polynomialsize.Proof. Given a family ( C n ) of multiplicatively disjoint arithmetic circuits of polynomialsize, first turn them into relaxed SBPs of polynomial size and polynomial m with Propo-sition 3.6 and then turn those relaxed SBPs into SBPs with Lemma 3.5. It is easy tocheck that the resulting SBPs have polynomial size. It is easy to see, that the number of symbols used in SBPs can be lowered to 2 withoutloss of computational power and with only logarithmic overhead in the size (see alsoSection 3.4. Therefore the only meaningful restriction of the size of the symbol setis the restriction to a set only consisting of one single symbol. The following fairlystraightforward lemma shows that doing so indeed decreases the computational power.Note that Kintali proved a similar result for the Turing machine setting.8 emma 3.8. ( f n ) ∈ VP ws if and only if it can be computed by polynomial size SBPswith one stack symbol.Proof. The direction from left to right is easy: Simply interpret each edge e of an ABP G as a nop -edge.For the other direction the key insight is that if one has only one stack symbol oneonly has to keep track of the size of the stack at any point in the path. But this heightcan be encoded by vertices of an ABP. So let G be a SBP of size m . It is clear that thestack cannot be higher than m on any path through G . We construct an ABP G ′ thathas for every vertex v in G the m + 1 vertices v , v , . . . v m . If vu is a push -edge in G ,we connect v i to u i +1 for i = 0 , . . . , m − G ′ . If vu is a pop -edge in G , we add v i u i − for i = 1 , . . . , m to G ′ . All these edges get the same weight as vu in the G . It is easy tosee that every stack-realizable path P in the SBP G corresponds directly to a path P ′ in the ABP G ′ and P and P ′ have the same weight. Thus G and G ′ compute the samepolynomial. Moreover, | G ′ | = ( m + 1) | G | which completes the proof. In this section we show that unlike for ordinary ABPs bounding the width of SBPsdoes not decrease the computational power: Polynomial size SBPs with at least 2 stacksymbols and width 2 can still compute every family in VP . Lemma 3.9.
Every family ( f n ) ∈ VP can be computed by a SBP of width with thestack symbol set { , } .Proof. The idea of the proof is to start from the characterization of VP by SBPs fromTheorem 3.3. We use the stack to remember which edge will be used next on a realizablepath through the branching program. We will show how this can be done with width 2SBPs with a bigger stack symbol size. In a second step we will seee how to reduce thestack symbol set to { , } .So let ( G n ) be a family of SBPs. Fix n and let G := G n with vertex set V and edgeset E . Furthermore, let w be the weight function, σ the stack operation labeling and S the stack symbol of G . Let s and t be the source and the sink of the SBP G . We assumewithout loss of generality that s has one single outgoing edge e s . Furthermore t is onlyentered by one nop -edge e t with weight 1. We will construct a new SBP G ′ with weightfunction w ′ and stack operation labeling σ ′ . G ′ will have stack symbol set S ∪ E . Foreach edge e with a successor edge e ′ the SBP G ′ contains a gadget G e,e ′ . The vertex setof G e,e ′ is { v e,e ′ , v e,e ′ , v e,e ′ , v e,e ′ , v e,e ′ , v e,e ′ } . These vertices are connected to a DAG bythe edges { v e,e ′ v e,e ′ , v e,e ′ v e,e ′ , v e,e ′ v e,e ′ , v e,e ′ v e,e ′ , v e,e ′ v e,e ′ , v e,e ′ v e,e ′ } . All these edges haveweight 1 except for v e,e ′ v e,e ′ for which we set w ′ ( v e,e ′ v e,e ′ ) := w ( e ). We call v e,e ′ v e,e ′ the weighted edge of G e,e ′ . Furthermore we set σ ( v e,e ′ v e,e ′ ) := pop ( e ), σ ( v e,e ′ v e,e ′ ) := σ ( e ), σ ( v e,e ′ v e,e ′ ) := push ( e ′ ). All other edges are nop -edges. The construction of G e,e ′ isillustrated in Figure 1.Now choose an order ≤ E of E such that for each pair uv, vw ∈ E , the edge uv comesbefore vw . This order can be iteratively constructed from a topological order ≤ V of V :9 e,e ′ v e,e ′ v e,e ′ v e,e ′ v e,e ′ v e,e ′ pop ( e ) w ( e ) /σ ( e ) push ( e ′ )Figure 1: The gadget G e,e ′ . We illustrate only the weight of the weighted edges. Alledges without stack operation label are nop -edges.For each vertex v along ≤ V iteratively add the edges entering v to ≤ E as the newmaximum. From ≤ E we construct an order ≤ G of the gadgets G e,e ′ by defining G e ,e ≤ G G e ,e ↔ e < e ∨ ( e = e ∧ e < e ) . We now connect the gadgets along the order ≤ G in the following way: Let G e ,e and G e ,e be two successors in ≤ G . We connect v e ,e to v e ,e by a nop -edge of weight 1.Let G e,e ′ be the minimum of ≤ G . We add a new vertex s and the edge sv e,e ′ with weigth1 and stack opeation σ ( sv e,e ′ ) := push ( e s ) where e s is the single outgoing edge of s in G . Let now G e,e ′ be the maximum gadget in ≤ G . We add a new vertex t and the edge v e,e ′ t with weight 1 and stack operation pop ( e t ). This concludes the construction of G ′ .It is easy to see that G ′ has indeed width 2. Thus we only need to show that G and G ′ compute the same polynomial. This will follow directly from the following claim: Claim 3.10.
There is a bijection π between the stack-realizable paths in G and G ′ .Furthermore w ( P ) := w ′ ( π ( P )) for each stack-realizable path in G .Proof. Clearly every s - t -path must traverse all gadgets in G ′ . Furthermore, whenever agadget is entered, the stack contains only one symbol from E which lies at the top ofthe stack. Through each gadget G e,e ′ there are exactly the two paths v e,e ′ v e,e ′ v e,e ′ v e,e ′ and v e,e ′ v e,e ′ v e,e ′ v e,e ′ . We call the former the weighted path through G e,e ′ . For a stack-realizable s - t -path P = e e . . . e k through G we define π ( P ) to be the unique paththrough G ′ that takes the weighted path through exactly the gadgets G e i ,e i +1 for i =1 , . . . , k = 1. We have w ( P ) := w ′ ( π ( P )) with this definition, because only the weightededges in the gadgets have a weight different from 1 in G ′ . So it suffices to show that π is indeed a bijection.We first show that π maps stack-realizable paths in G to stack-realizable paths in G ′ .So let P be as before. Observe that π ( P ) traverses the gadgets G e i ,e i +1 in the sameorder as P traverses the edges e i . Furthermore, whenever π ( P ) enters a gadget G e i ,e i +1 the top stack symbol is e i and the rest of the stack content is exactly that on P beforetraversing e i . When leaving G e i ,e i +1 the stack content is that after traversing e i on P e i +1 on the top. Thus all stack operations along π ( P ) mustbe legal and the stack is empty after traversing the last edge towards t . Thus π ( P ) isindeed stack-realizable.Clearly, π is injective, so to complete the proof of the claim we only need to show thatit is surjective. So let P ′ be a stack-realizable s - t -path in G ′ . Let G e ,e ′ , . . . , G e k ,e ′ k bethe gadgets in which P ′ takes the weighted path in the order in which they are visited.We claim that e s e . . . e k is a stack-realizable s - t -path. Clearly, s is the first vertex of P . Also in P ′ the symbol e t is popped in the last step by construction of G ′ , so thelast gadget in which P ′ took a weighted path must be one of the form G e,e t , becauseotherwise e t cannot be the top symbol on the stack before the last step. Thus t is thelast vertex of P .To see that P is a path, observe that we have e ′ i = e i +1 . Otherwise P cannot havethe right top symbol when taking the weighted path in G e i +1 ,e ′ i +1 . Thus e i +1 must be asuccessor of e i in G and P is an s - t -path.To see that P is stack-realizable observe that when P ′ traverses the weighted edgeof a gadget G e i ,e ′ i it has the same stack content as when P traverses e i in G . So P isobviously stack-realizable because P ′ is.Observing that obviously w ( P ) = P ′ by construction completes the proof.In a final step we now reduce the stack symbol size to { , } in a straightforward way.Let ℓ := ⌈ log( | S ∪ E | ) ⌉ , then each stack symbol s can be encoded into a { , } -string µ ( s ) of length ℓ . Now we substitute each edge e of G ′ by a path P e of length ℓ . If σ ′ ( e ) = push ( s ) we the edges along P e are push -edges, too, that push µ ( e ) onto thestack. If σ ′ ( e ) = pop ( s ) we pop µ ( s ) in reverse order along P e . If e is a nop -edge, alledges of P e are nop -edges, too. Finally, we give one of the edges in P e the weight w ′ ( e ),while all other edges get weight 1. Doing this for all edges, it is easy to see that theresulting SBP computes the same polynomial as G ′ . Furthermore, its width is 2. In this section we show that the characerization of VP by SBPs allows us to directlyuse results from counting complexity that rely on NAuxPDAs. We demonstrate this byadapting a proof by Niedermeier and Rossmanith [9] to reprove the classical paralleliza-tion theorem for VP originally proved by Valiant et al. [12]. While neither the resultnor the proof technique is new in itself, we argue that the use of applying the techniquesusing SBPs results in a proof that is arguably more transparent than any other proof ofthis classical theorem that we know. This raises our hopes that the SBP characterizationof VP may be helpful in the future.We now start presenting the ideas of Niedermeier and Rossmanith in detail. Thebasic idea is the following: The realizable paths are recursively cut into subpaths andthe polynomials are then computed by combining the polynomials of the subpaths. Inorder to reach logarithmic depth we have to make sure that the paths are cut in pathsof approximately equal length to result in a balanced computation. This is complicated11y that fact that the paths have to be realizable, so we have to account for the contentof the stack during the computation.We now give the details of the construction. Let G be an SBP and let P be a realizablepath in G from a to b . Let c be a vertex on P , then the stack height of P in c is thenumber of push -edges minus the number of pop -edges on P from a up to c . Similarly toNiedermeier and Rossmanith we give to a path P a description ( a, b, i ), where a is thestart vertex, b the end vertex and i the length of P .We define a relation ⊢ on paths in order to decompose them. Let P be a path withrealizable subpaths P and P and let these three paths have the descriptions ( a, b, i ),( c, d, j ) and ( e, b, k ). Then we write P , P ⊢ P iff • the stack height of P on e is 0 • there is an s ∈ S such that σ ( ac ) = push ( s ) and σ ( de ) = pop ( s ) and • j + k = i − Lemma 3.11.
Let P be a path with description ( a, b, i ) and i ≥ . Then there ex-ist uniquely described subpaths P , P and P with descriptions ( c, d, i ) , ( e, f, i ) and ( g, d, i ) with i , i ≤ i/ < i such that P , P ⊢ P . Lemma 3.11 allows us to cut a path P into three parts P , P and P − P . Noneof these parts is too big, but we cannot iterate this procedure, because unfortunately P − P is not a path because it has a “gap” from c to d . To remedy the situationNiedermeier and Rossmanith formalize this notion of a path with gap in the followingway: A path with gap with description ( a, ( c, d, j ) , b, i ) consists of two paths, one from a to c and one from d to b , where i and j with i ≥ j are even natural numbers. P isrealizable, if identifying c and d results in a realizable path of length i − j . Observe that P with description ( a, ( c, d, i ) , b, i ) is realizable if and only if a = c and b = d , i.e. thepath consists only of a gap.We now extend the relation ⊢ to paths with gaps. This is complicated a little by thefact that the gap can lie in either of the two subpaths that we want to split a path withgap into. So let P be a path with gap and description ( a, ( c, d, j ) , b, i ). For the first caselet P be a subpath with gap and description ( e, ( c, d, j ) , f, k ) and P be a subpath withdescription ( g, b, l ). For the second case let P be a subpath with description ( e, f, k )and P a subpath with gap and description ( g, ( c, d, j ) , b, l ). Then we write P , P ⊢ P if and only if the stack height g is 0, there is an s ∈ S such that σ ( ac ) = push ( s ) and σ ( de ) = pop ( s ) and k + l = i −
2. Observe that if c = d and j = 0 this definition coincideswith the definition on paths without gap.Niedermeier and Rossmanith give a version of Lemma 3.11 for paths with gap. Lemma 3.12.
Let ( a, ( c, d, j ) , b, i ) with i − j ≥ be a realizable path with gap. Thenthere exist uniquely determined paths P , P and P such that P has the description ( e, ( c, d, j ) , f, i ) , P , P ⊢ P and either . P has the description ( g, ( c, d, j ) , h, i ) and P has the description ( k, f, i ) suchthat i − j ≤ ( i − j ) / < i − j or2. P has the description ( g, h, i ) and P has the description ( k, ( c, d, j ) , f, i ) suchthat i − j ≤ ( i − j ) / < i − j . Let P be a realizable path with gap with description ( a, ( c, d, j ) , b, i ). Then we defineits weight w ( P ) := w ( P ′ ) where P ′ is the realizable path we get from P when weidentify c and d . Let w ( a, b, i ) := P P w ( P ) where the sum is over all realizable pathswith description ( a, b, i ). Furthermore, w ( a, ( c, d, j ) , b, i ) := P P w ( P ) where the sum isover all realizable paths with gap with description ( a, ( c, d, j ) , b, i ). With these definitionsand the Lemmas 3.11 and 3.12 we get the following Lemma: Lemma 3.13. a) w ( a, b, i ) = X w ( a, ( c, d, j ) , b, i ) w ( e, f, i ) w ( g, d, i ) w ( ce ) w ( f g ) where the sum is over all c, d, e, f, g ∈ V ( G ) such that there is an s with σ ( ce ) = push ( s ) and σ ( f g ) = pop ( s ) and all even numbers j, i , i with i , i ≤ i/ < j and i + i = j − .b) w ( a, ( c, d, j ) , b, i )= X w ( a, ( c , d , j ) , b, i ) w ( e, ( c, d, j ) , f, i ) w ( g, d , i ) w ( c e ) w ( f g )+ X w ( a, ( c , d , j ) , b, i ) w ( e, f, i ) w ( g, ( c, d, j ) , d , i ) w ( c e ) w ( f g ) where both sums are over all c , d , e, f, g ∈ V ( G ) such that there is an s with σ ( c e ) = push ( s ) and σ ( f g ) = pop ( s ) . The first sum is also over all even numbers j , i , i with i − j ≤ ( i − j ) / < j − j and i + i = j − , while the second sum isover all even numbers j , i , i with i − j ≤ ( i − j ) / < j − j and i + i = j − .Proof. (Sketch) For a) oberve that the decomposition of Lemma 3.11 is unique. So wesum the weight of every path from a to b of length i exactly once. For b) use Lemma3.12 for the same argument.The following Lemma is now easy to see: Lemma 3.14.
Let G be an SBP. Then f G can be computed by a semi-unbounded circuitof depth O (log( | G | )) and size | G | O (1) . Combined with Theorem 3.3 we get the parallelization Lemma by Valiant et al. [12].
Corollary 3.15.
Let ( f n ) ∈ VP . Then ( f n ) can be computed by a family of semi-unbounded circuits of polynomial size and logarithmic depth in n . . Random access memory We change the model of computation by allowing random access memory instead of astack. We still work over a symbol set S like for SBPs but we introduce three randomaccess memory operations : The operation write and delete take an argument s ∈ S whilethe operation nop again takes no argument. Let op ( s ) be a random access memory oper-ation with op ∈ { write, delete } and P = op op . . . op r a sequence of memory operations.With occ ( P, op ( s )) we denote the number of occurences of op ( s ) in P . We call a sequence P realizable if for all symbols s ∈ S we have that occ ( P, write ( s )) = occ ( P, delete ( s ))and for all prefixes P ′ of P we have occ ( P ′ , write ( s )) ≥ occ ( P ′ , delete ( s )) for all s ∈ S .Intuitively the random access memory operations do the following: write ( s ) writesthe symbol s into the random access memory. If s is already there it adds it anothertime. delete ( s ) deletes one occurence of the symbol s from the memory if there is one.Otherwise an error occurs. nop is the “no operation” operation again like for SBPs. Asequence of operations is realizable if no error occurs during the deletions and startingfrom empty memory the memory is empty again after the sequence of operations. Definition 4.1. A random access branching program (RABP) G is an ABP with anadditional edge labeling σ : E → { op ( s ) | op ∈ { write, delete } , s ∈ S } ∪ { nop } . A path P = v v . . . v r in G has the sequence of random access memory operations σ ( P ) := σ ( v v ) σ ( v v ) . . . σ ( v r − v r ). If σ ( P ) is realizable we call P a random-access-realizablepath . The RABP G computes the polynomial f G = X P w ( P ) , where the sum is over all random-access-realizable s - t -paths P .In a completely analogous way to Proposition 3.2 we can proof that disallowing nop -edges does not change the computational power of RABPs. Proposition 4.2.
Let G be an RABP of size s . There is an SBP G ′ of size O ( s ) suchthat f G = f G ′ and G ′ does not contain any nop -edges. If G is layered with width k , then G ′ is layered, too, and has width at most k . Intuitively random access on the memory allows us more fine-grained control over thepaths in the branching program that contribute to the computation. While in SBPsnearly all of the memory content is hidden, in RABPs we have access to the completememory at all times. This makes RABPs more expressive than SBPs which is formalizedin the following theorem.
Theorem 4.3. ( f n ) ∈ VNP if and only if there is a family of polynomial size RABPscomputing ( f n ) . Lemma 4.4. If ( f n ) is computed by a family of polynomial size RABPs, then ( f n ) ∈ VNP .Proof.
This is easy to see with Valiant’s criterion (Lemma 2.2) and the fact that checkingif a path through a RABP is realizable is certainly in P .We will now show the lower bound of Theorem 4.3. We will prove it directly forbounded width RABPs. To do so we consider the following dominating-set polynomialfor a graph G = ( V, E ): DSP G ( X , . . . , X n ) := X D Y v ∈ D X v , where the sum is over all dominating sets D in G .In Appendix A we show that the is a family ( G n ) of graphs such that the resultingfamily ( DSP G n ) of polynomials is VNP -complete.
Lemma 4.5.
For each family ( f n ) ∈ VNP there is a family of width RABPs of poly-nomial size computing ( f n ) .Proof. We will show that for a graph G = ( V, E ) with n vertices there is a RABP of size n O (1) and width 2 that computes DSP G ( X , . . . , X n ). The RABP works in two stages.The symbol set of the RABP will be V . In a first stage it iteratively selects vertices v and writes v and all of its neightbors into the memory. In a second stage it checksthat each vertex v was written at least once into the memory, i.e., either v or one of itsneighbors was chosen in the first phase. Thus the set of chosen vertices must have beena dominating set.So fix a graph G . For each vertex v with neighbors v , . . . , v k we construct a gadget G v as shown in Figure 2. We call the path through G v with the edges that have memoryoperations the choosing path . Now for each vertex v we construct a second gadget G ′ v that is shown in Figure 3. Choose an order on the vertices. For each non-maximal vertex v in the order with successor u , we connect the sink of G v to the source of G u and thesink of G ′ v to the source of G ′ u with a nop -edge of weight 1. Finally, let x be the maximalvertex in the order and y the minimal vertex. Connect the sink of G x to the source of G ′ y again by a nop -edge of weight 1.We claim that G ′ computes DSP G . To see this, define the weight of a vertex set D in G to be w ( S ) := Q v ∈ S X v . The following claim completes the proof. Claim 4.6.
There is a bijection π between dominating sets in G and RA-realizing pathsin G ′ such that for each dominating set D in G we have w ( D ) := w ( π ( D )) .Proof. Observe that for RA-realizing paths through G ′ once the path through the gadgets G v is chosen, then rest of the path is fixed. So each RA-realizing path P can be describedcompletely by the v for which the choosing paths through G v is taken.15 v x , v x , v x , v x , v x d, v x d, v x d +1 v write ( v ) /X v write ( v ) write ( v d ) Figure 2: The gadget G v . Let v be a vertex with neighbors v , . . . , v d . The weight of x v x , v is X v while all other edges have weight 1. G v has two paths. Ev-ery realizable path that traverses G v on the upper path writes v and all ofits neightbors into the memory. This path has weight X v . Realizable pathsthrough the upper path do not change the memory in G v and have a weightweight contribution of 1 in G v . x v x v x , v x , v x , v x , v x d +1 , v x d +1 , v x d +2 v delete ( v ) delete ( v ) delete ( v ) Figure 3: The gadget G ′ v . Let d be the degree of v , then G ′ v has d + 3 layers. All edgeshave weight 1. The edges connecting vertices in the lower level have operation delete ( v ) while all other edges have no memory operation. Every realizablepath through G ′ v has weight 1 and deletes between 1 and d + 1 occurences ofthe symbol v from memory.Let D be a dominating set. Let P be the set of s - t -paths in G ′ that for each v ∈ D take the choosing path through G v and for each G ′ take the other path. Because D isdominating, after a path P ∈ P has passed through the gadgets G v , it contains eachsymbol v ∈ V at least once. Thus there is a unique path in P that is RA-realizing. Callthis path π ( D ).Obviously, π is injective. To show that it is surjective, too, consider an RA-realizablepath P in G ′ . Let D be the set of V ∈ V for which P takes the choosing path. Thepath P passes every gadget G ′ v , so each element v ∈ V gets deleted from the memory atleast once. It follows that each v ∈ V must have been written to memory at least oncebefore. So for v ∈ V the path P must go through G v or through G u for a neighbor u of v . It follows that D is a dominating set. Furthermore, π ( D ) = P , so π is surjective.Finally, w ( D ) := w ( π ( D )) is true, because the only weighted edges in G ′ are in thegadgets G v and for each v the weighted edge in G v has the weight X v .16bserving that G ′ has width 2, completes the proof. Acknowledgements:
The author would like to thank S´ebastien Tavenas for pointingout an error in an earlier proof of Lemma 3.7. The corrected proof presented in this paperis the result of discussions with him and Pascal Koiran. The author is very thankfulfor this contribution. Furthermore, the author is grateful to Guillaume Malod who gavevery helpful feedback on a draft of this paper. Finally, the author would like to thankPeter B¨urgisser and Meena Mahajan for encouraging him to write up these results as apaper.
References [1] D.A. Barrington. Bounded-width polynomial-size branching programs recognize ex-actly those languages in NC1.
Journal of Computer and System Sciences , 38(1):150–164, 1989.[2] Michael Ben-Or and Richard Cleve. Computing algebraic formulas using a constantnumber of registers.
SIAM J. Comput. , 21(1):54–58, 1992.[3] R.P. Brent. The complexity of multiple-precision arithmetic. In R P Brent R S An-dersson, editor,
The Complexity of Computational Problem Solving , pages 126–165.Univ. of Queensland Press, 1976.[4] I. Briquel and P. Koiran. A dichotomy theorem for polynomial evaluation.
Mathe-matical Foundations of Computer Science 2009 , pages 187–198, 2009.[5] Peter B¨urgisser.
Completeness and reduction in algebraic complexity theory .Springer Verlag, 2000.[6] Shiva Kintali. Realizable paths and the nl vs l problem.
Electronic Colloquium onComputational Complexity (ECCC) , 17:158, 2010.[7] Pascal Koiran. Arithmetic circuits: The chasm at depth four gets wider.
Theor.Comput. Sci. , 448:56–65, 2012.[8] Guillaume Malod and Natacha Portier. Characterizing Valiant’s algebraic complex-ity classes.
J. Complexity , 24(1):16–38, 2008.[9] R. Niedermeier and P. Rossmanith. Unambiguous auxiliary pushdown automataand semi-unbounded fan-in circuits.
Information and Computation , 118(2):227–245, 1995.[10] N. Nisan. Lower bounds for non-commutative computation. In
Proceedings of thetwenty-third annual ACM symposium on Theory of computing , page 418. ACM,1991. 1711] Sven Skyum and Leslie G. Valiant. A complexity theory based on boolean algebra.
J. ACM , 32(2):484–502, 1985.[12] Leslie G. Valiant, Sven Skyum, S. Berkowitz, and Charles Rackoff. Fast parallelcomputation of polynomials using few processors.
SIAM J. Comput. , 12(4):641–644,1983.[13] L.G. Valiant. Completeness classes in algebra. In
Proceedings of the eleventh annualACM symposium on Theory of computing , pages 249–261. ACM, 1979.[14] Volker Weber and Thomas Schwentick. Dynamic complexity theory revisited.
The-ory Comput. Syst. , 40(4):355–377, 2007.
A. VNP-completeness of the dominating-set polynomial
In this appendix we show that there is a family of graphs such that the the polynomialfamily (
DSP G n := P D Q v ∈ D X v ) is VNP -complete. With Valiant’s criterion (Lemma2.2) containment in
VNP is clear.For hardness we will reduce from the polynomial
V CP G = P S Q v ∈ S X v where thesum is over all vertex covers S of G . This polynomial was introduced by Briquel andKoiran [4] who showed the following hardness result: Lemma A.1 ([4]) . There exists a family G n of polynomial size graphs such that ( V CP G n ) is VNP -complete.
With Lemma A.1 it suffices to show that for every graph G there is a graph G ′ of sizepolynomial in the size of G such that V CP G ≤ DSP G ′ . So let G = ( V, E ) be a graph. We construct G ′ by adding for each e = uv ∈ e a vertex v e and the edges uv e and vv e . Every dominating set D of G ′ must contain v e or one of u, v . Thus D is either a vertex cover of G or it contains a vertex v e for an e ∈ E . Setting X v e := 0 one gets V CP G as the projection of DSP G ′′