Pointers in Recursion: Exploring the Tropics
TThomas Seiller & Steffen Jost (Eds.): DICE-FOPARA 2019EPTCS 298, 2019, pp. 31–45, doi:10.4204/EPTCS.298.3
Pointers in Recursion: Exploring the Tropics ∗ Paulin Jacob´e de Naurois
CNRS, Universit´e Paris 13, Sorbonne Paris Cit´e, LIPN, UMR 7030, F-93430 Villetaneuse, France. [email protected]
Abstract.
We translate the usual class of partial/primitive recursive functions to a pointer recursionframework, accessing actual input values via a pointer reading unit-cost function. These pointerrecursive functions classes are proven equivalent to the usual partial/primitive recursive functions.Complexity-wise, this framework captures in a streamlined way most of the relevant sub-polynomialclasses. Pointer recursion with the safe/normal tiering discipline of Bellantoni and Cook correspondsto polylogtime computation. We introduce a new, non-size increasing tiering discipline, called trop-ical tiering. Tropical tiering and pointer recursion, used with some of the most common recursionschemes, capture the classes logspace, logspace/polylogtime, ptime, and NC. Finally, in a fashionreminiscent of the safe recursive functions, tropical tiering is expressed directly in the syntax of thefunction algebras, yielding the tropical recursive function algebras.
Introduction
Characterizing complexity classes without explicit reference to the computational model used for defin-ing these classes, and without explicit bounds on the resources allowed for the calculus, has been a longterm goal of several lines of research in computer science. One rather successful such line of research isrecursion theory. The foundational work here is the result of Cobham [7], who gave a characterization ofpolynomial time computable functions in terms of bounded recursion on notations - where, however, anexplicit polynomial bound is used in the recursion scheme. Later on, Leivant [11] refined this approachwith the notion of tiered recursion: explicit bounds are no longer needed in his recursion schemes. In-stead, function arguments are annotated with a static, numeric denotation, a tier , and a tiering disciplineis imposed upon the recursion scheme to enforce a polynomial time computation bound. A third impor-tant step in this line of research is the work of Bellantoni and Cook [2], whose safe recursion schemeuses only syntactical constraints akin to the use of only two tier values, to characterize, again, the classof polynomial time functions.Cobham’s approach has also later on been fruitfully extended to other, important complexity classes.Results relevant to our present work, using explicitly bounded recursion, are those of Lind [15] forlogarithmic space, and Allen [1] and Clote [6] for small parallel classes.Later on, Bellantoni and Cook’s purely syntactical approach proved also useful for characterizingother complexity classes. Leivant and Marion [14, 13] used a predicative version of the safe recur-sion scheme to characterize alternating complexity classes, while Bloch [3], Bonfante et al [4] andKuroda[10], gave characterizations of small, polylogtime, parallel complexity classes. An importantfeature of these results is that they use, either explicitly or not, a tree-recursion on the input. This tree-recursion is implicitly obtained in Bloch’s work by the use of an extended set of basic functions, allowingfor a dichotomy recursion on the input string, while it is made explicit in the recursion scheme in the twolatter works. As a consequence, these characterizations all rely on the use of non-trivial basic functions, ∗ Work partially supported by ANR project ELICA - ANR-14-CE25-0005 x is denoted by a recursive function withargument x . While this seems very natural for complexity classes above linear time, it actually yields afair amount of technical subtleties and difficulties for sub-linear complexity classes. Indeed, followingChandra et al. [5] seminal paper, sub-polynomial complexity classes need to be defined with a proper,subtler model than the one-tape Turing machine: the random access Turing machine (RATM), wherecomputation input is accessed via a unit-cost pointer reading instruction. RATM input is thus accessedvia a read-only instruction, and left untouched during the computation - a feature quite different to thatof a recursive function argument. Our proposal here is to use a similar construct for reading the input inthe setting of recursive functions: our functions will take as input pointers on the computation input, andone-bit pointer reading will be assumed to have unit cost. Actual computation input are thus implicit inour function algebras: the fuel of the computational machinery is only pointer arithmetics. This proposaltakes inspiration partially from the Rational Bitwise Equations of [4].Following this basic idea, we then introduce a new tiering discipline, called tropical tiering , to en-force a non-size increasing behavior on our recursive functions, with some inspirations taken from previ-ous works of M. Hofmann [8, 9]. Tropical tiering induces a polynomial interpretation in the tropical ringof polynomials (hence its name), and yields a characterization of logarithmic space. The use of different,classical recursion schemes yield characterizations of other, sub-polynomial complexity classes such aspolylogtime, NC, and the full polynomial time class. Following the approach of Bellantoni and Cook,we furthermore embed the tiering discipline directly in the syntax, with only finitely many different tiervalues - four tier values in our case, instead of only two tier values for the safe recursive functions, andprovide purely syntactical characterizations of these complexity classes in a unified, simple framework.Compared to previous works, our framework uses a unique, and rather minimal set of unit-cost basicfunctions, computing indeed basic tasks, and a unique and also simple data structure.The paper is organized as follows. Section 1 introduces the notations, and the framework of pointerrecursion. Section 2 applies this framework to primitive recursion. Pointer partial/primitive recursivefunctions are proven to coincide with their classical counterparts in Theorem 2.1. Section 3 appliesthis framework to safe recursion on notations. Pointer safe recursive functions are proven to coin-cide with polylogtime computable functions in Theorem 3.1. Tropical tiering is defined in Section 4.Proposition 4.1 establishes the tropical interpretation induced by tropical tiering. Tropical recursivefunctions are then introduced in Subsection 4.3. Section 5 gives a sub-algebra of the former, capturinglogspace/polylogtime computable functions in Theorem 5.2. Finally, Section 6 explores tropical recur-sion with substitutions, and provides a characterization of P in Theorem 6.2 and of NC in Theorem 6.4. Data structures considered in our paper are finite words over a finite alphabet. For the sake of simplicity,we consider the finite, boolean alphabet { , } . The set of finite words over { , } is denoted as { , } ∗ .Finite words over { , } are denoted with overlined variables names, as in x . Single values in { , } are denoted as plain variables names, as in x . The empty word is denoted by ε , while the dot symbol”.” denotes the concatenation of two words as in a . x , the finite word obtained by adding an a in frontaulin Jacob´e de Naurois 33of the word x . Finally, finite arrays of boolean words are denoted with bold variable names, as in x =( x , · · · , x n ) . When defining schemes, we will often omit the length of the arrays at hand, when clear fromcontext, and use bold variable names to simplify notations. Similarly, for mutual recursion schemes,finite arrays of mutually recursive functions are denoted by a single bold function name. In this case, the width of this function name is the size of the array of the mutually recursive functions.Natural numbers are identified with finite words over { , } via the usual binary encoding. Yet, inmost of our function algebras, recursion is not performed on the numerical value of an integer, as inclassical primitive recursion, but rather on its boolean encoding, that is, on the finite word over { , } identified with it: this approach is denoted as recursion on notations . When considering sub-polynomial complexity class, classical Turing Machines often fail to provide asuitable cost model. A crucial example is the class DLOGTIME: in logarithmic time, a classical Turingmachine fails to read any further than the first k . log ( n ) input bits. In order to provide a suitable timecomplexity measure for sub-polynomial complexity classes, Chandra et al [5] introduced the TuringMachine with Random Access (RATM), whose definition follows. Definition 1.1
RATMA Turing Machine with Random Access (RATM) is a Turing machine with no input head, one (or several)working tapes and a special pointer tape, of logarithmic size, over a binary alphabet. The Machine hasa special
Read state such that, when the binary number on the pointer tape is k , the transition from theRead state consists in writing the k th input symbol on the (first) working tape. In usual recursion theory, a function computes a value on its input, which is given explicitly as an argu-ment. This, again, is the case in classical primitive recursion. While this is suitable for describing explicitcomputation on the input, as, for instance for single tape Turing Machines, this is not so for describinginput-read-only computation models, as, for instance, RATMs. In order to propose a suitable recursionframework for input-read-only computation, we propose the following pointer recursion scheme, whoseunderlying idea is pretty similar to that of the RATM.As above, recursion data is given by finite, binary words, and the usual recursion on notation tech-niques on these recursion data apply. The difference lies in the way the actual computation input isaccessed: in our framework, we distinguish two notions, the computation input , and the function input :the former denotes the input of the RATM, while the latter denotes the input in the function algebra. Forclassical primitive recursive functions, the two coincide, up to the encoding of integer into binary strings.In our case, we assume an explicit encoding of the former into the latter, given by the two followingconstructs.Let w = w . · · · . w n ∈ { , } ∗ be a computation input. To w , we associate two constructs, • the Offset : a finite word over { , } , encoding in binary the length n of w , and • the Read construct, a 1-ary function, such that, for any binary encoding i of an integer 0 < i ≤ n , Read ( i ) = w i , and, for any other value v , Read ( v ) = ε .Then, for a given computation input w , we fix accordingly the semantics of the Read and
Offset con-structs as above, and a
Pointer Recursive function over w is evaluated with sole input the Offset , access-ing computation input bits via the
Read construct. For instance, under these conventions,
Read ( hd ( Offset )) w . In some sense, the two constructs depend on w , and canbe understood as functions on w . However, in our approach, it is important to forbid w from appearingexplicitly as a function argument in the syntax of the function algebras we will define, and from playingany role in the composition and recursion schemes. Since w plays no role at the syntactical level - itsonly role is at the semantical level- we chose to remove it completely w from the syntactical definitionof our functions algebras. Let us first detail our pointer recursive framework for the classical case of primitive recursion on nota-tions.
Basic pointer functions.
Basic pointer functions are the following kind of functions:1. Functions manipulating finite words over { , } . For any a ∈ { , } , x ∈ { , } ∗ , hd ( a . x ) = a tl ( a . x ) = x s ( x ) = . x hd ( ε ) = ε tl ( ε ) = ε s ( x ) = . x
2. Projections. For any n ∈ N , 1 ≤ i ≤ n , Pr ni ( x , · · · , x n ) = x i
3. and, finally, the
Offset and
Read constructs, as defined above.
Composition.
Given functions g , and h , · · · , h n , we define f by composition as f ( x ) = g ( h ( x ) , · · · , h n ( x )) . Primitive Recursion on Notations.
Let ⊥ denote non-terminating computation. Given functions h , g and g , we define f by primitive recursion on notations as f ( ε , y ) = h ( y ) f ( s a ( x ) , y ) = (cid:26) g a ( x , f ( x , y ) , y ) if f ( x , y ) = ⊥⊥ otherwise. Minimization.
For a function s , denote by s ( n ) its n th iterate. Then, given a function h , we define f byminimization on x as µ x ( h ( x , y )) = ( ⊥ if ∀ t ∈ N , hd ( h ( s ( t ) ( ε ) , y )) = s ( ε ) s ( k ) ( ε ) where k = min { t : hd ( h ( s ( t ) ( ε ) , y )) = s ( ε ) } otherwise.In other words, a function f defined by minimization on h produces the shortest sequence of 0 symbolssatisfying a simple condition on h , if it exists.Let now PR pointnot be the closure of basic pointer functions under composition and primitive recur-sion on notations, and REC pointnot be the closure of basic pointer functions under composition, primitiverecursion on notations, and minimization. Then, as expected,aulin Jacob´e de Naurois 35
Theorem 2.1
Modulo the binary encoding of natural integers, PR pointnot is the classical class of primitiverecursive functions, and REC pointnot is the classical class ofrecursive functions.P
ROOF . It is already well known that primitive recursive functions on notations are the classicalprimitive recursive functions, and recursive functions on notations are the classical recursive functions.Now, for one direction, it suffices to express the
Read and
Offset basic pointer functions as primitiverecursive functions on the computation input. For the other direction, it suffices to reconstruct withpointer primitive recursion the computation input from the
Read and
Offset basic pointer functions.
We recall the tiering discipline of Bellantoni and Cook [2]: functions arguments are divided into twotiers, normal arguments and safe arguments. Notation-wise, both tiers are separated by a semicolonsymbol in a block of arguments, the normal arguments being on the left, and the safe arguments on theright. We simply apply this tiering discipline to our pointer recursion framework.
Basic Pointer Safe Functions.
Basic pointer safe functions are the basic pointer functions of the pre-vious section, all their arguments being considered safe.
Safe Composition.
Safe composition is somewhat similar to the previous composition scheme, with atiering discipline, ensuring that safe arguments cannot be moved to a normal position in a function call.The reverse however is allowed. f ( x ; y ) = g ( h ( x ; ) , · · · , h m ( x ; ) ; h m + ( x ; y ) , · · · , h m + n ( x ; y )) . Calls to functions h m + i , where safe arguments are used, are placed in safe position in the argumentblock of g . A special case of safe composition is f ( x ; y ) = g ( ; x , y ) , where a normal argument x is usedin safe position in a call. Hence, we liberally use normal arguments in safe position, when necessary. Safe Recursion.
The recursion argument is normal. The recursive call is placed in safe position, afeature that prevents nesting recursive calls exponentially. f ( ε , y ; z ) = h ( y ; z ) f ( a . x , y ; z ) = g a ( x , y ; f ( x , y ; z ) , z ) . Let now SR pointnot be the closure of the basic pointer safe functions under safe composition and saferecursion. Theorem 3.1 SR pointnot isthe class DT IME ( polylog ) offunctions computable in poly-logarithmic time.P ROOF . The proof is essentially the same as for the classical result by Bellantoni and Cook [2].Here however, it is crucial to use the RATM as computation model. Simulating a polylogtime RATMwith safe recursion on pointers is very similar to simulating a polytime TM with safe recursion - insteadof explicitly using the machine input as recursion data, we use the size of the input as recursion data,and access the input values via the
Read construct, exactly as is done by the RATM model. The otherdirection is also similar: the tiering discipline of the safe recursion on pointers enforces a polylog boundon the size of the strings (since the initial recursion data - the
Offset - has size logarithmic in the size n of the computation input), and thus a polylog bound on the computation time.6 Pointers inRecursion: Exploring the Tropics We present here another, stricter tiering discipline, that we call tropical Tiering . The adjective ”tropical”refers to the fact that this tiering induces a polynomial interpretation in the tropical ring of polynomials.This tiering discipline takes some inspiration from Hofmann’s work on non-size increasing types [8],and pure pointer programs [9]. The idea however is to use here different tools than Hofmann’s to achievea similar goal of bounding the size of the function outputs. We provide here a non-size increasingdiscipline via the use of tiering, and use it in the setting of pointer recursion to capture not only purepointer programs (Hoffman’s class), but rather pointer programs with pointer arithmetics, which is inessence the whole class Logspace.
Basic Pointer Functions.
We add the following numerical successor basic function. Denote by E : N → { , } ∗ the usual binary encoding of integers, and D : { , } ∗ → N the decoding of binary strings tointegers. Then, s ( x ) = E ( D ( x ) + ) denotes the numerical successor on binary encodings, and, by convention, ε is the binary encodingof the integer 0. Primitive Recursion on Values.
Primitive recursion on values is the usual primitive recursion, encodedinto binary strings: f ( ε , y ) = h ( y ) f ( s ( x ) , y ) = g ( x , f ( x , y ) , y ) . As usual, tiering consists in assigning function variables to different classes, called tiers. In our setting,these tiers are identified by a numerical value, called tropical tier , or, shortly, tropic . The purpose ofour tropical tiers is to enforce a strict control on the increase of the size of the binary strings duringcomputation. Tropics take values in Z ∪ {− ∞ } . The tropic of the i th variable of a function f is denoted T i ( f ) . The intended meaning of the tropics is to provide an upper bound on the linear growth of thefunction output size with respect to the corresponding input size, as per Proposition 4.1. Tropics areinductively defined as follows.1. Basic pointer functions: T j = i ( Pr ni ) = − ∞ T ( hd ) = − ∞ T ( Read ) = − ∞ T ( tl ) = − T i ( Pr ni ) = T ( s ) = T ( s ) = T ( s ) =
12. Composition: T t ( f ) = max i { T i ( g ) + T t ( h i ) } . aulin Jacob´e de Naurois 373. Primitive recursion on notations. Two cases arise: • T ( g ) ≤ T ( g ) ≤
0. In that case, we set(a) T ( f ) = max { T ( g ) , T ( g ) , T ( g ) , T ( g ) } , and,(b) for all t ≥ T t ( f ) = max { T t + ( g ) , T t + ( g ) , T t − ( h ) , T ( g ) , T ( g ) } . • the previous case above does not hold, T ( g ) ≤
1, and T ( g ) ≤
1. In that case, we alsorequire that T ( g ) ≤ T ( g ) ≤
0, and, for all t ≥ T t ( g ) = T t ( g ) = T t − ( h ) = − ∞ .Then, we set T ( f ) = max { T ( g ) , T ( g ) , T ( g ) − , T ( g ) − , c h } , where c h is a constantfor h given in Proposition 4.1 below, and, for t ≥ T t ( f ) = − ∞ .Other cases than the two above do not enjoy tropical tiering.4. Primitive recursion on values. Only one case arises: • T ( g ) ≤ T ( f ) = max { T ( g ) , T ( g ) } , and,(b) for all t ≥ T t ( f ) = max { T t + ( g ) , T t − ( h ) , T ( g ) } .Again, other cases than the one above do not enjoy tropical tiering.Furthermore, when using tropical tiering, we use mutual recursion schemes. For f = ( f , · · · , f n ) ,mutual primitive recursion (on values) is classically defined as follows, f ( ε , y ) = h ( y ) f ( s ( x ) , y ) = (cid:26) g ( x , f ( x , y ) , y ) if ∀ i ( f i ( x , y ) = ⊥ ) ⊥ otherwise.and similarly for mutual primitive recursion on notations. Tropical tiering is then extended to mutualprimitive recursion in a straightforward manner.We define the set of L-primitive pointer recursive functions as the closure of the basic pointer func-tions of Sections 2 and 4 under composition, (mutual) primitive recursion on notations and (mutual)primitive recursion on values, with tropical tiering. Tropical tiering induces a non-size increasing discipline. More formally,
Proposition 4.1
The tropical tiering of a L-primitive recursive function f induces a polynomial inter-pretation of f onthe tropical ring ofpolynomials, asfollows.Forany L-primitve recursive function f with n arguments, there exists aconstant c f ≥ | f ( x , · · · , x n ) | ≤ max t { T t ( f ) + | x t | , c f } . P ROOF . The proof is given for non-mutual recursion schemes, by induction on the definition tree.Mutual recursion schemes follow the same pattern.1. For basic pointer functions, the result holds immediately.2. Let f be defined by composition, and assume that the result holds for the functions g , h , · · · , h n . Then, for any i = , · · · , n , | h i ( x ) | ≤ max t { T t ( h i ) + | x t | , c h i } . Moreover, there exists by in-duction c g such that | g ( h ( x ) , · · · , h n ( x )) | ≤ max i { T i ( g ) + | h i ( x ) | , c g } . Composing the inequali-ties above yields | g ( h ( x ) , · · · , h n ( x )) | ≤ max i { T i ( g ) + max t { T t ( h i ) + | x i | , c h i } , c g } = max t { T t ( f ) + | x t | , max i { c f i , c g }} .8 Pointers inRecursion: Exploring the Tropics3. Let f be defined by primitive recursion on notations, and assume that the first case holds. Let f ( a . x , y ) = g a ( x , f ( x , y ) , y ) , for a ∈ { , } , and assume T ( g ) ≤ T ( g ) ≤
0. We apply thetropical interpretation on g , and we show by induction the result for f on the length of a . x .(a) If max x , f ( x , y ) , t {| x | + T ( g a ) , | f ( x , y ) | + T ( g a ) , | y t | + T t + ( g a ) , c g a } = | x | + T ( g a ) : | f ( a . x , y ) | ≤| x | + T ( g a ) ≤ | x | + T ( f ) , and the result holds.(b) If max x , f ( x , y ) , t {| x | + T ( g a ) , | f ( x , y ) | + T ( g a ) , | y t | + T t + ( g a ) , c g a } = | f ( x , y ) | + T ( g a ) : Since T ( g a ) ≤ | f ( a . x , y ) | ≤ | f ( x , y ) | , and the induction hypothesis applies.(c) If max x , f ( x , y ) , t {| x | + T ( g a ) , | f ( x , y ) | + T ( g a ) , | y t | + T t + ( g a ) , c g a } = | y t | + T t + ( g a ) for some t : the result applies immediately by structural induction on g a .(d) If max x , f ( x , y ) , t {| x | + T ( g a ) , | f ( x , y ) | + T ( g a ) , | y t | + T t + ( g a ) , c g a } = c g a , the result holds im-mediately.(e) The base case f ( ε , y ) is immediate.4. Let f be defined by primitive recursion on notations, and assume now that the second of the twocorresponding cases holds. Let f ( a . x , y ) = g a ( x , f ( x , y ) , y ) , for a ∈ { , } . Since the first casedoes not hold, T ( g ) = T ( g ) =
1: assume that T ( g ) = T ( g ) ≤ T ( g ) ≤
0, and for all t ≥ T t ( g ) = T t ( g ) = T t − ( h ) = − ∞ .Then, we set T ( f ) = max { , c h } . We apply the tropical interpretation on g , and prove by inductionon the length of a . x that | f ( a . x , y ) | ≤ | a . x | + max { c g , c g , c h } .(a) If max t ≥ {| x | + T ( g a ) , | f ( x , y ) | + T ( g a ) , | y t | + T t ( g a ) , c g a } = | x | + T ( g a ) . Since T ( g a ) ≤ T ( f ) ≥ | f ( a . x , y ) | ≤ | x | ≤ T ( f ) + | x | , and the result holds.(b) If max t ≥ {| x | + T ( g a ) , | f ( x , y ) | + T ( g a ) , | y t | + T t ( g a ) , c g a } = | f ( x ) | + T ( g a ) . Since T ( g a ) ≤ | f ( a . x ) | ≤ + | f ( x ) | , and the induction hypothesis allows to conclude.(c) If max t ≥ {| x | + T ( g a ) , | f ( x , y ) | + T ( g a ) , | y t | + T t ( g a ) , c g a } = c g a , the result holds immedi-ately.(d) The case max t ≥ {| x | + T ( g a ) , | f ( x , y ) | + T ( g a ) , | y t | + T t ( g a ) , c g a } = | y t | + T t ( g a ) is impossi-ble since T t ( g a ) = − ∞ for t ≥ f ( ε , y ) is immediate.5. Let now assume f is define by primitive recursion on values. Then, the only possible case is similarto the first case of primitive recursion on notation.The proof by induction above emphasizes the critical difference between recursion on notation andrecursion on values: the second case of the safe recursion on notations correspond to the linear, non-sizeincreasing scanning of the input, as in, for instance, f ( a . x ) = s a ( f ( x )) . This, of course, is only possible in recursion on notation, where the height of the recursive calls stackis precisely the length of the scanned input. Recursion on values fails to perform this linear scanning,since, for a given recursive argument x , the number of recursive calls is then exponential in | x | .Proposition 4.1 proves that the tropical tiering of a function yields actually a tropical polynomialinterpretation for the function symbols: The right hand side of the Lemma inequality is indeed a tropicalinterpretation. Moreover, this interpretation is directly given by the syntax.Furthermore, the proof also highlights why we use mutual recursion schemes instead of more simple,non-mutual ones: non-size increasing discipline forbids the use of multiplicative constants in the size ofthe strings. So, in order to capture a computational space of size k . log ( n ) , we need to use k binary stringsof length log ( n ) , defined by mutual recursion.aulin Jacob´e de Naurois 39 Corollary 4.2
L-primitive pointer recursive functions are computable inlogarithmic space.P
ROOF .Proposition 4.1 ensures that the size of all binary strings is logarithmically bounded. A structuralinduction on the definition of f yields the result. The only critical case is that of a recursive construct.When evaluating a recursive construct, one needs simply to store all non-recursive arguments (the y i ’s) ina shared memory, keep a shared counter for keeping track of the recursive argument x , and use a simple while loop to compute successively all intermediate recursive calls leading to f ( x , y ) . All these sharedvalues have logarithmic size. The induction hypothesis ensures then that, at each step in the while loop, all computations take logarithmic space. The two other cases, composition and basic functions, arestraightforward.In the following section, we prove the converse: logarithmic space functions can be computed by asub-algebra of the L-primitive pointer recursive functions. In this section we restrict our tropical tiering approach to only four possible tier values: 1, 0, − − ∞ .The rules for tiering are adapted accordingly. More importantly, the use of only four tier values allowsus to denote these tropics directly in the syntax, in an approach similar to that of Bellantoni and Cook.Let us take as separator symbol the following ≀ symbol, with leftmost variables having the highest tier.As with safe recursive functions, we allow the use of a high tier variable in a low tier position, as in, forinstance, f ( x ≀ y ≀ z ≀ t ) = g ( ≀ y ≀ x , z ≀ t ) . Our tropical recursive functions are then as follows.
Basic tropical pointer functions.
Basic tropical pointer functions are the following. hd ( ≀ ≀ ≀ a . x ) = a tl ( ≀ ≀ a . x ≀ ) = x hd ( ≀ ≀ ≀ ε ) = ε tl ( ≀ ≀ ε ≀ ) = ε s ( x ≀ ≀ ≀ ) = . x s ( x ≀ ≀ ≀ ) = . x s ( x ≀ ≀ ≀ ) = E ( D ( x ) + ) Read ( ≀ ≀ ≀ x ) = a ∈ { , } Pr ni ( ≀ x i ≀ ≀ x , · · · , x i − , x i + , · · · , x n ) = x i Tropical composition.
Define t = t , t , t , t . The tropical composition scheme is then f ( x ≀ y ≀ z ≀ t ) = g ( h ( ≀ x ≀ y ≀ t ) , · · · , h a ( ≀ x ≀ y ≀ t ) ≀ h a + ( x ≀ y ≀ z ≀ t ) , · · · , h b ( x ≀ y ≀ z ≀ t ) ≀ h b + ( y ≀ z ≀ ≀ t ) , · · · , h c ( y ≀ z ≀ ≀ t ) ≀ h c + ( t ≀ t ≀ t ≀ t ) , · · · , h d ( t ≀ t ≀ t ≀ t )) Tropical Recursion on Notations - case 1. f ( x ≀ ε , y ≀ z ≀ t ) = h ( x ≀ y ≀ z ≀ t ) f ( x ≀ s a ( r ≀ ≀ ≀ ) , y ≀ z ≀ t ) = g a ( x ≀ r , f ( x ≀ r , y ≀ z ≀ t ) , y ≀ z ≀ t ) Tropical Recursion on Notations - case 2. (Linear scanning) f ( ≀ ε ≀ ≀ t ) = ε f ( ≀ s a ( r ≀ ≀ ≀ ) ≀ ≀ t ) = g a ( f ( ≀ r ≀ ≀ t ) ≀ r ≀ ≀ t ) Tropical Recursion on Values. f ( x ≀ ε , y ≀ z ≀ t ) = h ( x ≀ y ≀ z ≀ t ) f ( x ≀ s ( r ≀ ≀ ≀ ) , y ≀ z ≀ t ) = g ( x ≀ r , f ( x ≀ r , y ≀ z ≀ t ) , y ≀ z ≀ t ) As above, we use the mutual version of these recursion schemes, with the same tiering discipline.Note that, unlike previous characterizations of sub-polynomial complexity classes [3, 4, 10], our trop-ical composition and recursion schemes are only syntactical refinements of the usual composition andprimitive recursion schemes - removing the syntactical sugar yields indeed the classical schemes.
Definition 4.3
L-tropical functionsThe class of L-tropical functions is the closure of our basic tropical pointer functions, under tropicalcomposition, tropical mutual recursion on notations, and tropical mutual recursion on values.The restriction of only four tier values suffices to capture the computational power of RATMs. Moreprecisely,
Theorem 4.4
TheclassofL-tropicalfunctionsistheclassoffunctionscomputableinlogarithmicspace,with logarithmic size output.P
ROOF . L-tropical functions are L- primitive pointer recursive functions with tropics 1, 0, − − ∞ .Following Corollary 4.2, they are computable in logspace. The converse follows from the simulation ofa logarithmic space RATM. The simulation works as follows. Encoding the machine configurations.
Assume the machine M works in space k ⌈ log ( n + ) ⌉ . Aconfiguration of M is then encoded by 2 k + ⌈ log ( n + ) ⌉ :1. one string, of constant length, encodes the machine state,2. one string, of length ⌈ log ( n + ) ⌉ , encodes the pointer tape,aulin Jacob´e de Naurois 413. one string, of length ⌈ log ( n + ) ⌉ , encodes the head of the pointer tape. It contains symbolseverywhere, but on the position of the head (where it contains a ).4. k strings, of length ⌈ log ( n + ) ⌉ , encode the content of the work tape, and5. k strings, of length ⌈ log ( n + ) ⌉ , encode the position of the work tape head, with (as for the pointertape) everywhere but on the position of the head. Reading and Updating a configuration.
Linear scanning of the recursive argument in tropical recur-sion, corresponding to case 2 of the definition of tropical recursion on notations, is used to read and toupdate the encoding of the configuration. In order to do so, one defines L-tropical functions for1. encoding boolean values true and false , boolean connectives, and if then else constructs,2. scanning an input string until a is found, and computing the corresponding prefix sequence,3. computing left and right extractions of sub-strings of a string, for a given prefix,4. replacing exactly one bit in a binary string, whose position is given by a prefix of the string.With all these simple bricks, and especially with the in-place one-bit replacement, one is then able toread a configuration, and to update it, with L-tropical functions. None of these L-tropical functions usesrecursion on values. Computing the Transition map of the Machine.
Given the functions above, the transition map
Next of the machine is then computed by a simple L-tropical function of width ( k + ) : For a recursive argu-ment s of size ⌈ log ( n + ) ⌉ , Next ( ≀ s , c ≀ ≀ ) computes the configuration reached from c in one transitionstep. Simulating the RATM.
The simulation of the RATM is then obtained by iterating its transition map asuitable number of times. The time upper bound is here obtained by nesting k tropical recursive functionson values: on an input of size ⌈ log ( n + ) ⌉ , the unfolding of these recursive calls takes time n k . At eachrecursive step, this function needs to apply the transition map. The transition map having width ( k + ) ,we use here a mutual recursion scheme, of width ( k + ) . Again, for a recursive argument s of size ⌈ log ( n + ) ⌉ , we define Step ( ≀ ε , s , c ≀ ≀ ) = cStep ( ≀ s ( t ≀ ≀ ≀ ) , s , c ≀ ≀ ) = Next ( ≀ s , Step ( ≀ t , n , c ≀ ≀ ) ≀ ≀ ) Step ( ≀ ε , s , c ≀ ≀ ) = cStep ( ≀ s ( t ≀ ≀ ≀ ) , s , c ≀ ≀ ) = Step ( ≀ s , s , Step ( ≀ t , s , c ≀ ≀ ) ≀ ≀ ) ... Step k ( ≀ ε , s , c ≀ ≀ ) = cStep k ( ≀ s ( t ≀ ≀ ≀ ) , s , c ≀ ≀ ) = Step k − ( ≀ s , s , Step k ( ≀ t , s , c ≀ ≀ ) ≀ ≀ ) . Replacing s by the Offset in the above gives the correct bounds. Finally, one simply needs to usesimple L-tropical functions for computing the initial configuration, and reading the final configuration.2 Pointers inRecursion: Exploring the Tropics
Definition 5.1
LP-tropical functionsThe class of LP-tropical functions is the closure of our basic tropical pointer functions, under tropicalcomposition and tropical mutual recursion on notations.
Theorem 5.2
The class of LP-tropical functions is the class of functions computable in logarithmicspace, polylogarithmic time,withlogarithmic size output.P
ROOF . Mutual recursion on notations, with recursive arguments of logarithmic size, are computablein polylogarithmic time, following similar arguments as in the proof of Theorem 4.4. The conversefollows from the simulation in the proof of Theorem 4.4 above, where mutual recursion on values for thefunctions
Step i is replaced by mutual recursion on notations. In this section we extend the approach of Leivant and Marion [12] to our setting. Let us define a similartropical recursion on notations with substitutions. Note that the tropical tiering discipline prevents usingsubstitutions in case 2 of the tropical recursion on notations. Substitutions are therefore only defined forcase 1 of this recursion scheme.
Tropical Recursion with substitutions on Notations.
Given functions h , g , g , k and k , f ( x ≀ ε , u , y ≀ z ≀ t ) = h ( x ≀ u , y ≀ z ≀ t ) f ( x ≀ s a ( r ≀ ≀ ≀ ) , y ≀ u , z ≀ t ) = g a ( x ≀ r , f ( x ≀ r , k ( ≀ u ≀ ≀ ) , y ≀ z ≀ t ) , f ( x ≀ r , k ( ≀ u ≀ ≀ ) , y ≀ z ≀ t ) , y ≀ z ≀ t ) . Tropical Recursion with substitutions on Values.
Given functions h , g , k and k , f ( x ≀ ε , u , y ≀ z ≀ t ) = h ( x ≀ u , y ≀ z ≀ t ) f ( x ≀ s ( r ≀ ≀ ≀ ) , y ≀ u , z ≀ t ) = g ( x ≀ r , f ( x ≀ r , k ( ≀ u ≀ ≀ ) , y ≀ z ≀ t ) , f ( x ≀ r , k ( ≀ u ≀ ≀ ) , y ≀ z ≀ t ) , y ≀ z ≀ t ) .Again, as above, we assume these recursion schemes to be mutual. Definition 6.1
P-tropical functionsThe class of P-tropical functions is the closure of our basic tropical pointer functions, under tropicalcomposition, tropical recursion on notations and on values, and tropical recursion with substitutions onnotations and on values.
Theorem 6.2
Theclass of P-tropical functions with binary output isthe class P.P
ROOF . The result follows from
Alogspace = P [5], and Theorem 4.4. Substitutions in the tropicalrecursion scheme on notations amounts to alternation. Restriction to decision classes instead of functionclasses comes from the use of alternating Turing machines, which compute only decision problems.Let us first see how to simulate a logspace alternating machine with P-tropical functions. Recall thenotations and functions of the proof of Theorem 4.4. Since we now need to simulate a non-deterministic,alternating machine, we assume without loss of generality that we now have two kinds of machine states:aulin Jacob´e de Naurois 43 • non-deterministic universal • non-deterministic existentialand that non-deterministic transitions have at most two branches. Therefore, we also assume that wehave one predicate that determines the kind of a state in a configuration c : IsUniversal ( ≀ s , c ≀ ≀ ) .This predicate is assumed to output false or true .We also assume that we have two transition maps, Next ( ≀ s , c ≀ ≀ ) , and Next ( ≀ s , c ≀ ≀ ) , for com-puting both branches of non-deterministic transitions. For deterministic transitions, we assume bothbranches are the same. Finally, we also assume we have a predicate isPositive ( ≀ s , c ≀ ≀ ) , whichreturns true if the configuration c is final and accepting, and false otherwise.We define now, with substitutions, the following: Accept ( ≀ ε , s , c ≀ ≀ ) = isPositive ( ≀ s , c ≀ ≀ ) Accept ( ≀ s ( t ) , s , c ≀ ≀ )) = match IsUniversal ( ≀ s , c ≀ ≀ ) with | true − > AND ( ≀ Accept ( ≀ t , Next ( ≀ s , c ≀ ≀ ) , c ≀ ≀ ) , Accept ( ≀ t , Next ( ≀ s , c ≀ ≀ )) ≀ ≀ ) | false − > OR ( ≀ Accept ( ≀ t , Next ( ≀ s , c ≀ ≀ )) , c ≀ ≀ ) , Accept ( ≀ t , Next ( ≀ s , c ≀ ≀ )) ≀ ≀ ) .Then, for t and s large enough, and an initial configuration c , Accept ( ≀ t , s , c ≀ ≀ ) outputs the result ofthe computation of the machine. Finally, nesting up to k layers of such recursion on values schemesallows, as in the proof of Theorem 4.4, to simulate a polynomial computation time.The other direction is pretty straightforward: For any instance of a recursion scheme with substitu-tions, for any given values r , u , x , y and z , each bit of g a ( x ≀ r , f ( x ≀ r , k ( ≀ u ≀ ≀ ) , y ≀ z ≀ t ) , f ( x ≀ r , k ( ≀ u ≀ ≀ ) , y ≀ z ≀ t ) , y ≀ z ≀ t ) is a boolean function of the bitsof f ( x ≀ r , k ( ≀ u ≀ ≀ ) , y ≀ z ≀ t ) and f ( x ≀ r , k ( ≀ u ≀ ≀ ) , y ≀ z ≀ t ) . Hence, it can be computed by an alter-nating procedure. The space bound follows from the bound on the size of the strings, provided by thetiering discipline. Definition 6.3
NC-tropical functionsThe class of NC-tropical functions is the closure of our basic pointer tropical functions, under tropicalcomposition, tropical recursion on notations and tropical recursion with substitutions on notations.
Theorem 6.4
Theclass of NC-tropical functions withbinary output is NC.P
ROOF . The result follows from A ( logspace , polylogtime ) = NC [16], and Theorem 4.4. Substitu-tions in the tropical recursion scheme on notations amounts to alternation. The proof is similar to that ofTheorem 6.2, where additionally, • The time bound on the computation of the machine needs only to be polylogarithmic, instead ofpolynomial. As in Theorem 5.2, tropical recursion on notations suffices to obtain this bound, andtropical recursion on values is no longer needed. • For the other direction, any bit of g a ( x ≀ r , f ( x ≀ r , k ( ≀ u ≀ ≀ ) , y ≀ z ≀ t ) , f ( x ≀ r , k ( ≀ u ≀ ≀ ) , y ≀ z ≀ t ) , y ≀ z ≀ t ) is again a boolean func-tion of the bits of f ( x ≀ r , k ( ≀ u ≀ ≀ ) , y ≀ z ≀ t ) and f ( x ≀ r , k ( ≀ u ≀ ≀ ) , y ≀ z ≀ t ) . Here, this booleanfunction can be computed by a boolean circuit of polylogarithmic depth, hence, by an alternatingprocedure in polylogarihtmic time. The arguments behind this remark are the same as the ones inthe proof of A ( logspace , polylogtime ) = NC .4 Pointers inRecursion: Exploring the Tropics Theorems 4.4, 5.2, 6.2, and 6.4 rely on mutual recursive schemes. As stated above, we use these mutualschemes to express a space computation of size k log ( n ) for any constant k , with binary strings of lengthat most log ( n ) + c . If we were to use only non-mutual recursion schemes, we would need to have longerbinary strings. This can be achieved by taking as input to our functions, not simply the Offset , but somelarger string k ( Offset ) , where k is a function that appends k copies of its argument.It also remains to be checked wether one can refine Theorem 6.4 to provide characterizations of theclasses NC i as in [13]. A first step in this direction is to define a recursion rank, accounting for thenesting of recursion schemes: then, check wether NC-tropical functions of rank i are computable in NC i .Conversely, check also whether the simulation of Theorem 4.4 induces a fixed overhead, and wether NC i can be encoded by NC-tropical functions of rank i + c for some constant c small enough.Finally, note that we characterize logarithmic space functions with logarithmically long output (The-orem 5.2), and NC functions with one-bit output (Theorem 6.4). As usual, polynomially long outputsfor these classes can be retrieved via a pointer access: it suffices to parameterize these functions with anadditional, logarithmically long input, denoting the output bit one wants to compute. In order to retrievefunctions with polynomially long output, this approach could also be added to the syntax, with a Write construct similar to our
Read construct, for writing the output.
References [1] Bill Allen (1991):
Arithmetizing Uniform NC . Ann. Pure Appl. Logic 53(1), pp. 1–50,doi:10.1016/0168-0072(91)90057-S.[2] Stephen Bellantoni & Stephen A. Cook (1992):
A New Recursion-Theoretic Characterization of the PolytimeFunctions . ComputationalComplexity 2, pp. 97–110, doi:10.1007/BF01201998.[3] Stephen A. Bloch (1994):
Function-Algebraic Characterizations of Log and Polylog Parallel Time . Compu-tationalComplexity4, pp. 175–205, doi:10.1007/BF01202288.[4] Guillaume Bonfante, Reinhard Kahle, Jean-Yves Marion & Isabel Oitavem (2016):
Two function algebrasdefining functions in NCk boolean circuits . Inf.Comput. 248, pp. 82–103, doi:10.1016/j.ic.2015.12.009.[5] Ashok K. Chandra, Dexter Kozen & Larry J. Stockmeyer (1981):
Alternation . J. ACM 28(1), pp. 114–133,doi:10.1145/322234.322243.[6] P. Clote (1989):
Sequential, machine-independent characterizations of the parallel com-plexity classes ALOGTIME, AC k , NC k and NC . Feasible Mathematics, Birkha¨user,49-69,doi:10.1007/978-1-4612-3466-1 4.[7] A. Cobham (1962): The intrinsic computational difficulty of functions . In Y. Bar-Hillel, editor: Proceed-ings of the International Conference on Logic, Methodology, and Philosophy of Science, North-Holland,Amsterdam, pp. 24–30, doi:10.2307/2270886.[8] Martin Hofmann (2003):
Linear types and non-size-increasing polynomial time computation . Inf. Comput.183(1), pp. 57–85, doi:10.1016/S0890-5401(03)00009-9.[9] Martin Hofmann & Ulrich Sch¨opp (2010):
Pure pointer programs with iteration . ACMTrans.Comput.Log.11(4), pp. 26:1–26:23, doi:10.1145/1805950.1805956.[10] Satoru Kuroda (2004):
Recursion Schemata for Slowly Growing Depth Circuit Classes . ComputationalComplexity 13(1-2), pp. 69–89, doi:10.1007/s00037-004-0184-4.[11] Daniel Leivant (1991):
A Foundational Delineation of Computational Feasiblity . In: ProceedingsoftheSixthAnnual Symposium on Logic in Computer Science (LICS ’91), Amsterdam, The Netherlands, July 15-18,1991, IEEE Computer Society, pp. 2–11, doi:10.1109/LICS.1991.151625. aulin Jacob´e de Naurois 45 [12] Daniel Leivant & Jean-Yves Marion (1994):
Ramified Recurrence and Computational Complexity II: Sub-stitution and Poly-Space . In Leszek Pacholski & Jerzy Tiuryn, editors: CSL, Lecture Notes in ComputerScience 933, Springer, pp. 486–500, doi:10.1016/0022-0000(83)90008-9.[13] Daniel Leivant & Jean-Yves Marion (2000):
A characterization of alternating log time by ramified recur-rence . Theor.Comput.Sci. 236(1-2), pp. 193–208, doi:10.1016/S0304-3975(99)00209-1.[14] Daniel Leivant & Jean-Yves Marion (2000):
Ramified Recurrence and Computational Complexity IV: Predicative Functionals and Poly-Space . Information and Computation, p. 12 p. Available at https://hal.inria.fr/inria-00099077 . To appear. Article dans revue scientifique avec comit´e delecture.[15] J. C. Lind (1974):
Computing in logarithmic space . Technical Report, Massachusetts Institute of Technology.[16] Walter L. Ruzzo (1981):