p
URL: http://www.elsevier. nl/loc ate/en tcs/vo lume2. html 14 pages
Linear Time Computable Problems and Logical
Descriptions
Detlef Seese
University Karlsruhe TH,
AIFB Institute for Applied Computer Science and Formal Description Methods,
D - 76128 Karlsruhe, Germany
e-mail: [email protected]
Abstract
It is a general problem to investigate the trade o b etween the complexityofal-
gorithmic problems, the structure of the input ob jects and the expressivepower of
problem description languages. The article concentrates on linear time algorithms
and on rst order logic FO as problem description language. One of the main
results is a pro of that each FO-problem can b e solved in linear time for arbitrary
relational structures of universally b ounded degree.
Keywords: Linear Time Computability, Relational Structures, Descriptive
Complexity Theory, First-Order Logic, Finite Mo del Theory.
1 Intro duction
It could b e one of the ultimate goals of computer science to nd a general
problem solver, i.e. a machinery which transforms each algorithmic problem
P into an algorithm to solve P for arbitrary inputs. But unfortunately,itis
well-known that there is no such algorithm whose input is a formal description
' of an arbitrary algorithmic problem P and whose output is an algorithm to
solve P . Hence it is an interesting question to nd restrictions on ' and P
under which the ab ove question could have an armative answer. A p ossible
formalization is to nd a language L or more precise a logic, i.e. a language
and its semantics and a class K of structures, such that each problem P
which can b e describ ed by a formula ' in L can b e solved eciently for each
structure G 2 K .Now it is the problem to nd L and K in suchaway that
the expressivepower of L is strong, i.e. many algorithmic problems can b e
expressed in it, the class K is large, i.e. it contains many structures interesting
for applications, and all these problems can b e solved with low complexity,
i.e. in p olynomial or b etter in linear time.
Many approaches develop ed in connection with this problem concentrated
on strong languages with high expressivepower, but had to pay the price
c
1995 Elsevier Science B. V.
Seese
of very restricted classes of structures. The most successful ones investi-
gated extensions of the strong monadic second order language MSO or re-
lated algebraic-logical approaches in connection with structures of universally
b ounded tree width, i.e. structures which are up to a certain parameter close
related to trees [2,6,8,9,11,13,14,16,31,36,40,42]. In many of these cases one
gets even linear time algorithms. However in case that one is interested in
larger classes of structures it seems to b e necessary to lower the expressive
power of the corresp onding language L. With resp ect to such classes of struc-
tures almost all existing general results b elong to the theory of descriptive
complexity.
Historically, the investigation of connections b etween complexity classes
on one hand and descriptions in logical languages on the other started with
Ronald Fagin's seminal pap er [22], where he proved that NP coincides with the
class of problems expressible in existential second order logic. Immerman [33]
proved corresp onding results for P, NL and several other complexity classes
using extensions of the classical rst-order calculus byvarious op erators and
prompted thus the development of descriptive complexityasanown branch
of complexity theory. Several of the articles in this area concentrated on the
famos P-NP{ or the NP-Co-NP{Problem and investigated languages whose
expressivepower is higher than that of rst-order logic, e.g. extensions of
rst-o der logic by certain op erators, as e.g. a xp oint op erator LFP, for
whichitwas proved that P=FO+ LFP if structures with an ordered
universe are regarded see [33]. Pure rst order logic did not get so much
attention, since its expressivepower is relatively weak and it was one of the
early results of this area that FO is strictly contained in L and hence in P,
where L denotes the class of deterministic logspace computable problems see
[4,32].
The main result of this article is a pro of that each rst-order problem
can b e solved in linear time if only relational structures of b ounded degree are
regarded. The basic idea of the pro of is a lo calization technique which based on
a metho d whichwas originally develop ed by Hanf [30] to show that two in nite
structures agree on all rst-order sentences. Fagin, Sto ckmeyer and Vardi
[23] develop ed a variant of this technique which is applicable in descriptive
complexity theory to nite relational structures of universally b ounded degree.
Variants of this result can b e found also in [25] see also [46]. The essential
content of this result, which is denoted also as the Hanf-Sphere Lemma, is
that two relational structures of b ounded degree ful ll the same rst-order
sentences of a certain quanti er-rank, if b oth contain up to a certain number
m the same numb er of isomorphism typ es of substructures of a b ounded radius
r .
The pap er is organized as follows: section 2 intro duces the basic terminol-
ogy and the notion BIORAM which serves as basis of the linear time com-
putability used in this pap er. Section 3 intro duces lo cal r -typ es and handles
the case of structures of b ounded degree by reducing the general problem to a
lo cal investigation of r -typ es. Some op en problems and remarks conclude the
pap er in section 4. 2
Seese
A
Martin Kreidler prepared the L T X-version of this article. I wish to thank
E
him for his ecient and diligentwork. Furthermore, I thank him for his helpful
suggestions and careful reading of several versions of the \ nal" text. Finally,
Imust express my gratitude to Wolfgang Thomas and his colleagues in Kiel,
where I presented and discussed the rst version of the main result.
2 De nitions and conventions
This section is devoted to a brief intro duction of the basic terminology, Notions
from logic or complexity theory not intro duced in this or the following sections
are standard and the reader is referred e.g. to [10,12,20,37].
A nite signature S for relational structures is a nite set of relation sym-
b ols R ;:::;R , each with a xed arity r > 0, and constant symb ols c ;:::;c ,
1 s i 1 t
G G
G G G
but without function symb ols. An S -structure G =A ;R ;:::;R ;c ;:::;c
1 1
s t
G
consists of a nite set A , the domain or universe, from whichwe assume that
G
G
it is the set f1;:::;ng for a natural number n, relations R over A of arity
i
G
G
r for each i :1is and elements c of A for each j :1j t. The
i
j
individuals of the domain of a structure are sometimes denoted as points or in
analogy to graphs as vertices .For a structure G we will denote its domain by
jG j. The numb er of the elements of an arbitrary set B will b e denoted also
as j B j, but this will cause no diculties, since sets and structures can b e
typ ographically distinguished. An S -structure G is called nite in case that
its domain is. Unless otherwise stated, throughout the rest of this article we
make the assumption that all structures that will b e considered are nite. If
S is a signature, let ST RUC T S= fG : G is a nite S -structureg.
G
G
For a subset B A , that contains all c with 1 j t, the induced
j
G G
r G r G
substructure GB is the structure B; R \ B ; :::; R \ B ;c ;:::;c .
1 1
1 s s t
G
G
Individuals a and b from A are said to b e adjacent by R , if there are
i
G
x ;:::;x , such that a = b or x ;:::;x 2 R and a = x ;b = x for some
1 r 1 r j k
i i i
G
j; k r . We will sometimes denote x ;:::;x asR -edge connecting a and
i 1 r
i i
G
b. a and b are said to b e adjacent in G if there is a relation R such that a and b
i
G
are adjacentbyR . In this case a is said to b e incident with the corresp onding
i
edge x ; :::; x . The degree of an individual a is the cardinality of the set of
1 r
i
individuals adjacenttoabut not equal to a. The degree of a structure is the
maximum of the degrees of its individuals. A sequence x ;:::;x is called a
0 m
G -path, or simply a path if it is clear which structure is used, if for every
j j j +1 G The distance d a; bbetween a and b in G is the length of a shortest path G from a to b in G .For r 0 the r -neighbourhood of x in G , N a, consists r G G of all b 2 A with d a; b r . The sup erscript G will b e omitted, whenever p ossible. The language LS of rst-order logic for the signature S contains the relations and constant symb ols from S, \=" to denote the equality relation, ^, _, : as logical connectives \and", \or" and "not", x, y , z , x , x , x ,::: 1 2 3 as individual variables, running over the elements of the domain and 8, 9 as symb ols for the quanti ers \for all" and \there exists". The rst-order 3 Seese formulas for this language LS are build as usual. The quanti er-rank of a formula ', denoted as qr' is de ned by induction on the structure of formulas: qr':=0 if ' is atomic , qr' ^ :=maxqr';qrpsi ; qr' _ :=maxqr';qrpsi ; qr:':=qr' ; qr8x':= qr'+1 ; qr9x':=qr'+1 : Let G and G be two S -structures and assume n2N.We de ne the relation 1 2 between structures of the same signature by: G G if and only if for n 1 n 2 eachLS-formula ' with qr' n it holds: G j= ' if and only if G j= ': 1 2 We will say that G and G are n-equivalent in case that G G holds. 1 2 1 n 2 It was one of the trendsetting results of Ehrenfeucht [21] and Fra ss e [24] to give a game-theoretic and an algebraic characterization of n-equivalence. It is intro duced in form of a game b etween two players, whichhave the p ossibilityto cho ose alternatively one of the structures and a p oint in the chosen structure. 1 Player I, the sp oiler , starts the game bycho osing arbitrarily one of the two structures and a p oint in its domain. Player I I, the duplicator, continues bycho osing a p oint in the other structure. In the second round the sp oiler cho oses again arbitralily one of the two structures and a p oint in its domain and the duplicator cho oses a p oint in the other structure, and so on. The game is played in this wayover n rounds. Assume that the p oints selected in G are a ;:::;a and the p oints selected in G are b ,...,b , where the 1 1 n 2 1 n index i of a , b 1 i n indicates that the p ointwas chosen in round i i i. Let A b e the set fa ;:::;a g and B fb ;:::;b g. The duplicator wins the 1 n 1 n game if fa ;b ;:::;a ;b g is an isomorphism b etween G A and G B , 1 1 n n 1 2 otherwise the sp oiler wins. In case that the duplicator has a winning strategy, we write G G and call G and G Ehrenfeucht-Fra ss e n-equivalent. = 1 n 2 1 2 Some of the known results on these relations are collected in the following Theorem 2.1 [21,24] see also [20]: Let S be a nite signature for relational structures and let G and G be S -structures. 1 2 i For each n 2 N it holds: G G if and only if G G = 1 n 2 1 n 2 areequivalencerelations with nitely many equivalence classes ii and = n n and for each equivalence class thereisanLS-formula of quanti er-