default

Generalized Hex and logical characterizations

of p olynomial space

a; b;

AA ArratiaQuesada and IA Stewart

a

Department of MathematicsUniversity of WisconsinMadison

Madison WI USA

b

Department of Mathematics and Computer Science Leicester University

Leicester LE RH UK

submitted to Information Processing Letters

We answer a question p osed by Makowsky and Pnueli and show

that the logic HEX FO where HEX is the op erator ie

s

uniform sequence of Lindstrom quantiers corresp onding to the

wellknown PSPACEcomplete Generalized Hex

collapses to the fragment HEX FO and moreover that this logic

s

has a particular normal form which results in the problem HEX

b eing complete for PSPACE via quantierfree pro jections with

successor HEX is the rst natural problem to b e shown to have

this prop erty Our pro of of this normal form result is remark

ably similar to Immermans original pro of that transitive closure

logic TC FO has such a normal form which is surprising

s

given that HEX FO captures PSPACE and TC FO

s s

captures NL We also show that HEX FO do es not capture

PSPACE and that this logic do es not have a corresp onding normal

form

keywords Key words Computational complexity Descriptive

complexity Finite mo del theory Logical characterizations of

p olynomial space Completeness via logical reductions

We consider a particular logical characterization of the

PSPACE using rstorder logic with a builtin successor relation extended

Partially supp orted by EPSRC Grant GRK

Most of this work was done whilst the author was visiting the University of Leicester

with an op erator corresp onding to the wellknown PSPACEcomplete deci

sion problem Generalized Hex that is the logic HEX FO It was shown

s

by Makowsky and Pnueli see also that any problem in PSPACE

can b e dened by a sentence of the logic HEX FO and conversely that

s

any problem denable by a sentence of this logic is in PSPACE

There are numerous other similar logical characterizations of complexity

classes that is using logics obtained by extending rstorder logic with suc

cessor using op erators or more precisely uniform sequences of Lindstrom

quantiers corresp onding to problems the rst such b eing Immermans char

acterization of NL as those problems denable in the now wellstudied tran

sitive closure logic TC FO To our knowledge for of these other

s

characterizations more information is forthcoming that is the logics involved

p ossess normal forms and these normal forms yield strong complexitytheoretic

completeness results However Makowsky and Pnuelis logical characterization

of PSPACE failed to establish such a normal form for the logic HEX FO

s

and they left it as an op en problem as to whether the normal form existed In

Theorem of this note we establish such a normal form for HEX FO

s

which yields as an immediate corollary that HEX is complete for PSPACE via

quantierfree pro jections also called pro jection translations with successor

Other problems have b een shown to b e complete for PSPACE via quantier

free translations with successor in However these problems are rather

unnatural b eing based around the logical characterization of PSPACE as

partialxed p oint logic with successor in the sense that rstorder logic

was augmented with a contrived op erator to try and mimic the application of

the partialxed p oint construct On the other hand the normal form results

for the logics in hold in the absence of a successor relation which was

the whole p oint of the research in those pap ers A complete problem for

PSPACE via quantierfree pro jections with successor was also exhibited in

although it was not explicitly stated there as b eing so but again this

problem was unnatural b eing based around a characterization of PSPACE

using a dierent inductive construct Our result that HEX is complete for

PSPACE via quantierfree pro jections or rstorder translations for that

matter with successor is the rst such completeness result involving what

could b e called a natural problem

Not withstanding the preceding paragraph to our mind our actual pro of of

Theorem is the most interesting asp ect of this note given that it is essentially

identical to Immermans pro of in that transitive closure logic or as was

proven there the p ositive version TC FO has a normal form except that

s

in the combinatorial construction we replace an edge in one of Immermans

digraphs with a particular gadget see the pro of of Theorem This fact

encourages one to view the problem HEX as a game theoretic counterpart to

TC We intend to investigate this phenomenon more closely in future and hop e

to obtain criteria under which one can automatically transform a normal

form result for some logic FO which might capture NL for example

s

to the logic formed using the gametheoretic version of which might

capture PSPACE for example

The complexity class PSPACE do es have logical characterizations in which

a successor relation or any other builtin relation do es not app ear and con

sequently we have b een very careful ab ove in detailing when the successor

relation is present in our logics However as yet no problem natural or

otherwise has b een shown to b e complete for PSPACE via restricted logical

reductions in the absence of the successor relation Our nal result in this note

is that in the absence of the successor relation b oth the normal form and the

logical characterization in Theorem fail to hold Note that although the log

ics in have normal form results these logics do not capture PSPACE

in the absence of a successor relation

Given that nite mo del theory and descriptive complexity theory are now

rmly established in logic and theoretical computer science rather than give

denitions here we simply refer the reader to the pap er for all deni

tions and concepts regarding logics of the form FO and their relation

s

to complexity classes to the pap er for generalized EhrenfeuchtFrasse

games and their applicability to logics without builtin relations and to the

b o ok for background issues

Now for our results Let the signature hE C D i where E is a binary

relation symbol and C and D are constant symbols our signatures never

contain function symbols The problem HEX consists of those structures

S for which Player has a winning strategy in the game of Generalized Hex

on S where the game of Generalized Hex is played as follows Starting with

Player two players take it in turns to colour previously uncoloured vertices

S S S

of the graph describ ed by E apart from C and D with Player using the

colour blue and Player using the colour red If at the end of the play there

S S

is a path from the source C to the sink D consisting entirely of blue

coloured vertices then Player wins otherwise Player wins The notion of

Player having a winning strategy should b e clear The problem HEX is well

known to b e complete for PSPACE via logspace reductions see for more

details

The problem TC consists of those structures S for which there is a path

S S S

in the digraph describ ed by E from the source C to the sink D

Theorem HEX FO PSPACE and every problem in PSPACE

s

can be dened by a sentence of the form

HEX x y x y max

where jxj jy j k for some k is a quantierfree projection with suc

cessor and resp max is the constant symbol resp max repeated k

times

PROOF The result that HEX FO PSPACE is due to Makowsky

s

and Pnueli see also

Like the pro of of Theorem we pro ceed by induction on the complexity

of a sentence HEX FO The induction step assumes that every well

s

formed subformula of is logically equivalent to a formula of the desired form

and then treats the dierent ways in which can b e built from its maximal

subformulae in turn

Consider the case in the pro of of Theorem when is of the form

z TCx y x y max

where jxj jy j k for some k and is a quantierfree pro jection with z

amongst its free variables but dierent from those of x and y Let the under

lying signature of b e and let S b e some structure of size n The construc

tion in the pro of of Theorem takes copies of the digraphs D describ ed

z

S

by x y z where the vertices are k tuples over jS j f n g and

where z is given a value from jS j and strings them together to form the di

graph D by including an edge from the vertex max of D to the vertex of

z

D for each z f n g the vertex of D resp max of D is

z n

denoted as the source resp sink of the resulting digraph D Consequently D

has a path from its source to its sink i for each z f n g D has a

z

path from its vertex to its vertex max What is more it is shown in the

pro of of Theorem that the digraph D can b e describ ed in terms of S

uniformly by a quantierfree pro jection so that the source is and the sink

is max with the length of these tuples as dictated by the logical description

When dealing with the op erator HEX as opp osed to TC it is not enough

to simply rep eat the ab ove construction However by utilizing the following

gadget Immermans construction can b e made to work

Let G b e some undirected graph with source a and sink b Let G b e

obtained from copies of G namely fG i g by amalgamating

i

the sources of G G G and G to form the vertex a

the sources of G G G and G to form the vertex a

the sinks of G G G and G to form the vertex b

the sinks of G G G and G to form the vertex b

We say that G has two sources a and a and two sinks b and b The

graph G can b e visualized as in Fig where each graph G is represented

i

as a b old line

a a 1 G 2 G4 5 GG 1 2 G 7 G8

GG6 3

b 1 b 2

Fig The graph G

By the game of Generalized Hex on G we mean the following Either Player

or Player starts with b oth players colouring vertices as usual except that

they can also colour the sources and the sinks of G Player has a winning

strategy if he has a strategy which ensures a path of bluecoloured vertices

from at least one of the sources to at least one of the sinks in G note

that the source and the sink must b e coloured blue also

Lemma If Player has a winning strategy in the game of Generalized Hex

on G then Player has a winning strategy in the game of Generalized Hex on

G no matter whether Player or Player starts If Player has a winning

strategy in the game of Generalized Hex on G then Player has a winning

strategy in the game of Generalized Hex on G no matter whether Player

or Player starts

PROOF Supp ose that Player has a winning strategy in the game of Gen

eralized Hex on G and that Player starts the game of Generalized Hex on

G Wog we may assume that Player plays in the copy G of G in G

a If Player s rst move has coloured the sink b resp source a red then

Player colours the sink b resp source a blue wlog supp ose that b

has b een coloured red and b has b een coloured blue If Player replies by

colouring a vertex of G or G red then Player colours the source a blue

otherwise Player colours the source a blue Wlog we may assume that

a and b have b een coloured blue and no other vertex in G or G has b een

coloured If Player colours a vertex of G red then Player plays in G

according to his winning strategy on G and if Player do es not colour a

vertex of G red then Player plays in G according to his winning strategy

on G In any event Player wins the game of Generalized Hex on G

b If Player s rst move has coloured a vertex of G but not a or b then

Player colours the source a blue If Player replies by colouring a vertex

in G or G then Player colours the sink b blue otherwise Player colours

the sink b blue Player then wins as he did in the preceding paragraph

Reasoning similarly for the case when Player has a winning strategy in the

game of Generalized Hex on G and Player starts the game of Generalized

Hex on G yields that Player wins the game of Generalized Hex on G

The second part of the lemma follows similarly 2

Let b e as in the statement of the theorem and have underlying signature

Let S b e a structure of size n in which we interpret Let H b e dened as

z

S

the undirected graph describ ed by x y z for each z f n g

with the vertex resp max b eing the source resp sink Build the graph

H by stringing together the graphs fH z n g similarly to as

z

was done ab ove to obtain the digraph D except by including edges joining

b oth sources of H to b oth sinks of H for z n and

z z

amalgamating the two sources resp sinks of H resp H to form

n

the source resp sink of H Note that H is undirected with one source and

one sink whereas D is a digraph The graph H can b e pictured as in Fig

. . . source sink

() H () H

() H0 1 n-1

Fig The graph H

Supp ose that Player has a winning strategy in the game of Generalized

Hex on H for each z f n g By Lemma Player has a

z

winning strategy in the game of Generalized Hex on the graph H for

z

each z f n g In the game of Generalized Hex on H Player s

winning strategy is to play according to his winning strategy on each of H

z

for z n as follows Player b egins by playing according to his

winning strategy on H in fact any H can b e adopted as the graph

z

in which Player plays rst In general if Player plays in H for some

z

z f n g then Player replies according to his winning strategy

on H note that Player has a winning strategy regardless of whether he

z

plays rst or not

Conversely supp ose that Player has a winning strategy in the game of Gen

eralized Hex on some graph H for z f n g By Lemma Player

z

has a winning strategy in the game of Generalized Hex on the graph H

z

That is Player has a sequence of moves so that when Player plays rst

in H and no matter how Player plays Player can not obtain a blue

z

coloured path from some source to some sink recall the source and sink must

b e coloured blue as well In the graph H Player simply plays this sequence

of moves in the subgraph H of H No matter how Player plays in H he

z

will never b e able to obtain a bluecoloured path from some source of H

z

to some sink of H and consequently from the source of H to the sink of

z

H Hence Player has a winning strategy in the game of Generalized Hex on

the graph H

Consequently Player has a winning strategy for the game of Generalized

Hex on H i he has a winning strategy for the game of Generalized Hex on

H for each z f n g

z

In general the construction of G from a graph G of size n can b e describ ed

by a quantierfree pro jection The vertices of G are indexed by tuples

over f n g Roughly the rst comp onents of the tuple denote which

one of the copies G G G of G the vertex given by the th comp onent

resides with denoting G n denoting G n denoting

G and so on However the sources of G G G and G and of G G G

and G are amalgamated to form the sources of G and the sinks of G G

G and G and of G G G and G are amalgamated to form the sinks of

G We denote the sources of G by and n n n

ie the sources of G and G and the sinks of G by n and

n n n n ie the sinks of G and G The old sources and

sinks of G G G G G and G are left as isolated vertices The edges of

G can clearly b e dened by a quantierfree pro jection For example the

edges in G emanating from a source are dened by the formula

x x x x y y y max E x y

and the resulting quantierfree pro jection is just a disjunction of similar for

mula

Note that when we describ e our constructions using logical formula we often

introduce a number of isolated vertices The addition of isolated vertices to a

graph do es not make any dierence to the winner of the game of Generalized

Hex for b oth G or G

The description of H from the graphs fH z n g is then

z

done similarly with an extra comp onent added to the indexing tuples so as to

dene which copy of H a particular vertex b elongs to The source of H is

z

obtained by amalgamating the two sources of H as ab ove and calling it

and the sink of H is obtained by amalgamating the two sinks of H as

n

ab ove and calling it max The reader is referred to for example where

some quantierfree pro jections are given explicitly

Hence as the notion of quantierfree pro jection is transitive a result due to

Immerman see Prop osition of the problem dened by the sentence

z HEXx y x y max

can b e dened by a sentence of the form

HEXx y x y max

where jx j jy j k for some k and is a quantierfree pro jection

The other cases for the construction of in the pro of of Theorem

except with HEX replacing TC can all b e cop ed with by mimicking Im

mermans construction except using the gadget depicted in Fig as is done

ab ove we leave this as an exercise Consequently the result follows 2

Corollary The problem HEX is complete for PSPACE via quantierfree

projections with successor 2

In the absence of a builtin successor relation a result of Dawar and Gradel

Theorem tells us that the logic HEX FO do es not capture PSPACE

as it has a law However this do es not rule out a normal form result for

HEX FO analogous to that in Theorem For denitions relating to the

following theorem see

Prop osition There are problems denable in HEX FO which can not

be dened by a sentence of HEX FO in which the operator HEX does not

appear within the scope of the quantier

PROOF By Theorem it suces to show that for all p ositive integers

m there exist structures S and T such that

m m

S HEX and T HEX

m m

m

S T that is S and T satisfy exactly the same sentences of quan

m m m m

FO

tier rank at most m

l

Fix m Let G a b b e the graph with vertex set fa b i l g fa bg

i i

and edge set

fa a b b i l g fa b i l g

i i i i i li

fa b i l g fa a a b b b b a g

i li l l

l

The graph G a b is essentially a ladder with diagonal rungs to which the

vertices a and b are joined at each end Let S and T each consist of

m m

l

disjoint copies of G a b except that the source of S is vertex a of the rst

m

copy and the sink of S is vertex b of the rst copy whereas the source of T

m m

is vertex a of the rst copy and the sink of T is the vertex b of the second

m

m

copy furthermore set l

Clearly S HEX but T HEX A simple induction shows that Duplicator

m m

has a winning strategy in the mp ebble EhrenfeuchtFrassegame on S and

m

m

T and so S T see for example Theorem Hence the result

m m m

FO

follows 2

References

S Abiteb oul and V Vianu Fixp oint extensions of rst order logic and datalog

like languages Proc th IEEE Symp on Logic in Computer Science

E Dahlhaus Skolem normal forms concerning the least xp oint Lecture Notes

in Computer Science SpringerVerlag

A Dawar and E GradelGeneralized quantiers and laws Proc th IEEE

Ann Symp on Logic in Computer Science

HD Ebbinghaus and J Flum Finite Model Theory SpringerVerlag

A Ehrenfeucht An application of games to the completeness problem for

formalized theories Fund Math

Frasse Sur quelques classications des systems de relations Publ Sci

Univ Alger

MR Garey and DS Johnson Computers and Intractability A Guide to the

Theory of NPCompleteness Freeman

M Grohe Complete problems for xedp oint logics J Symbolic Logic

H Imhof Fixed Point Logics and Generalized Quantiers in Descriptive

Complexity PhD Thesis Alb ertLudwigs Universitat

N Immerman Languages which capture complexity classes SIAM J Comput

JA Makowsky and YB Pnueli Oracles and quantiers Lecture Notes in

Computer Science Vol SpringerVerlag

JA Makowsky and YB Pnueli Computable quantiers and logics over

nite structures in M Krynicki M Mostowski and LW Szczerba eds

Quantiers Generalizations Extensions and Variants of Elementary Logic

Kluwer Academic Publishers to app ear

IA Stewart Comparing the expressibility of languages formed using NP

complete op erators J Logic Computat

IA Stewart Metho ds for proving completeness via logical reductions

Theoret Comput Sci

IA Stewart Contextsensitive transitive closure op erators Annals Pure App

Logic

IA Stewart Completeness of path problems via logical reductions

Inform Computat

IA Stewart Logics with zeroone laws that are not fragments of b ounded

variable innitary logic Math Logic Quart to app ear