Circuits and Expressions with Non-Associative Gates

Joshua Berman Arthur Drisko Francois Lemieux Cristopher Moore Denis Therien

SFI WORKING PAPER: 1997-01-007

SFI Working Papers contain accounts of scientific work of the author(s) and do not necessarily represent the views of the Santa Fe Institute. We accept papers intended for publication in peer-reviewed journals or proceedings volumes, but not papers that have already appeared in print. Except for papers by our external faculty, papers must be based on work done at SFI, inspired by an invited visit to or collaboration at SFI, or funded by an SFI grant.

©NOTICE: This working paper is included by permission of the contributing author(s) as a means to ensure timely distribution of the scholarly and technical work on a non-commercial basis. Copyright and all rights therein are maintained by the author(s). It is understood that all persons copying this information will adhere to the terms and constraints invoked by each author's copyright. These works may be reposted only with the explicit permission of the copyright holder. www.santafe.edu

SANTA FE INSTITUTE

Circuits and Expressions with

NonAsso ciative Gates

Joshua Berman Arthur Drisko Francois Lemieux Cristopher Mo ore and

Denis Therien

State UniversityofNewYork at Binghamton

National Security AgencyUSA

McGill UniversityMontreal Queb ec

The Santa Fe Institute Santa Fe New Mexico corresp onding author

Abstract We consider circuits and expressions whose gates carry out

multiplication in a nonasso ciative algebra such as a or lo op

We dene a class we call the polyabelian algebras formed by iterated

quasidirect pro ducts of Ab elian groups Weshow that a quasigroup can

express arbitrary Bo olean functions if and only if it is not p olyab elian

in which case its Expression Evaluation and Circuit Value prob

lems are NC complete and Pcomplete resp ectively This is not true for

algebras in general and wegiveacoun terexample

We show that Expression Evaluation is also NC complete if the

algebra has a nonsolvable multiplication or but is in

TC if the algebra is b oth p olyab elian and has a solvable multiplication

semigroup eg for a nilp otent lo op or group

Thus in the nonasso ciative case earlier results ab out the role of solv

ability in circuit complexity generalize in several dierentways

Intro duction algebraic circuits and expressions

Bo olean expressions and circuits are wellknown constructs in logic and computer

science A Bo olean expression is either a variable x or is formed from shorter

i

expressions as or If all the x have truth values true

i

or falsethens truth value is determined byinterpreting and as and

ely or and not resp ectiv

A Bo olean circuit is an acyclic directed graph with source no des inputs x

i

and a single sink no de output and three kinds of intermediate no des and

and or gates with two inputs and not gates with one input Expressions are

simply circuits whose graph is a tree Then the truth value of the output is

dened in the obvious way

Given an expression or circuit and the truth values of its variables or inputs

determining the truth value of its output is called the Expression Evaluation

or Circuit Value problem resp ectively These problems are deeply related to

two imp ortant complexity classes NC and P

NC is the set of problems solvable by parallel circuits of p olynomial size and

logarithmic depth as a function of length of the input P is the set of problems

solvable in p olynomial time by a deterministic serial computer suchasaTuring

machine

k

More generally circuits of p olynomial size and p olylogarithmic depth O log n

for inputs of size n recognize the following complexity classes where the

fanin is the numberofinputstoeach gate

k

NC if the gates are ands and ors with fanin

k

AC if the gates are ands and ors with unb ounded fanin

k

TC if the gates are threshold gates with unb ounded fanin true if t

t

or more of their inputs are true

k

ACC p if the gates are ands ors and sum mo d pwith unb ounded

fanin

k k

ACC ACC p

p

ver all k is NC the class of problems solvable The union of any of these classes o

by parallel circuits of p olylogarithmic depth which is also p olylogarithmic time

on an idealized parallel computer

Since combinations of threshold gates can compute any function that dep ends

only on the sum of the inputs including sum mo d k wehave

k k k k k

NC AC ACC TC NC

for all k The classes well b e interested in are

AC ACC ACC TC NC ACC NC P

It is believed but not known that P NC in other words that there are

inherently sequential problems in P that cannot b e eciently parallelized Some

small progress has b een made towards proving this parity is in

ACC but not AC ACC pandACC q are incomparable if p and q are

distinct primes and ma jorityis in TC but not ACC Thus the rst two

inclusions in this series are prop er but ACC and P or even NPcouldbe

identical for all anyone has b een able to prove

A reduction from a problem A to a problem B is a mapping of instances of A

to instances of B If the mapping is computationally easy compared to B then

any fast algorithm for B b ecomes a fast algorithm for Athus B is at least as

hard as A A problem B is complete for a complexity class if every other problem

in that class can b e reduced to it

For P it is common to use LOGSPACE O log n memory in a Turing

machine or NC reductions for NC wewilluseAC or NC reductions the

latter b eing essentially lo cal replacement rules

We also have

NC DET NC

where DET is the class of problems NC reducible to calculating the determi

nantofaninteger DET is not known to b e comparable with AC or

ACC

Then we have the classical results that for Bo olean gates Expression

Evaluation and Circuit Value are NC complete and Pcomplete resp ec

tively under AC and NC reductions

We will consider circuits and expressions where the sole op eration is multi

plication in some nite algebra A rather than the usual Bo olean op erations

Thus our expressions are p olynomials like x x x x and our circuits

have one kind of no de whose output is the pro duct a b of its two inputs

Then dep ending on the algebraic prop erties of A such as asso ciativity

commutativity solvability and so on Expression Evaluation and Circuit

Value can havevarying complexities Previous results for the asso ciativecase

groups and include the following

Expression Evaluation Circuit Value

nonsolvable NC complete Pcomplete

solvable ACC ACC DET

In this pap er wewill extend these results to nonasso ciative algebras such

as and lo ops and to some extent to algebras in general We will

show that the idea of solvability generalizes in two imp ortantways in the non

asso ciative case polyabelianness the prop erty of being an iterated quasidirect

pro duct of Ab elian groups and Msolvability the prop ertyofhaving a solvable

multiplication group or semigroup

We hop e that these results are interesting in their own right and that they

might help illuminate the internal structure of P and NC and the relationship

between dierent circuit mo dels

In the problem of predicting a cellular automaton for a p olynomial

number of steps corresp onds to a sp ecial case of Circuit Value where the

circuit has a p erio dic structure Thus these results will also help us tell when

there are fast algorithms for predicting cellular automata whose rules corresp ond

to certain algebras as in

Algebraic preliminaries

We will use the following terms For the theory of quasigroups and lo ops we

recommend asanintro duction

An algebra also called a groupoid or G is a binary op eration

f G G G written f a ba b or simply ab The order of an algebra is

the numb er of elements in G written jGj Throughout the pap er we will assume

that our algebras are nite

A quasigroup is an algebra whose multiplication table is a Latin square in

hrow and each column Equivalentlyfor which each symb ol o ccurs once in eac

every a b there are unique elements ab and anb such that ab b a and

a anbbthus the left right cancel lation property holds that bc bd resp

cd bd implies c d

An identity is an element such that a a a for all a A loop is

a quasigroup with an identity In an Ab elian group we will call the identity

instead of

In a lo op the left right inverse of an element a is a a resp a an

so that a a resp a a If these are the same we will refer to them

both as a

An algebra is associative if a b ca b c for all a b cA semigroup is

an asso ciative algebra and a is a semigroup with identityA group is an

asso ciative quasigroup groups haveinverses and an identity

Two elements a b commute if a b b a An algebra is commutative if all

pairs of elements commute Commutative groups are also called AbelianWe will

use instead of for pro ducts in an Ab elian group

p

In a group the order of an element a is the smallest psuchthat a

or pn in an Ab elian group

A is a function from one algebra A to another B

such that a ba b An isomorphism is a onetoone and onto homo

B if A and B are isomorphic and morphism we will write A

isomorphisms from an algebra into itself are called endomorphisms and automor

phisms resp ectively the automorphisms of an algebra A form a group Aut A

Endomorphisms of Ab elian groups can b e represented by matrices

A subalgebra subquasigroup subloop etc of G is a subset H G suchthat

b b H for all b b H The subalgebra generated by a set S consisting of

all p ossible pro ducts of elements in S is written hS i

The left right cosets of a sublo op H G are the sets aH fah j h H g

and Ha fha j h H g for each a G A sublo op H is normal if the following

hold for all a b G

aH Ha abH abH and aH b aHb

Then the set of cosets of H is the quotient loop or factor GH it has identity

H H and is the image of G under the homomorphism aaH

A sublo op of G is proper if it is neither fg nor all of GAminimal normal

sublo op of G is one which do es not prop erly contain any prop er normal sublo ops

of GAsimple lo op is one with no prop er normal sublo ops

and the as The commutator of two elements in a lo op is a b abba

sociator of three elements is a b c abcabc The sublo op generated by

all p ossible commutators and asso ciators in a lo op G is called the commutator



associator subloop or derived subloop G It is normal and it is the smallest



sublo op such that the quotient GG is an Ab elian group



AloopG is solvable if its derived series G G G where G G

i

i

for all i ends in G fg after a nite numberofstepsAny nonsolvable lo op

k



contains a simple lo op H for which H H More generallywe call an algebra

solvable if it contains no nonsolvable lo ops

The center of a lo op is the set of elements that asso ciate and commute with

everything Z Gfc j cx xc cxy xcy xycforallx y GgItisa

normal sublo op of G

The upper central series of a lo op is fg Z Z where Z Z

i i

is the center of GZ A lo op is nilpotent of class k if Z G for some k

i k

Inductively G is nilp otent if it has a nontrivial center Z G and GZ G has a

nontrivial center and so on until we get an Ab elian group for which Z GG

The nilp otent lo ops are a prop er sub class of the solvable ones

direct A variety is a class of algebras V such that subgroups factors and

pro ducts of algebras in V are also in V Apseudovariety is closed under nite

direct pro ducts but not necessarily innite ones Solvable and nilp otent lo ops

b oth form pseudovarieties

In a quasigroup Qwe can dene left and rightmultiplication as functions

L b a b and R b b a These are permutations on Q the rows and

a a

columns of the multiplication table and the multiplication group MQisthe

group of permutations they generate More generally any algebra has a mul

tiplication semigroup generated by the L and R whic h are not necessarily

a a

onetoone functions on QIfwehave more than one op eration wewillreferto



L MQ and so on

a

Finally we refer to the identity function x x the cyclic group Z

p

f p g with addition mo d p and the groups S and A of p ermutations

n n

and even p ermutations resp ectively on n elements

Solvability and Bo oleancompleteness in groups and

lo ops

Let us dene the set of functions that can b e expressed as circuits whose gates

carry out multiplication in an algebra A and whose inputs can be variables

or constant elemen ts of A This is equivalent to the set of p olynomial ex

pressions denable in A with constants and variables such as x x x

x ax x b

Denition The polynomial closure of an algebra A is the smallest set P A

of functions on an arbitrary number of variables x x containing the

k

following

constants a for all a A

pro jections x for all i

i

pro ducts for all PA

Since P A is closed under comp osition and substitution of one function

for a variable of another it is a clone We will sometimes refer to the set of

k

functions on k variables as P A for instance P Acontains the multiplication

semigroup MA as well as functions like xx

We are interested in whether an algebra can express arbitrary Bo olean func

tions For instance in the quasigroup

if false and true then

a b ab and a a

are expressions of these Bo olean functions as p olynomials in We can combine

these to makeany other Bo olean function Formally

Denition An algebra A is strongly Booleancomplete if there exist ele

ments true and false in A and functions in P A suchthat a b

  

a b and aa whenever a b ftrue falseg



In general we will allow true and false to be sets rather than single

elements

Denition An algebra A isBooleancomplete if there exist disjoint subsets

T F A of true and false elements resp ectively and functions in

 

P Asuch that a b a b and a a whenever a b T F where

 

x y if x and y are b oth true or b oth false

Then a strongly Bo oleancomplete algebra is a Bo oleancomplete one where

T and F are the singletons ftrueg and ffalseg

Lemma If an algebra is Booleancomplete then its Expression Evalua

tion and Circuit Value problems are NC complete and Pcomplete under

AC and NC reductions respectively

Proof Bo olean Expression Evaluation and Circuit Value problems are

reducible to their algebraic counterparts since a lo cal rule can replace and or

and not gates with complexes of algebraic gates ut

Then we briey restate a theorem of Barrington with a slightly dierent

pro of The construction hinges on the fact that the commutator has the character

of an and gate if false then a b is false if either a or b is since the

identity commutes with everything

First weshowtwo useful lemmas

Lemma If Q is a nite quasigroup the divisions ab and anb areinP Q as

functions of a and b Therefore functions that yield the commutator associator

and left and right inverses areinP as wel l

Proof Recall the denition of L and R ab ove If Q is a quasigroup of order n

a a

n n

L and R are p ermutations on its elements and L and R are the identity

a a

a a

n n

Then aL bL bbso

a a

n

anb L baaa b

a

z

n times

is in P Q Similarly for abthenby comp osition we can dene a b ab ba

a b cabcabc a a and a an ut

Lemma If G is a simple loop or group for any x y there is a function

in P G that sends x to y and keeps the identity xed

xy

Proof Let U be the set of functions in P G such that For an

element x GletU xfx j U g b e the set of y s that we can send x

to while xing

 

Then U x is a sublo op since if we dene a a a

Moreover U x is a normal sublo op since we can fulll each requirement for



normality with a suitable denition of



aUxU x a xax a



abUx ab U x xab n abx



aU x baUxb xa n ax b b

 

In each case is in P Gby lemma and in U since if and only if

If G is simple then there are no prop er normal sublo ops and U xG for

xy thisisour any x Thus for any y there exists U suchthat

ut

xy

Theorem Barrington Nonsolvable groups arestrongly Booleancomplete

Proof Assume without loss of generality that G is simple and nonAb elian



so that G G Then cho ose any noncommuting pair of elements x y with

x y Let false and true be any nonidentity element t and

dene

a b a b

tx t y

xy t

This expression evaluates to t if a b t and if either a or b is in other

wordsitisanand gate Finallywe can express negation as a t a ut

By using an asso ciator instead of a commutator this generalizes to lo ops

Like the commutator the asso ciator x y z isifany of its arguments is

since the identity asso ciates with everything

Theorem Nonsolvable loops arestrongly Booleancomplete

Proof Assume without loss of generalitythat G is simple and nonasso ciative

since theorem treats the asso ciative case Cho ose a triplet of nonasso ciating

elements x y z G with x y z Let false and true t as

b efore Then

a b a bz

tx ty

xy z t

and a ta or t a ut

In fact simple nonAb elian groups simple lo ops and nonane

simple quasigroups have a stronger prop erty that their p olynomial closure

ts This is called functional contains al l p ossible nary functions on their elemen

completeness and is of interest in the eld of multivalued logic However

Bo oleancompleteness is sucient for our purp oses

Since the Circuit Value problem for solvable groups is in NC non

solvability is b oth necessary and sucient for Bo oleancompleteness in the case

of groups or semigroups in fact This also means that in the asso ciative case

Bo oleancompleteness and strong Bo oleancompleteness are equivalent

However a lo op can be solvable and still be strongly Bo oleancomplete

Let G be



Here G is the normal sublo op f g Z But the lower righthand blo ck

is the Bo oleancomplete quasigroup given ab ove and can be expressed in

P Gasab a b Then if false and true asbeforewe

can write a b ab and G is Bo oleancomplete We also note that

this lo op has a solvable multiplication group whichwe will discuss b elow

A lo op has the inverse property ifa abbaa bwhere a

a a Solvable lo ops with the inverse prop erty can also b e Bo oleancomplete

we b elieve the smallest example is



Here G f g Z so G is solvable However if false and

true we can dene a b a b since and a a

In both these examples the lower righthand blo ck can be any quasigroup

whatso ever clearly the standard denition of solvable for lo ops is not a very

meaningful constraint for our purp oses In the next section we will show that

for lo ops and quasigroups a prop erty slightly more subtle than solvabilityisthe

dividing line b etween Bo oleancompleteness and incompleteness

Polyab elian algebras

Denition and prop erties

The direct product of two algebras A B is the set of pairs a b with pairwise

multiplication a b a b a a b b Consider the following general

ization

Denition A quasidirect product oftwo algebras A and B is the set of pairs

a b under an op eration of the form

a b a b a a b b

a a



where each a a denes a local operation on B Wewilldenote sucha

a a



pro duct A B

If the lo cal op erations are of the form

b b f b g b

a a a a a a

  

we will call them separableFurthermore if B is an Ab elian group and the s

are of the form

b b f b g b h

a a a a a a a a

   

where f and g are endomorphisms on B and h is an element of B dep ending

arbitrarily on a and a thenwe will call them aneWe will call a quasidirect

pro duct A B separable or ane on B if all its lo cal op erations are

Lemma If A B is a quasigroup then A and B are quasigroups and al l the

s are quasigroup operations on B If A B is a quasigroup and is ane on

B then al l the f s and g s are automorphisms on B If A B is aloop ane

A we have f g and on B then A is a loop and for al l a

a a

h h hereweare using for the identities of both A and B Thus

a a

b b b b for b b B andB is a subloop of A B on which and

coincide

Proof Easy left to the reader ut

The quasidirect pro duct is a rather general way of extending to a lo op from a normal sublo op

Lemma If a loop G has a normal subloop N then G is isomorphic to a

quasidirect product GN N Furthermore al l the local operations and if N

is Abelian and G is ane on N thef s g s and hs areexpressible in P G

Proof Cho ose a set T with one elementineach coset of N and dene an op er

ation on T where t t is the elementofT in the same coset as t t Then

clearly T GN

Every element can b e uniquely written g tn where t T and n N Then

t n t n t t n n

t t



where

n t t n t n t n n

t t



whichisin N since N is normal Thus G is a quasidirect pro duct T N and

all the lo cal op erations are in P G If N is an Ab elian group and G is ane on

N then

f nn

a a a a a a

  

g n n

a a a a a a

  

h

a a a a

 

where we abuse notation by writing and instead of and for pro ducts in

N FinallyN is in P G since a b a b by lemma ut

Then dene the following class of algebras

Denition An algebra is polyabelian if it is an iterated quasidirect pro duct of

Ab elian groups A

i

A A A A

k

where all the pro ducts are ane

It is easy to show that subalgebras factors and nite direct pro ducts of

p olyab elian algebras are polyab elian so this class forms a pseudovariety The

next few lemmas show inclusions b etween the p olyab elian lo ops and some com

mon classes of groups and lo ops

Lemma Polyabelian loops are solvable

Proof Let H A A A with H G Then the reader can

i i i k

show that all the H are normal sublo ops of GandH H A is Ab elian

i i i i



Therefore H H and the deriv ed series ends after at most k steps ut

i

i

The converse is not true for lo ops in general for instance the solvable

Bo oleancomplete lo ops ab ove since the lo cal op erations in their lower right

hand blo cks are not ane but it is true for groups

Lemma Solvable groups arepolyabelian

Proof Any solvable group G has a normal subgroup N which is Ab elian namely



the last nontrivial group in its derived series such that N fg Then the lo cal

op eration in GN N from lemma can b e written

n n t t t n t n

t t



t t t t t n t n

where we use for pro ducts within N Thus G is ane on N where

f nt nt

t t



g nn

t t



h t t t t

t t



Then GN has an Ab elian normal subgroup and so on by induction G is p olya

b elian

If t t t t so that h then T is a subgroup of G isomorphic to GN

the quasidirect pro duct reduces to the semidirect product on groups and G is a

split extension of N by T In we dened p olyab elianness with semidirect

pro ducts onlyinwhich case anysolvable group is a subgroup of a p olyab elian

group by a theorem regarding wreath pro ducts ut

Lemma Nilpotent loops arepolyabelian

Z G Then the lo cal op eration in Proof Let G b e a nilp otent lo op with center

GZ G Z Gis

n n t t nt t n n

t t



since n and n asso ciate and commute with everything So G is ane on Z G

with f g and h t t nt t Then GZ G has a nontrivial center

and so on by induction G is p olyab elian ut

Thus p olyab elianness coincides with solvability for groups and lies prop erly

between nilp otence and solvability for lo ops

We wish to sho w that for purp oses of Bo oleancompleteness p olyab elianness

is the correct generalization of solvability in the nonasso ciative case that is an

algebra is Bo oleancomplete if and only if it is not p olyab elian This will turn

out to b e true for lo ops and quasigroups but not for algebras in general

Polyab elian algebras arent Bo oleancomplete

In one direction wecanprove this for all algebras In weshowthat Circuit

Value for p olyab elian algebras is in ACC and a simple mo dication of the

pro of for solvable semigroups in shows that it is also in DET Wenowshow

directly that p olyab elian algebras cannot express the and function First two

lemmas from

Denition A function on variables x x is ane if there exists an

n

Ab elian group A endomorphisms f f and an element h suchthatx x

n n

P

f x h

i i

i

Lemma If A is an Abelian group then any function in P A is ane and

the ane functions are closed under composition

Proof Obvious a ba b is ane and if and are b oth ane then

so are and ut

is an ane function then a b a b if and Lemma If a b

only if a b a b for any four elements a a b b

Proof We can write a bf ag bh where f and g are endomorphisms

Then a b a b implies that g b g b which in turn implies that

a b a b forany a ut

Theorem Polyabelian algebras cannot express the and function and so are

not Booleancomplete

Proof If G is Bo oleancomplete then it can express an nary and function for

any n ie a a a T if and only if a T for all i assuming that

n i

a T F for all i Wewillshow that this is imp ossible for n suciently large

i

If G A A A thenany g G has a unique vector of comp onents

k

g g where g A for all iCall g the A component of g We will g

k i i i i

pro ceed through the A by induction showing that there are elements of T and

i

F matching on all their comp onents and therefore equal then T and F are not

disjoint a contradiction

P

We will use the following fact if a a f a h is an n

n i i

i

ary ane function on an Ab elian group A of order p and if A has k distinct



m m

endomorphisms for instance k p for A Z since its endomorphisms are

p

m m matrices with entries in Z and if n is greater than p k thenat

p

least p of the variables have the same f f Thenifthesep variables are all

i

equal they contribute nothing to since pf In particular if the n p other

variables are true has the same value whether these p variables are true or

p np n

false As shorthand for this wewrite f t t Thus cannot b e an

and function

So assume that there is an nary and function in P G To start the

induction since A is a factor of Gthens A comp onent is a function of

the A comp onents of the a expressible in P A and therefore ane by lemma

i

p np n

Cho ose t T and f F thenforn suciently large f t t

p np n

Let f f t and t t then t T and f F byhyp othesis and

they have the same A comp onent

T and f F agree on their A comp onents for Now supp ose that t

m m j

all j m Think of as a tree where each no de outputs the pro duct of two

sub expressions according to some lo cal pro duct Nowthe A comp onents at each

j



no de dep end only on the A comp onents of its two sub expressions for j j j

since A A is a factor of G for all j and t and f have the same

j m m

A comp onent for all j m so inductively and each of its sub expressions

j

have constant A comp onents for j m when restricted to inputs in ft f g

j m m

Furthermore each no de applies an ane lo cal op eration on A and which

m

one it applies dep ends only on its sub expressions A comp onents for j m

j

Since these are constant in this restriction eachnodealways applies the same

lo cal op eration the comp osition of all of these make an ane function on

m

the A comp onents of its inputs

m

p np n

Then if weletf f t F and t t T we see that

m m

m m m

f and t agree on their A comp onents for all j m After k steps of

m m j

this induction t and f agree on all their comp onents and so are equal so T

k k

and F are not disjoint ut

Theorem and lemma establish the converse namely that nonp olyab elian

algebras are Bo oleancomplete in the case of groups wewillnow show this for

lo ops and then for quasigroups using slightly dierent techniques

Nonp olyab elian lo ops and quasigroups are Bo oleancomplete

First we need the following lemma

Lemma If a factor of G is Booleancomplete then so is G

Pro of If a homomorphic image G is Bo oleancomplete with T and F simply

 

let T and F in G b e the inverse images T and F ut

Corollary The set of nonBooleancomplete algebras forms a pseudovariety

Proof It is easy to show that subalgebras and direct pro ducts of nonBo olean

complete algebras are nonBo oleancomplete lemma completes the pro of

since it shows that contrap ositively factors of nonBo oleancomplete algebras

are nonBo oleancomplete ut

Then

Theorem Nonpolyabelian loops areBooleancomplete

Proof Let H b e the smallest nonp olyab elian factor of GWe will showthat H

is strongly Bo oleancomplete

Assume without loss of generalitythat H is solvable since wehave already

treated the nonsolvable case with theorem Then H has a normal sublo op K

Ab elian group namely the last nontrivial sublo op in its derived which is an



series with K fg Let N be a minimal normal sublo op of H contained in

K then N is also Ab elian Weknowthat H is not ane on N otherwise HN

would b e a smaller nonp olyab elian factor of G

Recall the denition of U x from lemma Since N is minimal U n N

for any n N otherwise U n N would b e a smaller normal sublo op since the

intersection of normal sublo ops is normal So for any n n N there exists a

function PH that sends n to n and preserves the identity

n n



Since H is not ane on N some lo cal op eration is either not separable or

not ane Dene the separator

K n n n n n n



where weuseand for pro ducts in N If is not separable then K n n



k for some n n however K nK n for any n But this

 

gives us our and gate let false andcho ose true t N andlet

b a a b K

tn k t  tn



If all the lo cal op erations are separable then one must not b e ane that is

some f or g is not a endomorphism of N Let f nn as in

lemma and dene the anator

L n n f n n f n f n

f

If f is not a endomorphism then L n n k for some n n but

f

L n L n for all nso

f f

a b L a b

k t f tn tn



is an and gate Similarly if some g is not a endomorphism

So any nonlinearity in the lo cal op erations can b e used to construct an and

gate and we can express negation a ta as b efore Thus H is strongly

Bo oleancomplete and G is Bo oleancomplete by lemma ut

For the quasigroup case we need some additional denitions and lemmas

The idea of a normal sublo op generalizes in the following way

Denition A normal congruence on a quasigroup Q is an equivalence such

that if a a and b b then a a b b In other words the equivalence

class of the pro duct dep ends only on the equivalence classes of a and b so the

map from Q to the set of equivalence classes Q is a homomorphism This

denition works for nite quasigroups for innite ones additional requirements

are needed to makesure Q is also a quasigroup For a lo op with a normal

sublo op for instance the equivalence classes are simply its cosets

er congruence is one other than the identitya b only if a borall A prop

of Q a b for all a b A quasigroup is simple if it has no prop er congruences

A normal congruence is minimal if there is no prop er normal congruence

whose equivalence classes are prop erly contained in those of

Then lemma generalizes in the following way

Lemma If Q is a simple quasigroup then for any x y z w with x z there

exists a function in P Q that sends x to y and z to w

xyzw

Proof Fix z and let U b e the set of functions in P Qsuchthat z w

z w

Then U x is the set of y s that we can send x to while sending z to w

z w

Supp ose y U x and y U x that is supp ose there are

z w z w



PQsuch that xy z w xy and z w

  

Then if a a a we have x y y and z w w



Therefore U and y y U x

z w w z w w

 

So for each x and z the sets U x for dierent w are equivalence classes

z w

of a normal congruence Moreover each one has more than one element for

instance w and wz x are both in U x by the functions a w and

z w

wz a and are distinct in a quasigroup if x z

Since Q is simple U x Q so for every y there exists a function

z w

ut U x that sends x to y whichisour

w z w xyz

Two more lemmas will prove useful

Lemma If a quasigroup Q is separable on a loop operation ie if

ab f a g b for some f gthena b is expressible in P Q

Proof Let the identityof b e Then f aag and g af a

n

Since Q is a quasigroup f and g are onetoone and f f and g

n

g if Q has order nThena b f a g b Note that it is not necessary

for f and g to b e automorphisms ut

Lemma Simple nonane quasigroups arestrongly Booleancomplete

Proof This is just a sp ecial case of the functional completeness result mentioned

ab ove We rely on the following fact the pro of of which can be found is

if Q is not ane then there is a function P Q that violates the

statement of lemma ie a b a b but a b a b for

some a a b b

Then cho ose an element x and dene

a bx a ba b

The reader can check that a b x for three out of four combinations of a

a b and b except a b which is some y x This has the shap e of an

and gate and using lemma w e can dene

b a a b

falseb trueb falsea truea xfalsey true

 

and

a a

truefalsefalsetrue

of which one example derived from a Malcev operation is

true truentrue a false

ntttt ut since ttnt tt

Finallywe note that lemma holds for quasigroups as well if Q has a normal

congruence then Q Q N where N is any one of the equivalence classes

and the lo cal op erations on N are in P Q Unlike the lo op case N might not

be a sub quasigroup of Q Lemma also holds if Q is Bo oleancomplete

then so is Q Then we can prove

Theorem Nonpolyabelian quasigroups areBooleancomplete

Proof As b efore replace Q with its smallest nonp olyab elian factor R whichwe

will show is strongly Bo oleancomplete Since lemma takes care of the case

when R is simple we assume without loss of generality that R has a minimal

normal congruence suchthat R is not ane on its equivalence classes

If there is a particular lo cal op eration whichisnotanethenitisasimple

quasigroup op eration expressible in P R and lemma applies However it

could b e the case that every lo cal op eration is ane but not all on an identical

Ab elian group For instance in the Bo oleancomplete lo op of order ab ove

every lo cal op eration is isomorphic to Z but in awaywhich is not ane on

each other the lower righthand blo ck is the upp er lefthand blo ck with and

switched but there is no automorphism of Z that only switches two elements

In this case we use lemma if any of the op erations is ane on an Ab elian

group A then A is expressible in P R Then if any other lo cal op eration

is not also ane on A we use its separator or anator with resp ect to to

construct an and gate as in theorem

Then R is strongly Bo oleancomplete and Q is Bo oleancomplete by lemma

ut

Corollary The nonBooleancomplete quasigroups and the polyabelian quasi

groups form the same pseudovariety

Algebras in general

It would be very nice if nonp olyab elianness were the criterion for Bo olean

completeness for algebras in general presumably with Ab elian group replaced

by Ab elian semigroup in the denition However we can givea counterexam

ple Let A be

Theorem A is nonpolyabelian but cannot express the and function

Proof The equivalence classes f g and f g form the only prop er normal

congruence of A There is no Ab elian semigroup on whichthelowerright and

upp erleft lo cal op erations are b oth ane so A is not p olyab elian

We could not have true and false in dierent equivalence classes since

A Z Sowe will assume rst that true false f g

The lower righthand blo ck lo oks like an and gate with true and

false inwhichcasewe could use the upp er lefthand blo cktosay a a

But there is no waytomapsay to and to since ab ba a whenever

a f g and b f g that is and dominate and

consider a p olynomial expression in P A The following rules Formally

preserve the value of on inputs restricted to f g

Replace a and a with a if a f g and contains only elements of

f g and

Replace ab with the appropriate constantin f g if a b f g

Applying these rules rep eatedly will leave us either with a constantin f g or

with variables and constants in f gonwhich is a subalgebra isomorphic to

Z Soany function in P A is constant or ane when restricted to variables in

f g and cannot express an and

Finally assume that true false f gAny no de whose output is or

is equal to either its left or its right input whichever one is or which

in turn is equal to one of its inputs and so on back up to a single constantor

variable Since is normal for inputs in f g the same sub expressions always

have values in f g and this path always leads back to the same input or

constant So any function in P A with an output in f g is either constantor

equal to one of its inputs when restricted to variables in f g and cannot b e

an and ut

Note that wehave not shown that this algebras Expression Evaluation

or Circuit Value problem is in NC simply that it is not Bo oleancomplete

Perhaps the reader can nd some more subtle analog of polyab elianness that

works for all algebras

Msolvability and expression evaluation

Wenow consider the relationship b etween expressions in an algebra and words

in that algebras multiplication group or semigroup

Denition An algebra is Msolvable if its multiplication semigroup is solvable

For groups solvability and Msolvability coincide since one can showthat

MG is isomorphic to G GZ G and is solvable if G is For lo ops M

solvability implies solvability by a recent result of Vesanen and nilp otent

lo ops are Msolvable by a theorem of Bruck Thus like p olyab elianness M

solvability is a generalization of solvabilitywhich lies prop erly b etween nilp otence

and solvability for lo ops

However the Msolvable lo ops and p olyab elian lo ops are incomparable First

we show that Msolvabilityis related to the solvabilityof the automorphisms

generated bythe f s and g s in a quasidirect pro duct

Denition For an ane quasidirect pro duct A B dene hfgB i as the

subgroup of AutB generated by all the f s and g s in the lo cal op erations and

dene hfghB i as the group of ane op erations on B generated by all the rows

and columns of the lo cal op erations

We need the following denition from

Denition The wreath product of B by A written A o B is a particular kind

A A

of semidirect pro duct A B where B is the set of functions from A to B

with multiplication dened as

 

a a a a a a a a where

In other words each elementofA o B consists of an elementofA and a vector

of jAj elements of B the s are multiplied comp onentwise but with the

comp onents of permuted by a Thus the Acomp onent is aected by a A

A

while the B comp onent within a blo ck fagB is aected by a B

Then wehave

Lemma If G A B is a quasigr oup then MB for every local oper

ation is contained in a factor of a subgroup of MG Furthermore if G is

ane on B the fol lowing areequivalent

G is Msolvable

hfgB i is solvable

hfghB i is solvable

Proof Let G A B Let H b e the subgroup of MG consisting of those

multiplications that preserve the blo cks fagB ie that leavethe Acomp onent

ts unchanged and let N b e the subgroup of H that also xes the B comp onen

of elements in a particular blo ck fa gB It is easy to see that N is normal

in H and that HN is isomorphic to the set of p ermutations of B that can b e

carried out with multiplications in G

Although unlike the lo op case fa gB might not b e a subalgebra we can

identify b with a b and dene the lo cal op erations as b b a n a b a b

where a is chosen so that the Acomp onentofb b is a Then multiplications



in are comp ositions of multiplications in G for instance R L R L

a

a b

a



b

So MB HN

Now supp ose G is ane on B Since the rows and columns of all the s

generate exactly hfghB iwehave hfghB i HN The subgroup of hfghB i

that preserves the identityofB is simply hfgB i Since subgroups and factors

of solvable groups are solvable b oth these groups are solvable if MGis

Conversely since elements of MG p ermute the blo cks with each other by

elements of A while p ermuting them internally by the rows and columns of the

s MG is a subgroup of the wreath pro duct MA o hfghB i and the

wreath pro duct of twosolvable groups is solvable

Finally since two ane functions bf bh and bf bh

comp ose as

bf f bh h

we see that hfghB i is a semidirect pro duct hfgB iB The semidirect pro d

uct of twosolvable groups is solvable and B is Ab elian so hfghB i is solvable

if hfgB i is ut

polyabelian and Msolvable loops are incompara Theorem The classes of

ble

Proof First we construct a polyab elian lo op which is not Msolvable Let B

be an Ab elian group with a nonsolvable automorphism group for instance

Aut Z is the simple group of order and is generated bytwoelements

A A

f and g

If we let G Z Z where b b f b g b then hfgB i AutB

is nonsolvable and G is not Msolvable by lemma This pro duces a lo op of

order since Ab elian groups smaller than Z all havesolvable automorphism

groups we b elieve this is the smallest p ossible

Conversely the Bo oleancomplete lo op of order given in section ab ove

is Msolvable MG consists of those permutations of eight elements which

either preserve or switch the blo cks f g and f g This is the wreath



pro duct Z o S and its derived subgroup MG is the subset of S S consisting

of pairs of p ermutations whose total parityiseven The rest of the derived series

is



fg MG A A Z

Thus nonp olyab elian and Bo oleancomplete lo ops can b e Msolvable ut

Wenowgive a simple result relating expressions in MG to expressions in

G

Lemma For any algebra GtheExpression Evaluation problem of MG

is NC reducible to that of G

Proof Supp ose wehavea word in MGsuchasL R L If G has n elemen ts

a b c

the pro duct is determined by its action on each elementn But this just

means evaluating n expressions in G namely acbacbacnb

This is easily seen to b e an NC reduction ut

Then we immediately have

Theorem The Expression Evaluation problem for nonMsolvable al

gebras is NC complete under AC reductions

Proof By lemma and the fact that Expression Evaluation for nonsolvable

semigroups is NC complete under AC reductions ut

No analogue of lemma seems to exist in the case of circuits since Circuit

Value is Pcomplete for nonsolvable algebras but in ACC for nonMsolvable

ones that are polyab elian circuits over MG are not easy to simulate with

circuits over Gorviceversa unless P ACC

As mentioned ab ove Expression Evaluation is in ACC for solvable

groups In this case the correct generalization of solvability in the non

asso ciative case consists of b eing both polyab elian and Msolvable but the need

to parse the expression makes the problem somewhat harder

Theorem For an algebra which is both polyabelian and Msolvable Ex

pression Evaluation is in TC orinACC if the expressions parse treeis

already known

Proof Consider a p olyab elian algebra A A A A An expression

k

suchas x x x x on variables x x can b e inductively calculated

n

in the following way similar to the algorithm in forCircuit Value the

A comp onent is just a sum in an Ab elian group and the A comp onentis

m

an expression with ane lo cal op erations

i

x x x x

where the are determined by the A comp onents of the sub expressions to

i m

their left and right

If a b f ag bh for all ithisisasum

i i i i

n n

X X

G h F x

j j i i

j i

where the F and G are endomorphisms of A comp osed of less than n of

i j m

the f s and g s In this case the reader can verify that

F f f G f

F f g f G f g

F f g g G

F g

Each one of these is a word in hfgA i by lemma this is solvable if A

m

is Msolvable Since Expression Evaluation is in ACC for solvable groups

these words and sums can b e evaluated in ACC We can calculate all of

s comp onents with k induction steps and were done

However howthe f s and g s contribute to the F s and Gs dep ends on the



expressions parse tree For each sub expression that x is contained in F

k i i

gains an f or g dep ending on whether x is to the left or rightof Similarly

k k i k



G gains an f or g for each sub expression that s sub expression is

i k k k i

contained in

The set of wellformed expressions is a structuredcontextfree language

and such expressions can b e parsed in TC as shown in In particular thresh

old gates can countthe ascent of a string in the parse tree dened as the number

of s minus the numb er of s then x is in the sub expression to the left of if

the ascent of the string b etween them is at least as great as the ascentofanyof

its initial substrings

Thus we can compute by rst parsing it with a TC circuit and then

calculating the ab ove sum with k levels of ACC circuits

Since the expression only has to b e parsed once the majoritydepth of the

circuit dened as the maximum numb er of threshold gates that any path tra

d

verses is constant for all algebras Thus this problem is in TC for some small

k

k as dened in ut

Msolvable Since nilp otent lo ops are b oth polyab elian by lemma and

wehave the corollary

Corollary Expression Evaluation is in TC orACC if the expressions

parse tree is already known for nilpotent loops

Cases where the parse tree is already known could include uniform families of

expressions one of each length For instance the problem of predicting a cellular

automaton amounts to evaluating a uniform family of circuits one of each size

This uniformity can signicantly simplify the Circuit Value problem as in

where cellular automata based on nilp otent groups are shown to b e predictable

in ACC

Conclusion and directions for further work

Wehaveshown that the relationship b etween solvability and circuit complexity

generalizes in nontrivial ways in the nonasso ciative case solvability b ecomes

polyab elianness for Bo oleancompleteness and Circuit Value and a combina

tion of p olyab elianness and Msolvability for Expression Evaluation The

table given in the Intro duction b ecomes the following in the case of quasigroups

or lo ops

Expression Evaluation Circuit Value

complete nonp olyab elian NC Pcomplete

polyab elian but

not Msolvable NC complete ACC DET

polyab elian and

Msolvable TC ACC DET

including nilp otent

For algebras in general nonp olyab elianness needs to b e replaced with some

further generalization as the necessary and sucient condition for Bo olean

completeness However the second and third rows of this table hold for all algebras

These results also have a languagetheoretic interpretation A regular lan

guage can be characterized by its syntactic monoid the semigroup of allowed

transitions of its nitestate machine Thus the regular languages that are NC

complete are exactly those whose syntactic monoid is nonsolvable Similarly

the set of expressions in a nonasso ciative algebra that evaluate to a particu

lar element is a structured contextfree language generated by the pro ductions

a bc for all b c suchthat b c aThus it seems that wemay b e close to

showing exactly which structured contextfree languages are NC complete

e Expression Overall the fact that algebras with diering prop erties hav

Evaluation and Circuit Value problems with probably diering circuit

complexities may help us learn more ab out the internal structure of NC and

k k k

hop efully make some progress towards proving that ACC TC and NC

form rich distinct hierarchies within P rather than all b eing equal to it

Acknowledgements JB assisted with this work as an intern at the Santa

Fe Institute funded by the Research Exp erience for Undergraduates program

of the National Science Foundation AD is grateful to the Santa Fe Institute

for an enjoyable visit CM is grateful to McGill University for their hospitality

and to Claire Riley for spicing the visit up a bit

References

M Ajtai formulae on nite structures Ann Pure Appl Logic

D A Barrington Boundedwidth p olynomialsize branching programs recognize

exactly those languages in NC J Comput System Sci

D A Mix Barrington and J Corb ett On the relative complexity of some lan

guages in NC Info Proc Lett

M BeaudryP McKenzie PPeladeau and D Therien Circuits with monoidal

gates Springer LNCS Proc STACS

RH Bruck Contributions to the theory of lo ops Trans Amer Math Soc

SR Buss The Bo olean formula value problem is in ALOGTIME In Proc th

ACM Symp on the Theory of Computing

O Chein HO Pugfelder and JDH Smith eds Quasigroups and Loops The

ory and Applications Heldermann Verlag

p olynomialtime M Furst JB Saxe and M Sipser Parity circuits and the

hierarchy Math Syst Theory

R Greenlaw HJ Ho over and WL Ruzzo Limits to Paral lel Computation P

Completeness Theory Oxford University Press

M Hall The Theory of Groups Chelsea

OH Ibarra T Jiang and B Ravikumar Some sub classes of contextfree lan

guages in NC Info Proc Lett

F Lemieux Finite Groupoids and their Applications to Computational Complexity

Ph D Thesis Scho ol of Computer Science McGill UniversityMontreal

A Maciel and D Therien Threshold circuits of small ma joritydepth Techni

cal Rep ort SOCS Scho ol of Computer Science McGill University Montreal

WD Maurer and JL Rho des A prop erty of nite simple nonAb elian groups

Proc Am Math Soc

R McKenzie On minimal lo cally nite varieties with p ermuting congruence re

lations Preprint

C Mo ore NonAb elian cellular automata Santa Fe Institute Working Pap er

or Predicting nonlinear cellular automata quickly by decomp osing them

into linear ones submitted to Physica D

C Mo ore Quasilinear cellular automata Santa Fe Institute Working Pap er

to app ear in Physica D Proceedings of the International Workshop on

Lattice Dynamics

CH Papadimitriou Computational Complexity AddisonWesley

HO Pugfelder Quasigroups and Loops An Introduction Heldermann Verlag

AA Razb orov Lower b ounds for the size of circuits of b ounded depth with basis

f g Math Notes Acad Sci USSR

IG Rosenberg Completeness prop erties of multiplevalued logic algebras In

DC Rhine ed Computer Science and MultipleValuedLogic Theory and Appli

cation NorthHolland

R Smolensky Algebraic metho ds in the theory of lower b ounds for Bo olean circuit

complexity Proc th ACM Symposium on the Theory of Computing

M Suzuki Group Theory I SpringerVerlag

A Szendrei Clones in Universal Algebra Les Presses de LUniversitedeMontreal

A Vesanen Solvable groups and lo ops Journal of Algebra

M Weinstein Examples of Groups Polygonal Publishing House Passaic New

Jersey

A

This article was pro cessed using the L T X macro package with LLNCS style E