Computational Complexity of Biased Diffusion Limited Aggregation
CCOMPUTATIONAL COMPLEXITY OF BIASEDDIFFUSION-LIMITED AGGREGATION ∗ NICOLAS BITAR † , ERIC GOLES ‡ , AND
PEDRO MONTEALEGRE ‡ Abstract.
Diffusion-Limited Aggregation (DLA) is a cluster growth model that consists in a setof particles that are sequentially aggregated over a two-dimensional grid. In this paper, we introducea biased version of the DLA model, in which particles are limited to move in a subset of possibledirections. We denote k -DLA the model where the particles move only in k possible directions.We study the biased DLA model from the perspective of Computational Complexity, defining twodecision problems The first problem is Prediction , whose input is a site of the grid c and a sequence S of walks, representing the trajectories of a set of particles. The question is whether a particlestops at site c when sequence S is realized. The second problem is Realization , where the inputis a set of positions of the grid, P . The question is whether there exists a sequence S that realizes P , i.e. all particles of S exactly occupy the positions in P . Our aim is to classify the Prediciton and
Realization problems for the different versions of DLA. We first show that
Prediction is P -Complete for 2-DLA (thus for 3-DLA). Later, we show that Prediction can be solved much moreefficiently for 1DLA. In fact, we show that in that case the problem is NL -Complete. With respectto Realization , we show that restricted to 2DLA the problem is in P , while for 1DLA is in L . Key words.
Diffusion-Limited Aggregation, Computational Complexity, Space Complexity,NL-Completeness, P-Completeness
AMS subject classifications.
1. Introduction.
Diffusion-Limited Aggregation (DLA) is a kinetic model forcluster growth, first described by Witten and Sander [26], which consists of an ide-alization of the way dendrites or dust particles form, where the rate-limiting step isthe diffusion of matter to the cluster. The original DLA model consists of a series ofparticles that are thrown one by one from the top edge of a two (or more) dimensionalgrid. The sites in the grid can either be occupied or empty. Initially all the sites in thegrid are empty, except for the bottom line which begins and remains occupied. Eachparticle follows a random walk in the grid, starting from a random position in the topedge, until it neighbors an occupied site, or the particle escapes from the top edge orone of the lateral edges. In case the particle finds itself neighboring an occupied site,the current position of the particle becomes occupied and the next particle is thrown.The set of occupied sites is called a cluster .Clusters generated by the dynamics are highly intricate and fractal-like (see Figure1); they have been shown to exhibit the properties of scale invariance and multifrac-tality [12, 17]. DLA clusters have been observed to appear in phenomena such aselectrodeposition, dielectrics and ion beam microscopy [7, 21, 22]. Nevertheless, per-haps the fundamental aspect of DLA is its profound connection to Hele-Shaw flow: ithas been shown that DLA is its stochastic counterpart [9, 13]. ∗ Submitted to the editors September 2, 2019. † Departamento de Ingenier´ıa Matem´atica, Universidad de Chile, Santiago, Chile([email protected]). Supported in part by CONICYT-PFCHA/Mag´ısterNacional/2019 -22190497. ‡ Facultad de Ingenier´ıa y Ciencias, Universidad Adolfo Ib´a˜nez, Santiago, Chile ([email protected],[email protected]). 1 a r X i v : . [ c s . D M ] A ug N. BITAR, E. GOLES, P. MONTEALEGRE
Fig. 1 . A realization of the dynamics for a × grid. In this article we study restricted versions of DLA , which consist in the limitationof the directions a particle is allowed to move within the grid. We ask what wouldbe the consequences of restricting the particles movement in terms of computationalcomplexity. More precisely, we consider four models, parameterized by k ∈ { , , , } .The 4-DLA model is simply the two-dimensional DLA model, i.e. when the particlescan move in the 4 cardinal directions. The 3-DLA model is the DLA model when theparticles can only move into the South, East or West direction. In the 2-DLA model,the directions are restricted to the South and East. Finally, in the 1-DLA model, theparticles can only move downwards.Even though the particles have restricted movement, it is possible to notice thatthe fractal-like structures are still present in the clusters obtained by the restrictedDLA (see Figure 2).It is interesting to note that, in fact, the 1-DLA model is a particular case ofanother computational model created to described processes in statistical physics,that of the Ballistic Deposition Model. In this model, there is a graph and a set ofparticles that are thrown into the vertices at some fixed initial height h . The heightof the particle decreases in one unit at a time, until it reaches the bottom (height 0or meets another particle, i.e. there is a particle in an adjacent vertex at the sameheight, or in the same vertex just behind. The 1-DLA model corresponds to the Bal-listic Deposition model when the graph is an undirected path. OMPUTATIONAL COMPLEXITY OF BIASED DLA Fig. 2 . DLA simulation for four (top left), three (top right), two (bottom left) and one (bottomright) directions, when N = 100 . Due to the generated cluster’s properties, theoretical approaches to the DLAmodel are usually in the realm of fractal analysis, renormalization techniques andconformal representations [5]. In this article we consider a perhaps unusual approachto study the DLA model (and its restricted versions), related with its computationalcapabilities, the difficulty of simulating their dynamic, and the possibility of character-izing the patterns they produce. Machta and Greenlaw studied, within the frameworkof computational complexity theory, the difficulty of computing whether a given siteon the grid becomes occupied after the dynamics have taken place, i.e. all the parti-cles have stuck to the cluster or have been discarded [15]. Inspired by their work, weconsider two decision problems: • DLA-Prediction , which receives a the sequence of trajectories for n parti-cles (i.e. the trajectories are deterministic and explicit) and the coordinatesof a site in the lattice as input. The question is whether the given coordinateis occupied by a particle after the n particles are thrown. • DLA-Realization , which receives a pattern of size n × n in the grid asinput, and whose question is whether that pattern can be produced by theDLA model.For each k ∈ { , , } we call k - DLA-Prediction and k - DLA-Realization ,respectively, the problems
DLA-Prediction and
DLA-Realization restricted to k -DLA model. N. BITAR, E. GOLES, P. MONTEALEGRE
The computational complexity of a problem can be defined as the amount ofresources, like time or space, needed to computationally solve it. Intuitively, the com-plexity of
DLA-Prediction represent how efficiently (in terms of computationalresources) we are able to simulate the the dynamics of DLA. On the other hand, thecomplexity of
DLA-Realization represent how complex are the patterns producedby DLA model.We consider four fundamental complexity classes: L , P , NL and NP . Classes L and P contain the problems that can be solved in a deterministic Turing machinethat use logarithmic space and take polynomial time , respectively. On the other hand NL and NP are the classes of problems that can be solved in a non-deterministic Turing machine that use logarithmic space and take polynomial time , respectively.For detailed definitions and characterizations of these classes we recommend the bookof Arora and Barak [2]. A convention between computer theorists states that P isthe class of problems that can be solved efficiently with respect to computation time.In that context, NP can be characterized as the classes of problems that can be ef-ficiently verified with respect to computation time. Similarly, the same conventionshold for L and NL changing computation time for space.It is easy to see that L ⊆ NL ⊆ P ⊆ NP , though it is unknown if any of theseinclusions is proper. Perhaps the most famous conjecture in Computational Com-plexity theory is if P (cid:54) = NP . Put simply, this conjecture states that there are someproblems whose solution can be efficiently verified but can not be efficiently found.As mentioned in last paragraph, in this context efficiently means polynomial time.Similarly, it is conjectured that L (cid:54) = NL , where in this case efficiently refers to loga-rithmic space. It is also conjectured that NL (cid:54) = P , meaning that some problems canbe computed efficiently with respect to computation time, but can not be verified (orcomputed) efficiently with respect to space [2].The problems in P that are the most likely to not belong to NL (hence not in L )are the P -Complete problems [11]. A problem is P -Complete if any other problemin P can be reduced to it via a log-space reduction , i.e. a function calculable in log-arithmic space that takes yes -instances of one problem into the other. In a nutshell,it is unlikely that some P -Complete problem belongs to NL , because in that case wewould have that NL = P . Similarly a problem is NL -Complete if any problem in NL can be reduced to it via a L reduction. NL -Complete problems are problems in NL that are the most likely to not belong to L , because if some NL -Complete problemwere to belong in L , it would imply that NL = L [2].One P -Complete problem is the Circuit Value Problem (CVP) , which con-sists in, given a Boolean circuit and an truth-assignment of its input gates, computethe output value of a given gate. Roughly, this problem is unlikely to be solvable(or verifiable) in logarithmic space because there is no better algorithm than sim-ply sequentially compute truth values of each gate of the Boolean circuit, keepingin memory the values of all gates already evaluated. One NL -Complete problem is Reachability , which consists in, given a directed graph G and two vertices s and t ,decide if there is a directed path between s and t . Roughly, this problem is unlikelyto be solvable in logarithmic space because there is no way to remember all pathsstarting from s that do not reach t . OMPUTATIONAL COMPLEXITY OF BIASED DLA
DLA-Prediction is P -Complete. The proof of this fact consists of reducing to it a versionof the Circuit Value Problem, which is known to be P -Complete [11]. Within thisproof, we noticed that the gadgets used to simulate the circuits rely heavily on thefact that in the DLA model, particles are free to move in any of the four cardinaldirections. On the other hand, in the context of the study of the Ballistic depositionmodel it was proven by Matcha and Greenlaw [14] that 1- DLA-Prediction is in NC . The class NC is a complexity class that contains NL and is contained in P . We begin our study of the complexity of biased DLA analyz-ing the complexity of the
DLA-Prediction problem. By extending the results ofMachta and Greenlaw to the 2-DLA model, we show that 2-
DLA-Prediction is P -Complete. This result is obtained following essentially the same gadgets used for thenon-restricted case, but carefully constructing them using only two directions. Moreprecisely, the construction of Machta and Greenlaw consists in a representation of aninstance of CVP as a sequence of particle throws, which final positions represent theinput Boolean circuit with its gates evaluated on the given input. A gate evaluated true is represented by a path of particles, while the false signals are represented by thelack of such path. Since the construction of the circuit must be done in logarithmicspace, the sequence of particles must be defined without knowing the actual outputof the gates. Therefore, the trajectory of the particles consideres that, if they are donot stick on a given position, they escape through the top edge of the grid. Sincethis escape movement is not possible in the 2-DLA (nor 3-DLA) model (because par-ticles can not move upwards), we modify the circuit construction to build the gatesin a specific way, in order to give the particles enough space to escape through therightmost edge or deposit at the bottom of the grid without disrupting the ongoingevaluation of the circuit.The fact that 2-
DLA-Prediction is P -Complete directly implies that 3- DLA-Prediction is also P -Complete, settling the prediction problem for these two biasedversions of the model.We then study the 1-DLA model. Despite of what one might guess, the dynamicsthe DLA model restricted to one direction are far from trivial (see Section 2.2 forexamples of the patterns produced by this model). Indeed, we begin our study showingthat this dynamics can simulate simple sorting algorithms like Bead-Sort . Then, weimprove the result of Matcha and Greenlaw by showing that 1-
DLA-Prediction is in NL . This is in fact an improvement, because they showed that 1- DLA-Prediction is in NC [14], and NL is a sub-class of NC [11]. Our result holds for the BallisticDeposition model, i.e., when the graph is not restricted to a path but is an arbitrarygraph given in the input (we call that problem BD-Prediction ). We finish our studyof the prediction problem showing that the complexity of
BD-Prediction can notbe improved . Indeed, we show that
BD-Prediction is NL -Complete.After this, we study the DLA-Realization problem. We observe that k - DLA-Realization is in NP for all k ∈ { , , , } . Moreover, the non-deterministic aspectof the NP algorithm solving DLA-Realization only needs to obtain the order ofthe sequence on which the particles are placed on the grid, rather than obtaining boththe order and the trajectory that each particle follows. In fact, the trajectories canbe computed in polynomial time, given the order in which the particles are placed inthe grid.We then show 1-
DLA-Realization can be solved much more efficiently. In fact,we give a characterization of the patterns that the 1-DLA model can produce. Our
N. BITAR, E. GOLES, P. MONTEALEGRE characterization is based on a planar directed acyclic graph (PDAG) that representthe possible ways in which the particles are able to stick. Each occupied cell of thegrid is represented by a node of the PDAG, plus a unique sink vertex that representsthe ground . We show that a pattern can be constructed by 1-DLA if and only ifthere is a directed path from every vertex to the ground. We use our characterizationshow that 1-
DLA-Realization is in L , using a result of Allender et al. [1] solving Reachability in log-space, when the input graph is a single sink PDAG.Finally, we give an efficient algorithm to solve the realization problem in the 2-DLA model, showing that 2-
DLA-Realization is in P . Our algorithm uses the factthat in the 2-DLA model, the particles are placed into the grid in a very specificway. More precisely, the realizable patterns are constructed following a diagonal thatgrows from the bottom-right part of the pattern to the top-left part. We use thisfact to efficiently compute the order in which the particles are thrown, obtaining apolynomial-time algorithm. For dynamical properties of the restricted versions of DLA,including Ballistic Deposition, we refer the reader to [4, 16, 18, 23].Some problems of similar characteristics have been studied in this context, suchas the Ising Model, Eden Growth, Internal DLA and Mandelbrot Percolation, to namea few [15, 19]. On the other hard, the problem of Sandpile Prediction is an examplewhere increasing the degrees of freedom, increases the computational complexity ofthe prediction problem. In particular, when the dimension is greater than 3, theprediction problem is P -Complete; but when the dimension is 1, the problem is in NC [20].Another example of a complexity dichotomy that depends on the topology of thesystem is the Bootstrap Percolation model [8]. In this model, a set of cells in a d -dimensional grid are initially infected, in consecutive rounds, healthy sites that havemore than the half of their neighbors infected become infected. In this model predic-tion problem can be defined, consisting in determining if a given site becomes infectedat some point of the evolution of the system. In [10] it is shown that this predictionproblem is P -Complete in three or more dimensions, while in two dimensions it isin NC . Other problems related to Bootstrap percolation involve the maximum timethat the dynamics takes before converging to a fixed point [6]. The first section formally introduces the differ-ent computational complexity classes, along side problems of known complexity usedthroughout the article. Next, the dynamics for the general case of DLA are presented,in addition to the formal definition of the two associated prediction problems that arediscussed: Prediction and Realization. The third section focuses on the proof thatDLA restricted to 2 or 3 directions is P -Complete and with the presentation of thenon-deterministic log-space algorithm for the generalized version of the one directionDLA problem, Ballistic Deposition. The last section talks about the results concern-ing the Realization problem, where the one-directional case is shown to be solvablein L , and the two-directional case has a polynomial algorithm characterizing figuresobtained from the dynamics.
2. Preliminaries.2.1. Complexity Classes and Circuit Value Problem.
In this subsectionwe will define the main background concepts in computational complexity requiredin this article. For a more complete and formal presentation we refer to the books ofArora and Barak [2] and Greenlaw et al. [11]. We assume that the reader is familiar
OMPUTATIONAL COMPLEXITY OF BIASED DLA P is the class of problems solvable in a Turingmachine that runs in polynomial time in the size of the input. More formally, if n isthe size of the input, then a problem is polynomial time solvable if it can be solvedin time n O (1) in a deterministic Turing machine.A logarithmic-space Turing machine consists in a Turing machine with threetapes: a read-only input tape , a write-only output-tape and a read-write work-tape .The Turing machine is allowed to move as much as it likes on the input tape, but canonly use O (log n ) cells of the work-tape (where n is the size of the input). Moreover,once the machine writes something in the output-tape, it moves to the next cell andcan not return. L is the class of problems solvable in a logarithmic-space Turingmachine.A non-deterministic Turing machine is a Turing machine whose transition functiondoes not necessarily output a single state but one over a set of possible states. Acomputation of the non-deterministic Turing machine considers all possible outcomesof the transition function. The machine is required to stop stop in every possiblecomputation thread, and we say that the machine accepts if at least one threadfinishes on an accepting state. A non-deterministic Turing machine is said to runin polynomial-time if every computation thread stops in a number of steps that ispolynomial in the size of the input. NP is the class of problems solvable in polynomialtime in a non-deterministic Turing machine. A non-deterministic Turing machine issaid to run in logarithmic-space if every thread of the machine uses only logarithmicspace in the work-tape. NL is the class solvable in logarithmic space in a non-deterministic Turing machine.A problem L is P -Complete if it belongs to P and any other problem in P canbe reduced to L via a logarithmic-space (many-to-one or Turing) reduction. A P -Complete problem belongs to NL implies that P = NL .One well-known P -Complete problem is the NOR-Circuit-Value-Problem .A NOR Boolean Circuit is a directed acyclic graph C , where each vertex of C hastwo incoming and two outgoing edges, except for some vertices that have no incomingedges (called inputs of C ) and others that have no outgoing edges (called outputs of C ). We consider that C is ordered by layers meaning that for each non-input vertexof C , the two incoming neighbors of v are at the same distance from an input. Inother words, the input gates are in the first layer, the outgoing neighbors of the inputgates are in the second layer, the third layer are outgoing neighbors of the vertices inthe second layer, and so on.Each vertex of C has a Boolean value ( true or false ). A truth-assignment of theinputs of C , called I , is an assignment of values of the input gates of C . The value ofa non-input gate v is the NOR function (the negation of the conjunction) of the valueof the two incoming neighbors of v . A truth-assignment I of C defines a dynamic over C . First the vertices of the second layer compute their value according to the valuesof the input gates given in I . Then the vertices of the third layer compute their valuesaccording to the values of the second layer, and so on until we compute the value ofall the vertices of the circuit. We call C ( I ) the truth values of the output vertices of C when the input gates are assigned I .The NOR-Circuit-Value-Problem is defined as follows.
N. BITAR, E. GOLES, P. MONTEALEGRE
NOR-Circuit-Value-Problem
Input:
A NOR Boolean Circuit C of size n , a truth-assignment I of C and g anoutput gate of C . Question: Is g true in C ( I )?In [11] it is shown that this problem is P -Complete. Proposition
NOR-Circuit-Value-Problem is P -Complete. A problem L is NL -Complete if L belongs to NL and any other problem in NL can be reduced to L via a (many-to-one or Turing) reduction computable inlogarithmic space. A NL -Complete problem belongs to L implies that NL = L .One NL problem is Reachability [2]. An instance of
Reachability is a di-rected graph G and two vertices s and t . The instance is accepted if there is a directedpath from s to t in G . Reachability is NL -Complete because the computation of anon-deterministic log-space Turing machine (which is the set of possible states of themachine plus contents of the working tape) can be represented by a directed graphof polynomial size, and the difficulty of finding a directed path in that graph is thedifficulty of finding a sequence of transitions from the initial state to an acceptingstate.For our reductions we will need specific variant of Reachability , that we call
Layered Exact Reachability ( LDE-Reachability ). In this problem, the inputgraph G is a directed acyclic graph (DAG), which is layered , meaning that verticesof a layer only receive inputs of a previous layer and only output to a next layer (butvertices with in-degree zero are not necessarily in the first layer). Also, besides G and s and t , the input considers a positive integer k ≤ | G | , where | G | is the numberof vertices of the input graph. The question is whether there exists a path of lengthexactly k connecting vertices s and t . We show that this restricted version is also NL -Complete. Proposition
LDE-Reachability is NL -Complete.Proof. Let us first consider the problem
Exact-Reachability . This problemreceives as input a directed graph G , two vertices s and t and a positive integer k ≤ | G | ,and the question is whether there exists a directed path of length exactly k connectingvertices s and t . Is easy to see that Exact-Reachability is NL -Complete. Indeed, itbelongs to NL because an algorithm can simply nondeterministically choose the rightvertices to follow in a directed path of length exactly k from s to t . The verificationof such path can be performed using O (log n ) simply verifying the adjacency of thevertices in the sequence, and keeping a counter of the length of the path, that uses O (log n ) space because k ≤ | G | ). Observe also that Exact-Reachability is NL -Complete because, if we have an algorithm A solving Exact-Reachability , we cansolve
Reachability running A for k ∈ { , . . . , | G |} .Observe now that LDE-Reachability is in NL for the same reasons than Exact-Reachability . We now show that,
LDE-Reachability is NL -Completereducing Exact-Reachability to it. Let (
G, s, t, k ) be an instance of
Exact-Reachability . Consider the instance ( G (cid:48) , s (cid:48) , t (cid:48) , k ) in LDE-Reachability definedas follows. The set of vertices of G (cid:48) is a set of k copies of V ( G ), the the set of verticesof G . We enumerate the copies from 1 to k , and call them V , . . . , V k . Then the set ofvertices of G (cid:48) is V ( G (cid:48) ) = V ∪ · · · ∪ V k . If v is a vertex of G , we call v i the copy of v that belongs to V i . There are no edges in G (cid:48) between vertices in the same copy of V .Moreover, if u, v are two adjacent vertices in G , we add, for each i ∈ { , . . . , k − } , a OMPUTATIONAL COMPLEXITY OF BIASED DLA i -th copy of u to the i + 1 copy v in G (cid:48) , formally:( u, v ) ∈ E ( G ) ⇐⇒ ( u i , v i +1 ) ∈ E ( G (cid:48) ) , ∀ i ∈ { , . . . , k } . Finally, s (cid:48) = s and t (cid:48) = t k . By construction we obtain that G (cid:48) is layered, and more-over ( G, s, t, k ) is a yes -instance of
Exact-Reachability if and only if ( G (cid:48) , s (cid:48) , t (cid:48) , k )is a yes -instance of LDE-Reachability .Finally, we remark that we can build the instance ( G (cid:48) , s (cid:48) , t (cid:48) , k ) in log-space from( G, s, t, k ). Indeed, the algorithm has to simply make a counter j from 1 to k , andsequentially connect the vertices of the j -th copy of V ( G ) with the vertices of the j + 1 copy of V ( G ). We deduce that LDE-Reachability is NL -Complete. The dynamics forthe computational of DLA is the following: We begin with a sequence of particleswhich will under go a random walk starting from a position at the top edge of a N × N lattice. The sequence specifies the order in which the particles are released.Each particle moves until it neighbors an occupied site at which point it sticks to itsposition, growing the cluster. We begin with an occupied bottom edge of the lattice.If the particles does not stick to the cluster and leaves the lattice (exiting throughthe top or lateral edges), it is discarded. A new particle begins its random walk assoon as the previous particle sticks to the cluster or is discarded. This process goeson until we run out of particles in our sequence.To study this model from a computational perspective, it is convenient to considera determinisitic version, where the sequence of sites visited by each released particleis predefined. The prediction problem presented by Machta and Greenlaw [15] for a d -dimensional DLA is: DLA-Prediction
Input:
Three positive integers: N , M , L , a site p in the two-dimensional latticeof size N , a list of random bits specifying M particle trajectories of length L defined by a site on the top edge of the lattice together with a list of directionsof motion. Question:
Is site p occupied after the particles have been thrown into the lattice?For this prediction problem, it is shown in [15] that DLA-Prediction is P -Complete. The proof consists of reducing a P -Complete variant of the Circuit ValueProblem to the prediction problem. Their construction relies heavily on the fact thatthe particles can move in four directions (Up, Down, Left or Right).The question we would like to answer is: what happens to the computationalcomplexity of the prediction problem as we restrict the number of directions theparticles are allowed to move along. Instead of the four permitted directions, werestrict the particle to move in three (left, right and downwards), two (right anddownwards) and one (only downwards) directions.We call the different directions by d = Down, d = Right, d = Left and d =Up. From this, we define the following class of prediction problems for k ∈ { , , , } :0 N. BITAR, E. GOLES, P. MONTEALEGRE k -DLA-Prediction Input:
Three positive integers: N , M , L , a site p in the N × N lattice, a listof random bits specifying M particle trajectories of length L defined by a site onthe top edge of the lattice together with a list of directions of motion, where theallowed directions of motions are { d , ..., d k } . Question:
Is site p occupied after the particles have been thrown into thelattice?Where DLA-Prediction is the same as .In addition, we ask for the comnputational complexity of determining whethera given pattern or figure is is obtainable through the different biased dynamics. Todo this, we codify a pattern on the two-dimensional grid as a 0-1 matrix, where 0represents an unoccupied site, and 1 represents an occupied one (an example of thiscan be found in Section 4.2). We define the computational problem as follows: k -DLA-Realization Input:
A 0-1 matrix M codifying a pattern on the two-dimensional grid. Question:
Does there exist a sequence of particle throws that can move onlyon the allowed directions of motions, { d , ..., d k } , whose end figure is representedby M ?Intuitively, this problem is concerned with understanding the complexity of thefigures that can be obtained through the different versions of the DLA dynamics, bylooking at the computational resources that are required to understand their structure.To our knowledge, this problem has not been studied from this angle before.
3. DLA-Prediction.3.1. Two and three directions.
In this section we show that the 2-
DLA-Prediction problem is P -Complete. This result directly implies that the 3- DLA-Prediction problem is also P -Complete. Theorem is P -Complete.Proof. We assume without loss of generality that the two directions in whichthe particles move are Down and Right. The proof consists of creating gadgets tosimulate an instance of the planar NOR CVP problem. To make this reduction, wemust simulate wires, which transmit the circuits truth value amongst the gates, NORgates and single input OR gates. For this purpose, we modify the gadgets used in [15]for the 4 directional case.Firstly, to transmit the truth values we generate wires. We create these by sys-tematically stacking particles. Each particle has a pre-assigned position in the wire.When each particle is released, it heads down to its target position. If the position be-low it is occupied (signaling that the wire is transmitting the value
True ) the particlesticks further transmitting the value. On the other hand, if the wire is transmittingthe value
False , the particle will not stick to the assigned position.If this happens, the particle is then instructed to move two positions to the right,and the to move indefinitely downwards to be discarded by means of getting stuckto the bottom, effectively transmitting the wire’s value. We must do this because wecan’t make use of the upwards direction to discard the particles (through the top ofthe lattice). This means, that when we finally put the circuit together, each wire mustbe isolated by a distance of at least four columns from the next, to permit discarding
OMPUTATIONAL COMPLEXITY OF BIASED DLA
False value of length n , by discarding on two columns, that stack of discarded particles will only reach aheight of n/ Fig. 3 . Gadget for the simulation of a NOR gate. Both inputs are grown until they reach thesites directly below sites a and b respectively. Two successive particles then follow the path a → b → c following the dotted line, stopping according to the inputs. The output is then grown from site c . Next, we must simulate the NOR gate. It receives two inputs from the precedinglayer. Each of these inputs are grown as mentioned before to the sites a and b , asshown in Fig. 3. It is important to remember that both input cables are separatedby a distance of four columns, to allow for the discarding of particles. In addition,we grow a power cable to function the gate (it is a wire that always carries the True value). Same as before, site c must be at least four columns away from site b . Onceeverything is in place, the gate is evaluated as follows: A particle makes the journey a → b → c . If input 1 is True , then the particle will stick at a . The same goes forinput 2 and site b . If both inputs are False , the particle will then stick at site c . Inany of the 3 cases, a new wire is grown starting from site d . By doing this, the NORgate is correctly evaluated.For the single input OR gate, we proceed in a similar fashion. The input wireis grown up to site 1. There, two particles make specific trajectories: the first visits a → b , while the second one c → d . After these particles have completed theirtrajectories, the power cable is grown starting at the site left of d . If the input isaffirmative, then the first of the walks will stop at a , and the second at c . The wire isgrown from 1, and the power cable as mentioned before, crossing the two of them. Ifthe input is negative, then the walks will end at b and d respectively. As before, thewire and the power cable are grown, crossing them. We re-state the importance of thedistance between the cables germinated at 1, c and a , for the discarding of particles.The planar NOR CVP instance is constructed from Right to Left and from thebottom up in the topological order provided, as it is shown in Figure 5.There are two important commentaries we must make to ensure the functioningof the evaluation. First off, due to the fact that the power cable is akin to a wireconstantly transmitting True , the direction in which it is grown is not important, the2
N. BITAR, E. GOLES, P. MONTEALEGRE
Fig. 4 . Gadget for the simulation of a OR gate. The input is grown up to site . A first particlethen makes the trajectory a → b , stopping according to the truth value of the gadget’s input. Then,a second particle makes the trajectory c → d , also stopping according to the truth value of the input.To finalize, the power wire is grown starting from site d , and the output is grown from site . This input OR gate, in fact, simulates the crossing of the input wire with the power wire. particles will always stick at the assigned location.If the circuit is constructed with the before mentioned space between wires, theresidual particles being deposited at the bottom of the lattice will not interfere withthe evaluation of the circuit.Lastly, if the circuit is k layers deep and consists of I inputs, the dimensions ofour lattice must be at least 10 k × I (the height of 10 k amounts for the height of thegates, and the wires from one layer to the next). OMPUTATIONAL COMPLEXITY OF BIASED DLA ≥ Fig. 5 . A circuit consists of single-input OR gates, shown as squares, and NOR gates, shownas circles. Truth-value carrying wires are shown in bold, where as the power cable is thinner. Forthis particular instance k = 3 , and I = 4 . Corollary is P -Complete.Proof. The particles in this case are allowed to move downwards, to the left andto the right. Thus, the proof of the P -Completeness is straightforward. Because wealready showed that given two directions, the prediction problem is P -Complete wecan just ignore one of the lateral directions, and execute the same constructions shownin the previous theorem.Because the before mentioned proofs rely only on the use of two dimensions, bothresults are directly extended to the dynamics in an arbitrary number of dimensions: Corollary and in Z d , are P -Complete. By restricting the directions in which we allow particlesto move, our problem statement simplifies. Because particles are only permitted tofall, there is no need to specify the whole trajectory of the particles, just the columnof the N × N lattice we are throwing it down. Therefore, as a first method forrepresenting the given behavior, we describe our input as sequence of particle drops: S = a a ... a n − a n where each a i ∈ [ N ] represents the column where the i -th particleis dropped, and [ n ] denotes the set { , . . . , n } for each integer n .This one-dimensional case is actually a particular instance of a more generalmodel called Ballistic Deposition (BD), first introducced by Void and Sutherland tomodel colloidal aggregation [24, 25]. The growth model takes the substrate to be anundirected graph G = ( V, E ), where each vertex defines a column through a ”height”function h : V → N , which represents the highest particle at the vertex. In addition,a sequence of particle throws is given by a list of vertices S = v v ... v n − v n , where4 N. BITAR, E. GOLES, P. MONTEALEGRE a particle gets stuck at a height determined by its vertex, and all vertices neighboringit. It is easy to see that the one-dimensional DLA problem on a N × N square latticeis the special case when G = ([ N ] , { ( i, i + 1) : i ∈ [ N ] } ).Our prediction problem is as follows: BD Prediction
Input:
A graph G = ( V, E ), a sequence S of particle throws and a site t =( h, v ) ∈ N × V , where v is a vertex and h a specified height for it. Question:
Is site t occupied after the particles have been thrown into the graph?This problem was shown to be in NC by Matcha and Greenlaw using a Minimum-Weight Path parallel algorithm [14]. We improve this result to show that the problemis in fact NL -Complete. Fig. 6 . A realization of the one-directional dynamics of the system on a one-dimensional strip.
As a first look at thecomputational capabilities of the model, and sticking to the 1-DLA version of BallisticDeposition, we show that we can sort natural numbers simulating The Bead-Sortmodel described by Arulanandham et al. [3]. This model consists of sorting naturalnumbers through gravity: numbers are represented by beads on rods, like an abacus,and are let loose to be subjected to gravity. As shown in [3], this process effectivelysorts any given set of natural numbers. It is reasonable to think that because of thedynamics and constraints of our model (one direction of movement for the particles),the same sorting method can be applied within our model, which is in fact the case.
Lemma
Bead-Sort can be simulated.Proof.
Let A be a set of n positive natural numbers, with m being the biggestnumber in the set. We create a 2 m × m lattice where we will be throwing theparticles. Here the k -th rod from the Bead-Sort model is represented by row 2 k − a ∈ A we create the sequence S a = 2 4 6 . . . a . The total sequence of launches S is created by concatenating all S a for a ∈ A .We note that because of the commutativity of our model, the order in which theconcatenation is made is not relevant. Thus, throwing sequence S into our lattice,effectively simulates the Bead-Sort algorithm.Let us give an example using the set A = { , , , } . Following the proof, wemust simulate 1-DLA on a 20 ×
20 square lattice, and create the sequences S = 2, S =2 4 6 8, S = 2 4 6 8 10 12 14, and S = 2 4 6 8 10 12 14 16 18 20. By releasingthe sequence S = S ◦ S ◦ S ◦ S into the lattice we obtain Figure 7, which is ordered OMPUTATIONAL COMPLEXITY OF BIASED DLA A .10 → → → → Fig. 7 . Figure obtained by trowing sequence S into the lattice. Set A is order decreasingly fromthe first row onwards. A key aspect of the present model is the commutativity of throws through non-consecutive vertices of the graph. Given a figure, F , we define ϕ v ( F ) as the figurethat results after throwing a particle through vertex v . We notice, that because ofthe dynamics of our model, the point at which a given particle freezes is determineduniquely by the state of the vertex it has been dropped in, and the state of itsneighbors. Therefore, given v ∈ V :( ϕ v ◦ ϕ u )( F ) = ( ϕ u ◦ ϕ v )( F ) ∀ u / ∈ N G ( v ) . We will later use this fact to create a better algorithm for the prediction problem.
There is a critical aspectof the dynamics that is exploitable to create an algorithm: if two particles are thrownon non-adjacent vertices, their relative order in the input sequence is reversible. Byusing this, our aim is to shuffle the sequence into one with the same final configu-ration, but that is ordered in a way that allows us to quickly solve the predictionproblem. Specifically, if we are able to reorganize the input sequence into one thatreleases particles according to the height they will ultimately end at, the remainingstep to solve the problem is checking amongst the particles for the target height, ifthe target vertex appears.Let S be the input sequence of BD Prediction . Formally, a sequence S = s . . . s n is composed of the vertices onto which each particle will be released. From S , we are able define a sequence of particles p , . . . , p n that represents the same realiza-tion as the input sequence. We define a particle p , as a triple ( V ( p ) , num( p ) , pos( p )) ∈ V × [ n ] × [ n ], where first coordinate, V ( p ), denotes the vertex onto which the particleis thrown, the second coordinate, num( p ), is an integer representing the number ofparticles thrown onto vertex V ( p ) before p , and the third, pos( p ) is the position of theparticle within sequence S . The particle description of S is easily obtained by setting V ( p i ) = s i , num( p i ) = |{ j ∈ [ n ] : s j = s i ∧ j ≤ i }| , and pos( p i ) = i .Let us call P = { p , . . . , p n } the set of particles of S .To further breakdown the problem, we define the following sets: A ( p ) := { q ∈ P : pos( q ) < pos( p ) } ,N ( p ) := { q ∈ A ( p ) : V ( q ) ∈ N G ( V ( p )) ∪ { V ( p ) }} , N. BITAR, E. GOLES, P. MONTEALEGRE N = ( p ) := { q ∈ N ( p ) : V ( q ) = V ( p ) } . In words, A ( p ) denotes the set of particles thrown before p , N ( p ) denotes the setof particles that are thrown before p on vertices adjacent to p , and N = ( p ) denotes thesubset of particles in N ( p ) in the same vertex as p .For a particle p ∈ P , the row of p , denoted row( p ) is the height at which the particleends up at after the dynamics have taken place. In other words, row( p ) = h ( V ( p ))after releasing the sequence S (cid:48) = s . . . s pos( p ) . Relative to this definition, we call N r the set of particles thrown before p in vertices adjacent than p that stick at row r ,formally: N r ( p ) = { q ∈ N ( p ) : row( q ) = r } . We translate the dynamics into this new notation in the following lemma:
Lemma
Let p ∈ P be a particle and let r = (cid:26) if N ( p ) = ∅ , max { row( q ) : q ∈ N ( p ) } if N ( p ) (cid:54) = ∅ . Then, row( p ) = (cid:26) r + 1 if N r ( p ) ∩ N = ( p ) (cid:54) = ∅ ,r if N r ( p ) ∩ N = ( p ) = ∅ . Explicitly, if the particle is the first of its neighbors to be thrown ( N ( p ) = ∅ ), itsrow is 1. If not; if its neighbors are higher than the vertex it is thrown in ( N r ( p ) ∩ N = ( p ) = ∅ ), the particle sticks at their height. Lastly, if the vertex that the particleis thrown in is higher that its neighbors ( N r ( p ) ∩ N = ( p ) (cid:54) = ∅ ), the particle sticks onerow higher than the last particle in the vertex. Proof.
Let p be a particle such that N ( p ) = ∅ . This implies that p is the firstparticle thrown through vertex V ( p ) and its adjacent vertices. From the commu-tativity property, we deduce that row( p ) = 1. On the other hand, r = 1 and N r ( p ) ∩ N = ( p ) = ∅ , so row( p ) = r .Suppose now that N ( p ) (cid:54) = ∅ , and let q be a particle in N r ( p ). Observe thatrow( q ) = r , and row( u ) ≤ r for all u ∈ N ( p ). Then, when p is thrown, the firstparticle that it encounters is q . Suppose that we can pick q such that V ( q ) = V ( p ) (i.e. N r ( p ) ∩ N = ( p ) (cid:54) = ∅ ). Since V ( q ) = V ( p ), we deduce that row( p ) = row( q ) + 1 = r + 1.On the other hand, if N r ( p ) ∩ N = ( p ) = ∅ then the coordinate ( V ( p ) , r ) is empty when p is thrown, but some of ( u, r ), for u ∈ N G ( V ( p )), are occupied. We deduce thatrow( p ) = row( q ) = r .We create a weighted graph that codifies the dependence of the particles betweeneach other. Let G S be a weighted directed graph defined from S as follows: the vertexset of G S is the set of particles P plus one more vertex g , called the ground vertex.The edges of G S have weights, given by the weight function W defined as: W ( p, q ) = p = g ) ∧ ( N ( q ) = ∅ ) , p ∈ N = ( q ) , p ∈ N ( q ) \ N = ( q ) , −∞ otherwise.Observe that if we keep only the edges with weight different than −∞ , the ob-tained graph has no directed cycle, i.e. it is a directed acyclic graph. Moreover, theset of incoming edges of vertex p is N ( p ) if N ( p ) (cid:54) = ∅ , and { g } otherwise. For p ∈ P ,we call ˜ ω gp the longest (maximum weight) path from g to p in G S . OMPUTATIONAL COMPLEXITY OF BIASED DLA Theorem
For every p ∈ P , row( p ) = ˜ ω gp .Proof. We reason by induction on pos( p ). Let p ∈ P be the particle such thatpos( p ) = 1. Observe that p has only one incoming edge, which comes from g , and W ( g, p ) = 1. Then ˜ ω gp = 1 = row( p ).Suppose now that row( p ) = ˜ ω gp for every particle q such that pos( q ) ≤ k and let p be a the particle pos( p ) = k + 1. If N ( p ) = ∅ , then, like in the base case, the onlyincoming edge of p is g , and from Lemma 3.5 we deduce that row( p ) = 1 = ˜ ω gp .Suppose now that N ( p ) is different than ∅ . Let q be the a particle in N ( p ) suchthat row( q ) is maximum, i.e. row( q ) = max { row( u ) : u ∈ N ( p ) } . Observe that, frominduction hypothesis and the choice of q , ˜ ω gq ≥ ˜ ω gu for all u ∈ N ( p ) \ { q } . Moreover,˜ ω gp ≤ ˜ ω gq + 1.Suppose that q can be chosen to be such that V ( q ) = V ( p ). Lemma 3.5 thenimplies that row( p ) = row( q ) + 1. On the other hand, the path from g to p that passesthrough q is of weight ˜ ω gq + 1. We deduce that ˜ ω gp = ˜ ω gq + 1 = row( q ) + 1 = row( p ).Suppose now that for all u ∈ N = ( p ), row( u ) is strictly smaller than row( q ). Inthis case, Lemma 3.5 implies that row( p ) = row( q ). On the other hand, the path from g to p that passes through q is of weight ˜ ω gq , which is greater or equal than ˜ ω gu , forall u ∈ N ( p ) \ N = ( p ) and strictly greater than ˜ ω gu , for all u ∈ N = ( p ). We deducethat ˜ ω gp = ˜ ω gq = row( q ) = row( q ).We now present a NL algorithm for the prediction problem.Given a site ( h, v ), we want to non-deterministically obtain a path through graph G S that will guarantee the site will be occupied by a particle. Each step of ouralgorithm we will non-deterministically guess a pair consisting of the next particle,and the corresponding weight of the transition between the last particle and the newone, such that the sum of the weights is the maximum weight to the final particle.We say a particle p is valid for an input sequence S , if p ∈ P . The following log-spacealgorithm verifies if a particles is valid. Algorithm 3.1Input:
A sequence S and a particle p ∈ V × [ n ] × [ n ] Output:
Accept if particle p is valid.Check if V ( p ) = s pos( p ) Sum ← for i ≤ pos( p ) doif s i = V ( p ) then Sum ← Sum + 1 endendif
Sum = num( p ) then Accept else
Reject. end
At each step of the for loop of the algorithm, we must remember the value ofSum, the particles vertex, V ( p ), and the current index of the iteration. This amountsto using O (log( n )) space.We also present a log-space algorithm to determine wether the obtained transitionweight corresponds to the value of the weight function8 N. BITAR, E. GOLES, P. MONTEALEGRE
Algorithm 3.2Input:
A sequence S , two valid particles p, q ∈ V × [ n ] × [ n ], and w ∈ { , } Output:
Accept if W ( p, q ) = w . if p = g thenfor i < pos( q ) do Check that s i is not adyacent to V ( q ) end Accept endif w = 1 then Check that pos( p ) < pos( q ) and V ( p ) = V ( q )Accept endif w = 0 then Check that pos( p ) < pos( q )Check that V ( p ) (cid:54) = V ( q )Check that V ( p ) is adjacent to V ( q )Accept end RejectFor this algorithm, the only case in which information needs to be stored is when p = g . For this instance, each iteration of the for loop must remember the index ofthe iteration, and the vertex V ( q ). Therefore, this algorithm uses O (log( n )) space.Combining these two subroutines, we are now ready to present the main algo-rithm. Algorithm 3.3 NL algorithm for
BD Prediction
Input:
A graph G = ( V, E ), a sequence S and a site t = ( x, v ) ∈ N × V Output:
Accept if a particle occupies site t and reject otherwise.Non-deterministically obtain m , the number of particles, and p . Write them down.Check if p is valid and that W ( g, p ) = 1Sum ← for j ∈ { , ..., m } do Non-deterministically obtain particle p j and the transition weight w j − ,j , andwrite them down.Check if p j is valid.Check if W ( p j − , p j ) = w j − ,j Sum ← Sum + w j − ,j Erase p j − and w j − ,j endif Sum = x and V ( p m ) = v then Accept else
Reject. end
At the j -th step of this algorithm, we must retain the following information: thesum of the weights so far, particles p j − and p j , the current weight w j − ,j . This OMPUTATIONAL COMPLEXITY OF BIASED DLA n ) = O (log( n )) space is used on the tape. Proposition
BD-Prediction is in NL .Proof. Let us show that Algorithm 3.2.2 decides
BD Prediction . Let S by aninput sequence and P = ( h, v ) an input site.If the release of S on to the underlying graph results on site P being occupied, byTheorem 3.6 we know that there exists a particle q ∈ P such that h = row( q ) = ˜ ω gq and V ( q ) = v . Let C = g p p ... p m − p m be the maximum weight path of weight˜ ω gq , where p m = q . Then, for the j -th non-deterministic choice the algorithm makes,it obtains the pair: p j and W ( p j − , p j ).If the algorithm accepts for S and P , we will obtain a sequence of particles suchthat the sum of the transition weights is exactly h and that V ( p m ) = v . This meansthat the weight from the ground to the last particle will indeed be h = ˜ ω gp m . Dueto Theorem 3.6, this means that row( p m ) = ˜ ω gp m = h . Therefore, particle p m indeedoccupies site P . Theorem
BD-Prediction is in NL -Complete.Proof. Due to proposition 2.2, to show that the problem is NL -Hard, we willreduce an instance of LDE-Reachability to the Ballistic Deposition problem.Let (
G, s, t, k ) be an instance of
LDE-Reachability , where m is the number oflayers of G , and let i ∈ [ m ] be the index such that s ∈ V i . The idea is to throw twoparticles for each vertex in all layers from i to i + k . This way, the height at whichthe particles freeze will increase with each layer. Formally, for every i < j ≤ i + k andevery u ∈ V j we create the sequence S u = uu (two particles are thrown in vertex u ).Concatenating these sequences, we obtain a sequence of throws on the whole layer S j = (cid:13) u ∈ V j S u . We note that due to the structure of the graph and the commutativityof the dynamics, the order in which these sequences are concatenated does not matterbecause no to vertices in the same layer are adjacent.Finally, our input sequence will be the concatenation of the sequences associatedto every layer from the i -th layer to the i + k -th one, S = S s ◦ (cid:13) i + k ≥ j>i S j . Theorder in which these sequences are concatenated is important, and must be done inincreasing order by their index. At any point in this process the only informationretained is the vertex for which we are currently creating the sequence S u . This onlyrequires log( n ) space to store, making this process a log-space reduction.By defining the site P = ( k + 1 , t ), we create an instance of BD-Prediction :( G, S, P ). Let us prove that this is indeed a reduction.If (
G, s, t, k ) ∈ LDE-Reachability , then there exists a directed path C = v ... v k in G , where s = v and t = v k . Because of the layered structure of thegraph, if s ∈ V i then v j ∈ V i + j . Then, because by construction, for every vertex on C two particles will be dropped, the height of the last particle dropped in v j will be j +1, meaning that the last particle dropped on v k = t will have a height of k +1. Thismeans that site P will in fact be occupied, and therefore ( G, S, P ) ∈ BD-Prediction .If (
G, S, P ) ∈ BD-Prediction , site P = ( k + 1 , t ) is occupied after the sequenceof particles, S , have been released onto G . Due to our construction, if site P isoccupied, site ( k, t ) must also be occupied by a particle. Let l ∈ [ m ] be such that0 N. BITAR, E. GOLES, P. MONTEALEGRE t ∈ V l . Because only two particles are thrown at each vertex, for the latter site to beoccupied there must exist a vertex v ∈ V l − adjacent to t such that sites ( k, v ) and( k − , v ) are occupied.Iterating this process, we obtain a sequence v ... v k − such that v i is adjacent to v i − and sites ( k − i + 1 , v i ) and ( k − i, v i ) are occupied, for every i ∈ { , ..., k − } . Byvirtue of the construction of S , the only posible way in which site (1 , v k − ) is occupiedis that s = v k − . This proves that ( G, s, t, k ) ∈ LDE-Reachability , concluding ourproof.
4. Shape Characterizations and Realization.
Although the figures obtainedby simulating the dynamics are complex and fractal-like, not every shape is obtainableas an end product. This naturally leads to the problem of characterizing the figureswhich are obtainable through the dynamics, for the different restrictions of the DLAmodel.A crucial observation is the fact that not all connected shapes are realizable.Figure 8 shows shapes that are not achievable for each of the restricted versions.
Fig. 8 . Four non-constructible figures with the respective maximum number of directions whereit is not constructible. The last figure is not constructible even with four directions.
Given a fixed number of allowed directions, determining whether a given figureis realizable is an NP problem, where the non-deterministic choices of the algorithmare the order in which the particles are released. Having the order, it is posible tocompute the trajectories that each particle takes in polynomial time, by finding apath that does not neighbor the already constructed cluster, from the place at whichit is released to its final destination.We give better algorithms for the shape characterization problems for both 1-DLA and 2-DLA, showing that the former belongs to the class of log-space solvableproblems, L , and the latter to P . To characterize shapes created by the one-directional dy-namics, given a sequence of drops S , and its corresponding shape F ( S ) ∈ { , } m × n ,we construct a planar directed acyclic graph (DAG), G = ( V, E ), that takes into ac-count the ways in which a shape can be constructed with the dynamics. We construct G in two steps. OMPUTATIONAL COMPLEXITY OF BIASED DLA G a = ( V a , E a ), where: V a = { ij : F ( S ) ij = 1 } ∪ { g } ,E = { ( ij, ij + 1) : F ( S ) ij = F ( S ) ij +1 = 1 } ,E = { ( ij, ij −
1) : F ( S ) ij = F ( S ) ij − = 1 } ,E = { ( ij, i + 1 j ) : F ( S ) ij = F ( S ) i +1 j = 1 } ,E = { ( nj, g ) : F ( S ) nj = 1 } , and E a = E ∪ E ∪ E ∪ E . The intuition is the following: we create a vertex foreach block in the shape and one representing the ground where the initial particlesstick. E and E account for the particles that stick through their sides, E accountsfor particles falling on top of each other and finally E connects the first level to theground.For example, given the sequence S = 2 7 7 2 6 3 4 4 4 5 6 3 2 6 2, we depict theobtained shape and corresponding graph in Figure 9. g , , , , , , , , , , , , , , , Fig. 9 . Shape and graph obtained from sequence S = Lemma
A configuration is constructible iff ∀ ij ∈ V a \ { g } there exists adirected path between ij and g .Proof. Given a constructible configuration, by virtue of the definition, there isa sequence S of particle drops that generates the configuration. Therefore, by thedynamics of our system and the construction of the graph, for each node in ourgraph, there exists a directed path to the ground , represented by node g .Now, let G = ( V, E ) be the graph corresponding to a given configuration on thegrid. If we have that ∀ ij ∈ V \ { g } there exists a directed path between ij and g , westart by reversing the direction of the arcs in our graph, and running a Breadth-firstsearch-like algorithm starting from node g , to determine the minimum distance from g to each of the other nodes. For all nodes with distance 1 from g , { i k j k } nk =1 , wecreate the sequence S = j ...j n . Then for all non-visited nodes, with distance d from g , { a k b k } mk =1 , we create the sequence S d = b ... b m . Let us show that the sequence S = S ◦ S ◦ ... ◦ S M , with M = max { dist( ij, p ) : ij ∈ V \ { g }} corresponds to theconfiguration. We do this by induction over | S | = n .For n = 1, we have only one occupied state on our configuration, which is theonly particle present in S . It is straightforward to see that F ( S ) actually correspondsto the configuration.2 N. BITAR, E. GOLES, P. MONTEALEGRE
Assuming the sequence is correct for n , let us see that it is also correct for n + 1.Because of the way S was constructed, the only possibility for the configuration notto be achieved is that S n +1 ends up higher or lower in F ( S ) on its column that inthe given configuration. Due to the dynamics, the only way for a particle to becomeinmobile is to stick to another particle, this means that either it sticks to a particlein its own column, or to a particle in one of the neighboring ones. By the inductionhypothesis, S \ S n +1 actually corresponds to the configuration of the first n particles.Therefore, if, without loss of generality, S n +1 ends up lower, this means that whengenerating the sequence S a node that was at a lesser distance from g than the particlewith which it sticks, was added after all other nodes that at the same distance, whichis a contradiction.Next, we obtain G from G a through the following procedure:1. For every v ∈ V a \ { g } , we create two vertices v and v , connected by an arcfrom the former to the latter.2. For every e = ( v, u ) ∈ E , we create an edge ( v , u ).3. For every e = ( v, u ) ∈ E , we create an edge ( v , u ).4. For every e = ( v, u ) ∈ E , we create an edge ( v , u ).5. For every e = ( v, g ) ∈ E , we create an edge ( v , g ). vu wg v v u u w w g This procedure turns G a into a planar DAG.It is straight forward to see that there is a directed path from a vertex v ∈ V a to g on graph G a if and only if there is a path from vertex v to g on graph G .Due to our construction, graph G is what is known as a Multiple Source SingleSink Planar DAG (MSPD): there are multiple vertices with in-degree zero, and onevertex with out-degree zero. Allender et al. showed that the reachability problem onMSPD is in fact log-space solvable [1]. Theorem
MSPD reachability is in L . Proposition
Determining whether a given figure is a valid configuration for1-DLA, is in L . The proof of this proposition consists on creating a log-space reduction from ourrealization problem to MSPD reachability. This stems from the fact that if a problemis log-space reducible to a log-space solvable problem, it is itself log-space solvable(the proof of this fact can be found in [2]).
Proof.
Let M be a matrix representing the configuration, using the same con- OMPUTATIONAL COMPLEXITY OF BIASED DLA NC . By assigning a processor for each pair of coordinates in thematrix, that is O ( n ) processors, to construct the nodes and arcs of our graph. Be-cause NC ⊆ L , this procedure is realizable in log-space. This procedure creates theMSPD G .For each vertex v ∈ V , we can solve the MSPD reachability problem for theinstance ( G, v, g ) in log-space. Due to Lemma 4.1, this solves the one-directionalrealization problem.
To characterize shapes generated by the two-directionaldynamics, we proceed in by recursively checking if the overall figure is constructible,starting from the corner.
Proposition
Determining whether a given figure is a valid configuration for2-DLA, is in P . We create a sequential algorithm, that checks if a figure is constructible by startingat the last coordinate of the shape, and by ordering neighboring sites according to theManhattan metric. We start by showing how the algorithm works on the followingexample:which is represented by the matrix, M = . On each iteration, we will add coordinates to a set of
Anchored sites, A . At eachstep, this set contains all the coordinates that we know are constructible, startingby the last coordinate. If by the time the algorithm finishes, there are coordinatesthat are not contained in A , we will state that the figure is not constructible throughthe two-directional dynamics. The order in which we will ask if the new figure isconstructible is shown in the following matrix:
20 18 15 11 719 16 12 8 417 13 9 5 214 10 6 3 1 . The algorithm begins by adding (4 ,
5) to set A . Next we ask if the figure obtainedby adding coordinate (3 ,
5) is constructible, which in this case amounts to asking if (cid:20) (cid:21) is constructible. Because we now that any column is realizable, we add coordinate(3 ,
5) to A . Furthermore, and by following the before mentioned order, because M , =0, we can add this coordinate to A .The first roadblock to this procedure is encountered on step 12:4 N. BITAR, E. GOLES, P. MONTEALEGRE M = A A ? A A A A A A A A A . Here, coordinates already on A are denoted by a superscripted A . In this step weask if A is constructible when adding coordinate (2 , ,
3) is always hanging in mid-air.Because overhangs are a possibility, we can’t rule out M as un-constructible. Thismeans that we must hold on to coordinate (2 ,
3) until more of the figure has beenruled as feasible.By continuing with the procedure, we arrive at a new situation: M = ? A A ? A A A A A A A A A A A . Because we left coordinate (2 ,
3) in stand-by, we now ask A is constructible byadding both (2 ,
3) and (1 ,
3) simultaneously. Due to the fact that this new figure canbe constructed, we add both coordinates to A , and move on to the rest of the missingcoordinates.To see where how this procedure discerns between realizable figures, let’s analyzea case where the figure is not constructible:which is represented by the matrix: . As before, the order in which we will grow the set of constructible positions isgiven by:
25 23 20 16 1124 21 17 12 722 18 13 8 419 14 9 5 215 10 6 3 1 . Again, the algorithm begins by adding site (5 ,
5) to the set of anchored sites A .Then, by following the order mentioned the algorithm continues to add sites (as longas the ones on A remain constructible as a whole) until it encounters a site it can’tadd. For the given example, this occurs at step 8: OMPUTATIONAL COMPLEXITY OF BIASED DLA A ? A A A A A A . Because up to this point A is composed of only empty sites, there is now way toconstruct a particle floating two blocks above the floor (that is, on site (3 , A ? A ? A A A A A A A A . We now ask if set A is constructible by adding both (3 ,
4) and (2 ,
4) simultane-ously. It is easy to see that the same problem persists: given A , we are still asking ifwe can build floating blocks, which is not allowed by the dynamics. In an analogousfashion, we proceed to ask if A is constructible by adding coordinates (3 ,
4) and (3 , A is constructible by adding (3 , , (2 ,
4) and (1 , , , (3 ,
3) and (3 , A A ? ? ? A A A A A A A A A A . Although site (3 ,
2) can be anchored at site (4 , ∈ A , we require that all thecoordinates added must be constructible.We note that after adding site (1 ,
5) to A , there is no way to continue with theprocedure. This means that the given figure is not constructible by the 2-DLA dy-namics.Let us formalize this procedure: Definition
Let C ⊆ [ N ] × [ N ] be a set of coordinates. We create the graph G C = ( V C , E C ) , where V C = { ( i, j ) : ( i, j ) ∈ C ∧ F ij = 1 } ∪ { g } ,E = { ( i, j )( k, l ) : F ij = F kl = 1 ∧ ( k, l ) ∈ { ( i, j ± , ( i ± , j ) }} ,E = { ( N, j ) g : F Nj = 1 } , and E C = E ∪ E . We say C is anchored, if G C is connected. N. BITAR, E. GOLES, P. MONTEALEGRE
The set of edges E represents particles which are stuck to each other, and E repre-sents the particles that are stuck to the ground.As in the first example, we will recursively check the given figure from site ( N, M ).The idea is to create the sequence of launches as the recursion works through thefigure. The order in which we do this is given determined by the 1-norm, as shownon Figure 10. . . . . . .. . .
Fig. 10 . Order in which new coordinates are added to the constructible set.
We define the family of sets { A n } n ∈ [ N ] , where A = { ( N, N ) } . We transformevery coordinate, ( i, j ) into n ( i, j ) = 1 + (cid:18) N − j − (cid:22) dN (cid:23) ( d + 1 − N ) (cid:19) + d ( d + 1)2 − (cid:22) dN (cid:23) ( d − N )( d + 1 − N ) , where d = ( N − i ) + ( N − j ), which orders them in the specified way (this can beseen in the examples, specifically on the matrices which specifiy the order in whichcoordinates are added). In addition, we define the set, B , of particles which are notconstructible at the current stage, but will possibly be constructed at a later iteration.We note that the algorithm will accept at the end if and only if set B is empty.Suppose we are on the n -th iteration; we define A n +1 as follows: Let i and j besuch that n + 1 = n ( i, j ).1. We first check if ( i − , j ) ∈ B . If this is the case, we continue checking for all( i − k, j ) ∈ B for k ≥
1. For all these coordinates, we ask if A n ∪{ ( i − k, j ) } k ≥ is anchored. If the answer is positive, we set A n +1 = A n ∪ { ( i − k, j ) } k ≥ . Ifnot, we add ( i, j ) to B , and set A n +1 = A n .2. We then check if ( i, j − ∈ B . If this is the case, as before, we continuechecking for all ( i, j − k ) ∈ B for k ≥
1. For all these coordinates, weask if A n ∪ { ( i, j − k ) } k ≥ is anchored. If the answer is positive, we set A n +1 = A n ∪ { ( i, j − k ) } k ≥ . If not, we add ( i, j ) to B , and set A n +1 = A n .3. If neither of the previous situations happen, we ask if A n ∪{ ( i, j ) } is anchored.If the answer is yes, we set A n +1 = A n ∪ { ( i, j ) } . On the contrary, we add( i, j ) to B , and set A n +1 = A n .4. We say F is constructible if A N = [ N ] × [ N ]. OMPUTATIONAL COMPLEXITY OF BIASED DLA
Proof of Prop. 4.4.
Let F ∈ { , } N × N be a figure obtained from the dynamics.We will show that the before mentioned procedure accepts F : let ( i, j ) ∈ [ N ] × [ N ]be an arbitrary coordinate. and n = n ( i, j ).The first case is when ( i, j − (cid:54)∈ B nor ( i − , j ) (cid:54)∈ B . If F ij = 0 it is evident that A n − ∪ { ( i, j ) } is constructible, which means that ( i, j ) ∈ A n . On the other hand, if F ij = 1, because of the dynamics, this site is occupied by virtue of the particle stick-ing to an occupied neighbor. If the coordinate of this occupied neighbor is in A n − , A n − ∪ { ( i, j ) } will be constructible, and therefore ( i, j ) ∈ A n . If it is not in A n − ,we will have ( i, j ) ∈ B . Because of this, this coordinate will be added later on: it willbe added in a block along side the occupied neighbor’s coordinates. The cases where( i, j − ∈ B or ( i − , j ) ∈ B are analogous. We conclude that A N = [ N ] × [ N ], i.e.the produre accepts.Now suppose that F is a figure such that A N = [ N ] × [ N ]. For every ( i, j ) suchthat F ij = 1, there exists an m ≥ n ( i, j ) such that ( i, j ) ∈ A m \ A m − . We create aparticle list from the sets { A n } n ∈ [ N ] : Each particle is thrown in the order of the indexof the first set on which the coordinate in which it ultimately ends up in appears. Ifonly a single coordinate is added from one A n to the next, there is no ambiguity onadding the new particles to the ones being thrown. The problem arrises when a blockof coordinates is added. In this case, we add the particles by ordering them accordingto their distance to node g on the auxiliary graph G C . Because the constructiblesets grow diagonally starting from the bottom right corner, each particle thrown canreach it assigned place in the figure, without being intercepted. Therefore, figure F is realizable by the dynamics.Even though we can’t provide a proof that this problem is P -Complete at thistime, there is some evidence pointing to the fact that it is probably not pararellizable.The following example shows that a figure’s different connected components are notindependent from each other. On Figure 11, the non-labeled section must be con-structed first. Then, it is easy to see that part a must be constructed before part b ,and part b must be constructed before part c . abc Fig. 11 . A figure exhibiting sequential behaviour. N. BITAR, E. GOLES, P. MONTEALEGRE
5. Conclusion.
The introduction of restrictions to the system changes our com-putational complexity when the only direction available for particles to move is down-wards. By adapting the P -Complete proof of the 4- DLA-Prediction we showedthat both 3-
DLA-Prediction and 2-
DLA-Prediction are P -Complete. For 1- DLA-Prediction , we tackled the generalized problem,
Ballistic Deposition and showed that by exploiting the commutativity exhibited by the dynamics of thesystem, we created a non-deterministic log-space algorithm to solve the problem, andshow that is in NL -Complete. What is interesting to note is that thealgorithm does not depend on the topological properties of the model, it exclusivelyworks on the input word (the sequence of particle throws in this case).We finally showed that characterizing the shapes that are obtainable through thedynamics is an interesting problem, and exhibited that the computational problemassociated is in L for the one-directional dynamics, and in P for the two-directionalone. An interesting extension to the presented problem is the oneof determining, given a figure, what is the minimum amount of directions necessaryto produce it, if it is achievable at all. We have shown that figures generated by the model are characterizable in L , and those of the two-directional modelin P . It remains to see if the latter can be improved into an NC algorithm, or theproblem is in fact P -Complete. In addition, the complexity class of the problem ofcharacterizing achievable figures remains to be found for the three and four-directionalcases.A related problem is concerned with determining if, given an initial and finalfigure, there is a sequence of particles throws that takes the initial figure to the final.This can too be divided in relation to the number of directions the particles are allowedto move in. It is our belief that because of the increase in the degrees of freedom theproblem allows, there is room to create more complex gadgets, indicating that theseproblems are possibly NP -Complete. Acknowledgments.
We would like to thank the anonymous reviewers for lettingus know about the Ballistic Deposition model, which we had no previous knowledgeof. This work has been partially supported by CONICYT, via PAI + ConvocatoriaNacional Subvenci´on a la Incorporaci´on en la Academia A˜no 2017 + PAI77170068(P.M.), and via CONICYT-PFCHA/Mag´ısterNacional/2019 - 22190497 (N. Bitar).
REFERENCES[1]
E. Allender, T. Chakraborty, D. A. M. Barrington, S. Datta, and S. Roy , Grid graphreachability problems , in 21st Annual IEEE Conference on Computational Complexity(CCC’06), IEEE, 2006, pp. 15–pp.[2]
S. Arora and B. Barak , Computational complexity: a modern approach , Cambridge Univer-sity Press, 2009.[3]
J. J. Arulanandham, C. S. Calude, and M. Dinneen , Bead–sort: A natural sorting algo-rithm , tech. report, Department of Computer Science, The University of Auckland, NewZealand, 2002.[4]
A. Asselah, E. N. Cirillo, B. Scoppola, E. Scoppola, et al. , On diffusion limited deposi-tion , Electronic Journal of Probability, 21 (2016).[5]
F. Barra, B. Davidovitch, and I. Procaccia , Iterated conformal dynamics and laplaciangrowth , Physical Review E, 65 (2002), p. 046144.[6]
F. Benevides and M. Przykucki , Maximum percolation time in two-dimensional bootstrappercolation , SIAM Journal on Discrete Mathematics, 29 (2015), pp. 224–251, https://doi.org/10.1137/130941584, https://doi.org/10.1137/130941584.OMPUTATIONAL COMPLEXITY OF BIASED DLA [7] R. Brady and R. Ball , Fractal growth of copper electrodeposits , Nature, 309 (1984), pp. 225–229.[8]
J. Chalupa, P. L. Leath, and G. R. Reich , Bootstrap percolation on a bethe lattice , Jour-nal of Physics C: Solid State Physics, 12 (1979), pp. L31–L35, https://doi.org/10.1088/0022-3719/12/1/008, https://doi.org/10.1088/0022-3719/12/1/008.[9]
D. Y. Chan, B. D. Hughes, L. Paterson, and C. Sirakoff , Simulating flow in porous media ,Physical Review A, 38 (1988), p. 4106.[10]
E. Goles, P. Montealegre-Barba, and I. Todinca , The complexity of the bootstrapingpercolation and other problems , Theoretical Computer Science, 504 (2013), pp. 73–82,https://doi.org/10.1016/j.tcs.2012.08.001, https://doi.org/10.1016/j.tcs.2012.08.001.[11]
R. Greenlaw, H. Hoover, and W. Ruzzo , Limits to Parallel Computation: P-completenessTheory , Oxford University Press, Inc., New York, NY, USA, 1995.[12]
T. C. Halsey, P. Meakin, and I. Procaccia , Scaling structure of the surface layer ofdiffusion-limited aggregates , Physical review letters, 56 (1986), p. 854.[13]
Z. Koza , The equivalence of the dla and a hydrodynamic model , Journal of Physics A: Math-ematical and General, 24 (1991), p. 4895.[14]
J. Machta and R. Greenlaw , The parallel complexity of growth models , Journal of StatisticalPhysics, 77 (1994), pp. 755–781.[15]
J. Machta and R. Greenlaw , The computational complexity of generating random fractals ,Journal of Statistical Physics, 82 (1996), pp. 1299–1326.[16]
T. Mansour, R. Rastegar, and A. Roitershtein , On ballistic deposition process on a strip ,arXiv preprint arXiv:1903.12548, (2019).[17]
P. Meakin , Diffusion-controlled cluster formation in 2-6-dimensional space , Physical ReviewA, 27 (1983), p. 1495.[18]
P. Meakin, P. Ramanlal, L. M. Sander, and R. Ball , Ballistic deposition on surfaces ,Physical Review A, 34 (1986), p. 5091.[19]
C. Moore and J. Machta , Internal diffusion-limited aggregation: parallel algorithms andcomplexity , Journal of Statistical Physics, 99 (2000), pp. 661–690.[20]
C. Moore and M. Nilsson , The computational complexity of sandpiles , Journal of statisticalphysics, 96 (1999), pp. 205–224.[21]
L. Niemeyer, L. Pietronero, and H. Wiesmann , Fractal dimension of dielectric breakdown ,Physical Review Letters, 52 (1984), p. 1033.[22]
J. Nittmann, G. Daccord, and H. E. Stanley , Fractal growth viscous fingers: quantitativecharacterization of a fluid instability phenomenon , Nature, 314 (1985), pp. 141–144.[23]
M. D. Penrose , Growth and roughness of the interface for ballistic deposition , Journal ofStatistical Physics, 131 (2008), pp. 247–268.[24]
D. Sutherland , Comments on vold’s simulation of floc formation , Journal of Colloid andInterface Science, 22 (1966), pp. 300–302.[25]
M. J. Vold , Computer simulation of floc formation in a colloidal suspension , Journal of ColloidScience, 18 (1963), pp. 684–695.[26]