<<

On Uniformity Within NC

David A Mix Barrington HowardStraubing

University of Massachusetts University of Massachusetts Boston Col lege

Journal of Computer and System Science

Abstract

In order to study classes within NC in a uniform setting we need

a uniformity condition which is more restrictive than those in common use Twosuch

conditions stricter than NC uniformity RuCo have app eared in recent research

Immermans families of circuits dened by rstorder formulas ImaImb and a unifor

mity corresp onding to Buss deterministic logtime reductions Bu We show that these

two notions are equivalent leading to a natural notion of uniformity for lowlevel circuit

complexity classes Weshow that recent results on the structure of NC Ba still hold

true in this very uniform setting Finallyweinvestigate a parallel notion of uniformity

still more restrictive based on the regular languages Here we givecharacterizations of sub

classes of the regular languages based on their logical expressibility extending recentwork

of Straubing Therien and Thomas STT A preliminary version of this work app eared

as BIS

Intro duction

Circuit Complexity

Computer scientists have long tried to classify problems dened as Bo olean predicates

or functions by the size or depth of Bo olean circuits needed to solve them This eort has

Former name David A Barrington Supp orted by NSF grant CCR Mailing address Dept of

Computer and Information Science U of Mass Amherst MA USA



Supp orted by NSF grants DCR and CCR Mailing address Dept of Computer and

Information Science U of Mass Amherst MA USA



Supp orted by NSF grant CCR Mailing address Dept of Computer Science Boston College

Chestnut Hill MA USA

develop ed into the eld of circuit complexity theory where classes of problems are dened

in terms of constraints on circuits solving them This study has b ecome more imp ortant

recently b ecause of the connections b etween size and depth of Bo olean circuits and number

of pro cessors and running time on a parallel computer see Co ok Co for a general survey

The complexityclass NC consists of those Bo olean functions functions from f g

to f g which can b e computed by circuits of fanin two and depth O log n That is f

is in NC if for each n there is a circuit C which computes f correctly on inputs of size

n

n and each C has depth at most c log n for some constant c This is nonuniform NC

n

we discuss uniformity b elow

Problems in NC are usually considered particularly easy to solve in parallel and thus

NC is considered a small for example it is the smallest of the ten

surveyed by Co ok Co But it lies ab ove a certain frontier our current techniques

for proving lower b ounds on circuit complexityhave not allowed us to proveany signicant

problems to b e outside of it for example even any NP complete problems This motivates

a study of sub classes of NC whichmight lie b elow this frontier in an eort to develop

new techniques and new understanding

There is a sub class of NC for which separation results are known AC is the class

of problems whichhave circuits of p olynomial size and constant depth in a mo del with

unb ounded fanin Furst Saxe and Sipser FSS and indep endently Ajtai Aj proved

that the exclusive OR function is not in AC separating this class from NC Laterwork

has attempted to extend the frontier upward from AC byproving lower b ounds for more

powerful sub classes

Razb orov Ra considered the extension of AC obtained by also allowing unb ounded

fanin exclusive OR gates and showed that the ma jority function dened by f x x

n

i the ma jorityofthex are is not in this class Barrington Ba dened the class

i

AC C AC with counters which further extends Razb orovs class by allowing unb ounded

fanin gates whichcount their inputs mo dulo some constant He conjectured that the ma

jority problem was not in AC C and hence that AC C NC This remains op en though

Smolensky Sm has proved some imp ortant partial results in this direction intro ducing

what promises to b e a p owerful new pro of technique Existing techniques have b een unable

to showeven an NP complete problem to b e outside of AC C

Between AC C and NC is another class which has excited considerable interest A

threshold gate counts its Bo olean inputs which are and compares the total with some

predetermined numb er to determine its output This generalizes unb ounded fanin AND

threshold indegree OR threshold and ma jority threshold half the indegree

gates but any threshold gate can b e built out of these three basic typ es TC is the class of

problems solvable by families of circuits of unb ounded fanin threshold gates where circuit

depth is b ounded by a constant and circuit size by a p olynomial in the input size As

individual threshold gates can b e simulated in NC TC NC also it is fairly easy to

see that AC C TC Considerable recentwork has dealt with TC someofitmotivated

by analogies with neural computing PSHMPSTRe

Uniformity

In their nonuniform versions these circuit complexity classes contain problems which

are not computable at in the ordinary sense eg any is in AC To

compute with a circuit family wemust b e able to construct the circuit for each input size

Wemay lo osely dene a uniform circuit family as one in which the b ehavior on all inputs

of any size is sp ecied by a single nite bit string A weak uniformity condition would b e

to allow this string to b e the description of a which on input n pro duces

the circuit C Since we are concerned with complexity and not just computabilitya better

n

denition places resource restrictions on the Turing machine

A circuit family hC C i is P uniform if the circuit C can b e constructed from n

n

in time p olynomial in n It is uniform if C can b e constructed using space O log n

n

These denitions suce to prove the classical result that uniform circuits of p olynomial

size are equivalent in computing p ower to Turing machines using p olynomial time In fact

the same pro of shows the result either for P uniform or Luniform circuits showing these

two classes equivalent to each other

There is a sense in whichtheLuniform version of this result is more satisfying than

the P uniform one In the latter case if webelieve P Lwe know that wehave isolated

an imp ortant fact ab out circuits and machines That is the p olynomialsize circuits were

able to simulate the p olynomialtime machines on their own without the p otential help of

a p olynomialtime machine used to construct them

As we study a given circuit complexityclasswewould like to use a uniformity condition

which separates these two sources of computational p ower That is wewant to allow strictly

less p ower to construct the circuits than the circuits themselves p osess In this pap er we

explore a variety of conditions suitable for the study of the classes AC AC C TC and

NC

unifor There is a reasonable though complicated notion of NC uniformityU

E

mity due to Ruzzo Ru see also Co which has the consequence that NC uniform

NC is equivalent to alternating logarithmic time mo dulo appropriate conventions on the

alternating Turing machines This denition is based not on constructing the circuit but

on answering certain classes of questions ab out it in alternating logarithmic time Most

pro ofs involving P orLuniform circuit families go through under this denition making

it a go o d to ol for studying complexity classes ab ove NC But to go within NC itself we

will require new notions still more restrictive

We note that one may still sp eak of say P uniform NC and that this may b e a class of

considerable interest At least by analogy it represents problems for whicha very fast chip

could b e manufactured by a sequential pro cess in reasonable time Many natural problems

have b een shown to b e in P uniform NC and are not known to b e in more uniform versions

BCHRe Recentwork by Allender Al shows P uniform NC to b e a fairly robust

class with a numb er of equivalent denitions

Summary of Results

In this pap er we consider three candidates for a suitable notion of uniformity within

the class NC Each is based on a sub class of NC the computational p ower used in

sp ecifying the circuits in a family is limited to this sub class In Section wemake precise

the denitions of the circuit classes already mentioned and the ways in which circuits are

sp ecied

The rst notion is based on Immermans theory of expressibility as a complexity measure

ImaImb The basic complexity class in this scheme is the class FO of languages which

can b e expressed by rstorder formulas in a certain formal system to b e explained in detail

in Section First order formulas can b e evaluated by AC circuits of a particularly regular

form so that FO is a uniform version of AC

In Section we will examine classes dened by rstorder formulas which include new

typ es of quantiers giving uniform versions of AC C TC andNC Whereas ordinary

quantiers express whether an instance or all instances of the quantied variable are satis

fying the new quantiers will p erform some other function on the sequence of truth values

given by the sequence of instances For example we will dene quantiers which can count

the satisfying instances mo dulo some constant determine whether the ma jority of the in

stances are satisfying or even interpret the truth values as elements of some nite group

and multiply them In fact we will dene quantiers for any function meeting a certain

technical condition that of b eing monoidal The expressibilityscheme extends to even

larger complexity classes through the use of syntactic iteration in formulas see for

example Imb

In Section weintro duce our second notion of uniformity This is based on deterministic

logarithmic time and the logtime hierarchy used extensively in the pro of by Samuel Buss

Bu that the Bo olean formula value problem is in alternating logarithmic time ie NC

uniform NC Tomake these classes meaningful wemust allow random access for the

readonly input tap e of the Turing machine Buss restricts his NC circuits to b e Bo olean

formulas fanout and thus is able to use a uniformity condition equivalent to Ruzzos

but simpler to state His condition is that a certain formula language b e decidable by

an alternating Turing machine in time O log n but we will consider families in which the

same language is decidable byadeterministic Turing machine within this time b ound We

will dene a notion of expression which will extend the notion of inx Bo olean formula

to allow op erators of unb ounded fanin and op erators for other functions b esides AND and

OR such as mo dular counting ma jorityandgroupmultiplication We will also consider

families of circuits with gates for these additional functions for which certain queries can

be answered by a deterministic logtime Turing machine These new notions implicit in

Buss use of deterministic logtime reductions are additional candidates for a uniformity

notion within NC

In Section weprove our main technical result which directly relates our rst two

notions of uniformity Weshow that the computation of a deterministic logtime Turing

machine maybesimulated by a rstorder formula ie that the language of strings accepted

by a particular logtime machine is rstorder expressible From this we show that the class

FO is equal to the logtime hierarchy used by Buss

In Section weprove our main result that our rst two notions give a robust denition

of uniformity for these circuit complexity classes

Theorem Let F be any set of monoidal functions The following are equivalent

denitions of L is in uniform AC F eg AC AC C TC orNC

L is rstorder denable using F quantiers

L is recognized bya DLOGT I M E uniform family of constantdepth p olynomialsize

circuits with gates for AND OR and a nite set of functions in F

L is recognized by a rstorder denable family of such circuits

L is recognized byaDLOGT I M E uniform family of constantdepth p olynomial

length expressions using AND OR and a nite set of functions from F

L is recognized by a rstorder denable family of such expressions

For NC and ab ove these denitions also coincide with the earlier notion of NC uniformity

RuCo

Given a robust notion of uniformity which can op erate within NC we then pro ceed in

Section to examine the resulting uniform classes A natural question to ask is whether

known results ab out the structure of NC hold true under these denitions We show that

Barringtons construction Ba of NC circuits to simulate branching programs can b e

carried out in this setting This is an improvementover the original argumentunderNC

uniformity as this app eared to require the full p ower of ALO GT I M E This construction

gives the following stronger version of the theorem See Ba or BT for denitions and

the relevance of solvability of groups and monoids

Corollary The word problem for S or for any nonsolvable monoid is com

plete for uniform NC under uniform AC reductions using this new notion of uniformity

Therefore uniform branching program families of width and p olynomial size recognize

exactly uniform NC

The third notion of uniformitywe consider in Section uses the regular languages as

our basic sub class of NC It arises when we consider the fact that b oth the other notions

allow reference to individual bits of a binary integer A logtime Turing machine can do this

by indirect addressing and Immermans logical system contains an explicit atomic predicate

th

BI T i j which gives the i bit of the binary expansion of j What sort of more restrictive

uniformity notion do we get by removing this ability from the logical system

There are four complexity classes to consider here the languages expressible by rst

order formulas using each of our four typ es of quantiers The rst twogiveuswellstudied

sub classes of the regular languages The languages expressible by rstorder formulas with

out BI T are exactly the aperiodic or groupfree regular languages as rst proved by Mc

Naughton and Pap ert MP When we add counting quantiers to get a uniform version

of AC C we get exactly the solvable regular languages as shown recently by Straubing

Therien and Thomas STT

The two more p owerful quantier typ es ma jorityquantiers and group multiplication

quantiers yield uniform versions of TC and NC in the presence of BI T Thus adding

them without BI T can b e thought of as giving even more uniform versions of these classes

Weinvestigate the classes of languages expressible in these two situations and show that in

each case we get a previously encountered language class

Theorem The BI T predicate can b e dened by a rstorder formula with ma jor

ityquantiers in this version without BI T as a primitive Hence this version of uniform

TC is the same as the other

Theorem A language can b e expressed by a rstorder formula with group

quantiers and ordinary quantiers without BI T iitisregular

These two cases are very dierent as in the latter case we nd that this more restrictive

notion gives us a dierent class That is the ability to lo ok at individual bits is crucial to

the relationship b etween nite groups and NC In Section we explore this issue further

employing classical results on the algebraic structure of nite automata See eg Ei

La or Pi for background and terminology

A nite automaton denes a monoid of transformations on its states a set of func

tions with an asso ciative op eration functional comp osition and an identity the identity

function on the states The b ehavior of an automaton on a given input string is a transfor

mation which is the pro duct of the transformations corresp onding to each input letter This

mapping from strings to b ehaviors contains the essence of the automatons computation

It can distinguish two input strings only by mapping them to dierentbehaviors Wesay

that a language is recognized by a monoid M if it is recognized by an automaton that has

M as its underlying monoid of transformations

In general an automaton can recognize more languages if this monoid is larger or more

complicated A structure theory of nite monoids has b een develop ed originally byKrohn

and Rho des KRT generalizing the structure theory of nite groups Just as all groups

can b e decomp osed into simple groups the comp osition factors of the JordanHolder theo

rem all monoids can b e decomp osed into simple groups and monoids containing no non

trivial groups

We are able to characterize languages expressible with group quantiers in terms of the

structure of monoids that recognize these languages In the logical language with BI T all

nonab elian simple groups are equivalent with quantiers for anyofthemwe can express

any NC predicate and thus multiplication in any other group But without BI T wecan

prove that these building blo cks are indep endent ie that using one nonab elian simple

group we cannot express another

Theorem Let G b e a family of nite groups A language L can b e expressed

using quantiers for groups in G and ordinary quantiers i it is regular and is recognized

byamonoidM suchthatevery simple group o ccurring in the decomp osition of M is a

comp osition factor of a group in G

We conclude in Section with some op en problems and directions for further research

Denitions of NC and sub classes

Wenow make precise the denitions of the circuit families and circuit complexityclasses

whichwehave b een discussing A is a lab elled whose

no des called gatesareeach assigned a value from f g which is a function of the values of

its predecessor no des The source no des or inputs are each lab elled with the name of one of

n input variables or its negation and there is a single sink no de the output Eachinternal

no de is lab elled with a Bo olean function of its inputs Later we will consider extensions to

this mo del where other functions of the inputs are allowed at internal no des The whole

n

circuit computes a function from f g to f gThesize of a circuit is the number of its

no des and the depth is the length of the longest path from an input to an output

A circuit family is a set consisting of a circuit C for eachinteger n and computes

n

a function from f g to f g or equivalently recognizes a language a subset of f g

The size and depth of a family are functions of nWe will dene dierent classes of languages

by placing various b ounds on these size and depth functions and varying the typ es of gates

allowed The most common gates will b e the AND and OR functions with the additional

variation that wemay restrict the fanin of the gates to two or not restrict it at all

In order to dene various uniformity conditions we will havetoxascheme for describ

ing circuits Let hC ni b e a circuit family where eachnodeineach circuit is given

n

anumb er unique for that circuit If the circuit contains gates computing noncommutative

op erations as will some of our examples we insist that the children of a no de b e numbered

consistently with the order of evaluation Then the direct connection language of the circuit

family is the set of all tuples ht a b y i where a and b are numb ers of no des in C b is a child

n

of anodea is of typ e t and y is any string of length n The string y is added to give the

query string the prop er length An alternate approachwould b e to replace y with a binary

representation of n and alter as necessary the resource b ounds for computing queries as in

BCGR If C is any class of languages a circuit family is said to b e C DCLuniform if

its direct connection language is in C

A Boolean formula is a string denoting a sp ecial kind of Bo olean circuit a tree whose

gates are binary ANDs and ORs The circuit is represented in the usual inx notation

see eg Bu with the addition of a sp ecial space character whichmay b e inserted

anywhere with no eect on the formulas meaning This will allow us more freedom in

formatting our formulas but will not cause us any more diculty in parsing them We

dene a formula family to b e similar to a circuit family a set consisting of an ninput

formula for each n and has size and depth functions like those of a circuit family

A general expression is also a string denoting a circuit which is a tree but the circuit

mayhave gates of arbitrary fanin and mayhave gate typ es other than AND and OR The

string for a particular gate consists of an identier for the gate typ e and strings for eachof

the no des children enclosed by parentheses and separated by commas The length of an

expression is the number of characters in the string and its depth is the depth of nesting

As with Bo olean formulas we allow a space character to o ccur at any p oint with no eect on

the meaning We dene expression families in the same way as circuit or formula families

The formula language ofaformula family or the expression language of an expression

th th

family is the set of tuples hc i y i for which jy j n and the i character of the n formula

or expression is a c Again a formula or expression family is said to b e C uniform if its

formula or expression language is in C

We will now dene our basic circuit complexity classes in their nonuniform versions

The class NC is dened as those languages recognized by families of circuits of AND and

OR gates of fanin two and depth O log n The class AC is dened as those languages

O

recognized by families of circuits of AND and OR gates with arbitrary fanin size n

i i

and depth O See eg Co for more on the classes NC and AC It is easy to

show AC NC and the inclusion is known to b e strict FSS Aj

Both NC and AC haveequivalent denitions in their nonuniform versions by fami

lies of expressions NC is the class of languages recognized by families of Bo olean formulas

of p olynomial length Sp or by families of p olynomial length and depth O log n AC

is the class of languages recognized by families of expressions of p olynomial length and

constant depth using the unb ounded fanin AND and OR op erations

Given a function f from f g to f g the AC closure of f is dened as those

languages recognized by families of circuits of AND OR and f gates with arbitrary fanin

O

size n and depth O An f gate with m inputs computes the restriction of f to

m

f g Similarly wemay sp eak of the AC closure of a family of functions As ab ove

an equivalent denition can b e given in terms of expressions with op erations drawn from a

particular family of functions

We dene AC q tobetheAC closure of the functions MODq awhich return

i the sum of the inputs is equal to a mo dulo q The class AC C is the union of AC q

for all q It is easy to see that AC C NC and this inclusion is conjectured to b e

strict Ba Partial results are known in this direction The function MAJ which returns

i the input has more s than s is in NC but was shown to b e outside AC by

Razb orov Ra and outside AC p for all primes p by Smolensky Sm Smolensky also

showed MODq a AC pfor p prime and q not a p ower of p

We dene TC to b e the AC closure of MAJ cf HMPST This is equivalentto

the class of languages recognized by circuits of p olynomial size and constant depth made

up of arbitrary threshold gates cf PS TC is a subset of NC and it is conjectured

HMPST that the inclusion is strict A language is said to b e complete for NC under

AC reductions if its AC closure is NC Languages known to b e complete for NC include

the Bo olean formula value problem Bu and a class of algebraically dened languages the

wordproblems for any nonsolvable group Ba or monoid BT whichwenow describ e

A monoid is a set with an asso ciative binary op eration and an identity groups are

a sp ecial case monoids with inverses for all elements Given a nite monoid M a

representation of the elements of M as binary strings and a punctuation scheme so that

sequences of elements of M can b e denoted the word problem for M and a M is the

set of strings denoting sequences whichmultiply to a If M is represented as a set of

transformations of a set of w elements this word problem is equivalent to a problem ab out

certain directed graphs of width w that is where the no des are partitioned into an ordered

set of levels each of size w and each directed edge go es from a no de in one level to a no de

in the next level We represent the word problem by using the edges out of one level to

represent the transformation corresp onding to each monoid element and asking questions

ab out the existence of paths from the rst level to the last It has b een shown Ba Ba

BT that determining the output of a family of such branching programs of constant width

and p olynomial size is equivalent in diculty to these word problems This has led to the

proofthatsuch programs of width recognize exactly NC and to characterizations of the

classes AC and AC C

The FirstOrder Framework

Immerman has b een studying the complexityof expressing prop erties in rstorder logic

as opp osed to the complexityof checking whether or not an input has a given prop ertyIn

this framework inputs are rstorder structures Firstorder logic is a familiar language for

expressing prop erties Here we presenta sketch of the relevant denitions See Ima or

Imb for more detailed denitions and background information

We will use formulas to express prop erties of Bo olean strings though the system easily

extends to express prop erties of graphs or of more complicated structures Our logical

language will havevariables which range over p ositions in the string that is numb ers from

ton for some nWe will have constantsymb ols for and n and binary predicates and

th

on numbers We access the input by a unary predicate X i whose value is the i bit of

the input string Finally for technical reasons we include the binary predicate BI T i j

th

on numb ers which holds i the i bit in the binary expansion of j is a one

Wenow dene our rstorder language L to b e the set of formulas built up from the given

relation symb ols and constant symb ols BITnX using logical connectives

variables x y z and quantiers Asentence in L ie a formula with no

free variables expresses a prop erty of strings a given string determines values of n and

of X i for each i and these values make the formula either true or false Dene FO to b e

the set of all languages expressible by sentences in L

This system can b e augmented in a number of interesting ways One can add new

constant and relation symb ols to sp eak ab out more complicated structures than strings

When we deal with regular languages later it will b e convenient to sp eak of strings of

inputs over an arbitrary nite alphab et A rather than just f gWe do this by replacing

the atomic predicate X withatomicpredicatesC foreach a A such that C iis

a a

th

true i the i input character is an a To take another example the language of graphs

would replace X with a binary relation symbol E for the edge predicate on pairs of

vertices One can add a least xed p oint op erator LFP to rstorder logic to formalize the

power of dening new relations by induction Immerman and Vardi indep endently showed

that the language FO LF P is equal to p olynomial time Im Va Immerman also

considered the addition of a transitive closure op erator TC to rstorder logic and showed

that FO TCNSPACElog nImIm

Recently Immerman has observed that rstorder inductive denitions of depth tn

INDtn express exactly the same prop erties as those checkable in time tn on a con

current read concurrent write parallel random access machine having p olynomially many

pro cessors CRAMTIMEtn Im An immediate corollary is

Fact Im FO CRAMTIMEO

It was previously known that the nonuniform versions of FO and CRAMTIMEO

are equal to nonuniform AC ImSV This coupled with the ab oveFact suggests the

class FO as a natural candidate for the role of uniform AC Wewillgivesomeinteresting

evidence for the robustness of this uniformity denition

In the next section we will also augment this framework by adding new quantiers to the

language which express op erations not denable in the original FO In particular wewill

dene quantiers which will corresp ond exactly to the new gate typ es mo dular counting

ma jority and group multiplying whichwe added to the Bo olean circuit mo del to give the

nonuniform classes AC C TC and NC

Generalized Quantiers

Wewillnow formally dene the new quantiers with whichwe will augment the rstorder

system in order to express languages in larger complexity classes We will b egin with several

examples eachofwhich will corresp ond to one of the new gate typ es intro duced in Section

We will then give a general denition Later in our main theorem we will show that each

such augmented rstorder system can express exactly those languages in the corresp onding

DLOGT I M E uniform circuit complexity class

We b egin with modular counting quantiers Q for each p ositiveinteger m and each

ma

integer a with am Given a formula x with one free variable xwe consider the

truth values of xas x ranges over the p ositions in the input The sentence Q xx

ma

is dened to b e true exactly if the numb er of p ositions x making x true is equal to a

mo dulo mFor example the formula Q xC x over the alphab et f g represents the

parity language of FSS We dene the class FOC rstorder with counters to b e those

languages expressible by rstorder formulas containing ordinary quantiers and mo dular

counting quantiers From the ab ove example we can see that FOC contains languages not

in AC and thus strictly contains FO Clearly a rstorder formula with mo dular counting

quantiers maybeevaluated on a particular input byan AC C circuit as a quantier Q

ma

canbesimulated by a gate computing the function MODm a Thus FOC AC C

Next we dene the majority quantier M which captures the notion of threshold com

putation Again let x b e a formula with one free variable x and consider the truth values

of xas x ranges through all the input p ositions The sentence Mxx is dened to

b e true exactly if x is true for more than half of the p ossible xWe also dene quanti

cation over pairs of variables eg Mxyx y for a formula with twofreevariables

is true i x y is true for a ma jority of pairs hx y i We will showbelow in Prop osi

tion that this quantier maybesimulated by the ordinary ma jorityquantier and the

BI T predicate Wehave not b een able to express the ma jorityofpairs quantier using

the onevariable ma jority quantier in the absence of BI T and we conjecture that this is

imp ossible In Section b elowwe shall see that this quantier can b e used to express

a wide variety of predicates As each use of the ma jority quantier can b e simulated bya

ma jority gate the languages expressible by rstorder formulas with ma jority quantiers

the class FOM form a subset of TC

Each of these typ es of quantiers can b e thought of as p erforming a computation on

the values of x for the dierent x In the case of an ordinary universal quantier these

values are multiplied to give the truth value of the quantied formula xx In the

case of an ordinary existential quantier these values are added in the twoelement Bo olean

algebra In the case of the mo dular counting quantiers the values are added mo dulo m

and the result is compared with some sp ecied value a Finally in the case of the ma jority

quantiers the values are added as integers and compared with some sp ecied value

Our last quantier typ e is a generalization of the mo dular counting quantiers the group

quantiers There is a natural order on the p ositions x in the input so that the values of

a formula xprovide an ordered sequence as x ranges through the p ositions There is no

reason whywe cannot think of applying a noncommutative op eration on this sequence In

particular the op eration of multiplication in a nonsolvable group app ears to have particular

computational signicance Can we capture this op eration in the rstorder setting bya

new quantier typ e

Todosowemust have truth values with more than two p ossible values as fol

k

lows Fix a nite group G and a mapping from f g onto G for some xed integer k

Let h x xi be a vector of rstorder formulas with a single common free vari

k

able x For each xletg x b e the elementof G denoted by the vector of truth values

h x xi For each element g of G and each input of length nwe dene the

k

Gg

sentence xh x xi to b e true i the elementof G obtained bymultiplying

k

g g gnisg This idea allows us to immediately dene monoid quantiers for any

k

nite monoid M and map from f g onto M but we will use only group quantiers in

this pap er

We are now ready to dene our generalized quantiers Though any given augmented

rstorder system will contain only nitely many such quantiers they can b e dened for

any function meeting a certain technical condition Let k and be anyxedintegers and let

f k gfng

f ff f g b e a family of functions where f is from f g to f gWe

n

say that the family f is monoidal if it is derived in the following way from the multiplication

k

op eration of a single p ossibly innite monoid M First there must b e a map from f g

to M The input to f is interpreted as a sequence of n k tuples of bits whose images in

n

M are multiplied out in lexicographic order The value of f dep ends only on the element

n

of M which is the result of this multiplication

For example the ma jorityquantier is dened in terms of a function f which inputs a

sequence of n bits and returns i there are at least as many ones as zero es in the sequence

As the inputs are single bits and we op erate on n of them wehave k in this

case The value of f can b e determined from the pro duct of the elements of the sequence

computed in a particular innite monoid Let N N b e the monoid of pairs of natural

numb ers under comp onentwise addition and identify the input symb ols and with the

elements h i and h i of N N resp ectively The pro duct of the elements of the input

sequence is then hi j i where the sequence contains i zero es and j ones The value of f is

exactly if i j Thus the ma jority gate function like all the gate functions wehave used

so far is monoidal

Given a monoidal f we dene a quantier Q which will bind dierentvariables

f

and op erate on a k tuple of formulas Given formulas x x with a vector x of

k

common free variables x x we can dene a sentence Q x x h x xi

f k

The value of this sentence is f applied to all the n vectors of truth values h a ai

k

for each tuple a ha a i with a n for each j

j

As one more example wecannow dene a quantier which determines the transitive

closure of a width directed graph an NC complete problem as describ ed in the next

section or see Ba Our graph will b e an arrayofn columns of ve no des each with

directed edges from no des in column y going only to column y We will denote such

graphs by a tuple of formulas x x for i j For a particular i j

ij

and tuple hx x i x x is true is there is an edge from no de i in column y

ij

P

z

x n The function W TC for each to no de j in column y where y

z

ij

z

i j inputs such a graph and outputs whether there is a directed path from no de i

in column to no de j in column n

Note that each function W TC derives from a binary op eration on columns whichis

ij

asso ciative and has an identity and is thus monoidal We can thus apply the formalism

If the formulas ab ove with k and as given and dene quantiers Q

ij

W TC

ij

represent a graph the sentence

Q x x h x x x x i

l

W TC

ij

is thus true i there is a path from no de i in column to no de j in column n in that

graph

Logtime Turing machines

We dene a logtime Turing machine to have a readonly input tap e of length na

constantnumb er of readwrite work tap es of total length O log n and a readwrite input

address tap e of length log n On a given time step the machine has access to the bit of

the input tap e denoted by the contents of the address tap e or to the fact that there is no

such bit if the address tap e holds to o large a number We will assume without loss of

generality that the machine always takes the same amount of time on inputs of a given

length this is b ecause some of the work tap e can always b e used as a clo ck The following

lemma summarizes some useful capabilities of suchamachine

Lemma A deterministic logtime Turing machine can a determine the length of its

input b add and subtract numbers of O log n bits c determine the logarithm of a binary

number of O log n bits and d decodeasimplepairing function on strings of length O n

Pro of For a use binary search with the aid of the input out of range resp onse this

idea is describ ed in Bu and credited there to Dowd For b put the numb ers on work

tap es and simulate the nite automaton which adds or subtracts this requires O log n

time as only one pass over the numb ers is needed For c makeasweep over the number

while op erating a binary counter on another work tap e The counter takes time linear in

the number counted For d wemay enco de hx y i by rst listing the lengths of x and y in

binarythenx then y Addresses of bits within x or y may then b e calculated by addition

The format for giving the lengths must b e parsable in O log ntime One scheme would

b e to list bits and of the lengths by and resp ectively and use the pair as a

separator

We dene an alternating logtime machine as an extension of this mo del in the usual way

see eg CKS with certain further assumptions As with the deterministic machine

we will use a clo ck to insure that the running time dep ends only on the input length We

will assume that the machine alternates b etween existential and universal states and that it

has exactly two options from each such state It records the sequence of choices on one of its

worktap es so that every conguration of the machineisreached by a unique computation

path Finallywe will assume that the alternating machine queries its input only once in

a computation in its last step An alternating machine with this restriction can simulate

an ordinary alternating machine which queries the input on every step at a p otential cost

of doubling the time taken Ateach step of the ordinary machine the restricted machine

guesses the value of the input to b e read and universally branches to two computation

paths one which continues the computation assuming that the bit is correct and one

whichwaits for the last step of the computation and then checks the bit Only one bit

is queried on each computation path Each nal state of the restricted machine is of the

form accept reject or accept i bit x or x hasvalue WedeneDLOGT I M E

i i

and ALO GT I M E as the classes of languages recognizable in deterministic and alternating

logtime Turing machines resp ectively

Following Buss Bu we dene DLOGT I M E uniform NC to b e the class of lan

guages recognized by families of Bo olean formulas with depth O log n for which a de

terministic logtime Turing machine can decide the formula language fhc i y i jy j n

th th

and the i character of the n formula is cg The question immediately arises whether

strengthening the uniformity restriction has changed the class NC It has not

Lemma The class DLOGT I M E uniform NC equals ALO GT I M E orNC uniform

NC

Pro of Buss Bu shows that the denition of ALO GT I M E uniform NC in terms of

the formula language is equivalent to Ruzzos original denition Ru in terms of the ex

tended connection language for circuits This and Ruzzos result show that DLOGT I M E

uniform NC is a subset of ALO GT I M E so it remains for us only to show that an

ALO GT I M E machine may b e simulated bya DLOGT I M E uniform formula family

Wenameeach conguration of the alternating Turing machine by the sequence of choices

leading to it recall that this choice sequence is recorded on one of the machines work

tap es We construct a circuit family to simulate the alternating machine in the standard

way We will then showhow the circuit for each n which is a tree can b e denoted by

a DLOGT I M E uniform formula A similar and indep endent argument is used for the

same purp ose in BCGR The b o dy of the circuit is easy to dene it has OR gates

for the existential choices and AND gates for the universal choices of the ALO GT I M E

machine in a full binary tree with alternating AND and OR rows Note that this circuit

is a balanced tree ie that all paths from the top to the b ottom have the same length

b ecause the alternating machine always runs for the same time whichwe will call t The

only diculty comes at the leaves of the tree where wemust place the input variable

corresp onding to the input p osition queried by the machine in the case when the sequence

of choices corresp onding to that leaf is made

Formallywe will dene a formula f for every binary string of length t such that

f where is the empty string is the desired formula denoting the whole circuit Once we

have done this we will explain howtoinsertspacesinto f in sucha way that it b ecomes

DLOGT I M E uniform First wedenetwo families of strings op forevery with

j j tandq uer y for every with j j t The string op will b e the single character

or corresp onding to the typ e of state existential or universal of M after carrying out

the choice sequence corresp onding to by one of our assumptions this dep ends only on

the parityof j j but it could in any case b e calculated in DLOGT I M E by simulating M

The string q uer y will b e x or x corresp onding to the input query made by M at

i i

the end of a run with choice sequence This can also b e calculated in DLOGT I M E by

simulating M note that b oth op andquery are indep endent of the input Nowwe

can dene f recursively The base case is f query for j j t and the general case

for j j t is f f op f

t

We will layoutf in blo cks of equal size The blo ck size will b e the least p ower

of two exceeding b oth t and log n which is still O log n The blo cknumb ers will

b e binary integers of length t p ossibly with leading zero es Each blo ck will b e padded

on the right with spaces Blo cks of the form will contain the string query Blo cks of

the form contain the op erators and the parentheses to wit

t t

if then blo ck

j j j

if then blo ck op

t t

if then blo ck

The reader mayverify that the ordered concatenation of these blo cks ignoring spaces

is the string f The given blo ck size suces to contain all blo cks as each query has

t

length dlog ne and the longest of the other blo cks blo ck has length t

It remains to show that a DLOGT I M E Turing machine on input n and i can calculate

th

the i character of f As shown in Lemma it can calculate the blo ck size and its

e

th

logarithm and thus determine whichcharacter of which blo ck is the i overall It can

then simulate M with the appropriate choice sequence to determine what that blo ckisand

explicitly nd the correct character as the blo cks are of size O log n

With this new notion of uniformitywe can reexamine the characterizations of NC in

terms of constantwidth branching programs Ba or equivalently programs over nite

monoids BT the relationship b etween these various mo dels was discussed ab ove Here

we will paraphrase Barringtons main theorem as follows

Theorem Ba The problems of multiplying togetherasequence of elements of the

permutation group S and of nding the transitive closure of a width graph arecomplete

under AC reductions This is true in both the nonuniform and ALO GT I M E for NC

uniform settings

Wenow show that the this theorem also holds in this new uniformity setting We adopt

Buss denition of DLOGT I M E reductions Bu A function f manyone reducing a

language A to a language B is said to b e a DLOGT I M E reduction if f increases the

th

length of strings only p olynomially and the predicate A c i z meaning the i symbol

f

of f z is c is recognized by some DLOGT I M E Turing machine

Prop osition These two problems remain complete for DLOGT I M E uniform NC

ie for ALO GT I M E under DLOGT I M E reductions

Pro of This is very similar to the pro of of Lemma ab ove Given an arbitrary

alternating logtime Turing machine there is a canonical balanced DLOGT I M E uniform

logdepth formula simulating it as shown ab ove Further there is a canonical branching

program obtained from that formula by the metho d of Ba Wewillshow that the

function taking an ALO GT I M E machine to a description of the branching program for

that machine is a DLOGT I M E reduction For any particular input a solution to either of

the two given problems can b e used to evaluate this branching program and thus simulate

the machine on that input

th

It suces to showhowaDLOGT I M E machine can obtain the i instruction of the

branching program given i in binary We need rst to determine which input variable is

to b e referenced This is the variable queried by the alternating machine after a particular

choice sequence in fact examining the metho d of Ba that given by the o ddnumbered

bits of the binary enco ding of i viewed as a string of t bits p ossibly with leading zero es

The DLOGT I M E machine can recover these bits and simulate the ALO GT I M E machine

th

with the resulting choice sequence Wemust then determine which group elements the i

instruction is to output for eachofthetwo p ossible values of this input variable This

th

can b e determined by tracing the t iterations of the Ba construction leading to the i

instruction which can b e done by a nitestate pro cess running left to rightover the bits

of i

This can b e interpreted as a simulation of alternating logtime Turing machines by

DLOGT I M E uniform branching program families analogous to the ALO GT I M E uniform

families of Ba or DLOGT I M E uniform programs over the monoid S as in BT

Just as ab ovewe expanded the circuit mo del by adding new gates we can expand

the logtime Turing machine mo del by adding new typ es of states generalizing the idea of

alternation To match circuits of unb ounded fanin wemust allow the existence of a number

of normal deterministic states b etween the sp ecial states and count depth of sp ecial states

Examples are

Normal alternating machines of constant alternation depth This yields the imp ortant

alternating logtime hierarchy and the class LH of languages accepted by constant

depth alternating logtime machines

States whose acceptance dep ends on the numb er of accepting successor paths mo dulo

some constant

States whose acceptance dep ends on whether a ma jority of the successor paths are

accepting as dened byParb erry and Schnitger PS

States which are analogues of the groupmultiplying circuit gates dened in Section

ab ove

Equivalence of FO and the Logtime Hierarchy

Our main result Theorem dep ends primarily up on the fact that rstorder formulas

are p owerful enough to express the notion of acceptance bya DLOGT I M E Turing machine

In fact we shall so on see that a language can b e so expressed i it is in LH the alternating

logtime hierarchy

Prop osition DLOGT I M E FO

Pro of Let T b e a DLOGTIME machine with k work tap es Wemust write a rstorder

sentence such that for all input strings A

T accepts A Aj

The sentence will b egin with existential quantiers x x x The vector

c

of variables x hx x i will co de the O log n steps of T s computation including for

c

each time step t the values q w w d d I representing T s state the sym

t t t t

kt kt

b ol it writes on each tap e the direction eachheadmoves and the value of the input b eing

scanned by the indextap e controlled input head at time t resp ectively It is imp ortant

to rememb er that eachvariable x is a blog bit numb er and that the logical relation

i

BIT allows its individual bits to b e sp ecied so the values q w d I are available from

t it it t

the variables x

The formula must now assert that the information in x meshes together to form a valid

accepting computation of T To do this we rst dene the rstorder formulas C p t aand

P p t meaning that for the computation determined by x the contents of cell p at time

t is a and that the appropriate work head is at p osition p at time t Here the p osition

p enco des also which tap e the cell is on Given C and P we can write the formula as

follows Wemust assert that for all t the input symbol I is correct Todothiswesay that

t

there exists a variable y equal to the contents of the index tap e This can b e veried using

the formula C Next wesaythatI is one i the corresp onding input relation X y holds

t

Finally we assert that the next moveofT ie q w w d d

t t t

kt kt

follows according to T s nite control from the current state q input symbol I andtape

t t

symb ol the unique a such that there exists p so that C p t aand P p tbothhold

Next note that using P we can write C b ecause the contents of cell p at time t is just

w where t is the most recent time that the appropriate head i was at p osition p or the

it

blank symbolifthatheadisnever at P b efore time t

Finally observe that to write the relation P p t it suces to take the sum of O log n

values of d for t tThus it suces to prove the following technical result

t

Lemma Let BSU M x y betrueiy is equal to the number of ones in the binary

representation of x Then BSUM is rstorder expressible

Pro of Let L blog nc and L blog Lc These numbers are available using

BIT For example L is the unique numb er satisfying

BITL n xx L BITx n

We express BSUM as follows Wemay assume that L L bykeeping a table of sp ecial

cases for L Then we existentially quantify one variable s consisting of L L bit

numbers s s where each s is the sum of s and the numb er of ones in the binary

L i i



expansion of x between bits i L andi L Thus s is equal to the bit sum of x

L



For example see the table b elow in which L L andxs bit sum of is calculated

To express the correctness of the sequence of partial sums swe need to express the

sum of variables and to express the bit sum of a set of L consecutive bits from x This

latter bit sum can b e expressed by the existence of L partial sums where a partial sum

is taken for eachoftheL bits we are summing For example in the table b elow to say

that bits through of s are correct wewould assert that there are bits on from bits

through of x and that the sum of bits through of s and is equal to bits

through of s Tosay that there are bits on from bits through of xwewould assert

the existence of in the following table containing the running sum for each of bits

andofx

x

s

r

Finallywe express the predicate PLUSa b c meaning that a b c This is just

th

carry lo ok ahead addition First express the carry into the i bit of a b as follows

CARRY i jiBITj a BITj b kj k iBITj a BITj b

Then with standing for exclusive or we can express PLUS

PLUSa b c iBITi c BITi a BITi b C ARRY i

Corollary FO LH

Pro of Toprove LH FOwe need only note that an alternating logtime machine

may b e assumed to write its guesses on a work tap e and then deterministically checkfor

acceptance Since a rstorder sentence can just as easily quantify these alternating guesses

it suces to express a DLOGT I M E predicate using Prop osition ab ove

The other direction is fairly easyWehavetoshow that for every rstorder sentence

x x Q x M x

k k

there exists an alternating constantdepth logtime Turing machine T such that for all

input strings A

T accepts A Aj

Since M is a constant size quantierfree formula it is easy to build a DLOGT I M E

Turing machine which on input A and with values a a on its tap e tests whether or

k

not Aj M a The most complicated part of this is to verify the BI T predicate which

requires counting in binary up to O log nona work tap e as in Lemma Thus using

k alternations b etween existential and universal states a logtime machine can guess

k

a a and then deterministically verify M a

k

Pro of of Main Theorem

Wenow restate our main theorem using the more precise denitions wehave develop ed

in sections DC Luniform generalized expressions and DLOGT I M E

Theorem Let F be any set of monoidal functions The fol lowing areequivalent de

nitionsofL is in uniform AC F eg AC AC C TC or NC

L is rstorder denable using F quantiers

L is recognizedbya DLOGT I M E DCLuniform family of constantdepth polynomial

size circuits with gates for AND OR and a nite set of functions in F

L is recognizedbyan FODCLuniform family of such circuits

L is recognizedbya DLOGT I M E uniform family of constantdepth polynomial

length generalized expressions using AND OR and a nite set of functions from

F

L is recognizedbya FOuniform family of such expressions

For NC and above these denitions also coincide with the earlier notion of NC unifor

mity RuCo

Pro of

Corresp onding to any rstorder formula of quantier depth d in prenex form is a canon

ical constantdepth circuit for each n A tree of fanout n and depth d corresp onds to the

quantiers and at each leaf of this tree there is a constantsize constantdepth section

This section calculates the value of the unquantied sentence obtained by taking particular

values for each of the quantied variables It will consist of Bo olean op erators input no des

and constants corresp onding to the value of atomic formulas equality order and BI T on

the chosen values of the quantied variables We need merely show that the no des of this

circuit can b e numb ered in suchaway that DC L queries ab out it can b e answered bya

DLOGT I M E Turing machine

This is straightforward and quite similar to our earlier constructions in Section The

address of a no de will consist of a eld of dlog ne bits for eachquantier and a constant

length eld for the b ottom section Eachnodeinthenary tree section of the circuit can

b e sp ecied by the sequence of variable choices leading to it Its no de numb er will have

these choices in the elds corresp onding to them and zero es in the remaining elds No des

in the b ottom section will have the the choices for all d variables indicated in the rst d

elds and a co de for the particular no de in the last eld In order to answer queries for the

direct connection language the DLOGT I M E machine needs to b e able to compare elds

of length dlog ne to check connections to interpret these elds as input variable names

to verify the no des corresp onding to atomic formulas of the form X i and to evaluate

atomic formulas for given values of the d variables to verify the values of the constants in

the b ottom section This last is p ossible b ecause a DLOGT I M E machine can easily check

order equalityandBI T on numb ers in the range from to n

This is immediate from the fact that DLOGT I M E FO

As the circuit is of p olynomial size we can refer to no de numbers by tuples of

variables It will suce to express the predicate Acca meaning a is the number of an

accepting gate a gate with output by a rstorder formula b ecause we can then evaluate

the circuit byevaluating this predicate on the output gate To do this we inductively dene

predicates Acc a meaning a is the numb er of an accepting gate at level dFor level

d

the input to the circuit Acc aisjustC xor C x ANDed with the predicate a is the

numb er of a input gate for input variable x or the negation of x This last predicate is

rstorder expressible byhyp othesis

To express Acc awewillshowhow to express a is the numb er of an accepting f gate

d

at level d for a monoidal function f First wemust saya is the number of an f gate at

level d which is rstorder for anyxeddThenwe need to use a Q quantier to apply

f

f to the sequence of values Acc b for all those b which are the numb ers of children

d

of a Here is where we need the assumption that the domain of f contains an identity

element We write an expression Acc b whose value is Acc bifb is a child of a and

d

d

the identity otherwise Then our desired predicate is Q bAcc b Finally Acc ais

f d

d

the OR of these predicates over all the functions f used in the circuit

The canonical constant depth circuit whichwe constructed from a rstorder

formula ab ove is a tree and so can b e denoted by a general expression with op erators

corresp onding to the quantiers We need to arrange this expression so that the expression

language is in DLOGT I M E This is easy b ecause wehaveaspacecharacter in our alphab et

and allow arbitrary emb edded spaces We simply cho ose a p ower of two greater than n and

p osition the terms of the expression so that their p osition in the tree can b e read o from

their binary addresses as in the pro of of Lemma

This is immediate from the fact that DLOGT I M E FO

Here we induct on the structure of the expression just as we inducted on the

structure of the circuit ab ove We dene a predicate Acc a expressing character number

d

a is the start of an accepting f term at level d For xed dwe can write a rstorder

formula matching parentheses to depth dsowe can express character b is the start of a

subterm of the term starting at character a and so forth Again we need the identity

character in the domain of f so that we can apply f to Acc b for exactly those b which

d

are the start of subterms of the term starting at a

Logically Dened Classes With BI T

Wemaynow examine the uniform complexity classes given by our examples First of

all the class FO is also DLOGT I M E uniform AC or FOuniform AC Adding in the

mo dular counting quantiers we get a class FOC rstorder plus counters which is also

the DLOGT I M E uniform version of the class AC C

When we add the ma jority quantier we get the class FOM rstorder plus ma jority

or DLOGT I M E uniform TC This class contains nearly all of the languages known to

b e in uniform NC such as the many examples given by Chandra et al of languages

equivalenttomajority under AC reductions CSV The constructions in that pap er

can all b e made uniform using the metho ds whichwe will develop in the next section

The two notable exceptions are the word problem for a nonsolvable group Ba and the

Bo olean formula value problem Bu These two problems and several others directly

related to them are complete for NC under uniform AC reductions and are thus not in

TC unless TC NC We should mention also that the several problems only known to

be in P uniform NC such as those of Beame et al BCH and of Reif Re are not

known to b e in this new class

Finallywe consider the eect of the group quantiers and the width transitive closure

op erator Group quantiers for solvable groups in fact monoid quantiers for solvable

monoids can b e simulated by iterated mo dular counting quantiers STT However by

Theorem and Prop osition our DLOGT I M E uniform version of Barringtons theo

rem Ba we know that rstorder formulas using quantiers for any single nonsolvable

group G can express exactly those languages in DLOGT I M E uniform NC Furthermore

the same is true of the W TC op erator The group quantiers corresp ond exactly to circuit

gates for Gs word problem and the width closure op erator decides whether a particular

denable width branching program accepts its input To summarize wehave

Corollary Firstorder logic with the addition of either the width transitive closure

operator or a multiplication quantier for a nonsolvable group expresses exactly those

languages in uniform NC

Nowthatwehave robust notions of uniform NC and uniform AC we can restate

Prop osition as a uniform version of Barringtons Theorem

Corollary The wordproblem for S or for any nonsolvable monoid is complete

for uniform NC under uniform AC reductions Therefore uniform branching program

families of width and polynomial size recognize exactly uniform NC

Logically Dened Classes Without BI T

The basic op erations of the rstorder logical system include one which is noticeably

less natural than the others the BI T predicate In fact the system without BI T was

explored rst in the course of eorts to classify regular languages according to algebraic

prop erties Further exploration of this system leads deep er into algebraic automata theory

see eg Eilenb erg Ei Lallement La or Pin Pi for background and denitions

McNaughton and Pap ert MP proved that in the system without BI T the languages

expressible by rstorder formulas are exactly the aperiodic or starfree regular languages

see Ladner La for a go o d exp osition of this result in more mo dern terminology This

isawellstudied sub class of the regular languages with a number of characterizations Here

we mention only the closely related result of Chandra et al CFL that an asso ciative

op eration on a nite set a semigroup can b e carried out in AC i the semigroup is

groupfree

The mo dular counting quantiers describ ed ab ovewere actually intro duced as an ex

tension of this system as well Straubing et al STT prove that with these quantiers

but without BI T one can dene exactly the solvable regular languages ie those languages

recognized by monoids that contain only solvable groups If AC C NC this class of

languages is exactly the intersection of AC C with the regular languages BCST By

adding op erators whichevaluate n mo dulo a constant the rstorder system without BI T

can b e mo died to give exactly those regular languages in nonuniform AC BCST

Adding ma jority quantiers will naturally take us out of the regular languages But

surprisingly the expressibility class we obtain is a familiar one the same uniform TC

we obtained with BI T To see this we rst showthatwe can express rstorder arithmetic

on variables in this system

Lemma The fol lowing formulas are expressible in FOwo BIT plus majority of

pairs

Hxx H xy x y ie is true for exactly bnc xs resp bn c pairs

x y

y x x ie y is the exact number of xs such that x

x y z

x y z

Pro of To express Hxxwesaythat is not true for the ma jorityofxs but it

b ecomes true if weaddonemorex H is similar

Hxx y Mxx x y Mxx

To express we create a twovariable predicate w z that is true for w and

z y forw and z and for half of the pairs with w Then

y x x H wz w z

Similarlywe can create a predicate that compares z with x y to express We force

z values to zero by xing the w and w columns x values to one with the w

column y more values to one with the w column and split the other columns evenly

between zero es and ones The resulting predicate is exactly evenly divided i x y z

The predicate that compares z with x y for is only slightly more subtle Wemake

a section of z zero es and a rectangular section of x y ones Note that x and y are b oth

less than nandz except for the cases x y n which can b e handled in

separate clauses

It now follows that

Theorem Even without BIT Firstorder Logic plus Majority is equal to uniform

TC

Pro of It suces to express BIT in FOwo BIT M This follows from Lemma

Note that we can express x is a p ower of bysaying that x has no o dd divisors

i

except Next we can express z as z is a p ower of and i y y

x y is a p ower of Finallywehave

i i

BITx i uw w u is o dd x w u

It is slightly annoying that we needed M rather than just M in Lemma As the

next prop osition shows this is not necessary in the presence of BIT We conjecture that it

is necessary without BIT

Prop osition The majorityofpairs quantier M xy x y is expressible in FO

M ie using the BIT predicate and the majority quantier

Pro of This is true b ecause in the presence of BIT we can express addition and mul

tiplication on variables even without ma jorityThus we can express the following

F x y x There are exactly y values of x less than or equal to bnc such that

x holds

S x y x There are exactly y values of x greater than bnc such that x

holds

y x x

hu v i x x y There are nu v pairs x y suchthatx y holds

is expressed as follows

F x y x Hxx bncx bnc xn y

is similar and then follows by addition of variables Part will involvesome

expressibility results whichareinteresting in their own right The pro ofs are adaptations of

known techniques to the rstorder setting We rst dene a variable col xy x y

for each column of the square array and then we are faced only with the problem of adding

n numb ers eachofO log n bits which is a sp ecial case of the following result

Prop osition The sum of a polynomial number of polynomiallength binary integers

and hence also multiplication of polynomiallength binary integers can be expressedin

FO M BI T

Pro of This uses a technique due to Chandra Sto ckmeyer and Vishkin CSV Using

the op erator we nd the sum of the units digits twos digits fours digits etc of the

summands These sums are eachanumber of O log n bits and the sum of them when

each is padded on the right with an appropriate numb er of zero es is our desired sum But

these sums can b e arranged into O log nnumb ers of p olynomial length whose sum is the

desired sum It thus suces to prove the following

Lemma it add of log n The sum of O log n polynomiallength binary integers and

hence among other things multiplication of binary numbers of length O log n is express

ible in FO BI T

Pro of We use the technique ab ove to reduce the O log nnumbers to O log log nnum

b ers this time using the BSU M predicate of Lemma instead of the op erator and so

remaining within FO BI T We can imagine this pro cess b eing carried out again and

again reducing the numb er of summands from log log n to log log log n log log log log nand

so forth until it b ecomes constant and we can nish by addition of variables In this imag

ined computation the part needed to calculate a single bit of the answer consists of less

than log n bits We can guess a variable which co des up this part of the calculation using

appropriate co ding tricks and verify that each bit of it is correct

To prove the sp ecial case of this Lemma numb ers of length O log n used in Prop osi

tionandinmultiplication of O log nbit numb ers it suces to use a simpler technique

suggested by Sam Buss He notes that Lipton Li has shown howtomultiply binary inte

gers with an alternating Turing machine using a constantnumb er of alternations and time

linear in the length of the pro duct If the pro duct is O log n bits then this computation

is in LH and thus in FO by Corollary Liptons technique of carrying out an iterated

addition mo dulo all small numb ers can easily b e adapted to add O log log nnumbers each

of length log n which will nish the pro cess after one step of the reduction technique used

ab ove

Clearly gives us M

Wenow consider the nal question ab out the system without BI T What are the

consequences of adding the group quantiers or the W TC op erator In the case with BI T

eachgave us all of NC b ecause the construction of Barrington Ba could b e carried

out Here since these op erators each can b e simulated by a nitestate machine it is not

surprising that all the languages denable in this way are regular see b elow A signicant

question however is whether we can get all regular languages in this way

In the next section we will use the structure theory of nite monoids to show that any

can b e expressed using the right group quantiers this will b e a sp ecial

case of Theorem Similarly one can show that no nonregular languages are obtained

One way to see this second fact is to use another expressibility result that of Buc hi

Bu on monadic secondorder quantiers see also La This result is that sentences

with suchquantiers in our system without BI T can express exactly the regular languages

Dening a translation from group quantiers to weak secondorder quantiers is fairly easy

and gives us the other half of

Theorem A language can be expressed by a rstorder formula with group quantiers

i it is regular

Expressing Regular Languages

We can in fact makeamuch more precise statement ab out the regular languages

expressible with group quantiers for a particular set of groups To do this we will need

anumb er of algebraic denitions see eg Ei Pi La for more background

Wehave already dened monoids and groups and we will assume the basic vo cabulary of

abstract algebra A monoid M divides another monoid N if it is the image of a submonoid

of M under a homomorphism A variety of nite monoids also called a pseudovarietyis

a family of nite monoids closed under division and direct pro duct The wreath product

M wr H of two monoids M and H is the set of pairs f h with f a function from H to M

not necessarily a homomorphism and h an elementof H This set is viewed as a monoid

under the multiplication

f h f h f h h

where

f h f hf hh

If G is any family of groups we dene the JordanHolder closure G to b e the closure of

G under wreath pro duct and division G consists of all groups each of whose comp osition

factors divides a group in G A monoid is aperiodic if every subset which is a group has

one element The variety A of ap erio dic monoids is closed under wreath pro duct as is the

variety of all groups We dene the KrohnRhodes closure G A of a family of groups G

to b e the closure of G and A the ap erio dics under wreath pro duct and division By the

KrohnRho des theorem KRT the monoids in G Acanbecharacterized in terms of

the simple groups which divide them a monoid is a member i each such simple group

divides a group in G For example the solvable monoids are the KrohnRho des closure of

the cyclic groups or in fact of the ab elian or solvable groups

Wesay that a language L A is recognized by a monoid M if there is a homomorphism

from A as a monoid under concatenation to M such that L is the inverse image under

of a subset of M If L is regular it has a unique syntactic monoid which divides all

monoids that recognize L In this context recognition by a nite state machine is viewed

as recognition by the monoid of transformations of the machines states Wearenowready

to show the relationship b etween this recognizability and logical expressability Recall that

wearenow expressing prop erties of strings from some nite alphab et A using atomic

th

predicates C i meaning the i input is an a

a

Theorem Let G be a family of groups A language can be expressed using quantiers

for groups in G and ordinary quantiers i it is regular and it is recognized by a monoid

in G AItcan beexpressed using only quantiers for groups in G i it is recognizedbya

group in G

Pro of This is an extension of STT where the groups in G were restricted to b e

cyclic We indicate here where changes must b e made in this pro of to accomo date the group

quantiers In each part of the pro of the second statement of the theorem ab out just the

group quantiers follows from the pro of in the general case

For the rst direction wemust showthatifL is recognized by a monoid in G A then

it is expressible with G quantiers L must b e recognized by some wreath pro duct of groups

in G and ap erio dics we will use induction on the length of this pro duct

Fact St Thm and Prop If L is recognizedby A wr M with A aperiodic

then L can be obtainedfrom languages recognizedby M by repeated use of Boolean operations

and letter concatenation the latter takes L and L to LaL for any letter a

With ordinary quantiers and Bo olean op erators we can express these two op erations

so that if all languages recognized by M are expressible then so are all languages recognized

by A wr M Th STT It remains to deal with the languages recognized by G wr M for

G Gby expressing them in terms of group quantiers Bo olean op erations and expressions

for languages recognized by M

Let L b e recognized by G wr M Without loss of generalitywemay assume that a word

w is in L i w f m for some homomorphism from A to G wr M some f from

M to G and some m in M This is b ecause any such L may b e written as a nite union

of such languages For each input letter a denef and m such that a f m

i i i i i i

Then by the denition of the wreath pro duct a a is given byf m m for a

r r

particular function f This function f is dened on an arbitrary element m of M by

f m f m f m m f m m m

r r

The set of words w such that w m is recognizable by M and thus expressible by

hyp othesis It remains to giveaformula to express whether f f

We rst build a formula x for each m M and a A denoting the letter in

ma

p osition x is a and m m m where again a f m This construction

r i i i

is identical to that of STT Now for each m M f m is calculated bymultiply

ing together a sequence of group elements as describ ed ab ove If we call these elements

g g n they can all b e expressed by a single formulavector g x with free

m m m

  

variable x The group element g xisgiven by f m m for the unique m such that

m x



x is true Once wehave g x the predicate f f is expressed by the AND for

ma m



all m M of

Gf m



xg x

m



For the other direction wemust show that the language expressed byanyformula

involving group quantiers for groups in G and ordinary quantiers can b e recognized bya

wreath pro duct of groups in G and ap erio dics As in STT we dene the quantier typ e

of a formula to b e a sequence u u where each u is a group in G or the symbol

s i

The quantier typ e gives the order of the quantiers in the formula and whether these are

group or ordinary quantiers We prove the recognizability of expressed languages by

induction on the length of the quantier typ e

Again as in STT for any sentence we dene formulas xand x each with

one free variable denoting resp ectively the initial segment of the input ending at p osition

x satises and the nal segment of the input b eginning at p osition x satises

These formulas have the same quantier typ e as The following lemma may then b e

proved in an identical manner to the corresp onding lemma of STT

Lemma Let x be a formula of quantier type with one free variable Then there

exist sentences for i r of quantier type andthere exist a a A such

i i r

that

r

x x x C x

i i a

i

i

The only two prop erties of the group quantiers used in this pro of are the obvious

There are only nitely many inequivalent formulas of a given quantier typ e

Gg

Given anyformulavector g x and an input there is exactly one g suchthat xg x

is true

Wenow pro ceed by induction on the length j j of and the case of adding ordinary

quantiers is already handled in STT It is useful to consider the case j j separately

Gg

Here wehaveaformula xg x where g x is made up of Bo olean combinations of

th

atomic formulas C x and thus dep ends only on the x input letter Wethus have a map

a

from A to G where aisthevalue of g xwhen C x is true We can extend to b e

a

a homomorphism from A to G in the obvious way Then the formula is satised by w i

w g so that it is clear that the language expressed by the formula is recognized by G

To do the inductive step we need two facts from the general algebraic theory of au

tomata The rst is a generalization of the Schutzenb erger pro duct of monoids describ ed in

section IX of Ei and requires some preliminary denitions from section V of Ei

Let A B andC b e monoids A left action of C on B is a map which assigns an

element cb of B to every c C and b B satisfying a few natural axioms b b b

c

cc b cbb cbb Similarlyaright action of A on B assigns a ba B to every

b B and a A satisfying similar axioms If these actions commute with each other ie

cba cba so we can write cba we dene a triple product A B C asfollows dierent

actions will in general give rise to dierent triple pro ducts As a set A B C is the direct

pro duct A B C of the three monoids It b ecomes a monoid under the op eration dened

by

a b ca b c aa ba cb cc

M M



Belowwe will use the group G G the direct pro duct of jM jjM j copies of

the group G indexed by the direct pro duct M M We will use the natural left action

of M on G given as follows If f is an elementofG sp ecied by an element f for each

cd

c M and d M andm is an elementof M each comp onentmf of mf is given by

cd

f Similarly a right action of M on G is given byfm f for each m M

mcd cd cdm

The reader mayverify that in the triple pro duct M G M dened using these actions

the pro duct of a string of elements a f b a f b isa a hb b where

r r r r r

h G is given for each c M and d M by

h f f f

i r

cd cdb b a a cdb b a a cd

 r r r 

i i

Fact Ei Let and be homomorphisms from A to monoids M and M

spectively Let from M A M to a group Gbeanymap Associate to each word

w a a A an element w of G by

r

r

Y

w a a a a a

i i i r

i

Then L fw w g g is recognized by a triple product M G M as denedabove

M M



where G is the group G

Pro of The homomorphism taking an element a of A to ah a where

hc d c a d recognizes L The e e comp onent of the middle term of w is

exactly w as dened ab ove

Fact Ei Prop V Every group that divides a triple product S TS is an

extension of a group dividing S S by a group dividing T Inparticular if S TandS

are al l members of the variety G A then so is S TS

Now supp ose weknowthatevery sentence of quantier typ e where j j denes

Gg

a language recognized by a monoid in G A Consider a sentence xg x where

g xisavector of formulas eachoftyp e By Lemma eachformula g xing xhas

i

an equivalentform

r

x x x Q

ij ij a

ij

j

where the s and s are eachasentence of typ e The language expressed byeachsuch

ij ij

sentence is recognized by a monoid in G Aby the inductivehyp othesis If wetake the direct

pro duct of the homomorphisms recognizing each such language we get a homomorphism

into the direct pro duct M of all these monoids which is still in G A Wecannow with

some eort dene a map from M A M to G so that the language expressed by

satises all the hyp otheses of Fact Then byFact weknow that the language

expressed by is recognized by a monoid in G A and wehave completed the pro of of

Theorem

It remains to dene c a d for c d M and a A The elements c and d determine

truth values of eachofthesentences and If these truth values and the letter a satisfy

ij ij

the disjunction ab ove for some iweset c a d g Otherwise weset c a d

i

Thismapiswelldened b ecause a particular set of truth values and a particular letter can

give rise to only one group element

One consequence of Theorem is that in the absence of the BI T predicate the

W TC op erator is no longer sucient to express even all regular languages Informally

this is b ecause the equivalence of width and arbitrary constant width dep ended on the

Barrington construction which can no longer b e carried out under this more restrictive

uniformity notion Furthermore wecanprove this assertion from Theorem b ecause

we can showtheW TC op erator to b e equivalentinpower to a group quantier for the

group S which is only one of the innitely many nonab elian simple groups

Directions for Further Research

Wehave given robust denitions of uniformity for complexity classes within NC We

can sp eak of uniform circuits uniform expressions sp ecial kinds of Turing machines

or rstorder formulas and b e talking ab out the same complexity classes For the

classes explored in Section one could as easily sp eak of uniform programs over a

nite monoid as in BT Clearly the next step is to explore these new complexity

classes as P and NP have b een explored Totake one example we might ask ab out an

NC analogue of the BermanHartmanis conjecture BH are the twoknown kinds

of languages complete for NC nonsolvable group and formula value isomorphic by

rstorder functions Wemight hop e ma jor questions in this area can b e answered

more easily and lead to techniques and intuitions useful in the study of the more

powerful complexity classes

Wenow see that the apparently technical addition of the BI T predicate or the

ma jority op eration which can b e used to dene it to the rstorder framework has

enormous consequences The two expressibility theories dier provably in the case of

group quantiers as wehave seen A similar provable dierence is known in the case

of iterated rstorder formulas Imb NC requires log n iterations without

BI T but O log n log log n with it In the former case the iterations suce to dene

BI T itself What is so sp ecial ab out BI T what other predicates would do as well

In the presence of BI T multiplication in one nonab elian simple group can b e de

ned in terms of another in sharp contrast to the pure rstorder case Can BI T

and solvable groups dene any new nonsolvable regular languages If so then

AC C NC in the uniform setting Can ma jority and solvable groups dene any

new regular languages If so then TC NC in the uniform setting Thomas p er

sonal communication has asked whether evenavery weak nonregular predicate such

as x y can b e used to dene any new regular languages A partial answer to

this comes from the fact that any language dened using rstorder logic and purely

numerical predicates suchasthismust b e in nonuniform AC The regular languages

in nonuniform AC havebeencharacterized BCST and are all solvable How

ever it is still op en whether x y mightbeusedtodenealanguagesuch as the

strings of length divisible by which is is nonuniform AC but not in FOFurther

questions along these lines are considered in BCST

Is it necessary in the absence of BI T for the ma jority quantiers to b e able to range

over pairs of variables and not just variables

Acknowledgements

Wewould like to thank Sam Buss Jay Corb ett Richard Ladner Steven Lindell

SushantPatnaik Larry Ruzzo Wolfgang Thomas Gyorgy Turan and Alan Wo o ds for

various helpful discussions In addition wewould like to thank the twoanonymous referees

for their comments whichhave greatly improved the presentation

References

Aj M Ajtai formulae on nite structures Annals of Pure and AppliedLogic

Al E Allender P uniform circuit complexity J ACM to app ear Also Technical

Rep ort DCSTR Aug Dept of Comp Sci Rutgers University

Ba D A Barrington Boundedwidth branching programs PhD thesis MIT Dept

of Mathematics May Technical rep ort TR MIT Lab oratory for Com

puter Science

Ba D A Barrington Boundedwidth p olynomialsize branching programs recognize

exactly those languages in NC J Comp Syst Sci Feb

BIS D A M Barrington N Immerman and H Straubing On uniformity within

NC Structure in Complexity Theory ThirdAnnual Conference Washington IEEE

Computer So ciety Press

BCST D A M Barrington K Compton H Straubing and D Therien Regular

languages in NC Technical rep ort BCCS Oct Boston College

BT D A M Barrington and D Therien Finite monoids and the ne structure of

NC J ACM Oct

BCH P W Beame S A Co ok and H J Ho over Logdepth circuits for division and

related problems SIAM J Comput

BH L Berman and J Hartmanis On isomorphisms and densityof NP and other

complete sets SIAM J Comp

Bu J R Buc hi Weak secondorder arithmetic and nite automata Z Math Logik

Grund lagen Math

Bu S R Buss The Bo olean formula value problem is in ALOGTIME th ACM

STOC Symp

BCGR S Buss S Co ok A Gupta and V Ramachandran An optimal parallel

algorithm for formula evaluation typ escript U of Toronto

CFL A K Chandra S Fortune and R Lipton Unb ounded fanin circuits and asso

ciative functions th ACM STOC Symp

CKS A K Chandra D C Kozen and L J Sto ckmeyer Alternation J ACM

CSV A K Chandra L J Sto ckmeyer and U Vishkin Constant depth reducibility

SIAM J Comp

Co S A Co ok A taxonomy of problems with fast parallel algorithms Information

and Control

Ei S Eilenberg Automata Languages and MachinesVol BNewYork Academic

Press

En H Enderton A Mathematical Introduction to Logic New York Academic Press

FSS M Furst J B Saxe and M Sipser Parity circuits and the p olynomialtime

hierarchy Math Syst Theory

HMPST A Ha jnal W Maass P Pudlak M Szegedy and G Turan Threshold

circuits of b ounded depth th IEEE FOCS Symp

Im N Immerman Relational queries computable in p olynomial time Information

and Control

Ima N Immerman Languages which capture complexity classes SIAM J Comp

Imb N Immerman Expressibility as a complexity measure Results and directions

Second Structure in Complexity Theory Conf

Im N Immerman Nondeterministic space is closed under complementation SIAM

J Comp Oct

Im N Immerman Expressibility and parallel complexity SIAM J Comput

KRT K B Krohn J Rho des and B Tilson in M A Arbib ed The Algebraic Theory

of Machines Languages and Semigroups New York Academic Press

La R E Ladner Application of mo deltheoretic games to discrete linear orders and

nite automata Information and Control

La G Lallement Semigroups and Combinatorial Applications New York J Wiley

Sons

Li R J Lipton Mo del theoretic asp ects of computational complexity in th IEEE

FOCS Symp

MP R McNaughton and S Pap ert CounterFreeAutomata Cambridge Mass MIT

Press

PS I Parb erry and G Schnitger Parallel computation with threshold functions J

Comp Syst Sci

Pi J E Pin Varieties of Formal Languages New York Plenum Press

Ra A A Razb orov Lower b ounds for the size of circuits of b ounded depth with basis

f g Mathematicheskie Zametki April in Russian English

translation Math Notes Acad Sci USSR Sept

Re J H Reif On threshold circuits and p olynomial computation Second Structure

in Complexity Theory Conference

Ru W L Ruzzo On uniform circuit complexity J Comp Sys Sci

Sm R Smolensky Algebraic metho ds in the theory of lower b ounds for Bo olean circuit

complexity th ACM STOC Symp

Sp P M Spira On timehardware complexity tradeos for Bo olean functions in

Proc th Hawaii Symposium on System Sciences North Hollywo o d Calif Western

Perio dicals Co

St L Sto ckmeyer The p olynomialtime hierarchy Theoretical Comp Sci

SV L Sto ckmeyer and U Vishkin Simulation of parallel random access machines by

circuits SIAM J Comput

St H Straubing Families of recognizable sets corresp onding to certain varieties of

nite monoids J Pure and AppliedAlgebra

STT H Straubing D Therien and W Thomas Regular languages dened with

generalized quantiers Proc th ICALP

Th W Thomas Classifying regular events in symb olic logic J Comp Sys Sci

Va M Vardi Complexity of relational query languages th ACM STOC Symp