Download as pdf or txt
Download as pdf or txt
You are on page 1of 490

Lecture Notes in Computer Science

Edited by G. Goos, J. Hartmanis and J. van Leeuwen

1858

Berlin
Heidelberg
New York
Barcelona
Hong Kong
London
Milan
Paris
Singapore
Tokyo

Ding-Zhu Du Peter Eades Vladimir Estivill-Castro


Xuemin Lin Arun Sharma (Eds.)

Computing
and Combinatorics
6th Annual International Conference, COCOON 2000
Sydney, Australia, July 26-28, 2000
Proceedings

13

Series Editors
Gerhard Goos, Karlsruhe University, Germany
Juris Hartmanis, Cornell University, NY, USA
Jan van Leeuwen, Utrecht University, The Netherlands
Volume Editors
Ding-Zhu Du
University of Minnesota, Department of Computer Science and Engineering
Minneapolis, MN 55455, USA
E-mail: [email protected]
Peter Eades
Vladimir Estivill-Castro
University of Newcastle
Department of Computer Science and Software Engineering
Callaghan, NSW 2308, Australia
E-mail: {eades,vlad}@cs.newcastle.edu.au
Xuemin Lin
Arun Sharma
The University of New South Wales
School of Computer Science and Engineering
Sydney, NSW 2052, Australia
E-mail: {lxue,arun}@cse.unsw.edu.au
Cataloging-in-Publication Data applied for
Die Deutsche Bibliothek - CIP-Einheitsaufnahme
Computing and combinatorics : 6th annual international conference ;
proceedings / COCOON 2000, Sydney, Australia, July 26 - 28, 2000.
D.-Z. Du . . . (ed.). - Berlin ; Heidelberg ; New York ; Barcelona ;
Hong Kong ; London ; Milan ; Paris ; Singapore ; Tokyo : Springer, 2000
(Lecture notes in computer science ; Vol. 1858)
ISBN 3-540-67787-9
CR Subject Classification (1998): F.2, G.2.1-2, I.3.5, C.2.3-4, E.1
ISSN 0302-9743
ISBN 3-540-67787-9 Springer-Verlag Berlin Heidelberg New York
This work is subject to copyright. All rights are reserved, whether the whole or part of the material is
concerned, specifically the rights of translation, reprinting, re-use of illustrations, recitation, broadcasting,
reproduction on microfilms or in any other way, and storage in data banks. Duplication of this publication
or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965,
in its current version, and permission for use must always be obtained from Springer-Verlag. Violations are
liable for prosecution under the German Copyright Law.
Springer-Verlag Berlin Heidelberg New York
a member of BertelsmannSpringer Science+Business Media GmbH
Springer-Verlag Berlin Heidelberg 2000
Printed in Germany
Typesetting: Camera-ready by author, data conversion by Boller Mediendesign
Printed on acid-free paper
SPIN: 10722191
06/3142
543210

Preface

The papers in this volume were selected for presentation at the 6th Annual
International Computing and Combinatorics Conference (COCOON 2000), in
Sydney, Australia from July 26 - 28, 2000. The topics cover many areas in theoretical computer science and combinatorial optimization.
There were 81 high quality papers submitted to COCOON 2000. Each paper
was reviewed by at least three program committee members, and the 44 papers
were selected. It is expected that most of them will appear in a more complete
form in scientific journals. In addition to the selected papers, the volume also
contains the papers from two invited keynote speeches by Christos Papadimitriou and Richard Brent.
This year the Hao Wang Award was given to honor the paper judged by the
program committee to have the greatest merit. The recipient is Approximating
Uniform Triangular Meshes in Polygons by Franz Aurenhammer, Naoki Katoh,
Hiromichi Kojima, Makoto Ohsaki, and Yinfeng Xu. The first Best Young Researcher paper award was given to William Duckworth for his paper Maximum
Induced Matchings of Random Cubic Graphs.
We wish to thank all who have made this meeting possible: the authors for
submitting papers, the program committee members and the external referees,
sponsors, the local organizers, ACM SIGACT for handling electronic submissions, Springer-Verlag for their support, and Debbie Hatherell for her assistance.

July 2000

Sponsoring Institutions
University of New South Wales
University of Newcastle
University of Sydney
Computer Science Association of Australasia

Ding-Zhu Du
Peter Eades
Xuemin Lin

Conference Organization

Program Committee Co-chairs


Ding-Zhu Du (University of Minnesota, USA)
Peter Eades (University of Sydney, Australia)
Xuemin Lin (University of New South Wales, Australia)

Program Committee
David Avis (McGill, Canada)
Jianer Chen (Texas A&M, USA)
Francis Chin (Hong Kong U., Hong Kong)
Vladimir Estivill-Castro (Newcastle, Australia),
George Havas (UQ, Australia)
Hiroshi Imai (Tokyo, Japan)
Tao Jiang (UC Riverside, USA)
Michael Juenger (Cologne, Germany)
Richard Karp (UC Berkeley, USA)
D. T. Lee (Academia Sinica, Taiwan)
Bernard Mans (Macquarie U., Australia)
Brendan McKay (ANU, Australia)
Maurice Nivat (Universite de Paris VII, France)
Takeshi Tokuyama (Tohoku, Japan)
Roberto Tamassia (Brown, USA)
Jie Wang (UNC Greensboro, USA)
Shmuel Zaks (Technion, Israel)
Louxin Zhang (NUS, Singapore)
Shuzhong Zhang (CUHK, Hong Kong)
Binhai Zhu (City U. Hong Kong, Hong Kong)

Organizing Committee
Vladimir Estivill-Castro (Conference Co-chair, University of Newcastle)
Arun Sharma (Conference Co-chair, University of New South Wales)
Hai-Xin Lu (University of New South Wales)

VIII

Conference Organization

Referees
Kazuyuki Amano
Joffroy Beauquier
Francois Bertault
Christoph Buchheim
S.W. Cheng
L. Devroye
Matthias Elf
Stanley Fung
Yehuda Hassin
Seokhee Hong
Tsan-Sheng Hsu
Wen-Lian Hsu
Ming-Tat Ko
Joachim Kupke
Thierry Lecroq
Weifa Liang
Frauke Liers
Chi-Jen Lu
Hsueh-I Lu

Marcus Oswald
Andrzej Pelc
David Peleg
Stephane Perennes
Z.P. Qin
Bruce Reed
Maurice Rojas
James L. Schwing
Rinovia M.G. Simanjuntak
Slamin
Rinovia Simanjuntak
Peter Tischer
Da-Wei Wang
John Watorus
Martin Wolff
Yinfeng Xu
Ding Feng Ye
Hong Zhu

Table of Contents

Invited Talks
Theoretical Problems Related to the Internet . . . . . . . . . . . . . . . . . . . . . . . . . .
Christos H. Papadimitriou

Recent Progress and Prospects for Integer Factorisation Algorithms . . . . . .


Richard P. Brent

Hao Wang Award Paper


Approximating Uniform Triangular Meshes in Polygons . . . . . . . . . . . . . . . . . 23
Franz Aurenhammer, Naoki Katoh, Hiromichi Kojima, Makoto Ohsaki,
Yinfeng Xu

The Best Young Researcher Paper


Maximum Induced Matchings of Random Cubic Graphs . . . . . . . . . . . . . . . . 34
William Duckworth, Nicholas C. Wormald, Michele Zito

Computational Geometry 1
A Duality between Small-Face Problems in Arrangements of Lines and
Heilbronn-Type Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Gill Barequet
On Local Transformation of Polygons with Visibility Properties . . . . . . . . . 54
Carmen Hernando, Michael E. Houle, Ferran Hurtado

Graph Drawing
Embedding Problems for Paths with Direction Constrained Edges . . . . . . . . 64
Giuseppe Di Battista, Giuseppe Liotta, Anna Lubiw, Sue Whitesides
Characterization of Level Non-planar Graphs by Minimal Patterns . . . . . . . 74
Patrick Healy, Ago Kuusik, Sebastian Leipert
Rectangular Drawings of Plane Graphs Without Designated Corners . . . . . 85
Md. Saidur Rahman, Shin-ichi Nakano, Takao Nishizeki
Computing Optimal Embeddings for Planar Graphs . . . . . . . . . . . . . . . . . . . . 95
Petra Mutzel, Rene Weiskircher

Table of Contents

Graph Theory and Algorithms 1


Approximation Algorithms for Independent Sets in Map Graphs . . . . . . . . . 105
Zhi-Zhong Chen
Hierarchical Topological Inference on Planar Disc Maps . . . . . . . . . . . . . . . . . 115
Zhi-Zhong Chen, Xin He
Efficient Algorithms for the Minimum Connected Domination on
Trapezoid Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Yaw-Ling Lin, Fang Rong Hsu, Yin-Te Tsai

Complexity, Discrete Mathematics, and Number Theory


Parameterized Complexity of Finding Subgraphs with Hereditary
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Subhash Khot, Venkatesh Raman
Some Results on Tries with Adaptive Branching . . . . . . . . . . . . . . . . . . . . . . . 148
Yuriy A. Reznik
Optimal Coding with One Asymmetric Error: Below the Sphere Packing
Bound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Ferdinando Cicalese, Daniele Mundici
Closure Properties of Real Number Classes under Limits and Computable
Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Xizhong Zheng

Graph Theory and Algorithms 2


A Characterization of Graphs with Vertex Cover Six . . . . . . . . . . . . . . . . . . . 180
Michael J. Dinneen, Liu Xiong
On the Monotonicity of Minimum Diameter with Respect to Order and
Maximum Out-Degree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Mirka Miller, Slamin

Online Algorithms
Online Independent Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Magn
us M. Halld
orsson, Kazuo Iwama, Shuichi Miyazaki,
Shiro Taketomi
Two-Dimensional On-Line Bin Packing Problem with Rotatable Items . . . 210
Satoshi Fujita, Takeshi Hada
Better Bounds on the Accommodating Ratio for the Seat Reservation
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Eric Bach, Joan Boyar, Tao Jiang, Kim S. Larsen, Guo-Hui Lin

Table of Contents

XI

Ordinal On-Line Scheduling on Two Uniform Machines . . . . . . . . . . . . . . . . . 232


Zhiyi Tan, Yong He

Parallel and Distributed Computing


Agents, Distributed Algorithms, and Stabilization . . . . . . . . . . . . . . . . . . . . . . 242
Sukumar Ghosh
A Fast Sorting Algorithm and Its Generalization on Broadcast
Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Shyue-Horng Shiau, Chang-Biau Yang
Efficient List Ranking Algorithms on Reconfigurable Mesh . . . . . . . . . . . . . . 262
Sung-Ryul Kim, Kunsoo Park

Computational Geometry 2
Tripods Do Not Pack Densely . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
Alexandre Tiskin
An Efficient k Nearest Neighbor Searching Algorithm for a Query Line . . . 281
Subhas C. Nandy
Tetrahedralization of Two Nested Convex Polyhedra . . . . . . . . . . . . . . . . . . . 291
Cao An Wang, Boting Yang
Efficient Algorithms for Two-Center Problems for a Convex Polygon . . . . . 299
Sung Kwon Kim, Chan-Su Shin

Combinatorial Optimization
On Computation of Arbitrage for Markets with Friction . . . . . . . . . . . . . . . . 310
Xiaotie Deng, Zhongfei Li, Shouyang Wang
On Some Optimization Problems in Obnoxious Facility Location . . . . . . . . . 320
Zhongping Qin, Yinfeng Xu, Binhai Zhu
Generating Necklaces and Strings with Forbidden Substrings . . . . . . . . . . . . 330
Frank Ruskey, Joe Sawada
Optimal Labelling of Point Features in the Slider Model . . . . . . . . . . . . . . . . 340
Gunnar W. Klau, Petra Mutzel

Data Structures and Computational Biology


Mappings for Conflict-Free Access of Paths in Elementary Data
Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
Alan A. Bertossi, M. Cristina Pinotti

XII

Table of Contents

Theory of Trinomial Heaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362


Tadao Takaoka
Polyhedral Aspects of the Consecutive Ones Problem . . . . . . . . . . . . . . . . . . . 373
Marcus Oswald, Gerhard Reinelt
The Complexity of Physical Mapping with Strict Chimerism . . . . . . . . . . . . 383
Stephan Weis, R
udiger Reischuk

Learning and Cryptography


Logical Analysis of Data with Decomposable Structures . . . . . . . . . . . . . . . . . 396
Hirotaka Ono, Kazuhisa Makino, Toshihide Ibaraki
Learning from Approximate Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
Shirley Cheung H.C.
A Combinatorial Approach to Asymmetric Traitor Tracing . . . . . . . . . . . . . . 416
Reihaneh Safavi-Naini, Yejing Wang
Removing Complexity Assumptions from Concurrent Zero-Knowledge
Proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
Giovanni Di Crescenzo

Automata and Quantum Computing


One-Way Probabilistic Reversible and Quantum One-Counter Automata . . 436
Tomohiro Yamasaki, Hirotada Kobayashi, Yuuki Tokunaga,
Hiroshi Imai
Similarity Enrichment in Image Compression through Weighted Finite
Automata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
Zhuhan Jiang, Bruce Litow, Olivier de Vel
On the Power of Input-Synchronized Alternating Finite Automata . . . . . . . 457
Hiroaki Yamamoto
Ordered Quantum Branching Programs Are More Powerful than Ordered
Probabilistic Branching Programs under a Bounded-Width Restriction . . . . 467
Masaki Nakanishi, Kiyoharu Hamaguchi, Toshinobu Kashiwabara

Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477

Theoretical Problems Related to the Internet


(Extended Abstract)
Christos H. Papadimitriou?
University of California, Berkeley, USA,
[email protected]
http://www.cs.berkeley.edu/christos/

The Internet has arguably superseded the computer as the most complex cohesive artifact (if you can call it that), and is, quite predictably, the source of
a new generation of foundational problems for Theoretical Computer Science.
These new theoretical challenges emanate from several novel aspects of the Internet: (a) Its unprecedented size, diversity, and availability as an information
repository; (b) its novel nature as a computer system that intertwines a multitude of economic interests in varying degrees of competition; and (c) its history
as a shared resource architecture that emerged in a remarkably ad hoc yet gloriously successful manner. In this talk I will survey some recent research (done in
collaboration with Joan Feigenbaum, Dick Karp, Elias Koutsoupias, and Scott
Shenker, see [1,2]) on problems of the two latter kinds. See [3,5] for examples of
theoretical work along the first axis.
To a large extent, the Internet owes its remarkable ascent to the surprising
empirical success of TCPs congestion control protocol [4]. A flow between two
points strives to determine the correct transmission rate by trying higher and
higher rates, in a linearly increasing function. As links shared by several flows
reach their capacity, one or more packets may be lost, and, in response, the
corresponding flow halves its transmission rate. The fantastic empirical success
of this crude mechanism raises important, and at times theoretically interesting,
questions related to novel search algorithms (the process clearly contains a novel
variant of binary search), on-line algorithms (when the true capacity that a
flow can use changes in an unknown and, in a worst case, adversarial fashion),
and algorithmic game theory (why is it that flows seem to be unwilling, or
unmotivated, to move away from TCP?).
In a situation in which the same piece of information is multicast to millions
of individuals, it is of interest to determine the price that each recipient must pay
in return. The information in question is of different value to each individual,
and this value is known only to this individual. The participants must engage
in a mechanism, that is to say, a distributed protocol whereby they determine
the individuals who will actually receive the information, and the price each will
pay. Economists over the past fourty years have studied such situations arising in auctions, welfare economics, and pricing of public goods, and have come
up with clever mechanisms solutions that satisfy various sets of desiderata
?

Research partially supported by the National Science Foundation.

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 12, 2000.
c Springer-Verlag Berlin Heidelberg 2000

Christos H. Papadimitriou

(axioms) or ingenious proofs that satisfying other sets of desiderata is impossible. In the context of the Internet, however, an important computational
desideratum emerges: The protocol should be efficient, with respect to the total
number of messages sent. It turns out that this novel condition changes the situation dramatically, and carves out a new set of pricing mechanisms that are
appropriate and feasible.

References
1. Joan Feigenbaum, Christos H. Papadimitriou, Scott Shenker, Sharing the Cost of
Multicast Transmissions, Proc. 2000 STOC.
2. Richard M. Karp, Elias Koutsoupias, Christos H. Papadimitriou, Scott Shenker,
Optimization Problems in Congestion Control, manuscript, April 2000.
3. Jon Kleinberg, Authoritative sources in a hyperlinked environment, Proc. ACMSIAM Symposium on Discrete Algorithms, 1998.
4. Van Jacobson Congestion Avoidance and Control, in ACM SigComm Proceedings,
pp 314-329, 1988.
5. Christos H. Papadimitriou, Prabhakar Raghavan, Hisao Tamaki, Santosh Vempala,
Latent Semantic Indexing: A Probabilistic Analysis, Proc. 1998 PODS, to appear
in the special issue of JCSS.

Recent Progress and Prospects for Integer


Factorisation Algorithms
Richard P. Brent
Oxford University Computing Laboratory,
Wolfson Building, Parks Road,
Oxford OX1 3QD, UK
[email protected]
http://www.comlab.ox.ac.uk/

Abstract. The integer factorisation and discrete logarithm problems


are of practical importance because of the widespread use of public key
cryptosystems whose security depends on the presumed difficulty of solving these problems. This paper considers primarily the integer factorisation problem. In recent years the limits of the best integer factorisation
algorithms have been extended greatly, due in part to Moores law and in
part to algorithmic improvements. It is now routine to factor 100-decimal
digit numbers, and feasible to factor numbers of 155 decimal digits (512
bits). We outline several integer factorisation algorithms, consider their
suitability for implementation on parallel machines, and give examples
of their current capabilities. In particular, we consider the problem of
parallel solution of the large, sparse linear systems which arise with the
MPQS and NFS methods.

Introduction

There is no known deterministic or randomised polynomial-time1 algorithm for


finding a factor of a given composite integer N . This empirical fact is of great
interest because the most popular algorithm for public-key cryptography, the
RSA algorithm [54], would be insecure if a fast integer factorisation algorithm
could be implemented.
In this paper we survey some of the most successful integer factorisation
algorithms. Since there are already several excellent surveys emphasising the
number-theoretic basis of the algorithms, we concentrate on the computational
aspects.
This paper can be regarded as an update of [8], which was written just
before the factorisation of the 512-bit number RSA155. Thus, to avoid duplication, we refer to [8] for primality testing, multiple-precision arithmetic, the use
of factorisation and discrete logarithms in public-key cryptography, and some
factorisation algorithms of historical interest.
1

For a polynomial-time algorithm the expected running time should be a polynomial


in the length of the input, i.e. O((log N )c ) for some constant c.

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 322, 2000.
c Springer-Verlag Berlin Heidelberg 2000

1.1

Richard P. Brent

Randomised Algorithms

All but the most trivial algorithms discussed below are randomised algorithms,
i.e. at some point they involve pseudo-random choices. Thus, the running times
are expected rather than worst case. Also, in most cases the expected running
times are conjectured, not rigorously proved.

1.2

Parallel Algorithms

When designing parallel algorithms we hope that an algorithm which requires


time T1 on a computer with one processor can be implemented to run in time
TP T1 /P on a computer with P independent processors. This is not always
the case, since it may be impossible to use all P processors effectively. However,
it is true for many integer factorisation algorithms, provided P is not too large.
The speedup of a parallel algorithm is S = T1 /TP . We aim for a linear
speedup, i.e. S = (P ).

1.3

Quantum Algorithms

In 1994 Shor [57,58] showed that it is possible to factor in polynomial expected


time on a quantum computer [20,21]. However, despite the best efforts of several
research groups, such a computer has not yet been built, and it remains unclear
whether it will ever be feasible to build one. Thus, in this paper we restrict our
attention to algorithms which run on classical (serial or parallel) computers. The
reader interested in quantum computers could start by reading [50,60].

1.4

Moores Law

Moores law [44,56] predicts that circuit densities will double every 18 months
or so. Of course, Moores law is not a theorem, and must eventually fail, but it
has been surprisingly accurate for many years. As long as Moores law continues
to apply and results in correspondingly more powerful parallel computers, we expect to get a steady improvement in the capabilities of factorisation algorithms,
without any algorithmic improvements. Historically, improvements over the past
thirty years have been due both to Moores law and to the development of new
algorithms (e.g. ECM, MPQS, NFS).

Integer Factorisation Algorithms

There are many algorithms for finding a nontrivial factor f of a composite integer N . The most useful algorithms fall into one of two classes

Recent Progress and Prospects for Integer Factorisation Algorithms

A. The run time depends mainly on the size of N, and is not strongly dependent
on the size of f . Examples are
Lehmans algorithm [28], which has worst-case run time O(N 1/3 ).
The Continued Fraction algorithm [39] and the Multiple Polynomial
Quadratic Sieve (MPQS) algorithm [46,59],
which under plausible assumptions have expected run time O(exp( c ln N ln ln N )), where c is a
constant (depending on details of the algorithm). For MPQS, c 1.
The Number Field Sieve (NFS) algorithm [29,30], which under plausible assumptions has expected run time O(exp(c(ln N )1/3 (ln ln N )2/3 )),
where c is a constant (depending on details of the algorithm and on the
form of N ).
B. The run time depends mainly on the size of f, the factor found. (We can
assume that f N 1/2 .) Examples are
The trial division algorithm, which has run time O(f (log N )2 ).
Pollards rho algorithm [45], which under plausible assumptions has
expected run time O(f 1/2 (log N )2 ).
Lenstras Elliptic Curve (ECM) algorithm
[34], which under plausible assumptions has expected run time O(exp( c ln f ln ln f )(log N )2 ), where
c 2 is a constant.
In these examples, the time bounds are for a sequential machine, and the term
(log N )2 is a generous allowance for the cost of performing arithmetic operations
on numbers which are O(N 2 ). If N is very large, then fast integer multiplication
algorithms [19,24] can be used to reduce the (log N )2 term.
Our survey of integer factorisation algorithms is necessarily cursory. For more
information the reader is referred to [8,35,48,53].

Lenstras Elliptic Curve Algorithm

Lenstras elliptic curve method/algorithm (abbreviated ECM) was discovered


by H. W. Lenstra, Jr. about 1985 (see [34]). It is the best known algorithm
in class B. To save space, we refer to [7,8,34] and the references there for a
description of ECM, and merely give some examples of its successes here.
3.1

ECM Examples

1. In 1995 we completed the factorisation of the 309-decimal digit (1025-bit)


10
Fermat number F10 = 22 + 1. In fact
F10 = 45592577 6487031809
4659775785220018543264560743076778192897 p252
where 46597 92897 is a 40-digit prime and p252 = 13043 24577 is a
252-digit prime. The computation, which is described in detail in [7], took

Richard P. Brent

about 240 Mips-years. (A Mips-year is the computation performed by a


hypothetical machine performing 106 instructions per second for one year,
i.e. about 3.15 1013 instructions. Is is a convenient measure but should not
be taken too seriously.)
2. The largest factor known to have been found by ECM is the 54-digit factor
484061254276878368125726870789180231995964870094916937
of (643 1)42 + 1, found by Nik Lygeros and Michel Mizony with Paul
Zimmermanns GMP-ECM program [63] in December 1999 (for more details
see [9]).
3.2

Parallel/Distributed Implementation of ECM

ECM consists of a number of independent pseudo-random trials, each of which


can be performed on a separate processor. So long as the expected number of
trials is much larger than the number P of processors available, linear speedup
is possible by performing P trials in parallel. In fact, if T1 is the expected run
time on one processor, then the expected run time on a MIMD parallel machine
with P processors is
1/2+
)
(1)
TP = T1 /P + O(T1
3.3

ECM Factoring Records

54
52
50
48
46
44
42
40
38
1990

1992

1994

1996

1998

2000

Figure 1: Size of factor found by ECM versus year

2002

Recent Progress and Prospects for Integer Factorisation Algorithms

Figure 1 shows the size D (in decimal digits) of the largest factor found by
ECM against the year it was done, from 1991 (40D) to 1999 (54D) (historical
data from [9]).

3.4

Extrapolation of ECM Records

7.6

7.4
7.2
7.0
6.8
6.6
6.4
6.2
6.0
1990

1992

1994
1996
1998
2000

Figure 2: D versus year Y for ECM

2002

Let D be the number of decimal digits in the largest factor found by ECM up
to a given date.
From the theoretical time bound for ECM, assuming Moores
D to be roughly a linear function of calendar year (in fact
law,
we
expect

D ln D shouldbe linear, but given the other uncertainties we


have assumed for
simplicity that ln D is roughly a constant). Figure 2 shows D versus year Y .
The straight line shown in the Figure 2 is

Y 1932.3
or equivalently Y = 9.3 D + 1932.3 ,
D=
9.3
and extrapolation gives D = 60 in the year Y = 2004 and D = 70 in the year
Y = 2010.

Richard P. Brent

Quadratic Sieve Algorithms

Quadratic sieve algorithms belong to a wide class of algorithms which try to find
two integers x and y such that x 6= y (mod N ) but
x2 = y 2 (mod N ) .

(2)

Once such x and y are found, then GCD (x y, N ) is a nontrivial factor of N .


One way to find x and y satisfying (2) is to find a set of relations of the form
u2i = vi2 wi (mod N ),

(3)

where the wi have all their prime factors in a moderately small set of primes
(called the factor base). Each relation (3) gives a colunm in a matrix R whose
rows correspond to the primes in the factor base. Once enough columns have been
generated, we can use Gaussian elimination in GF(2) to find a linear dependency
(mod 2) between a set of columns of R. Multiplying the corresponding relations
now gives an expression of the form (2). With probability at least 1/2, we have
x 6= y mod N so a nontrivial factor of N will be found. If not, we need to
obtain a different linear dependency and try again.
In quadratic sieve algorithms the numbers wi are the values of one (or more)
quadratic polynomials with integer coefficients. This makes it easy to factor the
wi by sieving. For details of the process, we refer to [11,32,35,46,49,52,59].
The best quadratic sieve algorithm (MPQS) can, under plausible assumptions, factor a number N in time (exp(c(ln N ln ln N )1/2 )), where c 1. The
constants involved are such that MPQS is usually faster than ECM if N is the
product of two primes which both exceed N 1/3 . This is because the inner loop
of MPQS involves only single-precision operations.
Use of partial relations, i.e. incompletely factored wi , in MPQS gives a
significant performance improvement [2]. In the one large prime (P-MPQS)
variation wi is allowed to have one prime factor exceeding m (but not too much
larger than m). In the two large prime (PP-MPQS) variation wi can have two
prime factors exceeding m this gives a further performance improvement at
the expense of higher storage requirements [33].
4.1

Parallel/Distributed Implementation of MPQS

The sieving stage of MPQS is ideally suited to parallel implementation. Different


processors may use different polynomials, or sieve over different intervals with
the same polynomial. Thus, there is a linear speedup so long as the number of
processors is not much larger than the size of the factor base. The computation requires very little communication between processors. Each processor can
generate relations and forward them to some central collection point. This was
demonstrated by A. K. Lenstra and M. S. Manasse [32], who distributed their
program and collected relations via electronic mail. The processors were scattered around the world anyone with access to electronic mail and a C compiler

Recent Progress and Prospects for Integer Factorisation Algorithms

could volunteer to contribute2 . The final stage of MPQS Gaussian elimination


to combine the relations is not so easily distributed. We discuss this in 7
below.
4.2

MPQS Examples

MPQS has been used to obtain many impressive factorisations [10,32,52,59].


At the time of writing (April 2000), the largest number factored by MPQS is
the 129-digit RSA Challenge [54] number RSA129. It was factored in 1994
by Atkins et al [1]. The relations formed a sparse matrix with 569466 columns,
which was reduced to a dense matrix with 188614 columns; a dependency was
then found on a MasPar MP-1. It is certainly feasible to factor larger numbers
by MPQS, but for numbers of more than about 110 decimal digits GNFS is
faster [22]. For example, it is estimated in [16] that to factor RSA129 by MPQS
required 5000 Mips-years, but to factor the slightly larger number RSA130 by
GNFS required only 1000 Mips-years [18].

The Special Number Field Sieve (SNFS)

The number field sieve (NFS) algorithm was developed from the special number
field sieve (SNFS), which we describe in this section. The general number field
sieve (GNFS or simply NFS) is described in 6.
Most of our numerical examples have involved numbers of the form
ae b ,

(4)

for small a and b, although the ECM and MPQS factorisation algorithms do not
take advantage of this special form.
The special number field sieve (SNFS) is a relatively new algorithm which
does take advantage of the special form (4). In concept it is similar to the
quadratic sieve algorithm, but it works over an algebraic number field defined
by a, e and b. We refer the interested reader to Lenstra et al [29,30] for details,
and merely give an example to show the power of the algorithm.
5.1

SNFS Examples

Consider the 155-decimal digit number


9

F9 = N = 22 + 1
as a candidate for factoring by SNFS. Note that 8N = m5 + 8, where m = 2103 .
We may work in the number field Q(), where satisfies
5 + 8 = 0,
2

This idea of using machines on the Internet as a free supercomputer has been
adopted by several other computation-intensive projects

10

Richard P. Brent

and in the ring of integers of Q(). Because


m5 + 8 = 0 (mod N ),
the mapping : 7 m mod N is a ring homomorphism from Z[] to Z/N Z.
The idea is to search for pairs of small coprime integers u and v such that both
the algebraic integer u + v and the (rational) integer u + mv can be factored.
(The factor base now includes prime ideals and units as well as rational primes.)
Because
(u + v) = (u + mv) (mod N ),
each such pair gives a relation analogous to (3).
The prime ideal factorisation of u+v can be obtained from the factorisation
of the norm u5 8v 5 of u+v. Thus, we have to factor simultaneously two integers
u + mv and |u5 8v 5 |. Note that, for moderate u and v, both these integers are
much smaller than N , in fact they are O(N 1/d ), where d = 5 is the degree of
the algebraic number field. (The optimal choice of d is discussed in 6.)
Using these and related ideas, Lenstra et al [31] factored F9 in June 1990,
obtaining
F9 = 2424833 7455602825647884208337395736200454918783366342657 p99 ,
where p99 is an 99-digit prime, and the 7-digit factor was already known
(although SNFS was unable to take advantage of this). The collection of relations took less than two months on a network of several hundred workstations.
A sparse system of about 200,000 relations was reduced to a dense matrix with
about 72,000 rows. Using Gaussian elimination, dependencies (mod 2) between
the columns were found in three hours on a Connection Machine. These dependencies implied equations of the form x2 = y 2 mod F9 . The second such equation
was nontrivial and gave the desired factorisation of F9 .
More recently, considerably larger numbers have been factored by SNFS,
for example, the 211-digit number 10211 1 was factored early in 1999 by a
collaboration called The Cabal [13].

The General Number Field Sieve (GNFS)

The general number field sieve (GNFS or just NFS) is a logical extension of the
special number field sieve (SNFS). When using SNFS to factor an integer N , we
require two polynomials f (x) and g(x) with a common root m mod N but no
common root over the field of complex numbers. If N has the special form (4)
then it is usually easy to write down suitable polynomials with small coefficients,
as illustrated by the two examples given in 5. If N has no special form, but is
just some given composite number, we can also find f (x) and g(x), but they no
longer have small coefficients.
Suppose that g(x) has degree d > 1 and f (x) is linear3 . d is chosen empirically, but it is known from theoretical considerations that the optimum value
3

This is not necessary. For example, Montgomery found a clever way of choosing two
quadratic polynomials.

Recent Progress and Prospects for Integer Factorisation Algorithms

is


d

3 ln N
ln ln N

11

1/3
.

We choose m = bN 1/(d+1) c and write


N=

d
X

aj m j

j=0

where the aj are base m digits. Then, defining


f (x) = x m, g(x) =

d
X

aj xj ,

j=0

it is clear that f (x) and g(x) have a common root m mod N . This method of
polynomial selection is called the base m method.
In principle, we can proceed as in SNFS, but many difficulties arise because of
the large coefficients of g(x). For details, we refer the reader to [36,37,41,47,48,62].
Suffice it to say that the difficulties can be overcome and the method works! Due
to the constant factors involved it is slower than MPQS for numbers of less than
about 110 decimal digits, but faster than MPQS for sufficiently large numbers,
as anticipated from the theoretical run times given in 2.
Some of the difficulties which had to be overcome to turn GNFS into a
practical algorithm are:
1. Polynomial selection. The base m method is not very good. Peter Montgomery and Brian Murphy [40,41,42] have shown how a very considerable
improvement (by a factor of more than ten for number of 140155 digits)
can be obtained.
2. Linear algebra. After sieving a very large, sparse linear system over GF(2)
is obtained, and we want to find dependencies amongst the columns. It is
not practical to do this by structured Gaussian elimination [25, 5] because
the fill in is too large. Odlyzko [43,17] and Montgomery [37] showed that
the Lanczos method [26] could be adapted for this purpose. (This is nontrivial because a nonzero vector x over GF(2) can be orthogonal to itself,
i.e. xT x = 0.) To take advantage of bit-parallel operations, Montgomerys
program works with blocks of size dependent on the wordlength (e.g. 64).
3. Square roots. The final stage of GNFS involves finding the square root of
a (very large) product of algebraic numbers4 . Once again, Montgomery [36]
found a way to do this.
4

An idea of Adleman, using quadratic characters, is essential to ensure that the desired
square root exists with high probability.

12

6.1

Richard P. Brent

RSA155

At the time of writing, the largest number factored by GNFS is the 155-digit
RSA Challenge number RSA155. It was split into the product of two 78-digit
primes on 22 August, 1999, by a team coordinated from CWI, Amsterdam. For
details see [51]. To summarise: the amount of computer time required to find the
factors was about 8000 Mips-years. The two polynomials used were
f (x) = x 39123079721168000771313449081
and
g(x) = +119377138320x5
80168937284997582x4
66269852234118574445x3
+11816848430079521880356852x2
+7459661580071786443919743056x
40679843542362159361913708405064 .

The polynomial g(x) was chosen to have a good combination of two properties: being unusually small over the sieving region and having unusually many
roots modulo small primes (and prime powers). The effect of the second property alone makes g(x) as effective at generating relations as a polynomial chosen
at random for an integer of 137 decimal digits (so in effect we have removed
at least 18 digits from RSA155 by judicious polynomial selection). The polynomial selection took approximately 100 Mips-years or about 1.25% of the total
factorisation time. For details of the polynomial selection, see Brian Murphys
thesis [41].
The total amount of CPU time spent on sieving was 8000 Mips-years on
assorted machines (calendar time 3.7 months). The resulting matrix had about
6.7 106 rows and weight (number of nonzeros) about 4.2 108 (about 62
nonzeros per row). Using Montgomerys block Lanczos program, it took almost
224 CPU-hours and 2 GB of memory on a Cray C916 to find 64 dependencies.
Calendar time for this was 9.5 days.
Table 1. RSA130, RSA140 and RSA155 factorisations
RSA130
Total CPU time in Mips-years
1000
Matrix rows
3.5 106
Total nonzeros
1.4 108
Nonzeros per row
39
Matrix solution time (on Cray C90/C916) 68 hours

RSA140
2000
4.7 106
1.5 108
32
100 hours

RSA155
8000
6.7 106
4.2 108
62
224 hours

Recent Progress and Prospects for Integer Factorisation Algorithms

13

Table 1 gives some statistics on the RSA130, RSA140 and RSA155 factorisations. The Mips-year times given are only rough estimates. Extrapolation of
these figures is risky, since various algorithmic improvements were incorporated
in the later factorisations and the scope for further improvements is unclear.

Parallel Linear Algebra

At present, the main obstacle to a fully parallel and scalable implementation


of GNFS (and, to a lesser extent, MPQS) is the linear algebra. Montgomerys
block Lanczos program runs on a single processor and requires enough memory
to store the sparse matrix (about five bytes per nonzero element). It is possible
to distribute the block Lanczos solution over several processors of a parallel
machine, but the communication/computation ratio is high [38].
Similar remarks apply to some of the best algorithms for the integer discrete
logarithm problem. The main difference is that the linear algebra has to be
performed over a (possibly large) finite field rather than over GF(2).
In this Section we present some preliminary ideas on how to implement the
linear algebra phase of GNFS (and MPQS) in parallel on a network of relatively
small machines. This work is still in progress and it is too early to give definitive
results.
7.1

Assumptions

Suppose that a collection of P machines is available. It will be convenient to


assume that P = q 2 is a perfect square. For example, the machines might be
400 Mhz PCs with 256 MByte of memory each, and P = 16 or P = 64.
We assume that the machines are connected on a reasonably high-speed
network. For example, this might be multiple 100Mb/sec Ethernets or some
higher-speed proprietary network. Although not essential, it is desirable for the
physical network topology to be a q q grid or torus. Thus, we assume that
a processor Pi,j in row i can communicate with another processor Pi,j 0 in the
same row or broadcast to all processors Pi, in the same row without interference
from communication being performed in other rows. (Similarly for columns.)
The reason why this topology is desirable is that it matches the communication
patterns necessary in the linear algebra: see for example [4,5,6].
To simplify the description, we assume that the standard Lanczos algorithm
is used. In practice, a block version of Lanczos [37] would be used, both to take
advantage of word-length Boolean operations and to overcome the technical
problem that uT u can vanish for u 6= 0 when we are working over a finite field.
The overall communication costs are nearly the same for blocked and unblocked
Lanczos, although blocking reduces startup costs.
If R is the matrix of relations, with one relation per column, then R is a large,
sparse matrix over GF(2) with slightly more columns than rows. (Warning: in
the literature, the transposed matrix is often considered, i.e. rows and columns
are often interchanged.) We aim to find a nontrivial dependency, i.e. a nonzero

14

Richard P. Brent

vector x such that Rx = 0. If we choose b = Ry for some random y, and solve


Rx = b, then x y is a dependency (possibly trivial, if x = y). Thus, in the
description below we consider solving a linear system Rx = b.
The Lanczos algorithm over the real field works for a positive-definite symmetric matrix. In our case, R is not symmetric (or even square). Hence we apply
Lanczos to the normal equations
RT Rx = RT b
rather than directly to Rx = b. We do not need to compute the matrix A = RT R,
because we can compute Ax as RT (Rx). To compute RT z, it is best to think
of computing (z T R)T because the elements of R will be scattered across the
processors and we do not want to double the storage requirements by storing
RT as well as R.
The details of the Lanczos iteration are not important for the description
below. It is sufficient to know that the Lanczos recurrence has the form
wi+1 = Awi ci,i wi ci,i1 wi1
where the multipliers ci,i and ci,i1 can be computed using inner products of
known vectors. Thus, the main work involved in one iteration is the computation
of Awi = RT (Rwi ). In general, if R has n columns, then wi is a dense n-vector.
The Lanczos process terminates with a solution after n + O(1) iterations [37].
7.2

Sparse Matrix-Vector Multiplication

The matrix of relations R is sparse and almost square. Suppose that R has n
columns, m n rows, and n nonzeros, i.e. nonzeros per column. Consider
the computation of Rw, where w is a dense n-vector. The number of multiplications involved in the computation of Rw is n. (Thus, the number of operations
involved in the complete Lanczos process
is of order n2  n3 .)

For simplicity assume that q = P divides n, and the matrix R is distributed


across the q q array of processors using a scattered data distribution to
balance the load and storage requirements [5]. Within each processor Pi,j a
sparse matrix representation will be used to store the relevant part Ri,j of R.
Thus the local storage of requirement is O(n/q 2 + n/q).
After each processor computes its local matrix-vector product with about
n/q 2 multiplications, it is necessary to sum the partial results (n/q-vectors) in
each row to obtain n/q components of the product Rw. This can be done in
several ways, e.g. by a systolic computation, by using a binary tree, or by each
processor broadcasting its n/q-vector to other processors in its row and summing
the vectors received from them to obtain n/q components of the product Rw.
If broadcasting is used then the results are in place to start the computation of
RT (Rw). If an inner product is required then communication along columns of
the processor array is necessary to transpose the dense n-vector (each diagonal
processor Pi,i broadcasts its n/q elements along its column).

Recent Progress and Prospects for Integer Factorisation Algorithms

15

We see that, overall, each Lanczos iteration requires computation


O(n/q 2 + n) on each processor, and communication of O(n) bits along each
row/column of the processor array. Depending on details of the communication
hardware, the time for communication might be O((n/q) log q) (if the binary tree
method is used) or even O(n/q +q) (if a systolic method is used with pipelining).
In the following discussion we assume that the communication time is proportional to the number of bits communicated along each row or column, i.e. O(n)
per iteration (not the total number of bits communicated per iteration, which is
O(nq)).
The overall time for n iterations is
TP n2 /P + n2 ,

(5)

where the constants and depend on the computation and communication


speeds respectively. (We have omitted the communication startup cost since
this is typically much less than n2 .)
Since the time on a single processor is T1 n2 , the efficiency EP is
EP =

T1

P TP
+ P

and the condition for EP 1/2 is


P .
Typically / is large (50 to several hundred) because communication between processors is much slower than computation on a processor. The number
of nonzeros per column, , is typically in the range 30 to 100. Thus, we can not
expect high efficiency.
Fortunately, high efficiency is not crucial. The essential requirements are
that the (distributed) matrix R fits in the local memories of the processors, and
that the time for the linear algebra does not dominate the overall factorisation
time. Because sieving typically takes much longer than linear algebra on a single
processor, we have considerable leeway.
For example, consider the factorisation of RSA155 (see Table 1 above). We
have n 6.7 106 , 62. Thus n2 4.5 1013 . If the communications speed
along each row/column is a few hundred Mb/sec then we expect to be a small
multiple of 108 seconds. Thus n2 might be (very roughly) 106 seconds or say 12
days. The sieving takes 8000 Mips-years or 20 processor-years if each processor
runs at 400 Mips. With P processors this is 20/P years, to be compared with
12/365 years for communication. Thus,
600
sieving time

communication time
P
and the sieving time dominates unless P > 600. For larger problems we expect
the sieving time to grow at least as fast as n2 .

16

Richard P. Brent

For more typical factorisations performed by MPQS rather than GNFS, the
situation is better. For example, using Arjen Lenstras implementation of PPMPQS in the Magma package, we factored a 102-decimal digit composite c102 (a
factor of 14213 1) on a 4 250 Mhz Sun multiprocessor. The sieving time was
11.5 days or about 32 Mips-years. After combining partial relations the matrix R
had about n = 73000 columns. Thus n2 5.3 109. At 100 Mb/sec it takes less
than one minute to communicate n2 bits. Thus, although the current Magma
implementation performs the block Lanczos method on only one processor, there
is no reason why it could not be performed on a network of small machines (e.g. a
Beowulf cluster) and the communication time on such a network would only
be a few minutes.
7.3

Reducing Communication Time

If our assumption of a grid/torus topology is not satisfied, then the communication


times estimated above may have to be multiplied by a factor of order
q = P . In order to reduce the communication time (without buying better
hardware) it may be worthwhile to perform some steps of Gaussian elimination
before switching to Lanczos.
If there are k relations whose largest prime is p, we can perform Gaussian
elimination to eliminate this large prime and one of the k relations. (The work
can be done on a single processor if the relations are hashed and stored on processors according to the largest prime occurring in them.) Before the elimination
we expect each of the k relations to contain about nonzeros; after the elimination each of the remaining k 1 relations will have about 1 additional
nonzeros (assuming no cancellation).
From (5), the time for Lanczos is about
T = n(z/P + n) ,
where z = n is the weight (number of nonzeros) of the matrix R. The effect of
eliminating one relation is n n0 = n 1, z z 0 = z + ( 1)(k 1) ,
T T 0 = n0 (z 0 /P + n0 ) . After some algebra we see that T 0 < T if
k<

2P
+3.

For typical values of / 100 and 50 this gives the condition k < 4P + 3.
The disadvantage of this strategy is that the total weight z of the matrix
(and hence storage requirements) increases. In fact, if we go too far, the matrix
becomes full (see the RSA129 example in 4.2).
As an example, consider the c102 factorisation mentioned at the end of 7.2.
The initial matrix R had n 73000; we were able to reduce this to n 32000,
and thus reduce the communication requirements by 81%, at the expense of
increasing the weight by 76%. Our (limited) experience indicates that this behaviour is typical we can usually reduce the communication requirements by a
factor of five at the expense of at most doubling the weight. However, if we try

Recent Progress and Prospects for Integer Factorisation Algorithms

17

to go much further, there is an explosion, the matrix becomes dense, and the
advantage of the Lanczos method over Gaussian elimination is lost. (It would be
nice to have a theoretical explanation of this behaviour.)

Historical Factoring Records


D

160
140
120
100
80
60
40
20
0
1960

1970

1980

1990

2000

2010

Figure 3: Size of general number factored versus year

Figure 3 shows the size D (in decimal digits) of the largest general number
factored against the year it was done, from 1964 (20D) to April 2000 (155D)
(historical data from [41,44,55]).
8.1

Curve Fitting and Extrapolation

Let D be the number of decimal digits in the largest general number factored by a given date. From the theoretical time bound for GNFS, assuming
Moores law, we expect D1/3 to be roughly a linear function of calendar year (in
fact D1/3 (ln D)2/3 should be linear, but given the other uncertainties we have
assumed for simplicity that (ln D)2/3 is roughly a constant). Figure 4 shows D1/3
versus year Y .
The straight line shown in the Figure 4 is
D1/3 =

Y 1928.6
or equivalently Y = 13.24D1/3 + 1928.6 ,
13.24

and extrapolation, for what it is worth, gives D = 309 (i.e. 1024 bits) in the year
Y = 2018.

18

Richard P. Brent
D1/3

6.5
6.0
5.5
5.0
4.5
4.0
3.5
3.0
2.5
2.0
1960

1970

1980

1990

2000

2010

Figure 4: D1/3 versus year Y

Summary and Conclusions

We have sketched some algorithms for integer factorisation. The most important
are ECM, MPQS and NFS. As well as their inherent interest and applicability
to other areas of mathematics, advances in public key cryptography have lent
them practical importance.
Despite much progress in the development of efficient algorithms, our knowledge of the complexity of factorisation is inadequate. We would like to find a
polynomial time factorisation algorithm or else prove that one does not exist.
Until a polynomial time algorithm is found or a quantum computer capable
of running Shors algorithm [57,58] is built, large factorisations will remain an
interesting challenge.
A survey similar to this one was written in 1990 (see [3]). Comparing the
examples there we see that significant progress has been made. This is partly
due to Moores law, partly due to the use of many machines on the Internet,
and partly due to improvements in algorithms (especially GNFS). The largest
number factored by MPQS at the time of writing [3] had 111 decimal digits.
According to [16], RSA110 was factored in 1992 (by MPQS). In 1996 GNFS was
used to factor RSA130; in August 1999, RSA155 also fell to GNFS. Progress
seems to be accelerating. This is due in large part to algorithmic improvements
which seem unlikely to be repeated. On the other hand, it is very hard to anticipate algorithmic improvements!

Recent Progress and Prospects for Integer Factorisation Algorithms

19

From the predicted run time for GNFS, we would expect RSA155 to take
6.5 times as long as RSA1405 . On the other hand, Moores law predicts that
circuit densities will double every 18 months or so. Thus, as long as Moores law
continues to apply and results in correspondingly more powerful parallel computers, we expect to get three to four decimal digits per year improvement in the
capabilities of GNFS, without any algorithmic improvements. The extrapolation
from historical figures is more optimistic: it predicts 67 decimal digits per year
in the near future.
Similar arguments apply to ECM, for which we expect slightly more than
one decimal digit per year in the size of factor found [9].
Although we did not discuss them here, the best algorithms for the integer discrete logarithm problem are analogous to NFS, requiring the solution of
large, sparse linear systems over finite fields, and similar remarks apply to such
algorithms.
Regarding cryptographic consequences, we can say that 512-bit RSA keys
are already insecure. 1024-bit RSA keys should remain secure for at least fifteen
years, barring the unexpected (but unpredictable) discovery of a completely
new algorithm which is better than GNFS, or the development of a practical
quantum computer. In the long term, public key algorithms based on the discrete
logarithm problem for elliptic curves appear to be a promising alternative to RSA
or algorithms based on the integer discrete logarithm problem.
Acknowledgements
Thanks are due to Peter Montgomery, Brian Murphy, Andrew Odlyzko, John
Pollard, Herman te Riele, Sam Wagstaff, Jr. and Paul Zimmermann for their
assistance.

References
1. D. Atkins, M. Graff, A. K. Lenstra and P. C. Leyland, The magic words are
squeamish ossifrage, Advances in Cryptology: Proc. Asiacrypt94, LNCS 917,
Springer-Verlag, Berlin, 1995, 263277.
2. H. Boender and H. J. J. te Riele, Factoring integers with large prime variations of
the quadratic sieve, Experimental Mathematics, 5 (1996), 257273.
3. R. P. Brent, Vector and parallel algorithms for integer factorisation, Proceedings Third Australian Supercomputer Conference University of Melbourne, December 1990, 12 pp. http://www.comlab.ox.ac.uk/oucl/work/richard.brent/pub/
pub122.html .
4. R. P. Brent, The LINPACK benchmark on the AP 1000, Proceedings of Frontiers 92 (McLean, Virginia, October 1992), IEEE Press, 1992, 128-135. http://
www.comlab.ox.ac.uk/oucl/work/richard.brent/pub/pub130.html
5

It actually took only about 4.0 times as long, thanks to algorithmic improvements
such as better polynomial selection.

20

Richard P. Brent

5. R. P. Brent, Parallel algorithms in linear algebra, Algorithms and Architectures: Proc. Second NEC Research Symposium held at Tsukuba, Japan, August 1991 (edited by T. Ishiguro), SIAM, Philadelphia, 1993, 54-72. http://
www.comlab.ox.ac.uk/oucl/work/richard.brent/pub/pub128.html
6. R. P. Brent and P. E. Strazdins, Implementation of the BLAS level 3 and Linpack benchmark on the AP 1000, Fujitsu Scientific and Technical Journal 29, 1
(March 1993), 61-70. http://www.comlab.ox.ac.uk/oucl/work/richard.brent/
pub/pub136.html
7. R. P. Brent, Factorization of the tenth Fermat number, Math. Comp. 68 (1999),
429-451. Preliminary version available as Factorization of the tenth and eleventh
Fermat numbers, Technical Report TR-CS-96-02, CSL, ANU, Feb. 1996, 25pp.
http://www.comlab.ox.ac.uk/oucl/work/richard.brent/pub/pub161.html .
8. R. P. Brent, Some parallel algorithms for integer factorisation Proc. Europar99,
Toulouse, Sept. 1999. LNCS 1685, Springer-Verlag, Berlin, 122.
9. R. P. Brent, Large factors found by ECM, Oxford University Computing Laboratory, March 2000. ftp://ftp.comlab.ox.ac.uk/pub/Documents/techpapers/
Richard.Brent/champs.txt .
10. J. Brillhart, D. H. Lehmer, J. L. Selfridge, B. Tuckerman and S. S. Wagstaff, Jr.,
Factorisations of bn 1, b = 2, 3, 5, 6, 7, 10, 11, 12 up to high powers, American
Mathematical Society, Providence, Rhode Island, second edition, 1988. Updates
available from http://www/cs/purdue.edu/homes/ssw/cun/index.html .
11. T. R. Caron and R. D. Silverman, Parallel implementation of the quadratic sieve,
J. Supercomputing 1 (1988), 273290.
12. S. Cavallar, B. Dodson, A. K. Lenstra, P. Leyland, W. Lioen, P. L. Montgomery,
B. Murphy, H. te Riele and P. Zimmermann, Factorization of RSA-140 using the
number field sieve, announced 4 February 1999. Available from ftp://ftp.cwi.nl/
pub/herman/NFSrecords/RSA-140 .
13. S. Cavallar, B. Dodson, A. K. Lenstra, P. Leyland, W. Lioen, P. L. Montgomery,
H. te Riele and P. Zimmermann, 211-digit SNFS factorization, announced 25 April
1999. Available from ftp://ftp.cwi.nl/pub/herman/NFSrecords/SNFS-211 .
14. D. V. and G. V. Chudnovsky, Sequences of numbers generated by addition in
formal groups and new primality and factorization tests, Adv. in Appl. Math. 7
(1986), 385434.
15. H. Cohen, A Course in Computational Algebraic Number Theory, Springer-Verlag,
Berlin, 1993.
16. S. Contini, The factorization of RSA-140, RSA Laboratories Bulletin 10, 8 (March
1999). Available from http://www.rsa.com/rsalabs/html/bulletins.html .
17. D. Coppersmith, A. Odlyzko and R. Schroeppel, Discrete logarithms in GF(p),
Algorithmica 1 (1986), 115.
18. J. Cowie, B. Dodson, R. M. Elkenbracht-Huizing, A. K. Lenstra, P. L. Montgomery
and J. Zayer, A world wide number field sieve factoring record: on to 512 bits,
Advances in Cryptology: Proc. Asiacrypt96, LNCS 1163, Springer-Verlag, Berlin,
1996, 382394.
19. R. Crandall and B. Fagin, Discrete weighted transforms and large-integer arithmetic, Math. Comp. 62 (1994), 305324.
20. D. Deutsch, Quantum theory, the Church-Turing principle and the universal quantum computer, Proc. Roy. Soc. London, Ser. A 400 (1985), 97117.
21. D. Deutsch, Quantum computational networks, Proc. Roy. Soc. London, Ser. A
425 (1989), 7390.

Recent Progress and Prospects for Integer Factorisation Algorithms

21

22. M. Elkenbracht-Huizing, A multiple polynomial general number field sieve Algorithmic Number Theory ANTS III, LNCS 1443, Springer-Verlag, Berlin, 1998,
99114.
23. K. F. Ireland and M. Rosen, A Classical Introduction to Modern Number Theory,
Springer-Verlag, Berlin, 1982.
24. D. E. Knuth, The Art of Computer Programming, Vol. 2, Addison Wesley, third
edition, 1997.
25. B. A. LaMacchia and A. M. Odlyzko, Solving large sparse systems over finite fields,
Advances in Cryptology, CRYPTO 90 (A. J. Menezes and S. A. Vanstone, eds.),
LNCS 537, Springer-Verlag, Berlin, 109133.
26. C. Lanczos, Solution of systems of linear equations by minimized iterations, J. Res.
Nat. Bureau of Standards 49 (1952), 3353.
27. S. Lang, Elliptic Curves Diophantine Analysis, Springer-Verlag, Berlin, 1978.
28. R. S. Lehman, Factoring large integers, Math. Comp. 28 (1974), 637646.
29. A. K. Lenstra and H. W. Lenstra, Jr. (editors), The development of the number
field sieve, Lecture Notes in Mathematics 1554, Springer-Verlag, Berlin, 1993.
30. A. K. Lenstra, H. W. Lenstra, Jr., M. S. Manasse and J. M. Pollard, The number
field sieve, Proc. 22nd Annual ACM Conference on Theory of Computing, Baltimore, Maryland, May 1990, 564572.
31. A. K. Lenstra, H. W. Lenstra, Jr., M. S. Manasse, and J. M. Pollard, The factorization of the ninth Fermat number, Math. Comp. 61 (1993), 319349.
32. A. K. Lenstra and M. S. Manasse, Factoring by electronic mail, Proc. Eurocrypt
89, LNCS 434, Springer-Verlag, Berlin, 1990, 355371.
33. A. K. Lenstra and M. S. Manasse, Factoring with two large primes, Math. Comp.
63 (1994), 785798.
34. H. W. Lenstra, Jr., Factoring integers with elliptic curves, Annals of Mathematics
(2) 126 (1987), 649673.
35. P. L. Montgomery, A survey of modern integer factorization algorithms, CWI Quarterly 7 (1994), 337366. ftp://ftp.cwi.nl/pub/pmontgom/cwisurvey.psl.Z .
36. P. L. Montgomery, Square roots of products of algebraic numbers, Mathematics of
Computation 1943 1993, Proc. Symp. Appl. Math. 48 (1994), 567571.
37. P. L. Montgomery, A block Lanczos algorithm for finding dependencies over GF(2),
Advances in Cryptology: Proc. Eurocrypt95, LNCS 921, Springer-Verlag, Berlin,
1995, 106120. ftp://ftp.cwi.nl/pub/pmontgom/BlockLanczos.psa4.gz .
38. P. L. Montgomery, Parallel block Lanczos, Microsoft Research, Redmond, USA,
17 January 2000 (transparencies of a talk presented at RSA 2000).
39. M. A. Morrison and J. Brillhart, A method of factorisation and the factorisation
of F7 , Math. Comp. 29 (1975), 183205.
40. B. A. Murphy, Modelling the yield of number field sieve polynomials, Algorithmic
Number Theory ANTS III, LNCS 1443, Springer-Verlag, Berlin, 1998, 137150.
41. B. A. Murphy, Polynomial selection for the number field sieve integer factorisation
algorithm, Ph. D. thesis, Australian National University, July 1999.
42. B. A. Murphy and R. P. Brent, On quadratic polynomials for the number field
sieve, Australian Computer Science Communications 20 (1998), 199213. http://
www.comlab.ox.ac.uk/oucl/work/richard.brent/pub/pub178.html .
43. A. M. Odlyzko, Discrete logarithms in finite fields and their cryptographic significance, Advances in Cryptology: Proc. Eurocrypt 84, LNCS 209, Springer-Verlag,
Berlin, 1985, 224314.
44. A. M. Odlyzko, The future of integer factorization, CryptoBytes 1, 2 (1995), 512.
Available from http://www.rsa.com/rsalabs/pubs/cryptobytes .

22

Richard P. Brent

45. J. M. Pollard, A Monte Carlo method for factorisation, BIT 15 (1975), 331334.
46. C. Pomerance, The quadratic sieve factoring algorithm, Advances in Cryptology,
Proc. Eurocrypt 84, LNCS 209, Springer-Verlag, Berlin, 1985, 169182.
47. C. Pomerance, The number field sieve, Proceedings of Symposia in Applied Mathematics 48, Amer. Math. Soc., Providence, Rhode Island, 1994, 465480.
48. C. Pomerance, A tale of two sieves, Notices Amer. Math. Soc. 43 (1996), 1473
1485.
49. C. Pomerance, J. W. Smith and R. Tuler, A pipeline architecture for factoring large
integers with the quadratic sieve algorithm, SIAM J. on Computing 17 (1988),
387403.
50. J. Preskill, Lecture Notes for Physics 229: Quantum Information and Computation, California Institute of Technology, Los Angeles, Sept. 1998. http://
www.theory.caltech.edu/people/preskill/ph229/ .
51. H. te Riele et al, Factorization of a 512-bits RSA key using the number field sieve,
announcement of 26 August 1999, http://www.loria.fr/~zimmerma/records/
RSA155 .
52. H. J. J. te Riele, W. Lioen and D. Winter, Factoring with the quadratic sieve on
large vector computers, Belgian J. Comp. Appl. Math. 27 (1989), 267278.
53. H. Riesel, Prime numbers and computer methods for factorization, 2nd edition,
Birkh
auser, Boston, 1994.
54. R. L. Rivest, A. Shamir and L. Adleman, A method for obtaining digital signatures
and public-key cryptosystems, Comm. ACM 21 (1978), 120126.
55. RSA Laboratories, Information on the RSA challenge, http://www.rsa.com/
rsalabs/html/challenges.html .
56. R. S. Schaller, Moores law: past, present and future, IEEE Spectrum 34, 6 (June
1997), 5259.
57. P. W. Shor, Algorithms for quantum computation: discrete logarithms and factoring, Proc. 35th Annual Symposium on Foundations of Computer Science, IEEE
Computer Society Press, Los Alamitos, California, 1994, 124134. CMP 98:06
58. P. W. Shor, Polynomial time algorithms for prime factorization and discrete logarithms on a quantum computer, SIAM J. Computing 26 (1997), 14841509.
59. R. D. Silverman, The multiple polynomial quadratic sieve, Math. Comp. 48 (1987),
329339.
60. U. Vazirani, Introduction to special section on quantum computation, SIAM J.
Computing 26 (1997), 14091410.
61. D. H. Wiedemann, Solving sparse linear equations over finite fields, IEEE Trans.
Inform. Theory 32 (1986), 5462.
62. J. Zayer, Faktorisieren mit dem Number Field Sieve, Ph. D. thesis, Universit
at des
Saarlandes, 1995.
63. P. Zimmermann, The ECMNET Project, http://www.loria.fr/~zimmerma/
records/ecmnet.html.

Approximating Uniform Triangular Meshes in


Polygons
Franz Aurenhammer1 , Naoki Katoh2 and Hiromichi Kojima2 , Makoto Ohsaki2 ,
and Yinfeng Xu3
1

Institute for Theoretical Computer Science, Graz University of Technology


Klosterwiesgasse 32/2, A-8010 Graz, Austria,
[email protected]
2
Department of Architecture and Architectural Systems, Kyoto University
Yoshida-Honmachi, Sakyo-ku, Kyoto, 606-8501 Japan
{naoki,kojima,ohsaki}@is-mj.archi.kyoto-u.ac.jp
3
School of Management, Xian Jiaotong University
Xian, 710049 P.R.China,
[email protected]

Introduction

Given a convex polygon P in the plane and a positive integer n, we consider


the problem of generating a length-uniform triangular mesh for the interior of
P using n Steiner points. More specifically, we want to find both a set Sn of n
points inside P , and a triangulation of P using Sn , with respect to the following
minimization criteria: (1) ratio of the maximum edge length to the minimum
one, (2) maximum edge length, and (3) maximum triangle perimeter.
These problems can be formalized as follows: Let V be the set of vertices of
P . For an n-point set Sn interior to P let T (Sn ) denote the set of all possible
triangulations of Sn V . Further, let l(e) denote the (Euclidean) length of edge
e, and let peri() be the perimeter of triangle .
l(e)
l(f )

Problem 1

minSn P minT T (Sn ) maxe,f T

Problem 2

minSn P minT T (Sn ) maxeT l(e)

Problem 3

minSn P minT T (Sn ) maxT peri()

Finding an optimal solution for any of the three problems seems to be difficult, in view of the NP-completeness of packing problems in the plane, see e.g.
Johnson [10], or in view of the intrinsic complexity of Heilbronns triangle problem, see [14]. For the case of a fixed point set, minimizing the maximum edge
length is known to be solvable in O(n2 ) time; see Edelsbrunner and Tan [7].
Nooshin et al. [12] developed a potential-based heuristic method for Problem 2,
but did not give a theoretical guarantee for the obtained solution.
In this paper, we offer an O(n2 log n) heuristic capable of producing constant approximations for anyof the three
problems stated above. Respective
approximation factors of 6, 4 3, and 6 3 are proven, provided n is reasonably
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 2333, 2000.
c Springer-Verlag Berlin Heidelberg 2000

24

Franz Aurenhammer et al.

large. Our experiments reveal a much better behaviour, concerning the quality
as well as the runtime. With minor modifications, our method works for arbitrary polygons (with possible holes), and yields the same approximation result
for Problem 1. Concerning Problems 2 and 3, the approximation factors above
can be guaranteed for a restricted class of non-convex polygons.
We first develop a heuristic we called canonical Voronoi insertion which
approximately solves a certain extreme packing problem for point sets within P .
The method is similar to the one used in Gonzalez [9] and Feder and Greene [8]
developed for clustering problems. We then show how to modify the heuristic,
in order to produce a set of n points whose Delaunay triangulation within P
constitutes a constant approximation for the problems stated above. Note that
the solution we construct is neccessarily a triangulation of constant vertex degree.
Generating triangular meshes is one of the fundamental problems in computational geometry, and has been extensively studied; see e.g. the survey article
by Bern and Eppstein [3]. Main fields of applications are finite element methods and computer aided design. In finite element methods, for example, it is
desirable to generate triangulations that do not have too large or too small angles. Along this direction, various algorithms have been reported [4,11,6,2,5,15].
Restricting angles means bounding the edge length ratio for the individual triangles, but not necessarily for a triangulation in global, which might be desirable
in some applications. That is, the produced triangulation need not be uniform
concerning, e.g., the edge length ratio of its triangles. Chew [6] and Melisseratos
and Souvaine [11] construct uniform triangular meshes in the weaker sense that
only upper bounds on the triangle size are required. To the knowledge of the
authors, the problems dealt with in this paper have not been studied in the field
of computational geometry. The mesh refinement algorithms in Chew [6] and in
Ruppert [15] are similar in spirit to our Voronoi insertion method, but do not
proceed in a canonical way and aim at different optimality criteria.
A particular application of length-uniform triangulation arises in designing
structures such as plane trusses with triangular units, where it is required to determine the shape from aesthetic points of view under the constraints concerning
stress and nodal displacement. The plane truss can be viewed as a triangulation
of points in the plane by regarding truss members and nodes as edges and points,
respectively. When focusing on the shape, edge lengths should be as equal as possible from the viewpoint of design, mechanics and manufacturing; see [12,13]. In
such applications, the locations of the points are usually not fixed, but can be
viewed as decision variables. In view of this application field, it is quite natural
to consider Problems 1, 2, and 3.
The following notation will be used throughout. For two points x and y in
the plane, let l(x, y) denote their Euclidean distance. The minimum (non-zero)
distance between two point sets X and Y is defined as l(X, Y ) = min{l(x, y) |
x X, y Y, x 6= y}. When X is a singleton set {x} we simply write l(X, Y ) as
l(x, Y ). Note that l(X, X) defines the minimum interpoint distance among the
point set X.

Approximating Uniform Triangular Meshes in Polygons

25

Canonical Voronoi Insertion and Extreme Packing

In this section, we consider the following extreme packing problem. Let P be a


(closed) convex polygon with vertex set V .
Maximize l(V Sn , V Sn )
subject to a set Sn of n points within P .
We shall give a 2-approximation algorithm for this problem using canonical
Voronoi insertion. In Section 3 we then show that the point set Sn produced by
this algorithm, as well as the Delaunay triangulation induced by Sn within P ,
can be modified to give an approximate solution for the three problems addressed
in Section 1.
The algorithm determines the location of the point set Sn in a greedy manner.
Namely, starting with an empty set S, it repeatedly places a new point inside P
at the position which is farthest from the set V S. The idea of the algorithm
originates with Gonzalez [9] and Feder and Greene [8], and was developed for
approximating minimax k-clusterings. Comparable insertion strategies are also
used for mesh generation in Chew [6] and in Ruppert [15], there called Delaunay
refinement . Their strategies aim at different quality measures, however, and
insertion does not take place in a canonical manner.
The algorithm uses the Voronoi diagram of the current point set to select
the next point to be inserted. We assume familiarity with the basic properties
of a Voronoi diagram and its dual, the Delaunay triangulation, and refer to the
survey paper [1].
Algorithm INSERT
Step 1: Initialize S := .
Step 2: Compute the Voronoi diagram Vor(V S) of V S.
Step 3: Find the set B of intersection points between edges of Vor(V S) and
the boundary of P . Among the points in B and the vertices of Vor(V S) inside
P , choose the point u which maximizes l(u, V S).
Step 4: Put S := S {u} and return to Step 2 if |S| < n.
Let pj and Sj , respectively, denote the point chosen in Step 3 and the set
obtained in Step 4 at the j-th iteration of the algorithm. For an arbitrary point
x P define the weight of x with respect to Sj as wj (x) = l(x, Sj V ). That is,
wj (x) is the radius of the largest circle centered at x which does not enclose any
point from Sj V . By definition of a Voronoi diagram, the point pj maximizes
wj1 (x) over all x P . Let
dn = l(Sn V, Sn V )

(1)

be the minimum interpoint distance realized by Sn V . Furthermore, denote by


Sn the optimal solution for the extreme packing problem for P and let dn denote
the corresponding objective value. The following approximation result might be
of interest in its own right. Its proof is an adaptation of techniques in [9,8] and
contains observations that will be used in our further analysis.

26

Franz Aurenhammer et al.

Theorem 1. The solution Sn obtained by Algorithm INSERT is a 2-approximation of the extreme packing problem for P . That is, dn dn /2.
Proof. We claim that pn realizes the minimum (non-zero) distance from Sn to
Sn V . Equivalently, the claim is
wn1 (pn ) = l(Sn , Sn V ).

(2)

To see this, assume that the minimum distance is realized by points pk and
pj different from pn . Let pk be inserted after pj by the algorithm. Then we
get wk1 (pk ) l(pk , pj ) < l(pn , Sn1 V ) = wn1 (pn ). On the other hand,
the sequence of weights chosen by the algorithm must be non-increasing. More
exactly, wk1 (pk ) wk1 (pn ) wn1 (pn ). This is a contradiction.
The observations dn = min{l(Sn , Sn V ), l(V, V )} and l(V, V ) dn dn
now imply dn = min{wn1 (pn ), dn } by (2). But pn maximizes wn1 (x) for all
x P . So the lemma below (whose proof is omitted) completes the argument.
Lemma 1. For any set S P of n 1 points there exists a point x P with
l(x, S V ) dn /2.

Delaunay Triangulation of Bounded Edge Ratio

Our aim is to show that Algorithm INSERT is capable of producing a point


set appropriate for Problems 1, 2, and 3. To this end, we first investigate the
Delaunay triangulation DT(Sn V ) of Sn V . This triangulation is implicitly
constructed by the algorithm, as being the dual structure of Vor(Sn V ). However, DT(Sn V ) need not exhibit good edge length properties. We therefore
prescribe the placement of the first k inserted points, and show that Algorithm
INSERT completes them to a set of n points whose Delaunay triangulation has
its edge lengths controlled by the minimum interpoint distance dn for Sn V .
3.1 Triangle types. For 1 j n, consider the triangulation DT(Sj V ).
Let us classify a triangles of DT(Sj V ) as either critical or non-critical,
depending on whether the Voronoi vertex dual to (i.e., the circumcenter of
) lies outside of the polygon P or not. Whereas edges of critical triangles can
be arbitrarily long, edge lengths are bounded in non-critical triangles.
Lemma 2. No edge e of a non-critical triangle of DT(Sj V ) is longer than
2 wj1 (pj ).
Proof. Let e = (p, q) and denote with x the Voronoi vertex dual to . As x
lies inside of P , we get l(x, p) = l(x, q) = wj1 (x) wj1 (pj ), by the choice of
point pj in Step 3 of Algorithm INSERT. The triangle inequality now implies
l(p, q) 2 wj1 (pj ).

Approximating Uniform Triangular Meshes in Polygons

27

We make an observation on critical triangles. Consider some edge e of DT(Sj V )


on the boundary of P . Edge e cuts off some part of the diagram Vor(Sj V )
that is outside of P . If that part contains Voronoi vertices then we define the
critical region, R(e), for e as the union of all the (critical) triangles that are dual
to these vertices. Notice that each critical triangle of DT(Sj V ) belongs to a
unique critical region.
Lemma 3. No edge f of a critical triangle in R(e) is longer than l(e).
Proof. Let p be an endpoint of f . Then the region of p in Vor(Sj V ) intersects
e. Let x be a point in this region but outside of P . There is a circle around x
that encloses p but does not enclose any endpoint of e. Within P , this circle is
completely covered by the circle C with diameter e. This implies that p lies in C.
As the distance between any two points in C is at most l(e), we get l(f ) l(e).
Let us further distinguish between interior triangles and non-interior ones, the
former type having no two endpoints on the boundary of P . The shortest edge
of an interior triangle can be bounded as follows.
Lemma 4. Each edge e of an interior triangle of DT(Sj V ) has a length
of at least wj1 (pj ).
Proof. We have l(e) l(Sj , Sj V ), because has no two endpoints on P s
boundary. But from (2) we know l(Sj , Sj V ) = wj1 (pj ).
3.2 Edge length bounds. We are now ready to show how a triangulation
with edge lengths related to dn can be computed. First, Algorithm INSERT is run
on P , in order to compute the value dn . We assume than n is chosen sufficiently
large to assure dn l(V, V )/2. This assumption is not unnatural as the shortest
edge of the desired triangulation cannot be longer than the shortest edge of P .
After having dn available, k points p01 , . . . , p0k are placed on the boundary of P ,
with consecutive distances between 2 dn and 3 dn , and such that l(V 0 , V 0 )
dn holds, for V 0 = V {p01 , . . . , p0k }. Notice that such a placement is always
possible. Finally, nk additional points p0k+1 , . . . , p0n are produced by re-running
Algorithm INSERT after this placement.
For 1 j n, let Sj0 = {p01 , . . . , p0j }. Define w(x) = l(x, Sn0 V ) for a point
x P . The value of w(p0n ) will turn out to be crucial for analyzing the edge
length behavior of the triangulation DT(Sn0 V ). The lemma below asserts that
w(p0n ) is small if n exceeds twice the number k of prescribed points.
Lemma 5. Suppose n 2k. Then w(p0n ) 3 dn .
Proof. The point set Sn produced by Algorithm INSERT in the first run is large
enough to ensure dn < l(V, V ). So we get dn = wn1 (pn ) from (2). As point pn
maximizes wn1 (x) for all x P , the n + |V | circles centered at the points in
Sn V and with radii dn completely cover the polygon P . Let dn = 1 for the
moment. Then
(3)
A(P ) (n + |V |) A0

28

Franz Aurenhammer et al.

where A(P ) is the area of P , and A0 denotes the area outside of P which is
covered by the circles centered at V .
Assume now w(p0n ) > 3 dn . Draw a circle with radius 32 dn around each point
in Sn0 \ Sk0 . Since w(p0n ) = l(Sn0 \ Sk0 , Sn0 V ) by (2), these circles are pairwise
disjoint. By the same reason, and because boundary distances defined by V 0 =
V Sk0 are at most 3dn , these circles all lie completely inside P . Obviously, these
circles are also disjoint from the |V | circles of radius dn centered at V . Finally,
the latter circles are pairwise disjoint, since dn l(V, V )/2. Consequently,
A(P )

9
(n k) + A00
4

(4)

where A00 denotes the area inside of P which is covered by the circles centered at
V . Combining (3) and (4), and observing A0 + A00 = |V | now implies n < 2k,
a contradiction.
It has to be observed that the number k depends on n. The following fact guarantees the assumption in Lemma 5, provided n is sufficiently large. Let B(P )
denote the perimeter of P .
Lemma 6. The condition dn A(P )/( B(P )) implies n 2k.
Proof. By (3) we have
n

A(P )
|V |.
(dn )2

To get a bound on k, observe that at most l(e)/2dn 1 points are placed on


each edge e of P . This sums up to
k

B(P )
|V |.
2dn

Simple calculations now show that the condition on dn stated in the lemma
implies n 2k.
The following is a main theorem of this paper.
Theorem 2. Suppose n is large enough to assure the conditions dn l(V, V )/2
and dn A(P )/( B(P )). Then no edge in the triangulation T + = DT(Sn0 V )
is longer than 6 dn . Moreover, T + exhibits an edge length ratio of 6.
Proof. Two cases are distinguished, according to the value of w(p0n ).
Case 1: w(p0n ) < dn . Concerning upper bounds, Lemma 2 implies l(e)
2 w(p0n ) < 2 dn for all edges e belonging to non-critical triangles of T + . If
e belongs to some critical triangle, Lemma 3 shows that l(e) cannot be larger
than the maximum edge length on the boundary of P , which is at most 3 dn
by construction. Concerning lower bounds, Lemma 4 gives l(e) w(p0n ) for
edges of interior triangles. We know w(p0n ) dn /2 from Lemma 1, which implies
l(e) dn /2 because dn dn . For edges spanned by V 0 , we trivially obtain
l(e) dn as l(V 0 , V 0 ) dn by construction.

Approximating Uniform Triangular Meshes in Polygons

29

Case 2: w(p0n ) dn . The upper bound 2 w(p0n ) for non-critical triangles now
gives l(e) 6 dn , due to Lemmas 5 and 6. The lower bound for interior triangles
becomes l(e) w(p0n ) dn . The remaining two bounds are the same as in the
former case.
3.3 Computational issues. The time complexity of computing the triangulation T + is dominated by Steps 2 and 3 of Algorithm INSERT. In the very
first iteration of the algorithm, both steps can be accomplished in O(|V | log |V |)
time. In each further iteration j we update the current Voronoi diagram under
the insertion of a new point pj in Step 2, as well as a set of weights for the
Voronoi vertices and relevant polygon boundary points in Step 3.
Since we already know the location of the new point pj in the current Voronoi
diagram, the region of pj can be integrated in time proportional to the degree
of pj in the corresponding Delaunay triangulation, deg(pj ). We then need to
calculate, insert, and delete O(deg(pj )) weights, and then select the largest one
in the next iteration. This gives a runtime of O(deg(pj ) log n) per iteration.
The following lemma bounds the number of constructed triangles, of a certain
type. Let us call a triangle good if it is both interior and non-critical.
Lemma 7. The insertion of each point pj creates only a constant number of
good triangles.
Proof. Consider the endpoints of all good triangles incident to pj in DT(Sj
V ), and let X be the set of all such endpoints interior to P . Then l(X, X)
l(Sj , Sj ) wj1 (pj ), due to (2). On the other hand, by Lemma 2, X lies in the
circle of radius 2 wj1 (pj ) around pj . As a consequence, |X| is constant. The
number of good triangles incident to pj is at most 2 |X|, as one such triangle
would have two endpoints on P s boundary, otherwise.
For most choices of P and n, the good triangle type will be most frequent. Note
also that the degree of all points in the final triangulation T + has to be constant.
In conclusion, we obtain a runtime bound of O(n2 log n) and a space complexity of O(n). However, Lemma 7 suggests a runtime of O(log n) in most
iterations.

Approximation Results

Let us now return to the three optimization problems for the polygon P posed
in the introduction. We will rely on Theorem 2 in the following. Recall that, in
order to make the theorem hold, we have to choose n sufficiently large.
Theorem 3. The triangulation T + approximates the optimal solution for Problem 1 by a factor of 6.
Proof. Theorem 2 guarantees for T + an edge length ratio of 6, and for no triangulation this ratio can be smaller than 1.

30

Franz Aurenhammer et al.

We now turn our attention to Problem 2. Let the point set S in conjunction with
the triangulation T of S V be the corresponding optimum solution. Let dlong
denote the optimum objective value, that is, dlong measures the longest edge
in T. The lemma below relates dlong to the optimum value dn for the extreme
packing problem for P . The proof is omitted in this extended abstract.
Lemma 8.

dlong

3
2 dn .

We strongly conjecture that the statement of Lemma 8 can be strengthened


to dlong dn , which would improve the bounds in Theorems 4 and 5 below.

Theorem 4. The triangulation T + constitutes a 4 3approximation for Problem 2.


Proof. Let emax denote the longest edge in T + . By Theorem 2 we have l(emax )

6d
n . Trivially dn dn holds, and Lemma 8 implies the theorem, l(emax )/dlong
4 3.
Finally let us consider Problem 3. Let dperi denote the optimum objective
value for this problem. We show the following:

Theorem 5. The triangulation T + gives a 6 3approximation for Problem 3.


Proof. For any triangulation
of P with n Steiner points, its longest edge cannot

be shorter than 2 dn by Lemma 8. This implies dperi 3 dn by the triangle


inequality. On the other hand, for the longest edge emax of T + we have l(emax )
+
6 dn due to Theorem 2. The longest triangle perimeter
max that occurs in T
is at most 3 l(emax ). In summary, max /dperi 6 3.
We conclude this section by mentioning an approximation result concerning
minimum-weight triangulations. The easy proof is omitted.
Theorem 6. Let S + be the vertex set of T + and let MWT(S + ) denote the
minimum-weight triangulation of S + . Then T + is a 6length approximation for
MWT(S + ).

Experimental Results

We have performed computational experiments in order to see the effectiveness


of the proposed algorithm. For space limitations, we focus on Problem 1 and we
only give detailed results for two typical convex polygons. The first polygon is
rather fat while the second one is skinny and has a very long edge. The length
of the shortest edge in both polygons is roughly equal to dn for n = 50. We have
tested the four cases of n = 50, 100, 200, 300.
As we described in Section 3, Algorithm INSERT places points on the boundary in the first run, and then is restarted to produce the triangulation. Thereby,
the consecutive distance between placed points need to be set to 2dn 3dn in

Approximating Uniform Triangular Meshes in Polygons

31

points consec dist edge ratio flips run 1 flips run 2 edge ratio flips run 1 flips run 2
50
12
2.67
81
97
5.08
65
65
23
3.96
81
86
5.43
65
64
100
12
2.00
180
214
3.18
147
191
23
2.61
180
174
3.62
147
158
200
12
1.96
371
475
2.08
335
427
23
3.23
371
392
2.71
335
343
300
12
2.04
567
700
2.1
531
657
23
3.85
567
580
2.5
531
563

order to ensure the desired results theoretically. However, the case of dn 2dn is
also tested in our experiments. The computational results are summarized below
(fat polygon left, skinny polygon right).
We observe that (1) the actual edge length ratio is much better than the
worst-case ratio of 6 given by Theorem 3, and (2) the number of flips per insertion
of a point is very small (roughly two). Although the example polygons do not
satisfy dn < l(V, V )/2 (as required by Theorem 3) we obtained much better
ratios. This exhibits the practical effectiveness of the proposed algorithm.
Note also that for a fat polygon (left) the choice of consecutive distance of
dn 2dn produces a better ratio, while for a skinny polygon (right) the contrary
can be observed.

Discussion and Extensions

We have considered the problem of generating length-uniform triangular meshes


for the interior of convex polygons. A unifying algorithm capable of computing
constant approximations for several criteria has been developed. The basic idea
has been to relate the length of triangulation edges to the optimum extreme packing distance. The method is easy to implement and seems to produce acceptably
good triangular meshes as far as computational experiments are concerned.
In practical applications, more general input polygons need to be triangulated. We stress that our algorithm works with minor modification for arbitrary
polygons with possible holes. Convexity is used solely in the proof of Lemma 8.
As a consequence, Theorems 1 and 2, the approximation result for Problem 1,
and Theorem 6 still hold. The modification needed is that visible distances in
a non-convex polygon P should be considered only, in the proofs as well as
concerning the algorithm. That is, for the point sets S P in question, the
Delaunay triangulation of S V constrained by P has to be utilized rather than
DT(S V ).
The proof of Lemma 8 (and with it the approximation results for Problems 2
and 3) still go through for non-convex polygons P with interior angles of at
2 dlong fall short of
most 3
2 , provided n is large enough to make the value
3
the minimum distance between non-adjacent edges of P . We pose the question
of establishing a version of Lemma
8 for general non-convex polygons, and of

improving the respective bound 23 for the convex case.

32

Franz Aurenhammer et al.

Viewed from the point of applications to the design of structures, it is also


important to generate a triangular mesh for approximating surfaces such as
large-span structures. For this direction, our result concerning Problem 1 can be
extended to spherical polygons. More precisely, given a convex polygon whose
vertices lie on a hemisphere (or a smaller region of a sphere cut by a plane), the
problem is to find a triangular mesh whose points are on the hemisphere that
minimizes the objective function of Problem 1. It can be shown that the algo
rithm obtained by appropriately modifying Algorithm INSERT attains a 3 5
approximation ratio.
Acknowledgements. This research was partially supported by the Austrian Spezialforschungsbereich F003, Optimierung und Kontrolle, and the Grant-in-Aid for Scientific
Research on Priority Areas (B) (No. 10205214) by the Ministry of Education, Science,
Sports and Culture of Japan. In addition, the fifth author was also supported by NSF
of China (No. 19731001) and the Japan Society for the Promotion of Science of Japan.
We gratefully acknowledge all these supports.

References
1. F. Aurenhammer, Voronoi diagrams a survey of a fundamental geometric data
structure, ACM Computing Surveys 23 (1991), 345-405.
2. M. Bern, D. Dobkin and D. Eppstein, Triangulating polygons without large angles, Intl. J. Comput. Geom. and Appl. 5 (1995), 171-192.
3. M. Bern and D. Eppstein, Mesh generation and optimal triangulation, in D.Z. Du (ed.), Computing in Euclidean Geometry, World Scientific Publishing, 1992,
47-123.
4. M. Bern, D. Eppstein and J.R. Gilbert, Provably good mesh generation, Journal
of Computer and System Sciences 48 (1994), 384-409.
5. M. Bern, S. Mitchell and J. Ruppert, Linear-size nonobtuse triangulation of polygons, Proceedings of the 10th Ann. ACM Symposium on Computational Geometry (1994), 221-230.
6. P. Chew, Guaranteed-Quality Mesh Generation for Curved Surfaces, Proceedings
of the 9th Ann. ACM Symposium on Computational Geometry (1993), 274-280.
7. H. Edelsbrunner and T.S. Tan, A quadratic time algorithm for the minmax length
triangulation, SIAM Journal on Computing 22 (1993), 527-551.
8. T. Feder and D.H. Greene, Optimal Algorithms for Approximate Clustering,
Proceedings of the 20th Ann. ACM Symposium STOC (1988), 434-444.
9. T. Gonzalez, Clustering to minimize the maximum intercluster distance, Theoretical Computer Science 38 (1985), 293-306.
10. D.S. Johnson, The NP-completeness column: An ongoing guide, Journal of Algorithms 3 (1982), 182-195.
11. E. Melisseratos and D. Souvaine, Coping with inconsistencies: A new approach
to produce quality triangulations of polygonal domains with holes, Proceedings
of the 8th Ann. ACM Symposium on Computational Geometry (1992),202-211.
12. H. Nooshin, K. Ishikawa, P.L. Disney and J.W. Butterworth, The traviation process, Journal of the International Association for Shell and Spatial Structures 38
(1997), 165-175.

Approximating Uniform Triangular Meshes in Polygons

33

13. M. Ohsaki, T. Nakamura and M. Kohiyama, Shape optimization of a double-layer


space truss described by a parametric surface, International Journal of Space
Structures 12 (1997), 109-119.
14. K.F. Roth, On a problem of Heilbronn, Proc. London Mathematical Society 26
(1951), 198-204.
15. J. Ruppert, A Delaunay Refinement Algorithm for Quality 2-Dimensional Mesh
Generation, Journal of Algorithms 18 (1995), 548-585.

Maximum Induced Matchings


of Random Cubic Graphs
William Duckworth1 , Nicholas C. Wormald1? , and Michele Zito2??
1

Department of Mathematics and Statistics, University of Melbourne, Australia


{billy,nick}@ms.unimelb.edu.au
2
Department of Computer Science, University of Liverpool, UK
[email protected]

Abstract. In this paper we present a heuristic for finding a large induced matching M of cubic graphs. We analyse the performance of
this heuristic, which is a random greedy algorithm, on random cubic
graphs using differential equations and obtain a lower bound on the expected size of the induced matching returned by the algorithm. The
corresponding upper bound is derived by means of a direct expectation argument. We prove that M asymptotically almost surely satisfies
0.2704n |M| 0.2821n.

Introduction

An induced matching of a graph G = (V, E) is a set of vertex disjoint edges


M E with the additional constraint that no two edges of M are connected
by an edge of E \ M. We are interested in finding induced matchings of large
cardinality.
Stockmeyer and Vazirani [11] introduced the problem of finding a maximum
induced matching of a graph, motivating it as the risk-free marriage problem
(find the maximum number of married couples such that each person is compatible only with the person (s)he is married to). This in turn stimulated much
interest in other areas of theoretical computer science and discrete mathematics
as finding a maximum induced matching of a graph is a sub-task of finding a
strong edge-colouring of a graph (a proper colouring of the edges such that no
edge is incident with more than one edge of the same colour as each other, see
(for example) [5,6,9,10]).
The problem of deciding whether for a given integer k a given graph G
has an induced matching of size at least k is NP-Complete [11], even for bipartite graphs of maximum degree 4. It has been shown [3,13] that the problem is APX-complete even when restricted to ks-regular graphs for k {3, 4}
and any integer s 1. The problem of finding a maximum induced matching
is polynomial-time solvable for chordal graphs [2] and circular arc graphs [7].
?
??

Supported by the Australian Research Council


Supported by EPSRC grant GR/L/77089

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 3443, 2000.
c Springer-Verlag Berlin Heidelberg 2000

Maximum Induced Matchings of Random Cubic Graphs

35

Recently Golumbic and Lewenstein [8] have constructed polynomial-time algorithms for maximum induced matching in trapezoid graphs, interval-dimension
graphs and co-comparability graphs, and have given a linear-time algorithm for
maximum induced matching in interval graphs.
In this paper we present a heuristic for finding a large induced matching
M of cubic graphs. We analyse the performance of this heuristic, which is a
random greedy algorithm, on random cubic graphs using differential equations
and obtain a lower bound on the expected size of the induced matching returned
by the algorithm. The corresponding upper bound is derived by means of a
direct expectation argument. We prove that M asymptotically almost surely
satisfies 0.2704n |M| 0.2821n. Little is known on the complexity of this
problem under the additional assumption that the input graphs occur with a
given probability distribution. Zito [14] presented some simple results on dense
random graphs. The algorithm we present was analysed deterministically in [3]
where it was shown that, given an n-vertex cubic graph, the algorithm returns
an induced matching of size at least 3n/20 + o(1), and there exist infinitely many
cubic graphs realising this bound.
Throughout this paper we use the notation P (probability), E (expectation),
u.a.r. (uniformly at random) and a.a.s. (asymptotically almost surely). When
discussing any cubic graph on n vertices, we assume n to be even to avoid parity
problems.
In the following section we introduce the model used for generating cubic
graphs u.a.r. and in Section 3 we describe the notion of analysing the performance
of algorithms on random graphs using a system of differential equations. Section 4
gives the randomised algorithm and Section 5 gives its analysis showing the a.a.
sure lower bound. In Section 6 we give a direct expectation argument showing
the a.a. sure upper bound.

Uniform Generation of Random Cubic Graphs

The model used to generate a cubic graph u.a.r. (see for example Bollobas [1])
can be summarised as follows. For an n vertex graph
take 3n points in n buckets labelled 1 . . . n with three points in each bucket
and
choose u.a.r. a perfect matching of the 3n points.
If no edge of the matching contains two points from the same bucket and no two
edges contain four points from just two buckets then this represents a cubic graph
on n vertices with no loops and no multiple edges. With probability bounded
below by a positive constant, loops and parallel edges do not occur [1]. The
edges of the random cubic graph generated are represented by the edges of the
matching and its vertices are represented by the buckets.
We may consider the generation process as follows. Initially, all vertices have
degree 0. Throughout the execution of the generation process, vertices will increase in degree until the generation is complete and all vertices have degree 3.
We refer to the graph being generated by this process as the evolving graph.

36

William Duckworth, Nicholas C. Wormald, and Michele Zito

Analysing Algorithms Using Differential Equations

We incorporate the algorithm as part of a matching process generating a random


cubic graph. During the generation of a random cubic graph, we choose the
matching edges sequentially. The first end-point of a matching edge may be
chosen by any rule, but in order to ensure that the cubic graph is generated
u.a.r., the second end-point of that edge must be selected u.a.r. from all the
remaining free points. The freedom of choice of the first end-point of a matching
edge enables us to select it u.a.r. from the vertices of given degree in the evolving
graph.
The algorithm we use to generate an induced matching of cubic graphs is a
greedy algorithm based on choosing a vertex of a given degree and performing
some edge and vertex deletions. In order to analyse our algorithm using a system
of differential equations, we generate the random graph in the order that the
edges are examined by the algorithm.
At some stage of the algorithm, a vertex is chosen of given degree based upon
the number of free points remaining in each bucket. The remaining edges incident
with this vertex are then exposed by randomly selecting a mate for each spare
point in the bucket. This allows us to determine the degrees of the neighbours
of the chosen vertex and we refer to this as probing those vertices. This is done
without exposing the other edges incident with these probed vertices. Once the
degrees of the neighbours of the chosen vertex are known, an edge is selected to
be added to the induced matching. Further edges are then exposed in order to
ensure the matching is induced. More detail is given in the following section.
In what follows, we denote the set of vertices of degree i of the evolving
graph by Vi and let Yi (= Yi (t)) denote |Vi | (at time t). The number of edges
in the induced matching at any stage of the algorithm (time t) is denoted by
M (= M (t)) and we let s(= s(t)) denote the number of free points available in
P2
buckets at any stage of the algorithm (time t). Note that s = i=0 (3 i)Yi . Let
E(X) denote the expected change in a random variable X conditional upon
the history of the process.
One method of analysing the performance of a randomised algorithm is to
use a system of differential equations to express the expected changes in variables describing the state of an algorithm during its execution (see [12] for an
exposition of this method).
We can express the state of the evolving graph at any point during the
execution of the algorithm by considering Y0 , Y1 and Y2 . In order to analyse
our randomised algorithm for finding an induced matching of cubic graphs, we
calculate the expected change in this state over one time step in relation to
the expected change in the size M of the induced matching. We then regard
E(Yi )/E(M ) as the derivative dYi /dM , which gives a system of differential
equations. The solution to these equations describes functions which represent
the behaviour of the variables Yi . There is a general result which guarantees
that the solution of the differential equations almost surely approximates the
variables Yi . The expected size of the induced matching may be deduced from
these results.

Maximum Induced Matchings of Random Cubic Graphs

37

The Algorithm

In order to find an induced matching of a cubic graph, we use the following


algorithm. We assume the generated graph G to be connected (since random
cubic graphs are connected a.a.s.). Then, at any stage of the algorithm after the
first step and before its completion, Y1 + Y2 > 0. The degree of a vertex v in
the evolving graph is denoted by deg(v). We denote the initial set of 3n points
by P . B(p) denotes the bucket that a given point p belongs to and we use q(b)
to denote the set of free points in bucket b. The set of induced matching edges
returned is denoted by M. Here is the algorithm; a description is given below.
select(p1 , P );
expose(p1 , p2 );
isolate(B(p1 ), B(p2 ));
M (B(p1 ), B(p2 ));
while (Y1 + Y2 > 0)
{ if (Y2 > 0)
{ select(u, V2 ); {p1 } q(u);
expose(p1 , p2 ); v B(p2 );}
else
{ select(u, V1 ); {p1 , p2 } q(u);
expose(p1 , p3 ); a B(p3 );
expose(p2 , p4 ); b B(p4 );
if
(deg(a) > deg(b)) v a;
else if (deg(b) > deg(a)) v b;
else
select(v, {a, b});}
isolate(u, v);
M M (u, v);
}
The function select(s, S) involves the process of selecting the element s u.a.r.
from the set S. The function expose(pi , pj ) involves the process of deleting
the selected point pi from P , exposing the edge (B(pi ), B(pj )) by randomly
selecting the point pj from P and deleting the point pj from P . The function
isolate(B1 , B2 ) involves the process of randomly selecting a mate for each free
point in the buckets B1 and B2 and then exposing all edges incident with these
selected mates. This ensures that the matching is induced.
The first step of the algorithm involves randomly selecting the first edge of the
induced matching and exposing the appropriate edges. We split the remainder
of the algorithm into two distinct phases. We informally define Phase 1 as the
period of time where any vertices in V2 that are created are used up almost
immediately and Y2 remains small. Once the rate of generating vertices in V2
becomes larger than the rate that they are used up, the algorithm moves into
Phase 2 and the majority of operations involve selecting a vertex from V2 and
including its incident edge in the induced matching.

38

William Duckworth, Nicholas C. Wormald, and Michele Zito

There are two basic operations performed by the algorithm. Type 1 refers to
a step when Y2 > 0 and a vertex is chosen from V2 . Similarly, Type 2 refers to
a step where Y2 = 0 and a vertex is chosen from V1 .
Figs. 1 and 2 show the configurations that may be encountered performing
operations of Type 1 and Type 2 respectively (a.a.s.). For Type 1, we add the
edge incident with the chosen vertex. For Type 2, if (after exposing the edges
incident with the chosen vertex u) exactly one of the neighbours of u has exactly
two free points, we add the edge incident with this vertex and the chosen vertex.
Otherwise we randomly choose an edge incident with the chosen vertex.
w

v
w

Fig. 1. Selecting a vertex from V2 and adding its incident edge to M.

v*

v
p

p
2a

p
2b

v*

p
2c

Fig. 2. Selecting a vertex from V1 and choosing an edge to add to M.


The larger circles represent buckets each containing 3 smaller circles representing the points of that bucket. Smaller circles coloured black represent points
that are free. Used points are represented by white circles. Points which are not
known to be free at this stage of the algorithm are shaded.
In all cases, the selected vertex is labelled u and the other end-point of the
induced matching edge chosen is labelled v. A vertex labelled v denotes that a
random choice has been made between 2 vertices and this one was not selected.
After selecting a vertex u of given degree, the edges incident with this vertex are
exposed. Once we probe the degrees of the neighbours of this vertex, we then
make the choice as to which edge to add to the induced matching. Only then
are other edges exposed. Therefore, at this stage, we do not know the degrees
of all the vertices at distance at most two from the end-points of the selected
induced matching edge. A vertex whose degree is unknown is labelled either w

Maximum Induced Matchings of Random Cubic Graphs

39

or p. A vertex labelled p will have one of its incident edges exposed and will
subsequently have its degree increased by one. We refer to these vertices as incs.
A vertex labelled w will have all of its incident edges exposed and we refer to
these vertices as rems. Should any rem be incident with other vertices of unknown
degree then these vertices will be incs.
Once the choice of induced matching edge has been made, all edges incident
with the endpoints of the induced matching edge are exposed and subsequently
the edges of the neighbours of the end-points of the chosen edge are exposed.
This ensures the matching is induced.

The Lower Bound

Theorem 1. For a cubic graph on n vertices the size of a maximum induced


matching is asymptotically almost surely greater than 0.2704n
Proof. We define a clutch to be a series of operations in Phase i involving the
selection a vertex from Vi and all subsequent operations up to but not including
the next selection of a vertex from Vi . Increment time by 1 step for each clutch of
vertices processed. We calculate E(Yi ) and E(M ) for a clutch in each Phase.
5.1

Preliminary Equations for Phase 1

The initial step of Phase 1 is of Type 2 (at least a.a.s.). We consider operations
of Type 1 first and then combine the equations given by these operations with
those given by the operations of Type 2.
Operations of Type 1 involve the selection of a vertex u from V2 (which
has been created from processing a vertex from V1 ). The expected change in
Y2 is negligible and can assumed to be 0 since this is phase 1 and Y2 remains
small as vertices of V2 are used up almost as fast as they are created. The
desired equation may be formulated by considering the contribution to E(Yi )
in three parts; deleting v (the neighbour of u), deleting the neighbour(s) of v
and increasing the degree of the other neighbours of these neighbours by one.
Let i denote the contribution to E(Yi ) due to changing the degree of an
inc from i to i + 1 and we have
(i 3)Yi + (4 i)Yi1
.
s
This equation is valid under the assumption that Y1 = 0.
We let i = i (t) denote the contribution to E(Yi ) due to a rem and all its
edges incident with incs and we have
i =

(i 3)
(6Y0 + 2Y1 )
Yi +
i .
s
s
Let i = i (t) denote the contribution to E(Yi ) for an operation of Type
1 in Phase 1. We have


6Y0 + 2Y1
(i 3)
Yi +
i .
i =
s
s
i =

40

William Duckworth, Nicholas C. Wormald, and Michele Zito

We now consider operations of Type 2. Let h,i (= h,i (t)) denote the contribution to E(Yi ) for operation 2h given in Fig. 2 (at time t). We will also use
ij = 1 if i = j and ij = 0 otherwise.
We have
a,i = 3i1 + i + i ,
b,i = i0 2i1 + i + 2i ,
c,i = 2i0 i1 + 2i + 2i .
These equations are formulated by considering the contribution to E(Yi ) by
deletion of vertices of known degree and the contribution given by the expected
degree of vertices of unknown degree.
For an operation of Type 2 in Phase 1, neighbours of u (the vertex selected
at random from V1 ) are in {V0 V1 }, since Y2 = 0 when the algorithm performs
this type of operation. The probability that these neighbours are in V0 or V1
are 3Y0 /s and 2Y1 /s respectively. Therefore the probabilities that, given we are
performing an operation of Type 2 in Phase 1, the operation is of type 2a, 2b or
4Y 2
9Y 2
2c are given by P(2a) = s21 , P(2b) = 12Ys20 Y1 and P(2c) = s20 respectively.
We define a birth to be the generation of a vertex in V2 by processing a vertex
of V1 . Let 1 (= 1 (t)) be the expected number of births from processing a vertex
from V1 (at time t). Then we have






2Y1
4Y1
4Y1
+ P(2b) 2 +
+ P(2c) 22 +
.
1 = P(2a) 2 +
s
s
s
Here, for each case, we consider the probability that vertices of degree one (in
the evolving graph) become vertices of degree two by exposing an edge incident
with the vertex.
Similarly, we let 2 = 2 (t) be the expected number of births from processing
a vertex from V2 . Then we have


6Y0 + 2Y1
2 ,
2 =
s
giving the expected number of births in a clutch to be 1 /(1 2 ).
For Phase 1, the equation giving the expected change in Yi for a clutch is
therefore given by
E(Yi ) = P(2a)a,i + P(2b)b,i + P(2c)c,i +

1
i .
1 2

The equation giving the expected increase in M for a clutch is given by


E(M ) = 1 +

1
1 2

since the contribution to the increase in the size of the induced matching by the
Type 2 operation in a clutch is 1.

Maximum Induced Matchings of Random Cubic Graphs

5.2

41

Preliminary Equations for Phase 2

In Phase 2, all operations are considered to be of Type 1 and therefore a clutch


consists of one step, but we must also consider the expected change in Y2 since
this is no longer a negligible amount. The expected change in Yi is given by
E(Yi ) = i i2
where i remains the same as that given for Phase 1 and the expected increase
in M is 1 per step.
5.3

The Differential Equations

The equation representing E(Yi ) for processing a clutch of vertices in Phase


1 forms the basis of a differential equation. Write Yi (t) = nzi (t/n), i (t) =
ni (t/n), j,i (t) = nj,i (t/n), s(t) = n(t/n), i (t) = ni (t/n) and j (t) =
nj (t/n). The differential equation suggested is
zi0 =

4z12
12z0 z1
9z02
1

+
c,i +
i
a,i
b,i
2
2
2

1 2

(i {0, 1})

where differentiation is with respect to x and xn represents the number of


clutches. From the definitions of , , s, and we have
i

(i3)
zi

(6z0 +2z1 )((i3)zi +(4i)zi1 )


,
2

a,i = 3i1 + i +

(i3)zi +(4i)zi1
,

i1
,
b,i = i0 2i1 + i + 2 (i3)zi +(4i)z

i1
,
c,i = 2i0 i1 + +2i + 2 (i3)zi +(4i)z

P2

i=0 (3

(i3)
zi

i)zi ,

6z0 +2z1
i ,

1 =

4z12
2

2 =

6z0 +2z1
2 .

2 +

2z1


+

12z0 z1
2


2 +

4z1


+

4z12
2


22 +

4z1


, and

Using the equation representing the expected increase in the size of M after
processing a clutch of vertices in Phase 1 and writing M (t) = nz(t/n) suggests
the differential equation for z as
z0 = 1 +

1
.
1 2

42

William Duckworth, Nicholas C. Wormald, and Michele Zito

We compute the ratio


zi0

4z12
2 a,i

dzi
dz

zi0 (x)
z 0 (x)

12z0 z1
2 b,i

1+

and we have
9z02
2 c,i

1
12 i

1
12

(i {0, 1})

where differentiation is with respect to z and all functions can be taken as


functions of z.
For Phase 2 the equation representing E(Yi ) for processing a clutch of
vertices suggests the differential equation
zi0 = i i2

(0 i 2).

(1)

The increase in the size of the induced matching per clutch of vertices processed
zi0 (x)
i
in this Phase is 1, so computing the ratio dz
dz = z 0 (x) gives the same equation
as that given in (1). Again, differentiation is with respect to z and all functions
can be taken as functions of z.
The solution to this system of differential equations represents the cardinalities of the sets Vi for given M (scaled by n1 ). For Phase 1, the initial conditions
are
z0 (0) = 1, zi (0) = 0 (i > 0).
The initial conditions for Phase 2 are given by the final conditions for Phase 1.
Wormald [12] describes a general result which ensures that the solutions to
the differential equations almost surely approximate the variables Yi . It is simple
to define a domain for the variables zi so that Theorem 5.1 from [12] may be
applied to the process within each phase. An argument similar to that given
for independent sets in [12] or that given for independent dominating sets in [4]
ensures that a.a.s. the process passes through phases as defined informally, and
that Phase 2 follows Phase 1. Formally, Phase 1 ends at the time corresponding
to 2 = 1 as defined by the equations for Phase 1. Once in Phase 2, vertices in
V2 are replenished with high probability which keeps the process in Phase 2.
The differential equations were solved using a Runge-Kutta method, giving
2 = 1 at z = 0.1349 and in Phase 2 z2 = 0 at z > 0.2704. This corresponds
to the size of the induced matching (scaled by n1 ) when all vertices are used up,
thus proving the theorem.
t
u

The Upper Bound

Theorem 2. For a cubic graph on n vertices the size of a maximum induced


matching is asymptotically almost surely less than 0.2821n
Proof. Consider a random cubic graph G on n vertices. Let M (G, k) denote
the number of induced matchings of G of size k. We calculate E(M (G, k)) and
show that when k > 0.2821n, E(M (G, k)) = o(1) thus proving the theorem. Let
N (x) = (2x)!
x!2x .

Maximum Induced Matchings of Random Cubic Graphs


E(M (G, k))
=

n
2k


N (k) 32k

43

(3(n 2k))! N ( 3n
2 5k)
(3n 10k)!
N ( 3n
2 )

4k
n! 32k (3(n 2k))! ( 3n
2 )! 2
.
k! (n 2k)! ( 3n
2 5k)! (3n)!

Approximate using Stirlings formula and re-write using f (x) = xx , = k/n


and we have
1

E(M (G, k)) n

32 f (3(1 2)) f ( 32 ) 24
.
f () f (1 2) f ( 32 5) f (3)

Solving this we find that for 0.2821 the expression on the right tends to 0.
t
u
Note that this bound may be improved by counting only maximal matchings.
However the improvement is slight and we do not include the details here for
reasons of brevity.

References
1. Bollob
as, B.: Random Graphs. Academic Press, London, 1985.
2. Cameron, K.: Induced Matchings. Discrete Applied Math., 24:97102, 1989.
3. Duckworth, W., Manlove, D. and Zito, M.: On the Approximability of the Maximum Induced Matching Problem. J. of Combinatorial Optimisation (Submitted).
4. Duckworth, W. and Wormald, N.C.: Minimum Independent Dominating Sets of
Random Cubic Graphs. Random Structures and Algorithms (Submitted).
5. Erd
os, E.: Problems and Results in Combinatorial Analysis and Graph Theory.
Discrete Math., 72:8192, 1988.
6. Faudree, R.J., Gy
arfas, A., Schelp, R.H. and Tuza, Z.: Induced Matchings in
Bipartite Graphs. Discrete Math., 78:8387, 1989.
7. Golumbic, M.C. and Laskar, R.C.: Irredundancy in Circular Arc Graphs. Discrete
Applied Math., 44:7989, 1993.
8. Golumbic, M.C. and Lewenstein, M.: New Results on Induced Matchings. Discrete
Applied Math., 101:157165, 2000.
9. Liu, J. and Zhou, H.: Maximum Induced Matchings in Graphs. Discrete Math.,
170:271281, 1997.
10. Steger, A. and Yu, M.: On Induced Matchings. Discrete Math., 120:291295,
1993.
11. Stockmeyer, L.J. and Vazirani, V.V.: NP-Completeness of Some Generalizations
of the Maximum Matching Problem. Inf. Proc. Lett., 15(1):1419, 1982.
12. Wormald, N.C.: Differential Equations for Random Processes and Random
Graphs. In Lectures on Approximation and Randomized Algorithms, 73155,
PWN, Warsaw, 1999. Michal Karo
nski and Hans-J
urgen Pr
omel (editors).
13. Zito, M.: Induced Matchings in Regular Graphs and Trees. In Proceedings of the
25th International Workshop on Graph Theoretic Concepts in Computer Science,
volume 1665 of Lecture Notes in Computer Science , 89100. Springer-Verlag,
1999.
14. Zito, M.: Randomised Techniques in Combinatorial Algorithmics. PhD thesis,
Department of Computer Science, University of Warwick, UK, November 1999.

A Duality between Small-Face Problems


in Arrangements of Lines and
Heilbronn-Type Problems
Gill Barequet
The TechnionIsrael Institute of Technology, Haifa 32000, Israel,
[email protected],
http://www.cs.technion.ac.il/barequet

Abstract. Arrangements of lines in the plane and algorithms for computing extreme features of arrangements are a major topic in computational geometry. Theoretical bounds on the size of these features are
also of great interest. Heilbronns triangle problem is one of the famous
problems in discrete geometry. In this paper we show a duality between
extreme (small) face problems in line arrangements (bounded in the unit
square) and Heilbronn-type problems. We obtain lower and upper combinatorial bounds (some are tight) for some of these problems.

Introduction

The investigation of arrangements of lines in the plane has attracted much attention in the literature. In particular, certain extremal features of such arrangements are of great interest. Using standard duality between lines and points,
such arrangements can be mapped into sets of points in the plane, which have
also been studied intensively. In this dual setting, distributions in which certain
features (defined by triples of points) assume their maxima are often sought.
In this paper we show a connection between these two classes of problems and
summarize the known bounds for some extremal-feature problems.
Let A(L) be an arrangement of a set L of n lines. We assume the lines of
A to be in general position, in the sense that no two lines have the same slope.
Thus every triple of lines define a triangle. Let U = [0, 1]2 be the unit square.
An arrangement A is called narrow if all its lines intersect the two vertical sides
of U . A narrow arrangement A is called transposed if the lines of A intersect the
vertical sides of U in two sequences that, when sorted in increasing y order, are
the reverse of each other. Clearly, every transposed arrangement is also narrow.
Note that all the vertices of a transposed arrangement lie in U . Later in the paper
we will also define the set of convex arrangements which is a proper subset of
the set of transposed arrangements.
In this paper we investigate the size of triangles defined by the lines of
narrow arrangements, according to several measures of the size of a triangle. We
consider the arrangements in which the minimum size of a triangle assumes its
maximum, and attempt to bound this value.
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 4453, 2000.
c Springer-Verlag Berlin Heidelberg 2000

A Duality between Small-Face Problems

45

Heilbronns triangle problem is the following:


Let {P1 , P2 , . . . , Pn } be a set of n points in U , such that the minimum
of the areas of the triangles Pi Pj Pk (for 1 i < j < k n) assumes its
maximum possible value G0 (n). Estimate G0 (n).
Heilbronn conjectured that G0 (n) = O( n12 ). The first nontrivial upper bound
), was given by Roth [6]. Schmidt [9]
(better than O( n1 )), namely, O( 1
n

log log n

improved this result twenty years later and obtained G0 (n) = O( 1


n

log n

). Then

1
1
) [7] and O( n1.117...
) [8]. The
Roth improved the upper bound twice to O( n1.105...
1
1
best currently-known upper bound, G0 (n) = O( n8/7 ) = O( n1.142... ) (for any
> 0), is due to Komlos, Pintz, and Szemeredi [3] by a further refinement of the
method of [7,8]. A simple probabilistic argument by Alon et al. [1, p. 30] proves
os [6, appendix] showed the same lower bound by an
a lower bound of ( n12 ). Erd
example. However, Komlos, Pintz, and Szemeredi [4] show by a rather involved
n
probabilistic construction that G0 (n) = ( log
n2 ). In a companion paper [2] we
show a lower bound for the generalization of Heilbronns triangle problem to
higher dimensions.
In this paper we consider some variants of Heilbronns problem, in which
other measures of triangles defined by triples of points are considered, and/or
some restrictions are imposed on the locations of the points in U . Specifically,
in a monotone decreasing distribution of points, the x-coordinates and the ycoordinates of the points appear in opposite permutations, and a convex monotone decreasing distribution is a monotone decreasing distribution in which the
points form a convex (or concave) chain according to the respective permutation.

The Duality and the Problems

Let A be a narrow arrangement of n lines. We define two measures of triangles.


Let F1 ( ) be the vertical height of a triangle , that is, the maximum length
of a vertical segment contained in . Let F2 ( ) be the area of . Our goal is
to bound F1 (n) = maxA min A F1 ( ) and F2 (n) = maxA min A F2 ( ), where
the maximum is taken over all narrow arrangements A of n lines, and where the
minimum is taken over all triangles formed by triples of lines in A. We use the
superscripts (mon) and (conv) for denoting the monotone decreasing and
the convex monotone decreasing variants, respectively.
Denote by li (resp., ri ) the y-coordinate of the intersection point of the line
`i L with the left (resp., right) vertical side of U . We dualize the line `i
to the point Pi = (li , ri ). This dualization maps the measures F1 and F2 of
lines into measures of triples of points in U . The two optimization problems are
mapped into generalizations of Heilbronns problem, where the difference is in the
definition of the measure of a triple of points. Note that the dual of a transposed
arrangement of lines is a monotone decreasing set of points. The measures G1
and G2 (defined below) crucially rely on the decreasing monotonicity of the

46

Gill Barequet

points. A convex arrangement is an arrangement whose dual set of points lies


in convex position.
It is easy to see that the vertical height of a triangle is the minimum length
of a vertical segment that connects a vertex of the triangle to the line supporting
the opposite edge. This follows from the convexity of a triangle, and indeed that
segment always lies inside the triangle. We now specify (in terms of the dual representation) the vertical distance between the intersection of two lines to a third
line of A (in the primal representation). Refer to Figure 1. The equation of `i is

1
lk

ri

Qi,k
lj
li

Qi,k|j

rj
rk

1
Fig. 1. Vertical distance

y = (ri li )x+ li . We compute the distance between Qi,k = (xi,k , yi,k ), the intersection point of `i and `k , and Qi,k|j = (xi,k , yi,k|j ), the vertical projection of Qi,k
lk ri li rk
k li
on `j . A simple calculation shows that Qi,k = ( (lk lil)(r
,
).
k ri ) (lk li )(rk ri )
r (l l )l (r r )

i
k
.
By substituting xi,k in the equation of `j we find that yi,k|j = j(lkklii)(rj k r
i)
Finally,


ri (lk lj ) rj (lk li ) + rk (lj li )

Dist(Qi,k , Qi,k|j ) = |yi,k yi,k|j | =

(lk li ) + (ri rk )


li ri 1


1

2 lj rj 1


lk rk 1
.
= 4 abs
2((lk li ) + (ri rk ))

The numerator of the last term is the area of the triangle defined by the points
Pi , Pj , and Pk . In case Pi and Pk are in monotone decreasing position, the

A Duality between Small-Face Problems

47

denominator is the perimeter of the axis-aligned box defined by Pi and Pk .


When setting G1 (Pi , Pj , Pk ) = Dist(Qi,k , Qi,k|j ), maximizing the smallest value
of F1 over the triangles defined by triples of lines of A dualizes to maximizing
the smallest value of G1 over triples of points in U . We denote the asymptotic
value by G1 (n) = F1 (n).
We now compute (in the dual representation) the area of the triangle defined
by three lines of A (in the primal representation). Recall that
Qi,j = (xi,j , yi,j ) = (

lj ri li rj
lj li
,
).
(lj li ) (rj ri ) (lj li ) (rj ri )

Tedious computation shows that




xi,j yi,j 1


1
Area(Qi,j , Qj,k , Qk,i ) = abs xj,k yj,k 1
2
xk,i yk,i 1
1
= abs(xj,k yk,i yj,k xk,i xi,j yk,i + yi,j xk,i + xi,j yj,k yi,j xj,k )
2


(li rj lj ri + lk ri li rk + lj rk lk rj )2
1
= abs
2
((lj li ) + (ri rj ))((lk li ) + (ri rk ))((lk lj ) + (rj rk ))


li ri 1 2


1 lj rj 1

2


lk rk 1
.
= 16 abs
2((lj li ) + (ri rj )) 2((lk li ) + (ri rk )) 2((lk lj ) + (rj rk ))
The numerator of the last term is the square of the area of the triangle defined by
the points Pi , Pj , and Pk . In case Pi , Pj , and Pk are in monotone decreasing position, the denominator is the product of the perimeters of the axis-aligned boxes
defined by Pi , Pj , and Pk . When setting G2 (Pi , Pj , Pk ) = Area(Qi,j , Qj,k , Qk,i ),
maximizing the smallest value of F2 over the triangles defined by triples of lines
of A dualizes to maximizing the smallest value of G2 over triples of points in U .
We denote the asymptotic value by G2 (n) = F2 (n).
In summary, we define a duality between narrow arrangements of lines and
distributions of points in the unit square. We define measures of triangles defined
by triples of lines of the arrangements, and find their dual measures of triples
of points. We consider some special structures of the arrangements and their
dual distributions of points. In all cases we look for the arrangement of lines (or
distribution of points) that maximizes the minimum value of the measure over
all triples of lines (or points), and attempt to asymptotically bound this value.

Heilbronns Triangle Problem

As noted in the introduction, the best known lower bound for the original Heiln
os, Pintz, and
bronns triangle problem, G0 (n) = ( log
n2 ), is obtained by Koml
Szemeredi [4]. The same authors obtain in [3] the best known upper bound,
1
).
O( n1.142...

48

Gill Barequet

Unlike the measures G1 and G2 , it is not essential to require the set to be


decreasing in the monotone case. Here we have only an upper bound:
(mon)

Theorem 1. G0

(n) = O( n12 ).

Proof. Refer to the sequence of segments that connect pairs of consecutive


points. The total length of the sequence is at most 2. Cover the whole sequence
of segments by at most n3 squares with side n6 . Thus at least one square contains
three points. The area of the triangle that they define is at most n182 .
For the convex case the bound is tight:
(conv)

Theorem 2. G0

(n) = ( n13 ).

Proof. The lower bound is obtained by a simple example: Put n points equally
spaced on an arc of radius 1 and of length 2 (see Figure 2). The points are

i
sin( 4n
)

ith point

i
cos( 4n
)

Fig. 2. Uniform distribution of points on an arc


ordered from bottom-right to top-left. The coordinates of the ith point are
(cos(2i), sin(2i)), for 1 i n, where = /(4n). The area of the triangle defined by every three consecutive points is 4 cos() sin3 () = ( n13 ).
It is also easy to prove the upper bound. Refer to the sequence of segments
that connect pairs of consecutive points. Drop all the segments of length greater
than 8/n. Since the maximum length of such a convex and monotone chain is 2,
less than n/4 segments are dropped. Now drop all pairs of consecutive segments
whose external angle is greater than 4/n. Since the maximum turning angle of
such a convex chain is /2, less than n/8 pairs are dropped. That is, less than n/4

A Duality between Small-Face Problems

49

segments are now dropped. In total we have dropped less than n/2 segments;
therefore two consecutive segments have not been dropped. The area of the
triangle which these two segments define is upper bounded by 12 ( n8 )2 sin( 4
n ) =
( n13 ).

Vertical Height

Theorem 3. G1 (n) = ( n1 ).
Proof. The lower bound is shown by an example.1 Set li = ni
for 1 i n (a set of almost-parallel lines). In this example

1
ni

and ri =

i
n,



(j i)ni+j (k i)ni+k + (k j)nj+k
,
G1 (Pi , Pj , Pk ) =

nj+1 (nk ni )
which is minimized when i, j, and k are consecutive integers. It is easy to verify
n1
that in this example, for every i, G1 (Pi , Pi+1 , Pi+2 ) = n(n+1)
. Hence G1 (n) =
1
( n ).
For the upper bound we return to the primal representation of the problem
by an arrangement A of n lines. Since A is narrow, there exists a vertical segment
of length 1 which stabs all the n lines. Hence there exists a triple of lines which
2
. Such a triple cannot
are stabbed by a vertical segment of length at most n1
2
define a triangle whose vertical height exceeds n1 , therefore F1 (n) = O( n1 ).
We now refer to transposed arrangements of lines (the dual of monotone
decreasing Heilbronns sets of points). The best upper bound of which we are
aware is Mitchells [5]. Here is a simplified version of the proof of this bound.
Let i denote the slope of `i (for 1 i n). Assume without loss of generality
that at least n/2 lines of L have positive slopes. For the asymptotic analysis we
may assume that all the lines of L are ascending. Denote by h the minimum
vertical height of a triangle in A(L). Then each pair of lines `i , `j L induces
3h2 cos( ) cos( )

i
j
(see Figure 3) through which no other line of
a hexagon of area
4 sin(j i )
L can pass. This is since such a line would form with `i and `j a triangle whose
vertical height is at most h/2. The intersection of every pair of such hexagons is
empty, for otherwise there would be a triangle
whose vertical height is less than

h. Denote by S the total area of the n2 hexagons. On one hand,

S=

X
1i<jn

3h2
3h2 cos(i ) cos(j )

4 sin(j i )
8

X
1i<jn

3h2
1

sin(j i )
8

X
1i<jn

1
,
j i

where we use the facts that 0 < i /4 for 1 i n and sin() < .
1

Note that this construction is monotone and even convex, and yet it beats the O( n12 )
(conv)

upper bound of G1

(n). This is because it is an increasing construction.

50

Gill Barequet

`j
`i
h
2

i
j

Fig. 3. Hexagonal forbidden zones induced by intersection of lines


Lemma 1.

1
1i<jn j i

= (n2 log n).

Proof. Omitted in this short version of the paper.


We thus have S = (h2 n2 log n). On the other hand, the total area of all the
hexagons along one line of L cannot exceed h (the area of a strip of vertical height
h clipped to the unit square). By summing up for all the lines of L we obtain
1
2S hn. The combination of the two inequalities implies that h = O( n log
n ).
(Note that the dropped-segments argument gives in this case a weaker upper
bound of O( n1 ).) Thus we have the following:
(mon)

Theorem 4. G1

1
(n) = O( n log
n ).

Finally we consider convex arrangements (the dual of convex monotone decreasing Heilbronns sets). As with the convex case of the original Heilbronns
triangle problem, the bound in this case is tight:
(conv)

Theorem 5. G1

(n) = ( n12 ).

Proof. For the lower bound we use the same example (points on an arc) as in the
proof of Theorem 2. Clearly, the perimeter of the bounding box of every triangle
defined by three consecutive points in this example is ( n1 ). Since the area of
each such triangle is ( n13 ) we obtain the lower bound. For the upper bound we
follow again the argument of dropping segments. The perimeter of the bounding
box of the triangle defined by the two remaining consecutive segments is linear
in the length s of the longer segment. The quotient of the area of the triangle
1
and s is upper bounded by 12 ( n8 ) sin( 2
n ) = ( n2 ).
(conv)

Table 1 shows a few examples which show the lower bound G1


( n12 ).

(n) =

A Duality between Small-Face Problems


li

ri

i
n

i
n

G1 (Pi , Pj , Pk )

i 2
n

pi

sin( i
) cos( i
) |
n
n

sin(

(ij)
2n

| (ij)(kj) |
n(i+k+n)

j i)( k j)


|
i+ k+ n) n

)sin(

(ik)
2n

)+sin(

(ik)
2n

i )cos( k )sin( i )+sin( k )


cos( 2n
2n
2n
2n

(conv)

Table 1. Convex line arrangements which show that G1

51

(n) = ( n12 )

Area

The function G2 (n) is as high as we like:


Theorem 6. G2 (n) = (f (n)) for any f (n).
Proof. We use the construction li = ni
an arbitrarily large M ). In this example

1
nM i

and ri =

i
n

(for 1 i n and for



[(j i)nM(i+j) (k i)nM(i+k) + (k j)nM(j+k) ]2
,

G2 (Pi , Pj , Pk ) =

2n2 (nMj nMi )(nMk nMi )(nMk nMj )
which is minimized by i = 1, j = 2, and k = 3. In this example G2 (P1 , P2 , P3 ) =
n2(M 1) (nM 1)
.
2nM +1

Set M =

log f (n)
2 log n

+ 1, and the claim follows.

We now refer to transposed arrangements of lines (the dual of monotone


decreasing Heilbronns sets of points).
(mon)

Theorem 7. G2

(n) = O( 1
n

log n

).

Proof. We follow an argument similar to that used in the proof of Theorem 4.


Let again i denote the slope of `i (for 1 i n), and assume without loss of
generality that all the lines of L are ascending. Denote by A the minimum area
of a triangle in A(L). Here the forbidden zone induced by each pair of lines
(refer to Figure 4).
`i , `j L is a rectangle whose diagonal is of length sin(2A
j i )
Indeed, if any other line of L passed through this rectangle, then together with
`i and `j it would form a triangle whose area is less then A/2. The intersection
of every pair of such rectangles is empty, for otherwise there would be a triangle
2A2
. Let
whose area is less than A. The area of the forbidden rectangle is sin(
j i )

again S denote the total area of the n2 forbidden zones. Here we have:
S=

X
1i<jn

2A2
= (A2 n2 log n),
sin(j i )

by using again Lemma 1. Since S 1, we obtain A = O( 1


n

log n

).

52

Gill Barequet

`j
A
sin(j i )

`i

i
j
(mon)

Fig. 4. Forbidden zones for G2

Finally we consider convex arrangements (the dual of convex monotone decreasing Heilbronns sets).
(conv)

Theorem 8. G2

(n) = ( n13 ).

Proof. For the lower bound we use the construction li = ni and ri = 1 ( ni )2


(for 1 i n). A simple calculation shows that in this example




(j i)(k i)(k j)
(conv)
,

(Pi , Pj , Pk ) =
G2
2(i + j + n)(i + k + n)(j + k + n)
whose minimum is easily verified to be ( n13 ).
For the upper bound we follow again the argument of dropping segments.
Then G2 (n) is upper bounded by A2 /xy 2 , where x and y are the lengths of the
two remaining consecutive segments, and A is the area of the triangle spanned
1
by these two segments. But A2 /xy 2 14 ( n8 ) sin2 ( 2
n ) = ( n3 ).

Summary

In this paper we show a relation between small-face problems in arrangements


of lines and Heilbronn-type problems in point sets. We use a duality between the
two classes for obtaining bounds for these problems. We summarize in Table 2
the best bounds that we are aware of. (There is a slight abuse of notation in the
synonyms of G1 and G2 .) Note that every lower (resp., upper) bound trivially
applies for columns on the left (resp., right) of it. We mention such trivial bounds
in square brackets. The main open problem is to obtain tight bounds for some
of the problems.

Acknowledgment
The author wishes to thank Noga Alon (who suggested the dropped-segments
argument) and Micha Sharir for helpful discussions. The original proof that

A Duality between Small-Face Problems

53

Measure
Construction
Arrangement Point
Narrow (Arng.)
Transp. (Arng.) Convex (Arng.)
of Lines
Set
General (Heil.)
Mon. Dec. (Heil.) Conv. Dec. (Heil.)
n
1
G0 : A
( log
),
O(
)
[( n13 )], O( n12 )
( n13 )
2
8/7
n
n
1
1
1
F1 : V.H.
G1 : A/P
( n )
[( n2 )], O( n log n )
( n12 )
2
3
1
1
F2 : Area
G2 : A /P
Unbounded
[( n3 )], O(
)
( n13 )
n

log n

Table 2. Summary of known bounds

(mon)

1
(n) = O( n log
G1
n ) is given in the unpublished manuscript [5]. It inspired the
simplified proof given in this paper with the kind permission of Joseph Mitchell.

References
1. Alon, N., Spencer, J.H.: The Probabilistic Method. John Wiley & Sons, 1992
2. Barequet, G.: A lower bound for Heilbronns triangle problem in d dimensions.
Proc. 10th Ann. ACM-SIAM Symp. on Discrete Algorithms. Baltimore, MD, 76
81, January 1999
3. Koml
os, J., Pintz, J., Szemeredi, E.: On Heilbronns triangle problem. J. London
Mathematical Society (2) 24 (1981) 385396
4. Koml
os, J., Pintz, J., Szemeredi, E.: A lower bound for Heilbronns problem. J.
London Mathematical Society (2) 25 (1982) 1324
5. Mitchell, J.S.B.: On the existence of small faces in arrangements of lines. Manuscript,
Dept. of Applied Mathematics, SUNY Stony Brook, NY, 1995. (available at
http://www.ams.sunysb.edu/~jsbm/publications.html)
6. Roth, K.F.: On a problem of Heilbronn. Proc. London Mathematical Society 26
(1951) 198204
7. Roth, K.F.: On a problem of Heilbronn, II. Proc. London Mathematical Society (3)
25 (1972) 193212
8. Roth, K.F.: On a problem of Heilbronn, III. Proc. London Mathematical Society (3)
25 (1972) 543549
9. Schmidt, W.M.: On a problem of Heilbronn. J. London Mathematical Society (2) 4
(1971) 545550

On Local Transformation of Polygons with


Visibility Properties
Carmen Hernando1 , Michael E. Houle2 , and Ferran Hurtado3
1

Departament de Matem`
atica Aplicada I, Universitat Polit`ecnica de Catalunya
(UPC), Avda. Diagonal 647, 08028 Barcelona, SPAIN
([email protected])
2
Basser Dept. of Computer Science, The University of Sydney, Sydney, NSW 2006,
AUSTRALIA
([email protected])
3
Departament de Matem`
atica Aplicada II, Universitat Polit`ecnica de Catalunya
(UPC), Pau Gargallo 5, 08028 Barcelona, SPAIN
([email protected])
Abstract. One strategy for the enumeration of a class of objects is
local transformation, in which new objects of the class are produced by
means of a small modification of a previously-visited object in the same
class. When local transformation is possible, the operation can be used
to generate objects of the class via random walks, and as the basis for
such optimization heuristics as simulated annealing.
For general simple polygons on fixed point sets, it is still not known
whether the class of polygons on the set is connected via a constant-size
local transformation. In this paper, we exhibit a simple local transformation for which the classes of (weakly) edge-visible and (weakly) externally
visible polygons are connected. The latter class is particularly interesting
as it is the most general polygon class known to be connected under local
transformation.

Introduction

Even for small instances, strategies for combinatorial enumeration must be very
ecient in order to handle the huge numbers of objects which are often produced.
In particular, they must avoid both the excessive recomputation of individual
objects, and the excessive computation of objects which are outside the class
under consideration. One way of limiting the construction of invalid objects is
through the use of local transformation, in which new objects of the class are
generated only from previously-examined objects by means of small changes. The
class must be connected with respect to the local transformation in question: that
is, every valid object must be reachable from some initial valid object by means
of a nite sequence of transformations. Local search and optimization methods
such as reverse search enumeration [1], random walks and simulated annealing
all make use of local transformation to visit new objects.


Partially supported by CUR Gen. Cat. 1999SGR00356 and MEC-DGES-SEUID


PB98-0933

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 5463, 2000.
c Springer-Verlag Berlin Heidelberg 2000


On Local Transformation of Polygons with Visibility Properties

55

Within the discipline of computational geometry, interest in local transformation can be traced back to the investigation of the connectivity of Delaunay triangulations under the diagonal ip operation [12,4]. Recent connectivity results
have been established for triangulations, including triangulations of polygons
[9,10], topological triangulations [3,14], and triangulations in higher dimensions
[11]. Other classes of objects, such as non-crossing trees and Euclidean matchings
have also been studied [5,6].
One class of great importance to computational geometry, but for which
no satisfactory enumeration method is yet known, is that of simple polygons.
Given a set of n points S, one can generate all simple polygons on S by conpossible Hamiltonian circuits of S, and then testing
sidering each of the (n1)!
2
each for self-intersection. However, this approach is hardly practical, as the proportion of circuits which are simple diminishes (at least) exponentially with n.
Zhu, Sundaram, Snoeyink, and Mitchell have provided a method for generating
x-monotone polygons in O(n2 ) time which does not use local transformation;
unfortunately, there is no obvious way of extending this to other classes of polygons.
As in the case of triangulations, if any simple polygon on S could be transformed into any other by means of a nite sequence of local transformations,
then methods such as reverse search enumeration could be applied. The time
complexity of the method would depend heavily on the number of edges modied by the transformation.
1.1

Edge Flips

Let S be a set of n points not all collinear. If two distinct polygons P and P  on
S dier in exactly k edges, then we shall say that P is (edge) k-flippable from P
to P  . Alternatively, we say that P is transformable to P  by means of a k-flip.
The edges of P not contained in P  are called the leaving edges, and the edges
of P  not contained in P are called the entering edges.
Figure 1 gives a characterization of k-ips for k = 2 and k = 3. A few special
cases are worth mentioning:
If the vertices of the internal chain of a 2-ip are collinear (or if the chain
consists of a single edge), the 2-ip is called a line flip (L-ip).
If two leaving edges of a 3-ip share a vertex in common, the ip will be
referred to as a vertex-edge flip (VE-ip).
A ip is called planar if no leaving edge intersects any entering edge, except
perhaps at their endpoints.
Planar ips are of computational interest, in that the entering edges are
edges of the visibility graph of P . Visibility graphs of simple polygons can be
computed in (M ) time, where M is the number of edges of the graph [7]. Using
the visibility graph, all candidate L-ips and planar VE-ips of a given polygon
can be generated in a straightforward manner, in O(M ) time.
In 1991, David Avis posed the following question: can any simple polygon
on S be transformed to any other simple polygon on S by means of a nite

56

Carmen Hernando, Michael E. Houle, and Ferran Hurtado

2- ip

L- ip

b
b

b
b

b
b

Non-planar 3- ip
b

Planar VE- ip
b

b
b
b

Non-planar VE- ip
b

b
b

b
b

b b b b b

b b b b b

Planar 3- ip

b
b

Planar 3- ip
b

b
b

Fig. 1. 2-ips and 3-ips.

Fig. 2. A non-2-ippable, non-VE-ippable polygon.

sequence of 2-ips? Unfortunately, the answer to Avis question turns out to be


no [8]. The 19-vertex polygon shown in Figure 2 cannot be 2-ipped or VEipped to any other polygon on S (although it is 3-ippable). Arbitrarily large
non-2-ippable and non-VE-ippable polygons may be exhibited.
The natural question to ask at this point is, is there any constant k such that
any polygon P on a given set of vertices S can be transformed into any other
polygon P  via a nite sequence of k-ips? For general polygons, the question is
still very much open. In this paper, we show that two of the simplest operations,
namely L-ips and planar VE-ips, together are sucient to connect polygon
classes with certain visibility properties: (weakly) edge-visible and (weakly) externally visible. These polygon classes are formally dened in the next section,
although more information concerning visibility within polygons can be found in
[13]. In Section 3, we prove the connectivity of edge-visible polygons under the
VE-L-flip operation, in which either an L-ip or a planar VE-ip can be performed. The edge-visibility is taken with respect to a xed edge. In Section 4, we
prove the connectivity of general edge-visible polygons, and of externally visible
polygons.

On Local Transformation of Polygons with Visibility Properties

57

Polygon Classes

Let P = (p0 , p1 , p2 , . . . , pn1 ) be a simple polygon in the plane. With respect


to P , points s, t R2 are said to be mutually (clearly) visible if the open line
segment st joining s and t does not intersect P . The visibility is said to be
internal if st lies in the interior of P , and external otherwise.
Let e be an edge of P . P is said to be (weakly) edge-visible from e if for every
point s on P there exists a point t on e that is internally visible from s. One
variant of edge visibility requires that t be in the relative interior of e in such
cases, it is not hard to see that e must be an edge of the convex hull of P . In
this paper, we will assume that e coincides with an edge of the boundary of the
convex hull, but will also consider some cases in which visibility to the endpoints
of e is allowed.
Algorithms for edge-visible polygons tend to be simpler and more ecient
than their counterparts for general simple polygons, due to their special visibility
properties. For example, the most important property for our purposes also
allows edge-visible polygons to be triangulated in linear time, simply by cutting
o convex vertices one by one:
Property 1. [2] Every convex vertex of P other than the endpoints of e is an ear
of P .
Closely related to edge-visible polygons are (weakly) externally visible polygons. A polygon P is (clearly) externally visible if for each point s on the boundary, there exists a ray s originating at s which avoids the interior of P , and
which intersects P only at s. If s is on the boundary of the convex hull of P , this
condition is trivially satised. Otherwise, s must be on some chain of P through
the interior of the hull, with only its endpoints pi and pj on the hull boundary.
Together with the lid segment (pi , pj ), the chain forms what is referred to as
a pocket polygon. As any external ray originating inside the pocket must intersect the lid in order to escape, every pocket of an externally visible polygon is
edge-visible with respect to its lid (see Figure 3).
Two well-known classes of polygons, monotone and shar-shaped, are subclasses of the class of externally visible polygons. Although we have established
connectivity for these classes as well, the details are omitted in this version of
the paper, due to space limitations.

Edge-Visible Polygons

Instead of proving directly that a polygon of a given class can be transformed


into another polygon from the same class, our strategy is to show that it can
always be transformed into a unique canonical polygon K. If this is so, polygon
P could be transformed into another polygon P  by rst transforming P into
K, and then reversing the operations that transform P  into K. Before showing
how this can be done for edge-visible polygons, we present a technical lemma
concerning the visibility of subchains within a polygon.

58

Carmen Hernando, Michael E. Houle, and Ferran Hurtado

pi

pj

Fig. 3. An externally visible polygon.

3.1

Clearly Visible Chains

Let S be a set of n planar points, not all collinear. Let e be an edge of the convex
hull boundary of S, and q be a point on e, such that the endpoints of e are the only
pair of points of S forming a collinearity with q. Let P = (p0 , p1 , p2 , . . . , pn1 )
be an edge-visible polygon on S from e = (p0 , pn1 ), with vertices listed in
clockwise order about the interior.
With respect to q, for 0 < i < m 1, vertex pi is a left cusp if both pii
and pi+1 appear after pi in clockwise angular order about q. If instead both pi1
and pi+1 appear before pi , then pi is a right cusp. The notion of a cusp extends
to polygons which are not edge-visible, and even to polygonal chains, provided
that adjacent vertices are not collinear with q.
The following lemma shows the existence of a chain of P that is entirely
visible from q, and whose endpoints are either endpoints of e or cusps.
Lemma 1. Let P , e and q be as defined above. Then there exist indices 0 a <
b < n such that:
1. every point of subchain (pa , pa+1 , . . . , pb ) is visible from q, with the possible
exceptions of pa if a = 0, and pb if b = n 1;
2. if a > 0, then pa is a left cusp;
3. if b < n 1, then pb is a right cusp.
Proof. Omitted.
3.2

Transformation to a Canonical Polygon

Let us now consider the polygon K q spanning the points of S in such a way that
its vertices appear consecutively in (clockwise) angular order about q. Polygon
K q shall be called the canonical edge-visible polygon on S with respect to q. Note
that K q is uniquely dened, and is simple.
Any edge-visible polygon P on S with visibility to e can be given a score
depending on the visibility of its vertices from q. Every vertex si of P contributes

On Local Transformation of Polygons with Visibility Properties


pc

pc

pj
pa

59

pj
q


pb

pa

pj+1
q


pb

Fig. 4. Searching for a cusp behind chain P , and attempting VE-ip with vertex
Pc .
either 0 or 1 to the score: si contributes 1 if si is an endpoint of e or if si is
visible from q; otherwise, the contribution of si is 0. Every polygon on S with
edge-visibility to e can be scored in this way. It is not hard to see that the
score of the canonical polygon K q is n, and that K q is the only polygon on S
which achieves this maximum score. Also, the minimum possible score is 3: a
contribution of 1 from each endpoint of e, and 1 from that vertex of P closest
to the line containing e (this vertex must be visible from q).
Lemma 2. Let S be a set of n planar points, not all collinear. Let e be an edge
of the convex hull boundary of S, and q be a point on e, such that the endpoints
of e are the only pair of points of S forming a collinearity with q. If P is an
edge-visible polygon spanning S with visibility to e, then P can be transformed
into canonical edge-visible polygon K q via a sequence of at most n3 VE-L-flips.
Proof. Let P be the polygon (p0 , p1 , p2 , . . . , pn1 ), with e = (p0 , pn1 ), and
vertices listed in clockwise order about the interior.
It suces to show that if P = K q , there exists an improving VE-ip; that
is, one which transforms P into another edge-visible polygon P  such that the
score of P  is greater than that of P .
Lemma 1 implies the existence of indices 0 a < b n 1 such that
a = 0 or pa is a left cusp,
b = n 1 or pb is a right cusp, and
P = (pa , pa+1 , . . . , pb ) is entirely visible from q the only possible exceptions being at pa if a = 0, or pb if b = n 1.
The only situation in which a could equal 0 and b could equal n 1 is if P
were the canonical polygon K q . Since by assumption P = K q , either a > 0 or
b < n 1. We will consider only the case where a > 0, as the arguments for the
case where b < n 1 are virtually identical.
Starting from pa , we search for a vertex and edge to participate in a VE-ip,
by performing a radial sweep clockwise about q. As the sweep ray progresses, the
closest intersection points (to q) with both P and P \ P are maintained, the

60

Carmen Hernando, Michael E. Houle, and Ferran Hurtado

rst intersections being on edge (pa , pa+1 ) of P and edge (pa , pa1 ) of P \ P .
Note that the visibility of P to q implies that the chain is radially monotone
with respect to q; that is, any ray from q intersects P in at most one point (see
Figure 4). The sweep continues until a cusp pc of P \ P is encountered. We
claim that this must occur before the sweep ray reaches pb .
Since pc is a cusp, it must be a convex vertex. From the edge-visible property
of P , it must therefore be an ear. Let (pj , pj+1 ) be the edge of P intersected
by the ray through pc , where a j < b. If pc is visible from both pj and pj+1 , a
VE-ip is possible: edges (pc1 , pc ), (pc , pc+1 ) and (pj , pj+1 ) could be replaced
by edges (pc1 , pc+1 ), (pc , pj ) and (pc , pj+1 ). Due to the radial monotonicity of
P with respect to q, the removal of edge (pj , pj+1 ) would result in pc becoming
visible from q. The internal visibility to e and to q of all other vertices would
remain unchanged; the VE-ip would thus yield an edge-visible polygon of higher
score than P . However, it is possible that some part of the polygon interferes
with the visibility from pc to pj+1 (see Figure 4).
If pc is not visible from both pj and pj+1 , we search for an alternative to pc
for the ip with (pj , pj+1 ). Let l be the line segment joining q and pc , and let x
be a point of l between (pj , pj+1 ) and pc . Imagine a second sweep in which the
point x begins on (pj , pj+1 ) and slowly moves along l towards pc . As x moves,
the empty triangular area x bounded by x, pj and pj+1 would grow, until one
or both of its sides comes into contact with at least one vertex of P \ P . Let us
assume that contact occurs along the side (x, pj+1 ) of the triangle; the case in
which the only contact is along (x, pj ) is handled symmetrically.
For contact to occur along (x, pj+1 ), there must exist b < d d < n 1
such that
pi is collinear with (x, pj+1 ) for all d i d ,
pd +1 is not collinear with (x, pj+1 ), and
pi is not collinear with (x, pj+1 ) for all j + 1 < i < d.
There are two cases remaining to be considered.
1. j + 2 < d.
The segment (pj , pd ) passes through the interior of x , and thus pj and pd
are mutually visible. The construction guarantees that pd and pj+1 are also
visible, and that pd is a convex vertex. Here, a VE-ip is possible: edges
(pd1 , pd ), (pd , pd+1 ) and (pj , pj+1 ) could be replaced by edges (pd1 , pd+1 ),
(pd , pj ) and (pd , pj+1 ). By the same arguments as when pc was visible from
pj and pj+1 , the VE-ip would yield an edge-visible polygon of higher score
than P (see Figure 5).
2. j + 2 = d.
The segment (pd , pj ) passes through the interior of x , and thus pd and
pj are mutually visible. The collinearity of (pj+1 , pj+2 , . . . , pd ) and the fact
that pd is a convex vertex together imply that pd +1 and pj+1 are mutually
visible. To see this, consider the polygon that would result if the collinear
chain (pj+1 , pj+2 , . . . , pd ) were replaced by the new edge (pj+1 , pd ). This
resulting polygon would also be edge-visible with respect to e, and pd would

On Local Transformation of Polygons with Visibility Properties

pj

pc

pc

x
pj

pd

p d

pj+1
q


61

pd
pj+1

q


Fig. 5. Two cases: no contact with pj+2 ; contact with pj+2 .


be an ear. Here, an L-ip is possible: edges (pd , pd +1 ) and (pj , pj+1 ) could be
replaced by edges (pj , pd ) and (pj+1 , pd +1 ). With the deletion of (pj , pj+1 ),
each of the vertices (pj+2 , pj+3 , . . . , pd ) would become visible to q without
disturbing the visibility to q of any other vertices. The L-ip would thus
yield an edge-visible polygon of higher score than P (see Figure 5).
It should be observed that as long as no other vertex of P is collinear with
the endpoints of e, it is always possible to choose some point q on e satisfying
the non-collinearity condition of the lemma. The main theorem of this section
follows as an immediate corollary.
Theorem 1. Let S be a set of n planar points, not all collinear. Let P and P 
be edge-visible polygons spanning S, with visibility to a common convex hull edge
e. Then P can be transformed into P  via a sequence of no more than 2n 6
VE-L-flips.

Other Polygon Classes

The methods of the previous section for proving connectivity under the VE-Lip operation of edge-visible polygons can be extended to other classes as well.
The general strategy is the same: dene a score function and a unique canonical
polygon which maximizes it, and then show that there always exists an improving
VE-L-ip for every polygon other than the canonical.
4.1

Externally Visible Polygons

Let point set S, convex hull edge e, and point q on e be dened as in the previous
section. Let h be the number of points of S on the boundary of its convex hull.
The canonical externally visible polygon K q = (k0 , k1 , . . . , kh1 , kh , . . . , kn1 ) is
dened as follows:
the endpoints of e are k0 and kh1 ;
the subchain (k0 , k1 , . . . , kh1 ) of K q spans the points of S on its convex hull
boundary, in counterclockwise order about the interior;

62

Carmen Hernando, Michael E. Houle, and Ferran Hurtado

the subchain (kh , kh+1 , . . . , kn1 ) of K q spans the points of S interior to the
convex hull;
the vertices of subchain (kh1 , . . . , kn1 , k0 ) appear consecutively in clockwise angular order about q.
Again, K q is uniquely dened, and is simple
An externally visible polygon P on S will be scored as follows: vertex si in
the interior of the convex hull of S contributes 1 if si has external visibility to
q; otherwise, if si is not externally visible to q or if si is on the convex hull
boundary, the contribution of s1 is 0. The score of the canonical polygon K q
is n h, and no other externally visible polygon on S achieves this maximum
score. The minimum possible score is 0, occurring whenever e is an edge of P .
The following lemma is a corollary of Lemma 2.
Lemma 3. Let S be a set of n planar points, not all collinear. Let e be an edge
of the convex hull boundary of S, and q be a point on e, such that no pair of
points form a collinearity with q unless they are both collinear with e. If P is an
externally visible polygon spanning S, then P can be transformed into canonical
externally visible polygon K q via a sequence of at most n h VE-L-flips.
Proof. The details have been omitted, as the proof is virtually identical to that
of Lemma 2.
Lemma 3 immediately implies the connectivity result for externally visible
polygons.
Theorem 2. Let S be a set of n planar points, not all collinear. Let P and P 
be externally visible polygons spanning S. Then P can be transformed into P 
via a sequence of no more than 2n 2h VE-L-flips.
4.2

Edge-Visible Polygons with Diering Visibility Edges

Theorem 3. Let S be a set of n planar points, and let S be the subset of S


lying on the boundary of the convex hull of S. Assume that no point s of S is
collinear with any pair of points of S \ {s}. Let P and P  be edge-visible polygons
spanning S, with visibility to convex hull edges e and e , respectively. Then P can
be transformed into P  via a sequence of no more than  h+1
2 (n 3) VE-L-flips,
where h is the cardinality of S .
Proof. Consider the shorter of the two sequences of edges between e and e
along the boundary of the convex hull of S. If both sequences have the same
number of edges, then choose one arbitrarily. Let the chosen sequence be E =
(e1 , e2 , . . . , em ), where e1 = e and em = e . Let the endpoints of ei be (si1 , si )
for all 1 i m.
To transform P into P  , we rst transform P to the canonical edge-visible
polygon K q1 with respect to a point q1 on e1 very close to s1 : q1 is chosen so
that no line passing through a pair of points of S \ {s0 , s1 } separates it from s1 .
This can be done via a sequence of at most n 3 VE-L-ips, by Lemma 2.

On Local Transformation of Polygons with Visibility Properties

63

Since s1 is assumed not to be involved in any collinearity among the points


of S, there exists a point q on e2 from which no line of collinearity separates q1 .
This implies that q and q1 are both visible from every point on the boundary
of K q1 , which in turn implies that K q = K q1 is edge-visible with respect to e2 .
K q can then be transformed into a new canonical edge-visible polygon K q2 for
some point arbitrarily close to s2 , again by Lemma 2.
This process may be continued, choosing points qi on ei suciently close to
si for all 1 i < m. The result, after m 1 applications of Lemma 2, is a
polygon edge-visible with respect to e = em . A nal application of Lemma 2
shows that this polygon can then be transformed to P  .
The total number of ips required is bounded by m(n3). Since E is chosen to
be the smaller of the two sequences available, it is easy to show that m  h+1
2 .
From this, the result follows.

References
1. D. Avis and K. Fukuda, Reverse search for enumeration, Discr. Appl. Math.
65:2146, 1996.
2. D. Avis and G. T. Toussaint, An optimal algorithm for determining the visibility
of a polygon from an edge, IEEE Trans. Comput. C-30:910914, 1981.
3. H. Edelsbrunner and N. R. Shah, Incremental topological flipping works for
regular triangulations, Algorithmica 15:223241, 1996.
4. S. Fortune, Voronoi diagrams and Delaunay triangulations, in Computing in
Euclidean Geometry, D. Z. Du and F. K. Hwang, eds., World Scientific, pp.
193234, 1992.
5. C. Hernando, F. Hurtado, A. M
arquez, M. Mora and M. Noy, Geometric tree
graphs of points in convex position, Discr. Appl. Math. 93:5166, 1999.
6. C. Hernando, F. Hurtado and M. Noy, Graphs of non-crossing matchings, Proc.
15th European Conference on Computational Geometry, pp. 97100, 1999.
7. J. Hershberger, Finding the visibility graph of a simple polygon in time proportional to its size, Algorithmica 4:141155, 1989.
8. M. E. Houle, On local transformations of simple polygons, Australian Comp.
Sci. Commun. 18(3):6471 (Proc. CATS96, Melbourne), 1996.
9. F. Hurtado and M. Noy, Graphs of triangulations of a convex polygon and tree
of triangulations, Comput. Geom. Theory Appl. 13:179188, 1999.
10. F. Hurtado, M. Noy and J. Urrutia, Flipping edges in triangulations, Discr.
Comp. Geom. 22:333346, 1999.
11. B. Joe, Construction of three-dimensional Delaunay triangulations using local
transformations, Computer Aided Geom. Design 8:123142, 1991.
12. C. L. Lawson, Transforming triangulations, Discr. Math. 3:365372, 1972.
13. J. ORourke, Art Gallery Theorems and Algorithms, Oxford University Press,
New York, 1987.
14. M. Pocchiola and G. Vegter, Computing the visibility graph via pseudotriangulations Proc. 11th ACM Symp. Comp. Geom., 1995, pp. 248257.
15. C. Zhu, G. Sundaram, J. Snoeyink, and J. S. B. Mitchell, Generating random
polygons with given vertices, Comput. Geom. Theory Appl. 6:277290, 1996.

Embedding Problems for Paths with Direction


Constrained Edges?
Giuseppe Di Battista, Giuseppe Liotta2 , Anna Lubiw3 , and Sue Whitesides4
1

Dipartimento di Informatica ed Automazione, Universit`


a di Roma Tre, Roma, Italy.
[email protected]
2
Dipartimento di Ingegneria Elettronica e dellInformazione,
Universit`
a di Perugia, Perugia, Italy.
[email protected]
3
Department of Computer Science,
University of Waterloo,Waterloo, Canada.
[email protected]
4
School of Computer Science,
McGill University,Montreal, Canada.
[email protected]

Abstract. We determine the reachability properties of the embeddings


in R3 of a directed path, in the graph theoretic sense, whose edges have
each been assigned a desired direction (East, West, North, South, Up,
or Down) but no length. We ask which points of R3 can be reached by
the terminus of an embedding of such a path, by choosing appropriate
positive lengths for the edges, if the embedded path starts at the origin,
does not intersect itself, and respects the directions assigned to its edges.
This problem arises in the context of extending planar graph embedding
techniques and VLSI rectilinear layout techniques from 2D to 3D. We
give combinatorial characterizations of reachability that yield linear time
recognition and layout algorithms.

Introduction

The shape of a directed, polygonal curve in 3D that consists of n axis-parallel


straight line segments is the sequence of n direction labels East, W est, N orth,
South, U p, or Down determined by the directions of the n segments of the curve.
A shape for a directed, graph theoretic path P is an ordered sequence
of n labels East, W est, N orth, South, U p, or Down, one for each of the n
edges of P . Each label in the sequence specifies a direction for the corresponding
directed edge of P when that edge is realized as a straight line segment in 3D.
?

Research partially supported by operating grants from the Natural Sciences and
Engineering Research Council (NSERC) of Canada, by the project Algorithms for
Large Data Sets: Science and Engineering of the Italian Ministry of University and
Scientific and Technological Research (MURST 40%), and by the project Geometria
Computazionale Robusta con Applicazioni alla Grafica ed a CAD of the Italian
National Research Council (CNR).

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 6473, 2000.
c Springer-Verlag Berlin Heidelberg 2000

Embedding Problems for Paths with Direction Constrained Edges

65

A realization of a graph theoretic directed path P as an orthogonal polygonal


curve in 3D is specified by giving a start point, a shape , and an assignment of
positive lengths to the edges.
Given a point p in 3D and a shape for a directed, graph theoretic path P ,
the 3D shape path reachability problem is to find an assignment (if one exists) of
positive integer lengths to the directed edges of P so that the resulting realization
of P as an orthogonal, polygonal curve
ends at p if it starts at the origin;
is simple, that is, does not intersect itself; and
satisfies the direction constraints on its segments as specified by .
The 3D shape path reachability problem has instances that do not admit
solution. For example, consider a point p that lies East of the origin and the
shape given by the sequence of labels U W DESW N , where U stands for U p,
W stands for W est, and so on. Shape cannot be the shape of any simple, orthogonal, polygonal realization of a path that starts at the origin and terminates
at p, even though contains an E label (see Figure 1).
Up
W
D

West

North
U

East
O

p
South
Down

Fig. 1. No path of shape = U W DESW N can start at the origin O and reach
a point p East of O.
The main result of this paper is a combinatorial characterization of those 3D
shape path reachability problem instances that admit solution, together with
linear time recognition and embedding algorithms based on this characterization.
Various 2D versions of our 3D shape path problem have been studied in
several papers, including [10, 9]. The problem has also been generalized to nonorthogonal polygons and graphs in [11, 4, 7].
A basic technique for 2D orthogonal layout in VLSI and in graph drawing
is to give a shape for a graph, that is, an assignment of direction labels E,

66

Giuseppe Di Battista et al.

W , N , and S to the edges, then to determine lengths for the edges so that the
layout is non-crossing [Vijayan and Widgerson] ( [10]). The graph must have
maximum degree 4. In the VLSI context, each vertex represents either a corner
of a bounding box containing components, or a connection pin on the side of
such a box. The edges at a vertex connect it to its two neighbors (pins or box
corners) on the bounding box and, in the case of a pin vertex, to a pin on another
box.
The well-known topology-shape-metrics approach [3] for constructing a rectilinear embedding of a planar graph consists of three main steps, called planarization, orthogonalization, and compaction. The planarization step determines an
embedding, i.e., the face cycles, for the graph in the plane. The orthogonalization step then specifies for each edge (u, v), an ordered list of the bends that the
orthogonal polygonal line representing (u, v) is to have in the final embedding.
For example, (u, v) could be labeled N ESN E, which would say starting from
u first go North, then go East, etc. Finally, the compaction step computes the
final embedding, giving coordinates to vertices and bends.
While the literature on 3D orthogonal embeddings of graphs is quite rich (see
e.g. [1, 5, 6, 8, 12, 13]), the extension of the topology-shape-metrics approach to
3D remains, as far as we know, to be carried out. The 3D shape path reachability
results we present here are an essential prerequisite for such a program.

Overview of the Main Results

In order to state our characterization result precisely, we introduce the concepts


of a flat and of a canonical sequence in a shape.
Let be a shape. A flat of is a consecutive subsequence 0 of that is
maximal with respect to the property that its labels come from the union of two
oppositely directed pairs of directions, i.e., either from the set {N, S, E, W }, or
from the set {N, S, U, D}, or from the set {U, D, E, W }. Thus any realization of
the shape sequence 0 must consist of segments that lie on the same axis-aligned
plane. For example, the shape = U W DESW N depicted in Figure 1 contains
two flats: F1 = U W DE, and F2 = ESW N . Observe that two consecutive flats
of share a label and that they must be drawn on perpendicular planes. For
example, the last label, E, of F1 coincides with the first label, E, of F2 .
A not necessarily consecutive subsequence , where consists of k
elements, is a canonical sequence provided that:
1 k 3;
any two elements of indicate mutually orthogonal directions; and
the elements of that appear on any given flat of form a possibly empty
consecutive subsequence of .
The type of a canonical sequence is given by the (unordered) set of labels
it contains.
For example, the shape = U W DESW N depicted in Figure 1 contains two
canonical sequences of type {U, N, W }. The first two elements of are a U and a

Embedding Problems for Paths with Direction Constrained Edges

67

W . These elements belong to the same flat, F1 , where they appear consecutively;
they do not belong to F2 . The last element of is an N , which belongs to flat
F2 but not to F1 . Thus the conditions for a canonical sequence of length k = 3
and type {U, N, W } are satisfied by the subsequence of consisting of its first,
second, and last elements. The first, next-to-last, and last elements of form a
second canonical sequence of type {U, N, W }. Note, however, that does not
contain a canonical subsequence of type {U, E, N }: these labels occur in unique
positions in , and in particular, the unique U and the unique E both belong to
the same flat F1 , but they are not consecutive elements of .
The essence of our combinatorial characterization of solvable shape path
reachability problems is given below. For concreteness, the characterization is
given with respect to the U N E octant. As explained in the next section, the
results for other octants can be obtained by a suitable permutation of the labels.
Theorem 1. Let be a shape and let p be a point in the U N E octant. Then
there exists a simple, orthogonal, polygonal curve of shape that starts at the
origin and that terminates at p if and only if contains a canonical sequence of
type {U, N, E}.
In other words, p can be reached, starting from the origin, by a simple polygonal curve of shape if and only if it is possible to choose from a U element,
an N element and an E element, not necessarily in that order, such that if any
flat of contains two of these elements, then the two elements are consecutive
in .

Preliminaries

We regard each coordinate axis in the standard 3D coordinate system as consisting of the origin plus two open semi-axes, directed away from the origin and
labelled with a pair of opposite direction labels from the set {N, W, S, E, U, D}.
A triple XY Z of distinct unordered labels no two of which are opposite defines
the XY Z octant. Note that unless stated otherwise, we consider octants to be
open sets. Similarly, a pair XY of distinct orthogonal labels defines the XY
quadrant in 2D or 3D. Finally, a label X defines the X semi-axis, which consists
of those points that are positive multiples of the unit vector in the X direction.
For short we call a semi-axis an axis. Thus, 3D space is partitioned into eight
octants, twelve quadrants, six axes, and the origin.
Let be a shape consisting of n elements or labels1 . An embedding or drawing
of , denoted as (), is a non-self-intersecting, directed, orthogonal polygonal
curve consisting of n segments such that the k-th segment (k = 1, . . . , n) of
() has positive length and has the orientation specified by the k-th label of
. Unless stated otherwise, we assume that the start of the directed curve ()
lies at the origin of the reference system.
1

Since the elements of a shape sequence have direction labels as values, we often refer
to the elements as labels.

68

Giuseppe Di Battista et al.

Assumptions. Since we are interested in shapes that admit embeddings, we assume from now on that shapes do not contain adjacent labels that are oppositely
directed. Furthermore, we assume that shapes do not contain adjacent labels that
are identical, since the reachability properties of shapes with adjacent, identical
labels are not changed by coalescing such labels. Finally, we assume that the
point p to be reached in an instance of the shape path reachability problem lies
in an octant.
Remark. Let () be a permutation of the six direction labels that maps opposite
pairs of labels to possibly different opposite pairs (for example, might map
N, S, E, W, U, D to E, W, N, S, D, U , respectively). Note that () defines a linear
transformation of 3D space that is not necessarily a rotation. Nevertheless, this
transformation defines a bijection between embeddings of and embeddings of
(). Here, () denotes the sequence of labels obtained by applying to the
labels of . For concreteness, we often state our results and proofs referring
to some given octant, quadrant, or axis where points of embeddings of can
lie. However, the results can also be stated with respect to any other octant,
quadrant, or axis since they are preserved under the () transformation.
Definition. A drawing () of a shape is an expanding drawing if each segment
travels one unit farther in its direction than the extreme points, with respect to
that direction, of the previous segments of ().
Expanding drawings are useful because a new segment of arbitrary length,
perpendicular to the last segment of the drawing, may be appended to the last
segment without causing any collisions. The definition above is a simple, technical way to achieve this property.
Up
E

North

U
N

N
West
U

S E
E

N
D

D
D
East

N
S

W
South
Down

Fig. 2. The expanding drawing for = EN W SEDN U N DSW U N U ED. The


drawing starts at the origin, and each segment travels one unit farther in its
direction than any preceding segment has gone.

Embedding Problems for Paths with Direction Constrained Edges

69

Lemma 1. Every shape admits an expanding drawing.


In the next sections we shall characterize the reachabiity properties of shapes
by means of canonical sequences.

The Shape Path Reachability Problem

We say that a drawing () of a shape reaches point p if () terminates at


p when it starts at the origin. A shape reaches a point p if it admits a drawing
() that reaches p. A shape reaches a set of points if it reaches each point
in the set. For example, shapes N EU , N U E, and N W U E all reach the U N E
octant; that is, for each point of the U N E octant, each of these shapes has a
drawing that terminates at that point.
Lemma 2. Let be a shape. If reaches a point p in an axis, quadrant or
octant, then it reaches that entire axis, quadrant or octant, respectively.
Observe that if a shape reaches the U N E octant, then it must contain a
U label, an N label and an E label. Notice, however, that the converse is not
always true. As previously observed, the shape U W DESW N does not reach the
U N E octant, even though it contains a U label, an E label, and an N label.
In the rest of this section, we investigate the problem of determining whether
a shape can reach a given portion of 2D or 3D space. We distinguish between
shapes that consists of only one flat and shapes that have more than one flat. A
shape of the first type is a 2D shape, while a shape of the second type is a 3D
shape.
4.1

Reachability in 2D

In this section we answer the following question: Given a point p in a quadrant


or on an axis and a 2D shape , can reach p? By Lemma 2, this question
can be answered by characterizing when can reach the quadrant or the axis
containing p.
We start by investigating a special type of reachability. Let () be a drawing
of that reaches the N E quadrant. We say that () reaches the N E quadrant
for the first time with label X if X {N, S, E, W } is the direction associated
with the first segment of () entering the N E quadrant when walking along
() starting at the origin.
Lemma 3. Let () be a drawing of a 2D shape = 0 E such that ()
reaches the N E quadrant for the first time with its last label, E. Then contains
a canonical sequence N E.
Lemma 4. Let = 0 00 be a 2D shape such that 0 reaches the N E quadrant.
Then reaches the N E quadrant.

70

Giuseppe Di Battista et al.

We are now ready to consider the more general problem of quadrant reachability.
Theorem 2. A 2D shape reaches the N E quadrant if and only if contains
a canonical sequence of type {N, E}.
Proof. We prove first that if contains a canonical sequence of type {N, E},
then it reaches the N E quadrant. Let = 1 N E2 , where 1 or 2 may be the
empty string. By Lemma 1, 1 has an expanding drawing (1 ). Extend (1 )
to a drawing for as follows. Append to the terminal point of (1 ) a segment
oriented N that is so long that i) its terminal point projects to the N axis and ii)
the resulting drawing is still an expanding drawing. Because the new drawing is
expanding we can append to its terminal point a segment oriented E that is long
enough to enter the N E quadrant. Thus 1 N E reaches the N E quadrant,
and hence by Lemma 4, so does .
Suppose now that = X1 , . . . , Xn reaches the N E quadrant, and let ()
be a drawing of that terminates at a point in the N E quadrant. Suppose the
first segment of () to intersect the N E quadrant is the ith segment, whose
associated direction is Xi . Let 0 denote the initial sequence X1 , . . . Xi of .
Then () contains a drawing ( 0 ) of 0 . If Xi = E, then by Lemma 3, 0 and
hence contains the consecutive subsequence N E. Similarly, if Xi = N , then
contains the consecutive subsequence EN .
Based on the results above and on Lemma 2 it is possible to design a linear time algorithm for deciding whether a 2D shape can reach a point of a
quadrant.
Theorem 3. Let be a 2D shape, and let p be a point of a quadrant. There
exists a linear time and space algorithm that decides whether reaches p.
4.2

Reachability in 3D

In this section we answer the following question: Given a point p in an octant and
a 3D shape , can reach p? Again, by Lemma 2, this question can answered
by characterizing when can reach a given octant. To this aim, we introduce
the key concept of a doubly expanding drawing. This concept will later be used
for the study of shape path embeddability.
A doubly expanding drawing is one for which the first and last segments can be
replaced by arbitrarily long segments without creating any intersections within
the drawing. Figure 3 shows an example of a doubly expanding drawing.
Lemma 5. Let be a shape with n labels such that it either consists of exactly
two labels or it contains at least two flats. Then has a double expanding drawing
that can be computed in O(n) time.
The next lemma gives a sufficient condition for octant reachability; the proof
(omitted due to space constraints) is based on connecting together singly and
doubly expanding drawings for subsequences of shapes and gives rise to a linear
time embedding algorithm.

Embedding Problems for Paths with Direction Constrained Edges

71

Up
North

E
N
West

W
N

U
N
E

U
N N
W

D
East

S
W

S
South
Down

Fig. 3. A doubly expanding drawing for = W N EN ESW N U N U SW U N EDS.


Lemma 6. Let be a 3D shape that contains a canonical sequence of type
{U, N, E}. Then reaches the U N E octant.
The next lemma proves that the condition of Lemma 6 is also necessary for
octant reachability.
Lemma 7. Let be a 3D shape that reaches the U N E octant. Then contains
a canonical sequence of type {U, N, E}.
Proof. First, we begin by proving a weaker form of this:
If is a 3D shape that can reach the N E quarter-space (i.e., the union of the
U N E octant, the DN E octant, and the N E quadrant), then one can choose
one N and one E in that either are consecutive or do not share a flat.
To prove this, consider a drawing () that reaches the (open) N E quarterspace. Let (a, b) be the first edge of that enters this quarter-space. Suppose
without loss of generality that (a, b) is an E edge. Since this E edge lies in the N
half-space, there must be a previous N edge, (c, d), that enters this half-space.
If the chosen E and N edges do not share a flat, we are done. So assume that
they do share a flat. Let be the N SEW plane containing the flat. Note that
of
b is in the (open) N E quadrant of . We claim that c is in the closure SW
the W quadrant. This is because d, which is in the N half-plane but not in the
quadrant. The portion of from c to b thus
N E quadrant, must lie in the N W
travels to the N E quadrant. By the Lemma 3 one can find a consecutive pair

72

Giuseppe Di Battista et al.

N E or EN in the corresponding portion of . This completes the proof of the


preliminary result.
To obtain a proof of the original statement, consider a drawing () that
reaches the EN U octant. Let (p, q) be the first edge of that enters this octant,
and suppose without loss of generality that (p, q) is a U edge. Since this U edge
lives in the N E quarter-space, there must be a previous edge, (r, s), that enters
this quarter-space. Assume without loss of generality that (r, s) is an N edge.
octant, and r is in the E SD

Note that q is in the EN U octant, s is in the EN D


octant.
The path from the origin to s travels to the EN quarter-space, and thus by
the preliminary result just proved, one can choose in the corresponding portion
of an E and an N that either are consecutive or do not share a flat. The path
from r to q travels to the N U quarter-space, and thus by the preliminary result
above, one can choose in the corresponding portion of an N and a U that are
either consecutive or do not share a flat. Note that the second pair of chosen
labels follows the first pair in , except that the N edge (r, s) may be in both
pairs. If it is, we have what we want.
Now consider the other possibilities. The chosen letters may appear in the
order EN1 N2 U , with the N edge (r, s) in the closed interval from N1 to N2 . We
claim that either N1 and U do not share a flat, or E and N2 do not share a flat,
for if both occurred then all four letters would share a flat. Thus at least one of
N1 or N2 will suffice to establish the lemma.
As a next possibility, the chosen letters may appear in the order N1 EN2 U ,
with the N edge (r, s) in the closed interval from E to N2 . E and U cannot share
a flat, because such a flat would also have to contain N2 , and thus N1 suffices.
The case EN1 U N2 is similarN2 suffices.
The final possibility is that the chosen letters may appear in the order
N1 EU N2 with the N edge (r, s) in the interval from E to U . Because the N
edge intervenes, E and U cannot share a flat, and thus either of N1 or N2 will
suffice.
Lemmas 6 and 7 can be summarized as follows.
Theorem 4. Let be a 3D shape. Shape reaches the U N E octant if and only
if it contains a canonical sequence of type {U, N, E}.
Theorem 4 and Lemma 2 yield a linear time algorithm for deciding whether a
3D shape can reach a point in an octant. Given a point p that can be reached,
the linear time algorithm in the proof of Lemma 6 then gives an embedding that
terminates at p.
Theorem 5. Let be a 3D shape with n labels, and let p be a point of an
octant. There exists an algorithm that decides whether reaches p, that runs in
O(n) time, and that computes an embedding for that reaches p when such an
embedding exists.

Embedding Problems for Paths with Direction Constrained Edges

73

Open Problems

Several issues remain open. We mention three that in our opinion are interesting.
1. Study the reachability problem under the additional constraint that the
lengths of some of the segments are given.
2. Study the reachability problem in the presence of obstacles.
3. Study the reachability problem for paths that must be embedded in a fixed
grid and that are to reach specified points in this grid.
In the case of the last item, it is no longer true that a shape can reach a
point if and only if it can reach all the other points in the same octant. One can
no longer construct a drawing and then scale it so that its terminus is located
at some specified point p, as scaling would move some edges off grid lines. For
drawings in a fixed grid, volume becomes a meaningful issue to study.

References
[1] T. Biedl, T. Shermer, S. Wismath, and S. Whitesides. Orthogonal 3-D graph
drawing. J. Graph Algorithms and Applications, 3(4):6379, 1999.
[2] R. F. Cohen, P. Eades, T. Lin and F. Ruskey. Three-dimensional graph drawing.
Algorithmica , 17(2):199208, 1997.
[3] G. Di Battista, P. Eades, R. Tamassia, and I. Tollis. Graph Drawing. Prentice
Hall, 1999.
[4] G. Di Battista and L. Vismara. Angles of planar triangular graphs. SIAM J.
Discrete Math., 9(3):349359, 1996.
[5] P. Eades, C. Stirk, and S. Whitesides. The techniques of Kolmogorov and Bardzin
for three dimensional orthogonal graph drawings. Inform. Process. Lett., 60:97
103, 1996.
[6] P. Eades, A. Symvonis, and S. Whitesides. Two algorithms for three dimensional
orthogonal graph drawing. In S. North, editor, Graph Drawing (Proc. GD 96),
volume 1190 of Lecture Notes Comput. Sci., pages 139154. Springer-Verlag, 1997.
[7] A. Garg. New results on drawing angle graphs. Comput. Geom. Theory Appl.,
9(12):4382, 1998. Special Issue on Geometric Representations of Graphs, G. Di
Battista and R. Tamassia, editors.
[8] A. Papakostas and I. Tollis. Incremental orthogonal graph drawing in three dimensions. In G. Di Battista, editor, Graph Drawing (Proc. GD 97), volume 1353
of Lecture Notes Comput. Sci., pages 139154. Springer-Verlag, 1997.
[9] R. Tamassia. On embedding a graph in the grid with the minimum number of
bends. SIAM J. Comput., 16(3):421444, 1987.
[10] G. Vijayan and A. Wigderson. Rectilinear graphs and their embeddings. SIAM
J. Comput., 14:355372, 1985.
[11] V. Vijayan. Geometry of planar graphs with angles. In Proc. 2nd Annu. ACM
Sympos. Comput. Geom., pages 116124, 1986.
[12] D. R. Wood. Two-bend three-dimensional orthogonal grid drawing of maximum
degree five graphs. Technical Report 98/03, School of Computer Science and
Software Engineering, Monash University, 1998.
[13] D. R. Wood. An algorithm for three-dimensional orthogonal graph drawing. In
Graph Drawing (Proc. GD 98), volume 1547 of Lecture Notes Comput. Sci., pages
332-346. Springer-Verlag, 1998.

Characterization of Level Non-planar Graphs by


Minimal Patterns
Patrick Healy1 , Ago Kuusik1? , and Sebastian Leipert2
1

Dept. of Comp. Science and Info. Systems, University of Limerick, Ireland


2
Institut f
ur Informatik, Universit
at zu K
oln, Germany

Abstract. In this paper we give a characterization of level planar graphs


in terms of minimal forbidden subgraphs called minimal level non-planar
subgraph patterns (MLNP). We show that a MLNP is completely characterized by either a tree, a level non-planar cycle or a level planar cycle
with certain path augmentations. These characterizations are an important first step towards attacking the N P-hard level planarization problem.

Introduction

Level graphs are an important class of graphs that generalize bipartite graphs.
Such graphs are used to model hierarchical relationships or workflow diagrams.
From the point of view of representing the relationships graphically, it is desirable
that the graphs are drawn with as few edge crossings as possible. J
unger et al. [5]
have presented a linear-time algorithm to determine if a level graph is planar;
this algorithm can be modified to determine a planar embedding of the graph
as well.
Clearly, level graphs that need to be visualized are not level planar in general.
Mutzel [6] therefore studies the level planarization problem for the case k = 2
levels, removing a minimum number of edges such that the resulting subgraph
is level planar. For the final diagram the removed edges are reinserted into a
level planar drawing. However, the level planarization problem is N P-hard [3].
Mutzel [6] gives an integer linear programming formulation for the 2-level planarization problem, studying the polytope associated with the set of all level
planar subgraphs of a level graph with 2 levels.
In order to attack the level planarization problem for k 2 levels, an integer
linear programming formulation has to be found, and the polytope associated
with the set of all level planar subgraphs of a level graph needs to be described.
Besides, polynomial time separation algorithms need to be developed for practical application. One important step in the study of the polytope associated
with the set of all level planar subgraphs is the characterization of level planar
graphs in terms of minimal forbidden subgraphs called minimal level non-planar
subgraph patterns (MLNP-patterns) These graphs are the analogue of K5 and
K3,3 in the case of general graph planarity.
?

Funded by Forbairt Basic Research Grant SC/97/611.

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 7484, 2000.
c Springer-Verlag Berlin Heidelberg 2000

Characterization of Level Non-planar Graphs by Minimal Patterns

75

This paper is organized as follows. After summarizing the necessary preliminaries in the next section, we introduce the minimal level non-planar subgraph
patterns in Sect. 3. We prove that the patterns are minimal level non-planar and
that the set of patterns is complete for the special case of hierarchies. This result
is generalized to level graphs in Sect. 4.

Preliminaries

A level graph G = (V, E, ) is a directed acyclic graph with a mapping : V


{1, 2, . . . , k}, k 1, that partitions the vertex set V as V = V1 V2 Vk ,
Vj = 1 (j), Vi Vj = for i 6= j, such that (v) = (u) + 1 for each edge
(u, v) E.
A drawing of a level graph G in the plane is a level drawing if the vertices
of every Vj , 1 j k, are placed on a horizontal line lj = {(x, k j) | x R},
and every edge (u, v) E, u Vj , v Vj+1 , 1 j < k, is drawn as a straight
line segment between the lines li and li+1 . A level drawing of G is called level
planar if no two edges cross except at common endpoints. A level graph is level
planar if it has a level planar drawing.
A hierarchy is a level graph G(V, E, ) where for every v Vj , j > 1, there
exists at least one edge (w, v) such that w Vj1 . That is, all sources appear
on the first level.
The characterization of level non-planarity by patterns of subgraphs has
been suggested earlier by Di Battista and Nardelli who have identified three
(not necessarily minimal) patterns of level non-planar subgraphs for hierarchies [1]. We call these patterns Level Non-Planar (LNP) patterns. To describe
the LNP patterns, we give some terminology similar to theirs. A path is an
ordered sequence of vertices (v1 , v2 , . . . , vn ), n > 1 such that for each pair
(vi , vi+1 ), i = 1, 2, . . . , n 1 either (vi , vi+1 ) or (vi+1 , vi ) belongs to E. Let
i and j, i < j be two levels of a level graph G = (V, E, ). LACE(i, j) denotes
the set of paths C connecting any two vertices x Vi and y Vj such that
{z C | z Vt , i t j}. If C1 and C2 are completely distinct paths belonging to LACE(i, j) then a bridge is a path connecting vertices x C1 and
y C2 . Vertices x and y are thus called the endpoints of a bridge. The next
theorem gives a characterization of LNP patterns for hierarchies, as opposed to
level graphs.
Theorem 1 (Di Battista and Nardelli). Let G = (V, E, ) be a hierarchy
with k > 1 levels. G is level planar if and only if there is no triple L1 , L2 , L3
LACE(i, j), 0 < i < j k, that satisfies one of the following conditions:
(a) L1 , L2 and L3 are completely disjoint and pairwise connected by bridges.
Bridges do not share a vertex with L1 , L2 and L1 , except in their endpoints
(see Fig. 1(a));
(b) L1 and L2 share an endpoint p and a path C (possibly empty) starting from
p, L1 L3 = L2 L3 = ; there is a bridge b1 between L1 and L3 and a
bridge b2 between L2 and L3 , b1 L2 = b2 L1 = (see Fig. 1(b));

76

Patrick Healy, Ago Kuusik, and Sebastian Leipert

(c) L1 and L2 share an endpoint p and a path C1 (possibly empty) starting from
p; L1 and L3 share an endpoint q (q 6= p) and a path C2 (possibly empty)
starting from q, C2 C1 = ; L2 and L3 are connected by a bridge b, bL1 =
(see Fig. 1(c)).

L1

b1

L2

L3

L1

b2

b3

L2

b2

b1
j
(a)

L3

C1
L2

p
L1
L3

j
(b)

C2

(c)

Fig. 1. Di Battista-Nardellis Level Non-Planar Patterns

Minimal Level Non-planar Patterns in Hierarchies

Di Battista and Nardelli, as we have remarked, have identified three level nonplanar patterns for hierarchies. From the recognition of an LNP pattern in a
hierarchy, one can decide that the hierarchy is not level planar, but one cannot
guarantee that a removal of an edge from the subgraph matching an LNP pattern
leads to the level planarity of the graph.
MLNP patterns are defined to have the following property: If a level graph
G = (V, E, ) matches an MLNP pattern then any subgraph G0 (V, E 0 , ) of G,
with E 0 = E \ {e}, e E, is embeddable without crossings on levels. The MLNP
patterns are divided into three categories: trees, level non-planar cycles, and level
planar cycles with incident paths. We give a comprehensive description of each
of these categories and show that the categories are complete for hierarchies.
The terminology that is used to describe the MLNP patterns is compatible
with Harary [4], except that we denote by a chain a tree T (V, E) where E =
{(v1 , v2 ), (v2 , v3 ), . . . , (v|V |1 , v|V | )}. Furthermore, we define some terms that are
common to all of the patterns. The upper- and lower-most levels that contain
vertices of a pattern P are called extreme levels of P . The extreme levels of a
pattern are not necessarily the same as the extreme levels 1 and k of the input
graph G. If pattern P is instantiated in G as subgraph GP and the uppermost
level of GP in G is i and the lower most level is j (i < j) then the extreme levels
of P correspond to levels i and j in G. If vertex v lies on an extreme level then
we call this extreme level the incident extreme level and the other extreme level
the opposite extreme level of v.

Characterization of Level Non-planar Graphs by Minimal Patterns

3.1

77

Trees

Characterization We can characterize a MLNP tree pattern as follows. Let i and


j be the extreme levels of a pattern and let x denote a root vertex with degree 3
that is located on one of the levels i, . . . , j. From the root vertex emerge 3 subtrees that have the following common properties (see Fig. 2 for an illustration):
each subtree has at least one vertex on both extreme levels;
a subtree is either a chain or it has two branches which are chains;
all the leaf vertices of the subtrees are located on the extreme levels, and if
there is a leaf vertex v of a subtree S on an extreme level l {i, j} then v is
the only vertex of S on the extreme level l;
those subtrees which are chains have one or more non-leaf vertices on the
extreme level opposite to the level of their leaf vertices.
The location of the root vertex distinguishes the two characterizations.
T1 The root vertex x is on an extreme level l {i, j} (see Fig. 2(a)):
at least one of the subtrees is a chain starting from x, going to the
opposite extreme level of x and finishing on xs level;
T2 The root vertex x is on one of the intermediate levels l, i < l < j (see
Fig. 2(b)):
at least one of the subtrees is a chain that starts from the root vertex,
goes to the extreme level i and finishes on the extreme level j;
at least one of the subtrees is a chain that starts from the root vertex,
goes to the extreme level j and finishes on the extreme level i.
a

li

li

b
(a)

lj

lj

(b)

Fig. 2. Minimal Level Non-Planar Trees

Theorem 2. A subgraph matching either of the two tree characterizations T1


or T2 is minimal level non-planar.
Proof. The proof of level non-planarity of T1 and T2 is straightforward by
matching T1 and T2 to the LNP pattern (a).
To prove minimality, we consider the two forms of the tree patterns separately. Consider T1 where the root vertex x and vertices a, v and w of the

78

Patrick Healy, Ago Kuusik, and Sebastian Leipert

chains are located on the same extreme level. Every subtree detached from the
root-vertex x has a level planar layout. Thus if we remove one of the edges incident upon the leaf vertices on the extreme level of the root vertex (like the
vertices v or w in Fig. 2(a)) then the corresponding subtree can be embedded
under the root vertex x and between the other subtrees without any crossings.
If we remove an edge incident upon the leaf vertices near the opposite level of
the root vertex (for example, the path from vertex c to the branching point
in Fig. 2(a)) then the modified subtree can be embedded on top of the chainshaped subtree (according to the characterization there has to be one). Next, if
we remove any other edge, we will have two disconnected subgraphs: one which
contains the root vertex and the other which does not contain the root vertex.
The former is a reduced case of the removal of an edge incident to a leaf vertex
and the other component can be embedded.
In the case T2 when the root vertex is not on an extreme level, we consider
two cases: the removal of an edge connecting the leaf vertex of a chain and the
removal of an edge connecting a leaf vertex of a non-chain subtree. In the former
case, the two chain subtrees can be embedded on top of each other. In the latter
case, the path can be embedded under or on top of a chain by repositioning
either vertices v or u as appropriate. If we remove any other edge then, again,
we will have two disconnected subgraphs from which the subgraph containing
the root vertex is a reduced case of the removal of an edge incident to a leaf
vertex and the other subgraph can be embedded.
The following three lemmas (stated without proof) and theorem prove that
the two tree patterns in our characterization are unique.
Lemma 1. If LNP pattern (a) matches a tree then each one of the paths L1 ,
L2 , L3 contains only one vertex where the bridges are connected.
Lemma 2. If LNP pattern (a) matches a tree then its bridges must form a
subgraph homeomorphic to K1,3 .
Lemma 3. Only LNP pattern (a) can be matched to a tree.
Theorem 3. Let T be a tree. T is level non-planar if and only if it matches
either of the two tree characterizations.
Proof. From the previous lemmas it is possible to derive a level non-planar tree
pattern (not necessarily minimal) from LNP pattern (a) only. Consider a tree
matching pattern (a). If the pattern is bounded by levels i and j, but the vertices
of bridges occur on levels l1 , . . . , l2 , where i < l1 and l2 < j then we can remove all the edges of the paths Li which connect vertices on levels i, . . . , l1 and
l2 , . . . , j without affecting level planarity. Moreover we can narrow the range of
levels l1 , . . . , l2 even more, until both levels l1 and l2 contain at least one vertex
v whose degree in the subgraph bounded by levels l1 and l2 is greater than 1.

Characterization of Level Non-planar Graphs by Minimal Patterns

79

Then, it can be shown that the tree between levels l1 , . . . , l2 is homeomorphic to


one of the MLNP trees. From Lemmas 1 and 2 each of the paths Li has exactly
one vertex ci to connect a bridge and the bridges form a subgraph homeomorphic to K1,3 . Consequently, after narrowing the levels to l1 , . . . , l2 , each of the
new extreme levels l1 , l2 contains at least one of the following:
a root vertex (x);
a vertex of a path from x to ci (ci included).
In the latter case, if the vertex, say d, on level l1 or l2 is not identical to vertices
x or ci , we can remove the part of the upward path Li from the extreme level
of d to the vertex ci . The tree maintains level non-planarity since the path Li of
LNP pattern (a) starts from the vertex d now. After performing this operation
on each path Li , we obtain a tree that matches either of our characterizations.
3.2

Cycles

We now study cycles that are bounded by the extreme levels of the pattern. A
cycle must then contain at least two distinct paths between the extreme levels
having vertices of the extreme levels only in their endpoints. These paths are
called pillars.
Level Non-planar Cycles
Theorem 4. If a cycle has more than two distinct paths connecting the vertices
on the extreme levels of a pattern, it is minimal level non-planar.
Proof. The number of such paths must be even. So, following our assumption
of more than two paths, the number of paths must be at least 4 in a level nonplanar cycle. Without loss of generality, consider the 4-path case first. Let the
extreme levels be i and j. Let us denote a sequence of paths along the cycle
A = (va , . . . , vb ), B = (vb , . . . , vc ), C = (vc , . . . , vd ), D = (vd , . . . , va ), and
va , vc Vi , vb , vd Vj . Consider LNP pattern (c). The paths A, B, C can
be mapped always to the paths L2 , L1 , L3 of the pattern, respectively. The
remaining path D can be then mapped to the bridge in LNP pattern (c). If the
number of paths is greater then 4, the first three paths can be mapped as in the
case of 4 paths, and the remaining paths can be mapped to the bridge.
Such a cycle is minimal since any edge that is removed from a level non-planar
cycle results in a chain that can be drawn as a level planar graph.
Level Planar Cycles Level planar cycles can be augmented by a set of chains
to obtain minimal level non-planarity. First, we give some terminology related
to level planar cycles. A vertex that lies on a pillar is called an outer vertex;
all the remaining vertices are inner vertices. The endpoints of pillars are corner
vertices; if an extreme level i has only one vertex it is called a single corner
vertex. A bridge in the context of a planar cycle is the shortest walk between

80

Patrick Healy, Ago Kuusik, and Sebastian Leipert

corner vertices on the same level; a bridge contains two corner vertices as its
endpoints and the remainder are inner vertices. A pillar is monotonic if, in a
walk of the cycle, the level numbers of subsequent vertices of the pillar are
monotonically increasing or decreasing, depending on the direction of traversal.
We call two paths or chains parallel if they start on the same pillar and end on
the same extreme level. If a chain is connected to a cycle by one of its vertices
having degree 1 (considering only edges of the chain) then this vertex is called
the starting vertex of the chain and the level where this vertex lies, the starting
level. The other vertex of degree 1 of the chain is then the ending vertex and
corresponding level, the ending level.
Characterization Given a level planar cycle whose extreme levels are i and j,
there are four cases to consider where augmentation of the level planar cycle by
paths results in minimal level non-planarity. The pattern cannot contain one of
the tree patterns given earlier. We enumerate these augmenting paths below. In
all cases the paths start at a vertex on the cycle and end on an extreme level.
C1 A single path p1 starting from an inner vertex and ending on the opposite
extreme level of the inner vertex; p1 and the cycle share only one vertex. The
path will have at least one vertex on an extreme level, the end vertex, and
at most two, the start and end vertices. An example of this is illustrated in
Fig. 3 (a);
C2 Two paths p1 and p2 , starting, respectively, from vertices vp1 and vp2 , vp1 6=
vp2 , of the same pillar L = (vi , . . . , vp1 , . . . , vp2 , . . . vj ) terminating on extreme levels j and i, respectively. Vertices vp1 or vp2 may be identical to
corner vertices of L (vp1 = vi or vp2 = vj ) only if the corner vertices are
not single corner vertices on their extreme levels. Paths p1 and p2 do not
have any vertices other than their start (if corner) and end vertices on the
extreme levels. There are two subcases according to the levels of vp1 and vp2 :
(vp1 ) < (vp2 );
(vp1 ) (vp2 ), this means, L must be a non-monotonic pillar.
Figures 3 (b) and (c) illustrate typical subgraphs matching the two subcases,
respectively;
C3 Three paths, p1 , p2 and p3 . Path p1 starts from a single corner vertex and
ends on the opposite extreme level; paths p2 and p3 start from opposite pillars
and end on the extreme level where the single corner vertex is. Neither p2
nor p3 can start from a single corner vertex. Figure 3 (d) illustrates a level
planar cycle augmented by three paths causing level non-planarity;
C4 Four paths, p1 , p2 , p3 and p4 . The cycle comprises a single corner vertex
on each of the extreme levels. Paths p1 and p2 start from different corner
vertices and end on the opposite extreme level to their start with the paths
embedded on either side of the cycle such that they do not intersect; paths
p3 and p4 start from distinct non-corner vertices of the same pillar and finish
on different extreme levels. The level numbers of starting vertices are such
that they do not cause crossing of the last two paths. See Fig. 3 (e) for an
illustration.

Characterization of Level Non-planar Graphs by Minimal Patterns

vi

li

li

vp1
L

p1

vp2
lj

(a)

(b)

p3

p2
p1

lk
ll
lj

vj

vi
p2

vp2

ll
lk

p2
vj

li
(c)

li

p3
p2

p1

p1

p4

lj
(d)

li

L
vp1

li

p2

81

lj

(e)

Fig. 3. Level Planar Cycles with Paths

We will now prove that each of the path-augmented cycles is minimal level
non-planar and, in Theorems 6 to 10, prove that this set is complete for hierarchies.
Theorem 5. Each of the four path-augmented cycles is minimal level nonplanar.
Proof. The augmented cycles are level non-planar because it can be shown that
each can be mapped to one of Di Battista and Nardellis LNP patterns. To
see minimality we consider the three cases of the starting position of the pathaugmentation on the cycle.
Suppose the start vertex is an inner vertex of a cycle. Since no subgraph
matches an MLNP tree, breaking either an edge of the path or an edge of the
cycle yields a level planar embedding.
In case of a path-augmented cycle of type C2, the removal of any edge of the
cycle allows one of the augmenting paths to be embedded through the gap left
by that edge. The removal of any edge of an augmenting path allows that path
to be embedded on the internal face of the cycle. In both cases no crossings will
remain.
For paths starting from corner vertices similar reasoning holds.
Theorem 6. If a minimal level non-planar graph G comprises a level planar
cycle and a single path p1 connected to the cycle, then p1 starts from an inner
vertex of the cycle and ends on the opposite extreme level.
Proof. For a path to cause level non-planarity, the path must start from an inner
vertex of the cycle. Otherwise, the path can be embedded on the external face.

82

Patrick Healy, Ago Kuusik, and Sebastian Leipert

There are only two possibilities for causing level non-planarity: crossing with
the incident bridge or, crossing with the opposite bridge. In the former, the path
in combination with the lower part of the cycle forms a level non-planar tree.
Since this level non-planar tree is minimal, the combination of the cycle and the
path is not minimal. Therefore, the latter is the only remaining minimal level
non-planar case.
Theorem 7. If a minimal level non-planar graph G comprises a level planar
cycle and two paths p1 and p2 connected to the cycle, then p1 and p2 start from
the same pillar and end on an extreme level and either they cross or they start
from a non-monotonic sub-chain of the pillar.
Proof. Neither of the two paths may start from an inner vertex of the cycle because otherwise either they can be embedded on the internal face, or at least one
of them matches type C1 above, or they form a level non-planar tree. Since the
latter two cases are not minimal both paths must start from a pillar. Moreover,
they must start from the same pillar, otherwise, the paths can be both embedded
on the external face. The paths must finish on extreme levels, otherwise they
can be embedded on the internal face. Moreover, the extreme levels must be
different for if they are the same, the pattern although it can be made level
non-planar by introducing non-monotonic paths and a non-monotonic pillar
will not be minimal since it can be shown to match a minimal level non-planar
tree pattern. If the extreme levels are different, then either the paths cross or
there is a non-monotonic pillar that causes a crossing of the cycle and a path.
Theorem 8. If a minimal level non-planar graph G comprises a level planar
cycle and three paths p1 , p2 and p3 connected to the cycle, then G has a single
corner vertex c1 with p1 starting at c1 and extending to the opposite extreme
level and p2 and p3 starting on opposite pillars and ending on the extreme level
that contains c1 .
Proof. As in the case of two paths, none of the paths may start from an inner
vertex. Hence, all the paths should start from pillars. Additionally, all the paths
must end on extreme levels, otherwise, they can be embedded on the internal
face. No pair of paths can create minimal level non-planarity of the type C2
above. These conditions are met if one of the paths starts from a single corner
vertex. If there were no other paths, the path starting from the single corner could
be embedded on the external face on both sides of the cycle. However, if we have
two paths starting from different pillars, not from a single corner vertex, and
ending on the extreme level of the single corner vertex, a level planar embedding
is not possible.
Theorem 9. If a minimal level non-planar graph G comprises a level planar
cycle and four paths p1 , . . . , p4 connected to the cycle, then G has two single
corner vertices c1 and c2 with p1 starting at c1 and extending to the opposite

Characterization of Level Non-planar Graphs by Minimal Patterns

83

extreme level of c1 , p2 starting at c2 and extending to the opposite extreme level


of c2 , and p3 and p4 starting on the same pillar and diverging to end on opposite
extreme levels such that they do not cross.
Proof. This is proved analogously to the previous theorem, considering two corner vertices instead of one.
Theorem 10. If a level non-planar graph G comprises a level planar cycle and
five or more path augmentations that extend to extreme levels, then G cannot be
minimal level non-planar.
Proof. A level non-planar pattern with two parallel paths cannot be minimal
(since any path that crosses one will cross both or one of the parallel paths is
redundant) unless one of the parallel paths can be embedded on the other side
of the cycle, in which case this path starts from a single corner vertex.
Suppose we have a minimal level non-planar graph comprising a level planar
cycle and five path augmentations extending to extreme levels. Since removing
any edge from a minimal level non-planar graph makes it planar, there must
be four non-crossing paths. This can be achieved only by having on each pillar
either two diverging paths ending on opposite extreme levels or, parallel paths
where one pair of paths starts out from a single corner vertex. In neither case is
it possible to add a fifth path so that minimal level non-planarity holds.
3.3

Minimal Level Non-planar Subgraphs in Hierarchies

Having shown that our characterizations of trees, level non-planar cycles and
path-augmented cycles are minimally level non-planar, it only remains for us
now to show that this set is a complete characterization of minimal level nonplanar subgraphs.
Theorem 11. The set of MLNP patterns characterized in sections 3.1, 3.2, and
3.2 is complete for hierarchies.
Proof. Every graph comprises either a tree, or one, or more, cycles. It remains to
prove that there is no MLNP pattern containing more than one cycle. Suppose
a graph is MLNP and it has more than one cycle. Then it must be a subcase of
one of Di Battista and Nardellis LNP patterns. Each of these, however, has at
most one single cycle and the remainder of the patterns comprises chains. Then
at least one of our cycles must be broken in order to match it to a chain, thus
contradicting the hypothesis.

Minimal Level Non-planar Subgraphs in Level Graphs

We have given in the previous section a characterization of level planar hierarchies in terms of minimal forbidden subgraphs. It remains to show that the
described patterns characterize level planarity for general level graphs as well.

84

Patrick Healy, Ago Kuusik, and Sebastian Leipert

Theorem 12. Let G = (V, E, ) be a level graph with k > 1 levels. Then G is
not level planar if, and only if it contains one of the MLNP patterns as described
in sections 3.1, 3.2, and 3.2.
Proof. If a subgraph Gp of G corresponds to an MLNP pattern, then G must be
non level planar.
It remains to proof the opposite direction. Suppose there exists a minimal
pattern P of non level planarity that is not applicable for hierarchies. Let G be
a level graph such that P is the only pattern of non level planarity in G.
Since G is not level planar, augmenting the graph by an incoming edge for
every source preserving the leveling in the graph constructs a non level planar
hierarchy H = (V, E EH , ), where EH is the set of all extra added edges.
Let P be the set of all subgraphs of H corresponding to a MLNP pattern. By
assumption, we have for any Gp P, Gp = (Vp , Ep , ) that there exists an edge
ep Ep EH . Removing for every Gp P the edge ep from H, we construct a
level planar graph H 0 . By construction, H 0 contains G as a subgraph. Since every
subgraph of a level planar graph must be level planar itself, this contradicts G
being a non level planar subgraph.

Conclusion

We have given a characterization of level planar graphs in terms of minimal


forbidden subgraphs. This description of level planarity is a main contribution for
solving the N P-hard level planarization problem for practical instances. Based
on the characterization of level planar graphs an integer linear programming
formulation for the level planarization problem can be given, allowing to study
the associated polytope in order to develop an efficient branch-and-cut approach.

References
[1] G. Di Battista and E. Nardelli. Hierarchies and planarity theory. IEEE Transactions on Systems, Man, and Cybernetics, 18(6):10351046, 1988.
[2] P. Eades, B. D. McKay, and N. C. Wormald. On an edge crossing problem. In Proc.
9th Australian Computer Science Conference, pages 327334. Australian National
University, 1986.
[3] P. Eades and S. Whitesides. Drawing graphs in two layers. Theoretical Computer
Science, 131:361374, 1994.
[4] F. Harary. Graph Theory. Addison-Wesley, 1969.
[5] M. J
unger, S. Leipert, and P. Mutzel. Level planarity testing in linear time. Technical Report 98.321, Institut f
ur Informatik, Universit
at zu K
oln, 1998.
[6] P. Mutzel. An alternative method to crossing minimization on hierarchical graphs.
In Stephen North, editor, Graph Drawing. Symposium on Graph Drawing, GD 96,
volume 1190 of Lecture Notes in Computer Science, pages 318333. Springer-Verlag,
1996.

Rectangular Drawings of Plane Graphs


Without Designated Corners
(Extended Abstract)
Md. Saidur Rahman1 , Shin-ichi Nakano2 , and Takao Nishizeki3
1

2
3

Department of Computer Science and Engineering, Bangladesh University of


Engineering and Technology, Dhaka-100, Bangladesh.
[email protected]
Department of Computer Science, Gunma University, Kiryu 376-8515, Japan.
[email protected]
Graduate School of Information Sciences, Tohoku University, Aoba-yama 05,
Sendai 980-8579, Japan.
[email protected]

Abstract. A rectangular drawing of a plane graph G is a drawing of


G such that each vertex is drawn as a point, each edge is drawn as a
horizontal or a vertical line segment, and the contour of each face is drawn
as a rectangle. A necessary and sufficient condition for the existence of
a rectangular drawing has been known only for the case where exactly
four vertices of degree 2 are designated as corners in a given plane graph
G. In this paper we establish a necessary and sufficient condition for the
existence of a rectangular drawing of G for the general case in which no
vertices are designated as corners. We also give a linear-time algorithm
to find a rectangular drawing of G if it exists.

Key words: Graph, Algorithm, Graph Drawing, Rectangular Drawing.

Introduction

Recently automatic drawings of graphs have created intense interest due to their
broad applications, and as a consequence, a number of drawing styles and corresponding drawing algorithms have come out [DETT99]. Among different drawing
styles a rectangular drawing has attracted much attention due to its applications in VLSI floorplanning and architectural floorplanning [BS88, H93, H95,
KH97, KK84, L90, RNN98]. A rectangular drawing of a plane graph G is a
drawing of G in which each vertex is drawn as a point, each edge is drawn as
a horizontal or a vertical line segment, and the contour of each face is drawn
as a rectangle. Note that in a rectangular drawing of a plane graph G the contour of the outer face of G is also drawn as a rectangle. Fig. 1(d) illustrates a
rectangular drawing of the graph in Fig. 1(c). Clearly not every plane graph has
a rectangular drawing. For example the graph in Fig. 1(e) has no rectangular
drawing.
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 8594, 2000.
c Springer-Verlag Berlin Heidelberg 2000

86

Md. Saidur Rahman, Shin-ichi Nakano, and Takao Nishizeki


3

3
2

13

11

16
12

10

11

12

13

2
14

15

14

11

16 15

12

10

10

17

(a)
(b)
a

13

11

13

14

12 16 15

(c)
3

14

16 15

17

10

5
7

17

13

14
1

11

12

16 15

5
17

10

17

7
8

(d)

6
c

(f)
(e)

Fig. 1. (a) Interconnection graph, (b) dual-like graph, (c) good designation of
corners, (d) rectangular drawing, (e) bad designation of corners, and (f) 2-3
plane graph.

In a VLSI floorplanning problem, the interconnection among modules is usually represented by a plane graph, every inner face of which is triangulated.
Fig. 1(a) illustrates such an interconnection graph of 17 modules. The dual-like
graph of an interconnection graph is a cubic graph in which every vertex has
degree 3 [L90]. Fig. 1(b) illustrates a dual-like graph of the graph in Fig. 1(a),
which has 17 inner faces. Inserting four vertices a, b, c and d of degree 2 in appropriate edges on the outer face contour of the dual-like graph as illustrated
in Fig. 1(c), one wishes to find a rectangular drawing of the resulting graph as
illustrated in Fig. 1(d). If there is a rectangular drawing, it yields a floorplan of
modules. Each vertex of degree 2 is a corner of the rectangle corresponding to
the outer rectangle. Thomassen [T84] gave a necessary and sufficient condition
for such a plane graph with exactly four vertices of degree 2 to have a rectangular drawing. Linear-time algorithms are given in [BS88, H93, KH97, RNN98] to
obtain a rectangular drawing of such a plane graph, if it exists. However, it has
not been known how to appropriately insert four vertices of degree 2 as corners.
If four vertices a, b, c and d of degree 2 are inserted in edges as in Fig. 1(e), then
the resulting graph has no rectangular drawing.

Rectangular Drawings of Plane Graphs Without Designated Corners

87

In this paper we assume that four or more vertices of degree 2 have been
inserted to all edges that may be drawn as edges incident to corners in a rectangular drawing; for example, insert one or two vertices of degree 2 to each edge
on the outer contour. Thus we consider a plane connected graph G in which
every vertex on the outer contour has degree 2 or 3, every vertex not on the
outer contour has degree 3, and there are four or more vertices of degree 2 on
the outer contour. We call such a graph a 2-3 plane graph. (See Fig. 1(f).) We do
not assume that four vertices of degree 2 are designated as corners in advance.
We give a necessary and sufficient condition for such a 2-3 plane graph G to have
a rectangular drawing, and give a linear-time algorithm to find appropriate four
vertices of degree 2 and obtain a rectangular drawing of G with these vertices
as corners.
The rest of the paper is organized as follows. Section 2 describes some definitions and presents preliminary results. Section 3 presents our main result on
rectangular drawing. Finally, Section 4 concludes with an open problem.

Preliminaries

In this section we give some definitions and present preliminary results.


Let G be a connected simple graph. We denote the set of vertices of G by
V (G), and the set of edges of G by E(G). The degree of a vertex v is the number
of neighbors of v in G. We denote the maximum degree of a graph G by .
A graph is planar if it can be embedded in the plane so that no two edges
intersect geometrically except at a vertex to which they are both incident. A
plane graph is a planar graph with a fixed embedding. A plane graph divides the
plane into connected regions called faces. We regard the contour of a face as a
clockwise cycle formed by the edges on the boundary of the face. We denote the
contour of the outer face of graph G by Co (G). We call a vertex not on Co (G)
an inner vertex of G.
For a simple cycle C in a plane graph G, we denote by G(C) the plane
subgraph of G inside C (including C). An edge of G which is incident to exactly
one vertex of a simple cycle C and located outside C is called a leg of the cycle
C. The vertex of C to which a leg is incident is called a leg-vertex of C. A simple
cycle C in G is called a k-legged cycle of G if C has exactly k legs in G. A k-legged
cycle C is a minimal k-legged cycle if G(C) does not contain any other k-legged
cycle of G. We say that cycles C and C 0 in a plane graph G are independent if
G(C) and G(C 0 ) have no common vertex. A set S of cycles is independent if any
pair of cycles in S are independent.
A rectangular drawing of a plane graph G is a drawing of G such that each
edge is drawn as a horizontal or a vertical line segment, and each face is drawn
as a rectangle. In a rectangular drawing of G, the contour Co (G) of the outer
face is drawn as a rectangle and hence has four convex corners. Such a corner is
called a corner of the rectangular drawing. Since a rectangular drawing D of G
has no bend and each edge is drawn as a horizontal or a vertical line segment,
only a vertex of degree 2 of G can be drawn as a corner of D. Therefore, a graph

88

Md. Saidur Rahman, Shin-ichi Nakano, and Takao Nishizeki

with less than four vertices of degree 2 on Co (G) has no rectangular drawing.
Thus we consider a 2-3 plane graph G in which four or more vertices on Co (G)
have degree 2 and all other vertices have degree 3. We call a vertex of degree 2
in G that is drawn as a corner of D a corner vertex.
The following result on rectangular drawings is known [T84, RNN98].
Lemma 1. Let G be a 2-3 plane graph. Assume that four vertices of degree 2
are designated as corners. Then G has a rectangular drawing if and only if G
satisfies the following three conditions [T84]: (c1) G has no 1-legged cycles; (c2)
every 2-legged cycle in G contains at least two designated vertices; and (c3) every
3-legged cycle in G contains at least one designated vertex. Furthermore one can
check in linear time whether G satisfies the conditions above, and if G does then
2
one can find a rectangular drawing of G in linear time [RNN98].
It is rather difficult to determine whether a 2-3 plane graph G has a rectangular drawing unless four vertices of degree 2 are designated as corners. Considering
all combinations of four vertices of degree 2 as corners and applying the algorithm
in Lemma 1 for each of the combinations, one can determine whether G has a
rectangular drawing. Such a straightforward method requires time O(n5 ) since
there are O(n4 ) combinations, and one can determine in linear time whether G
has a rectangular drawing for each combination. In the next section we obtain
a necessary and sufficient condition for G to have a rectangular drawing for the
general case in which no vertices of degree 2 are designated as corners. The
condition leads to a linear-time algorithm.

Rectangular Drawings Without Designated Corners

The following theorem is our main result on rectangular drawings.


Theorem 2. A 2-3 plane graph G has a rectangular drawing if and only if G
satisfies the following four conditions:
(1)
(2)
(3)
(4)

G has no 1-legged cycle;


every 2-legged cycle in G contains at least two vertices of degree 2;
every 3-legged cycle in G contains at least one vertex of degree 2; and
if an independent set S of cycles in G consists of c2 2-legged cycles and c3
3-legged cycles, then 2c2 + c3 4.
2
Before proving Theorem 2, we observe the following fact.

Fact 3 In any rectangular drawing D of G, every 2-legged cycle of G contains


at least two corners, every 3-legged cycle of G contains at least one corner, and
2
every cycle with four or more legs may contain no corner.

Rectangular Drawings of Plane Graphs Without Designated Corners

89

We now prove the necessity of Theorem 2.


Necessity of Theorem 2. Assume that G has a rectangular drawing D. Then
G has no 1-legged cycle, since the face surrounding a 1-legged cycle cannot be
drawn as a rectangle in D. By Fact 3 every 2-legged cycle in D contains at least
two corners and every 3-legged cycle in D contains at least one corner. Since a
corner is a vertex of degree 2, every 2-legged cycle in G must have at least two
vertices of degree 2 and every 3-legged cycle must have at least one vertex of
degree 2.
Let an independent set S consist of c2 2-legged cycles and c3 3-legged cycles
in G. Then by Fact 3 each of the c2 2-legged cycles in S contains at least two
corners, and each of the c3 3-legged cycle in S contains at least one corner. Since
all cycles in S are independent, they are vertex-disjoint each other. Therefore
there are at least 2c2 + c3 corners in D. Since there are exactly four corners in
2
D, we have 2c2 + c3 4.
In the rest of this section we give a constructive proof for the sufficiency of
Theorem 2, and show that the proof leads to a linear-time algorithm for finding
a rectangular drawing of G if it exists.
We first give some definitions. For a graph G and a set V 0 V (G), G V 0
denotes a graph obtained from G by deleting all vertices in V 0 together with
all edges incident to them. For a plane graph G, we define a Co (G)-component
as follows. A subgraph F of G is a Co (G)-component if F consists of a single
edge which is not in Co (G) and both ends of which are in Co (G). The graph
G V (Co (G)) may have a connected component. Add to such a component all
edges of G, each joining a vertex in the component and a vertex in Co (G). The
resulting subgraph F of G is a Co (G)-component, too. All these subgraphs F of
G and only these are the Co (G)-components.
Let {v1 , v2 , , vp1 , vp }, p 3, be a set of three or more consecutive vertices
on Co (G) such that the degrees of the first vertex v1 and the last vertex vp are
exactly three and the degrees of all intermediate vertices v2 , v3 , , vp1 are two.
Then we call the set {v2 , v3 , , vp1 } a chain of G, and we call vertices v1 and
vp the ends of the chain. Every vertex of degree 2 in G is contained in exactly
one chain. A chain in G corresponds to an edge of the dual-like graph of an
interconnection graph into which vertices of degree 2 have been inserted. Two
chains are consecutive if they have a common end. We now have the following
lemmas.
Lemma 4. Let G be a 2-3 plane graph, and let k be the number of vertices of
degree 3 on Co (G). If a Co (G)-component F contains a cycle, then F contains
2
a cycle with k or less legs.

Lemma 5. Assume that a 2-3 plane graph G satisfies the four conditions in
Theorem 2, and that G has at most three vertices of degree 3 on Co (G). Then G
has a rectangular drawing.

90

Md. Saidur Rahman, Shin-ichi Nakano, and Takao Nishizeki

Proof. If G is a cycle, then clearly G has a rectangular drawing. Therefore we


may assume that G has at least one vertex of degree 3 on Co (G). If G had exactly
one vertex of degree 3 on Co (G), then G would have a 1-legged cycle or a vertex
of degree 1, contrary to the assumption that G is a 2-3 plane graph satisfying
the conditions in Theorem 2. Thus G has either two or three vertices of degree
3 on Co (G), and hence there are the following two cases to consider.
Case 1: G has exactly two vertices of degree 3 on Co (G).
In this case G has exactly one Co (G)-component F . We now claim that F is
a graph of a single edge. Otherwise, F has a cycle, and then by Lemma 4 F has
a 2-legged cycle, but the 2-legged cycle contains no vertex of degree 2, contrary
to the assumption that G satisfies Condition (2).
Clearly the ends of the edge in F are the two vertices of degree 3 on Co (G).
Since G is a simple graph, the two vertices divide Co (G) into two chains of G.
Furthermore, G has two 2-legged cycles C1 and C2 as indicated by dotted lines
in Fig. 4(a). Since G satisfies Condition (2), each of C1 and C2 contains at least
two vertices of degree 2. We arbitrarily choose two vertices of degree 2 on each
of C1 and C2 as corner vertices. Then we can find a rectangular drawing of G
as illustrated in Fig. 2(b).
C2

C1

c
d

G
(a)

(b)

Fig. 2. Illustration for Case 1.


Case 2: G has exactly three vertices of degree 3 on Co (G).
In this case G has exactly one Co (G)-component F . The Co (G)-component F
has no cycle; otherwise, by Lemma 4 G would have a 2-legged or 3-legged cycle
containing no vertex of degree 2, contrary to the assumption that G satisfies
Conditions (2) and (3). Therefore, F is a tree, and has exactly one vertex of
degree 3 not on Co (G). Thus G is a subdivision of a complete graph K4 of four
vertices, and has three 3-legged cycles C1 , C2 and C3 as indicated by dotted lines
in Fig. 3(a). Since G satisfies Condition (3), each 3-legged cycle contains at least
one vertex of degree 2. We choose four vertices of degree 2; one vertex of degree
2 on each of the three 3-legged cycles, and one vertex of degree 2 arbitrarily. We
2
then obtain a rectangular drawing D of G as illustrated in Fig. 3(b).
By Lemma 5 we may assume that G has four or more vertices of degree 3 on
Co (G). We now have the following lemmas.

Rectangular Drawings of Plane Graphs Without Designated Corners


b

C2

91

C1
a

b
d

G
(a)

C3

(b)

Fig. 3. Illustration for Case 2.

Lemma 6. Assume that a 2-3 plane graph G satisfies the four conditions in
Theorem 2, that G has four or more vertices of degree 3 on Co (G), and that
there is exactly one Co (G)-component. Then the following (a)-(d) hold:
(a) for any 2-legged cycle C, at most one chain of G is not on C;
(b) one can choose four vertices of degree 2 in a way that at most two of them
are chosen from any chain and at most three are chosen from any pair of
consecutive chains;
(c) G has a 3-legged cycle; and
(d) if G has two or more independent 3-legged cycles, then the set of all minimal
2
3-legged cycles in G is independent.
Lemma 7. If a 2-3 plane graph G has two or more Co (G)-components, then G
2
has a pair of independent 2-legged cycle.
We are now ready to prove the following lemma.
Lemma 8. Assume that a 2-3 plane graph G satisfies the four conditions in
Theorem 2, and that Co (G) has four or more vertices of degree 3. Then G has
a rectangular drawing.
Proof. We shall consider the following two cases depending on the number of
Co (G)-components.
Case 1: G has exactly one Co (G)-component.
By Lemma 6(c) G has a 3-legged cycle. We shall consider the following two
subcases depending on whether G has a pair of independent 3-legged cycles or
not.
Subcase 1a: G has no pair of independent 3-legged cycle.
By Lemma 6(b) we can designate four vertices of degree 2 as corners in a way
that at most two of them are chosen from any chain and at most three are chosen
from any pair of consecutive chains of G. By Lemma 1 it suffices to show that
G satisfies the three conditions (c1)-(c3) regarding the four designated vertices.

92

Md. Saidur Rahman, Shin-ichi Nakano, and Takao Nishizeki

Since G satisfies Condition (1) in Theorem 2, G has no 1-legged cycle and


hence satisfies (c1).
We now claim that G satisfies (c2), that is, any 2-legged cycle C in G contains
at least two designated vertices. By Lemma 6(a) at most one chain of G is not
on C. Since any chain contains at most two of the four designated vertices, C
must contain at least two of them.
We then claim that G satisfies (c3), that is, every 3-legged cycle C in G
has at least one designated vertex. By Condition (3) C has a vertex of degree
2. Therefore exactly two of the three legs of C lie on Co (G). Let x and y be
the leg-vertices of these two legs, respectively. Let P be the path on Co (G)
starting at x and ending at y without passing through any edge on C. Then
P contains at most two chains; otherwise, either G would have more than one
Co (G)-components or G would have a pair of independent 3-legged cycles, a
contradiction. Furthermore, if P contains exactly one chain then it contains at
most two designated vertices, and if P contains exactly two chains then they are
consecutive and contain at most three designated vertices. Hence, in either case,
C contains at least one of the four designated vertices.
Subcase 1b: G has a pair of independent 3-legged cycles.
Let M be the set of all minimal 3-legged cycles in G. By Lemma 6(d) M is
independent. Let k = |M|, then clearly 2 k and k 4 by Condition (4). For
each 3-legged cycle Cm in M, we arbitrarily choose a vertex of degree 2 on Cm .
If k < 4, we arbitrarily choose 4 k vertices of degree 2 on Co (G) which are not
chosen so far in a way that at most two vertices are chosen from any chain. This
can be done because G has four or more vertices of degree 2 and every 2-legged
cycle has two or more vertices of degree 2. Thus we have chosen exactly four
vertices of degree 2, and we regard them as the four designated corner vertices.
In Fig. 4(a) four vertices a, b, c and d of degree 2 are chosen as the designated
corner vertices; vertices a, c and d are chosen on three independent minimal 3legged cycles indicated by dotted lines, whereas vertex b is chosen arbitrarily
on Co (G). By Lemma 1 it suffices to show that G satisfies the conditions (c1)(c3) regarding the four designated vertices. We can indeed prove that G satisfies
Conditions (c1)-(c3) regarding the four designated vertices. The detail is omitted
in this extended abstract.
Case 2: G has two or more Co (G)-components.
In this case by Lemma 7 G has a pair of independent 2-legged cycles, C1
and C2 . One may assume that both C1 and C2 are minimal 2-legged cycles. By
Condition (4) at most two 2-legged cycles of G are independent. Therefore, for
any other 2-legged cycle C 0 (6= C1 , C2 ), G(C 0 ) contains either C1 or C2 .
Let ki , i = 1 and 2, be the number of all minimal (not always independent)
3-legged cycles in G(Ci ). Then we claim that ki 2, i = 1 and 2. First consider
the case where Ci has exactly three vertices of degree 3 on Co (G). Then G(Ci )
has exactly two inner faces; otherwise, G(Ci ) would have a cycle which has 2
or 3 legs and has no vertex of degree 2, contrary to Condition (2) or (3). The
contours of the two faces are minimal 3-legged cycles, and there is no other
minimal 3-legged cycle in G(Ci ). Thus ki = 2. We next consider the case where

Rectangular Drawings of Plane Graphs Without Designated Corners


C1
a

b
c

C2

93

b
c

d
G
(a)

G
(b)

Fig. 4. (a)Illustration for Case 1, and (b) illustration for Case 2.


Ci has four or more vertices of degree 3 on Co (G). Then we can show, similarly
as in the proof of Lemma 6(d), that the set of all minimal 3-legged cycles of
G in G(Ci ) is independent. If ki 3, then Condition (4) would not hold for
the independent set S of ki + 1 cycles: the ki 3-legged cycles in G(Ci ) and the
2-legged cycle Cj , j = 1 or 2 and j 6= i. Thus ki 2.
We choose two vertices of degree 2 on each Ci , 1 i 2, as follows. For
each of the ki minimal 3-legged cycle in G(Ci ), we arbitrarily choose exactly one
vertex of degree 2. If ki < 2, then we arbitrarily choose 2 ki vertices of degree
2 in V (Ci ) which have not been chosen so far in a way that at most two vertices
are chosen from any chain. This can be done because by Condition (2) Ci has at
least two vertices of degree 2. Thus we have chosen four vertices of degree 2, and
we regard them as the designated corner vertices for a rectangular drawing of
G. In Fig. 4(b) G has a pair of independent 2-legged cycles C1 and C2 , k1 = 2,
k2 = 1, and four vertices a, b, c and d on Co (G) are chosen as the designated
vertices. Vertices a and d are chosen from the vertices on C1 ; each on a minimal
3-legged cycle in G(C1 ). Vertices b and c are chosen from the vertices on C2 ; c
is on the minimal 3-legged cycle in G(C2 ), and b is an arbitrary vertex on C2
other than c.
By Lemma 1 it suffices to show that G satisfies the conditions (c1)-(c3)
regarding the four designated vertices. We can indeed prove that G satisfies
Conditions (c1)-(c3) regarding the four designated vertices. The detail is omitted
2
in this extended abstract.
Lemmas 5 and 8 immediately imply that G has a rectangular drawing if G
satisfies the conditions in Theorem 2. Thus we have constructively proved the
sufficiency of Theorem 2.
We immediately have the following corollary from Theorem 2.
Corollary 9. A 2-3 plane graph G has a rectangular drawing if and only if G
satisfies the following six conditions:
(1) G has no 1-legged cycle;
(2) every 2-legged cycle in G has at least two vertices of degree 2;

94

Md. Saidur Rahman, Shin-ichi Nakano, and Takao Nishizeki

(3)
(4-1)
(4-2)
(4-3)

every 3-legged cycle in G has a vertex of degree 2;


at most two 2-legged cycles in G are independent of each other;
at most four 3-legged cycles in G are independent of each other; and
if G has a pair of independent 2-legged cycles C1 and C2 , then each of
G(C1 ) and G(C2 ) has at most two independent 3-legged cycles of G and
the set {C1 , C2 , C3 } of cycles is not independent for any 3-legged cycle C3
in G.
2

We now have the following theorem.


Theorem 10. Given a 2-3 plane graph G, one can determine in linear time
whether G has a rectangular drawing or not, and if G has, one can find a rect2
angular drawing of G in linear time.

Conclusions

In this paper we established a necessary and sufficient condition for a 2-3 plane
graph G to have a rectangular drawing. We gave a linear-time algorithm to
determine whether G has a rectangular drawing, and find a rectangular drawing
of G if it exists. Thus, given a plane cubic graph G, we can determine in linear
time whether one can insert four vertices of degree 2 into some of the edges on
Co (G) so that the resulting plane graph G0 has a rectangular drawing or not, and
if G0 has, we can find a rectangular drawing of G0 in linear time. It is left as an
open problem to obtain an efficient algorithm for finding rectangular drawings
of plane graphs with the maximum degree = 4.

References
[BS88] J. Bhasker and S. Sahni, A linear algorithm to find a rectangular dual of a
planar triangulated graph, Algorithmica, 3 (1988), pp. 247-278.
[DETT99] G. Di Battista, P. Eades, R. Tamassia and I. G. Tollis, Graph Drawing,
Prentice Hall, Upper Saddle River, NJ, 1999.
[H93] X. He, On finding the rectangular duals of planar triangulated graphs, SIAM J.
Comput., 22(6) (1993), pp. 1218-1226.
[H95] X. He, An efficient parallel algorithm for finding rectangular duals of plane triangulated graphs, Algorithmica 13 (1995), pp. 553-572.
[KH97] G. Kant and X. He, Regular edge labeling of 4-connected plane graphs and
its applications in graph drawing problems, Theoretical Computer Science, 172
(1997), pp. 175-193.
[KK84] K. Kozminski and E. Kinnen, An algorithm for finding a rectangular dual of
a planar graph for use in area planning for VLSI integrated circuits, Proc. 21st
DAC, Albuquerque, June (1984), pp. 655-656.
[L90] T. Lengauer, Combinatirial Algorithms for Integrated Circuit Layout, John Wiley
& Sons, Chichester, 1990.
[RNN98] M. S. Rahman, S. Nakano and T. Nishizeki, Rectangular grid drawings of
plane graphs, Comp. Geom. Theo. Appl., 10(3) (1998), pp. 203-220.
[T84] C. Thomassen, Plane representations of graphs, (Eds.) J. A. Bondy and U. S.
R. Murty, Progress in Graph Theory, Academic Press Canada, (1984), pp. 43-69.

Computing Optimal Embeddings for Planar


Graphs
Petra Mutzel and Rene Weiskircher
Technische Universit
at Wien, Karlsplatz 13, 1040 Wien
{mutzel, weiskircher}@apm.tuwien.ac.at

Abstract. We study the problem of optimizing over the set of all combinatorial embeddings of a given planar graph. At IPCO 99 we presented a rst characterization of the set of all possible embeddings of
a given biconnected planar graph G by a system of linear inequalities.
This system of linear inequalities can be constructed recursively using
SPQR-trees and a new splitting operation. In general, this approach may
not be practical in the presence of high degree vertices.
In this paper, we present an improvement of the characterization which
allows us to deal eciently with high degree vertices using a separation
procedure. The new characterization exposes the connection with the
asymmetric traveling salesman problem thus giving an easy proof that
it is NP-hard to optimize arbitrary objective functions over the set of
combinatorial embeddings.
Computational experiments on a set of over 11000 benchmark graphs
show that we are able to solve the problem for graphs with 100 vertices
in less than one second and that the necessary data structures for the
optimization can be build in less than 12 seconds.

Introduction

A graph is called planar if it admits a drawing into the plane without edgecrossings (planar drawing). We call two planar drawings of the same graph
equivalent when the circular sequence of the edges around each vertex is the
same in both drawings. The equivalence classes of planar drawings are called
combinatorial embeddings. A combinatorial embedding also denes the set of
cycles in the graph that bound faces in a planar drawing.
The complexity of embedding planar graphs has been studied by various
authors in the literature [5, 4, 6]. In this paper we deal with the following optimization problem concerning embeddings: Given a planar biconnected graph and
a cost function on the cycles of the graph, nd an embedding such that the
sum of the cost of the cycles that appear as face cycles in is minimized. The
objective function is chosen only to demonstrate the feasibility of the approach in
computational experiments. However, our description of the set of combinatorial


Partially supported by DFG-Grant Mu 1129/3-1, Forschungsschwerpunkt Eziente


Algorithmen f
ur diskrete Probleme und ihre Anwendungen

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 95104, 2000.
c Springer-Verlag Berlin Heidelberg 2000


96

Petra Mutzel and Rene Weiskircher

embeddings of a planar graph as an Integer Linear Program (ILP) makes some


important NP-hard problems arising in graph drawing accessible to ILP-based
optimization methods.
One example is the minimization of the number of bends in an orthogonal
planar drawing of a graph. This number highly depends on the chosen planar embedding. Whereas bend minimization of a planar graph is NP-hard ([9], a branch
and bound algorithm for the problem is given in [3]), it can be solved in polynomial time for a xed embedding ([13]). Figure 1 shows two dierent orthogonal
drawings of the same graph that were generated using the bend minimization
algorithm by Tamassia ([13]). The algorithm used dierent combinatorial embeddings as input. Drawing 1(a) has 13 bends while drawing 1(b) has only 7
bends.
5

4
3
2
0

6
3

7
4

(a)

(b)

Fig. 1. The impact of the chosen planar embedding on the drawing

For a xed embedding, the bend minimization problem can be formulated


as a ow problem in the geometric dual graph. This is the point where we plan
to use our description: Once we have characterized the set of all embeddings
via an integer linear formulation on the variables associated with cycles of the
graph, we can combine this formulation with the ow problem to solve the bend
minimization problem over all embeddings.
In [12] we introduced an integer linear program (ILP) whose set of feasible
solutions corresponds to the set of all possible combinatorial embeddings of a
given biconnected planar graph. The program is constructed recursively with the
advantage that we only introduce variables for those simple cycles in the graph
that form the boundary of a face in at least one combinatorial embedding of the
graph, thus reducing the number of variables tremendously. The constraints are
derived using the structure of the graph. We use a data structure called SPQRtree suggested by Di Battista and Tamassia ([2]) for the on-line maintenance of

Computing Optimal Embeddings for Planar Graphs

97

triconnected components. SPQR-trees can be used to code and enumerate all


possible combinatorial embeddings of a biconnected planar graph.
The problem of our original formulation was that it may be inecient for
graphs with high-degree vertices, because it requires to compute the convex
hull of a number of points that may be exponential in the degree of a vertex.
When looking for a solution to this problem, we discovered a connection of the
embedding problem with the asymmetric traveling salesman problem (ATSP)
enabling us to apply the same machinery used for solving the ATSP-problem to
the problem of nding an optimal embedding for a planar biconnected graph.
Our computational results on a set of more than 11000 benchmark graphs
show that our new approach preserves the positive properties of our rst approach while making it possible to deal eciently with high degree vertices. As
in our rst version, the size of the integer linear system computed for the benchmark graphs grows only linearly with the size of the problem and the computed
systems can be solved fast using a mixed integer program solver. There are only
a few graphs with high degree vertices for which we need to apply our separation
procedure and we never need more than three separation steps.
Section 2 gives a brief overview of SPQR-trees. In Section 3 we sketch the
recursive construction of the linear constraint system using a splitting operation
on the SPQR-tree. Section 4 introduces the connection of our problem with
the ATSP problem and describes the separation procedure. Our computational
results are described in Section 5.

SPQR-Trees

In this section, we give a brief overview of the SPQR-tree data structure for biconnected graphs. SPQR-trees have been suggested by Di Battista and Tamassia
([2]). They represent a decomposition of a biconnected graph into triconnected
components. A connected graph is triconnected, if there is no pair of vertices in
the graph whose removal splits the graph into two or more components.
An SPQR-tree has four types of nodes and with each node is associated a
biconnected graph which is called the skeleton of that node. This graph can
be seen as a simplied version of the original graph and its vertices are also
contained in the original graph. The edges in a skeleton represent subgraphs of
the original graph. The node types and their skeletons are as follows:
1. Q-node: The skeleton consists of two vertices that are connected by two
edges. One of the edges represents an edge e of the original graph and the
other one the rest of the graph.
2. S-node: The skeleton is a simple cycle with at least 3 vertices.
3. P -node: The skeleton consists of two vertices connected by at least three
edge.
4. R-node: The skeleton is a triconnected graph with at least four vertices.
All leaves of the SPQR-tree are Q-nodes and all inner nodes S-,P or Rnodes. When we see the SPQR-tree as an unrooted tree, then it is unique for

98

Petra Mutzel and Rene Weiskircher

each biconnected planar graph. Another important property of these trees is


that their size (including the skeletons) is linear in the size of the original graph
and that they can be constructed in linear time [2].
As described in [2], SPQR-trees can be used to represent all combinatorial
embeddings of a biconnected planar graph. This is done by choosing embeddings
for the skeletons of the nodes in the tree. The skeletons of S- and Q-nodes are
simple cycles, so they have only one embedding. Therefore, we only have to look
at the skeletons of R- and P -nodes. The skeletons of R-nodes are triconnected
graphs. Our denition of combinatorial embeddings distinguishes between two
combinatorial embeddings of a triconnected graph, which are mirror-images of
each other (the circular order of the edges around each vertex in clockwise order
is reversed in the second embedding). The number of dierent embeddings of a
P -node skeleton is (k 1)! where k is the number of edges in the skeleton.
Every combinatorial embedding of the original graph denes a unique combinatorial embedding for each skeleton of a node in the SPQR-tree. Conversely,
when we dene an embedding for each skeleton of a node in the SPQR-tree, we
dene a unique embedding for the original graph. Thus, if the SPQR-tree of G
has r R-nodes and the P -nodes P1 to Pk where the skeleton of Pi has Li edges,
then the number of combinatorial embeddings of G is exactly
2r

k

(Li 1)! .
i=1

Because the embeddings of the R- and P -nodes determine the embedding of the
graph, we call these nodes the decision nodes of the SPQR-tree.

3
3.1

Recursive Construction of the Integer Linear Program


The Variables of the Integer Linear Program

A face cycle in a combinatorial embedding of a planar graph is a directed cycle


of the graph with the following property: In any planar drawing realizing the
embedding, the left side of the cycle is empty. Note that the number of face
cycles of a planar biconnected graph with m edges and n vertices is m n + 2.
We construct an integer linear program (ILP) where the feasible solutions
correspond to the combinatorial embeddings of a graph. The variables of the
program are the same as in [12]. They are binary and represent directed cycles
in the graph. In a feasible solution of the ILP, a variable xc has value 1 if the
associated cycle c is a face cycle in the represented embedding and 0 otherwise.
To keep the number of variables as small as possible, we only introduce variables
for those cycles that are indeed face cycles in a combinatorial embedding of the
graph.
3.2

Splitting an SPQR-Tree

We construct the variables and constraints of the ILP recursively. Therefore,


we need an operation that constructs a number of smaller problems from our

Computing Optimal Embeddings for Planar Graphs

99

original problem such that we can use the variables and constraints computed
for the smaller problems to compute the ILP for the original problem. This is
done by splitting the SPQR-tree at some decision-node v.
The splitting operation deletes all edges in the SPQR-tree incident to v whose
other endpoint is not a Q-node, thus producing smaller trees. Then we attach
new Q-nodes to all nodes that were incident to deleted edges to make sure that
the trees we produce are again SPQR-trees. The new edges we use to attach the
Q-nodes are called split-edges and the trees we produce split-trees. The graphs
represented by the split-trees are called split-graphs. The new tree containing
v is the center split-tree and the associated graph the center split-graph. The
split-trees either have only one decision node (like the center split-tree) or at
least one less than the original tree. The splitting process is depicted in Fig. 2.
Q

...

T1

Q
Q

T3

...

...

T2
Q

T1

v
Q

...

Split

Q
v

Q
Q

Q
Q

T2

T3

...

...

Fig. 2. Splitting an SPQR-tree at an inner node

3.3

Construction of the ILP for SPQR-Trees

Since this topic is treated in detail in [12] and [11], we only give a short sketch of
our approach. Let T be the SPQR-tree of a biconnected planar graph G, v the
node used for splitting the tree and T1 , . . . , Tk the split-trees of v. We assume
that T1 is the center split-tree and that the graph Gi is the split-graph belonging
to split-tree Ti . We can distinguish two types of directed cycles in G:
1. Local cycles are contained in one of the graphs G1 , . . . , Gk .
2. Global cycles of are not contained in any of the Gi .
We assume that we have already computed the ILP Ii for each Ti . The variables
in Ii that represent local cycles will also be variables in the ILP for T . We
compute the global cycles of G for which we need variables by combining cycles
in the split-graphs that are represented by variables in the Ii .
The set C of all constraints of the ILP of T is given by C = Cl Cc Cg . Cl
is the set of lifted constraints. For each constraint contained in Ii , we compute

100

Petra Mutzel and Rene Weiskircher

a constraint that is valid for T by replacing each variable xc by the sum of the
variables in R(xc ) (The set of variables for T whose associated cycles have been
constructed using c).
The set Cc is the set of choice constraints. They state that for each variable
xc computed for Ti , the sum of the variables in the set R(xc ) can be at most
one. This is true because all of the cycles in R(xc ) either pass an edge or one
of the split-graphs in the same direction and therefore at most one of the cycles
can be a face cycle in any embedding. The proof is omitted but can be found in
[11].
The only element of Cg is the center graph constraint, which states that the
number of global face-cycles in any feasible solution plus the number of local
face-cycles contained in G1 is equal to the number of faces of G1 . This is true,
because any drawing of G can be generated from a drawing of G1 by replacing
some edges by subgraphs. In this process, the face cycles of G1 may be replaced
by global cycles or are preserved (if they are local cycles of G).
We observe that a graph G whose SPQR-tree has only one inner node is
isomorphic to the skeleton of this node. Therefore, the ILP for an SPQR-tree
with only one inner node is dened as follows:
S-node: When the only inner node of the SPQR-tree is an S-node, G is a
simple cycle. Thus it has two directed cycles and both are face-cycles in the
only combinatorial embedding of G. So the ILP consists of two variables,
both of which must be equal to one.
R-node: G is triconnected and according to our denition of combinatorial
embeddings, every triconnected graph has exactly two embeddings, which
are mirror-images of each other. When G has m edges and n vertices, we
have k = 2(m n + 2) variables and two feasible solutions. The constraints
are given by the convex hull of the two points in k-dimensional space that
correspond to the solutions.
P -node: The ILP for graphs whose only inner node in the SPQR-tree is a P node is described in detail in Section 4 because this is where the connection
to the asymmetric travelings salesman problem (ATSP) is used.
The proof of correctness diers from the proof given in [12] and more detailed
in [11] only in the treatment of the skeletons of P -nodes, so we only look at the
treatment of P -node skeletons in more detail in the next section.

P -Node Skeletons and the ATSP

A P -node skeleton P consists of two vertices va and vb connected by k 3 edges


and has therefore (k 1)! dierent combinatorial embeddings. Every directed
cycle in P is a face cycle in at least one embedding of P , so we need k 2 k
variables in an ILP description of all combinatorial embeddings.
Let C be the set of variables in the ILP and c : C R a weight function on C.
We consider the problem of nding the embedding of P that minimizes the sum
of the weights of the cycles that are face cycles. We will show that this problem

Computing Optimal Embeddings for Planar Graphs

101

can be stated as the problem of nding a Hamiltonian cycle with minimum


weight in the complete directed graph B = (V, E) with k vertices or simply
as the asymmetric traveling salesman problem (ATSP). The transformation we
will show here also works in the opposite direction thus showing NP-hardness
of optimizing over all embeddings. But we show here the reduction to ATSP
because this is what our algorithm does when it computes the ILP.
The complete directed graph B has one vertex for every edge of P . Let e1
and e2 be two edges in P and v1 and v2 the corresponding vertices in B. Then
the edge (v1 , v2 ) corresponds to the cycle in P that traverses edge e1 from va to
vb and edge e2 from vb to va . The edge (v2 , v1 ) corresponds to the same cycle
in the opposite direction. In this way, we dene a bijection b : C E from the
cycles in P to the edges in B. This bijection denes a linear function c : E R
on the edges of B such that c (e) = c(b1 (e)).
Now it is not hard to see that each embedding of P corresponds to a Hamiltonian cycle in B and vice versa. If the Hamiltonian cycle is given by the sequence
(v1 , v2 , . . . , vk ) of vertices, then the sequence of the edges in P in the corresponding embedding in counter-clockwise order around va is (e1 , e2 , . . . , ek ). Figure 3
shows an example of a P -node skeleton with four edges and the corresponding
ATSP-graph. The embedding of the P -node skeleton on the left corresponds
to the Hamiltonian cycle marked in the ATSP-graph. The marked edges correspond to the face cycles in the embedding of the P -node skeleton. The sequence
of the edges in P in counter-clockwise order around vertex va corresponds to the
sequence of the vertices in the Hamiltonian cycle of the ATSP-graph.
va

e1

e2 e3

vb

v1

v2

v3

v4

e4

Fig. 3. A P -node skeleton and its corresponding ATSP-graph

The sum of the weights of all edges on the Hamiltonian cycle is equal to the
sum of the weights of the cycles of P that are face cycles in this embedding. So
nding an embedding of P that minimizes the sum of the weights of the face
cycles is equivalent to nding a traveling salesman tour with minimum weight in
B. Since we can easily construct a corresponding P -node embedding problem for
any ATSP-problem, we have a simple proof that optimizing over all embeddings
of a graph is in general NP-hard.
It also enables us to use the same ILP used for ATSP for the ILP that
describes all combinatorial embeddings of a P -node skeleton. The formulation
for the ATSP ILP found in [7] has two types of constraints.

102

Petra Mutzel and Rene Weiskircher

1. The degree constraints state that each vertex must have exactly one incoming
edge and one outgoing edge in every solution.
2. The subtour elimination constraints state that the number of edges with
both endpoints in a nonempty subset S of the set of all vertices can be at
most |S| 1.
The number of degree constraints is linear in the number of edges in a P -node
skeleton, while the number of subtour elimination constraints is exponential.
Therefore, we dene the ILP for a graph whose SPQR-tree has a P -node as
the only inner node just as the set of degree constraints for the corresponding
ATSP-problem.
To cope with the subtour elimination constraints, we store for each P -node
skeleton the corresponding ATSP-graph. For each edge in the ATSP-graph we
store the corresponding cycle in the P -node skeleton. During the recursive construction, we update the set of corresponding cycles for each edge in the ATSPgraph, so that we always know the list of cycles represented by an edge in the
ATSP-graph. This is done in the same way as the construction of the lifted
constraints in subsection 3.3.
When the construction of the recursive ILP is nished, we use a mixed integer
programming solver to nd an integer solution. Then we check if any subtour
elimination constraint is violated. We do this by nding a minimum cut in each
ATSP-graph. The weight of each edge in the ATSP graph is dened as the sum
of the values of the variables representing the cycles associated with the edge.
If the value of this minimum cut is smaller than one, we have found a violated
subtour elimination constraint and add it to the ILP. As we will show in the
next section, separation of the subtour elimination constraint is rarely necessary.

Computational Results

In our computational experiments, we used a benchmark set of 11491 graphs


collected by the group around G. Di Battista in Rome ([1]). Since some of these
graphs are not planar, we rst computed a planar subgraph using the algorithm
from [10]. Then we made the resulting graphs biconnected while preserving planarity using the algorithm from [8]. For the resulting graphs, we rst computed
the recursive part of our ILP and then used a branch and cut algorithm with
CPLEX as integer program solver to optimize randomly chosen linear functions
over the set of all combinatorial embeddings of the graph. After each optimization phase, we checked if there was a violated subtour elimination constraint and
if this was the case, we added the found constraint and re-optimized the ILP.
Our experiments ran on a Sun Enterprise 10000.
Figure 4(a) shows that the number of embeddings can vary greatly for graphs
with similar size. One graph with 97 vertices and 135 edges had 2,359,296 combinatorial embeddings while another one with 100 vertices and 131 edges had
only 64 embeddings (note that the y-axis in the gure is logarithmic).
Figure 4(b) shows that the number of constraints and variables of our formulation grows roughly linear with the size of the graphs which is surprising when

Computing Optimal Embeddings for Planar Graphs


1e+07

2000

Embeddings

Variables
Constraints

1800

1e+06

103

1600
100000

1400
1200

10000

1000

1000

800

100

600

10

400
200

1
20

40

60
Vertices

(a)

80

100

20

40

60

80

100

Vertices

(b)

Fig. 4. The number of embeddings of the tested graphs and the number of
variables and constraints

we consider the growth of the number of embeddings. Our ILP always has more
constraints than variables. Figure 5(a) shows the time needed for building the
recursive ILP and the time needed for optimization including separation. Optimization is very fast and the longest time we needed was 0.75 seconds. The time
needed for building the ILP grows sub-exponential with the number of vertices
and never exceeded 11 seconds.
Figure 5(b) shows that separation was rarely necessary and in the cases
where we separated constraints, the number of the separation steps was small.
The boxes show the number of graphs that needed 0, 1, 2 or 3 separation steps,
e.g. 1, 2, 3 or 4 optimization rounds (note that the y-axis is logarithmic). We
needed at most three separation steps and this was only the case for one of the
11,491 graphs. For 11,472 of the graphs, no re-optimization was necessary.
Our future goal will be to extend our formulation such that each solution
will correspond to an orthogonal representation of the graph. This will enable
us to nd drawings with the minimum number of bends over all embeddings. Of
course, this will make the solution of the ILP much more dicult.
Acknowledgments We thank the group of G. Di Battista in Rome for giving
us the opportunity to use their implementation of SPQR-trees in GDToolkit, a
software library that is part of the ESPRIT ALCOM-IT project (work package
1.2), and to use their graph generator.

References
[1] G. Di Battista, A. Garg, G. Liotta, R. Tamassia, E. Tassinari, and F. Vargiu.
An experimental comparison of four graph drawing algorithms. Comput. Geom.
Theory Appl., 7:303326, 1997.
[2] G. Di Battista and R. Tamassia. On-line planarity testing. SIAM Journal on
Computing, 25(5):956997, 1996.

104

Petra Mutzel and Rene Weiskircher

12

Optimization time
Building time

10000

10
1000
Seconds

8
100

6
4

10

2
1
0

20

40

60
Vertices

(a)

80

100

Separated constraints

(b)

Fig. 5. The time needed for building the ILP and for optimization and the
benchmark set divided up by the number of separation steps

[3] P. Bertolazzi, G. Di Battista, and W. Didimo. Computing orthogonal drawings with the minimum number of bends. Lecture Notes in Computer Science,
1272:331344, 1998.
[4] D. Bienstock and C. L. Monma. Optimal enclosing regions in planar graphs.
Networks, 19(1):7994, 1989.
[5] D. Bienstock and C. L. Monma. On the complexity of embedding planar graphs
to minimize certain distance measures. Algorithmica, 5(1):93109, 1990.
[6] J. Cai. Counting embeddings of planar graphs using DFS trees. SIAM Journal
on Discrete Mathematics, 6(3):335352, 1993.
[7] G. Carpaneto, M. DellAmico, and P. Toth. Exact solution of large scale asymmetric travelling salesman problems. ACM Transactions on Mathematical Software,
21(4):394409, 1995.
[8] S. Fialko and P. Mutzel. A new approximation algorithm for the planar augmentation problem. In Proceedings of the Ninth Annual ACM-SIAM Symposium on
Discrete Algorithms, pages 260269, San Francisco, California, 1998.
[9] A. Garg and R. Tamassia. On the computational complexity of upward and
rectilinear planarity testing. Lecture Notes in Computer Science, 894:286297,
1995.
[10] M. J
unger, S. Leipert, and P. Mutzel. A note on computing a maximal planar subgraph using PQ-trees. IEEE Transactions on Computer-Aided Design,
17(7):609612, 1998.
[11] P. Mutzel and R. Weiskircher. Optimizing over all combinatorial embeddings of a
planar graph. Technical report, Max-Planck-Institut f
ur Informatik, Saarbr
ucken,
1998.
[12] P. Mutzel and R. Weiskircher. Optimizing over all combinatorial embeddings
of a planar graph. In G. Cornuejols, R. Burkard, and G. W
oginger, editors,
Proceedings of the Seventh Conference on Integer Programming and Combinatorial
Optimization (IPCO), volume 1610 of LNCS, pages 361376. Springer Verlag,
1999.
[13] R. Tamassia. On embedding a graph in the grid with the minimum number of
bends. SIAM Journal on Computing, 16(3):421444, 1987.

Approximation Algorithms for Independent Sets


in Map Graphs
Zhi-Zhong Chen
Department of Mathematical Sciences, Tokyo Denki University,
Hatoyama, Saitama 350-0394, Japan.
[email protected]

Abstract. This paper presents polynomial-time approximation algorithms for the problem of computing a maximum independent set in
a given map graph G with or without weights on its vertices. If G is
given together with a map, then a ratio of 1 + can be achieved in O(n2 )
time for any given constant > 0, no matter whether each vertex of G is
given a weight or not. In case G is given without a map, a ratio of 4 can
be achieved in O(n7 ) time if no vertex is given a weight, while a ratio
of O(log n) can be achieved in O(n7 log n) time otherwise. Behind the
design of our algorithms are several fundamental results for map graphs;
these results can be used to design good approximation algorithms for
coloring and vertex cover in map graphs, and may find applications to
other problems on map graphs as well.

Introduction

An independent set in a graph G = (V, E) is a subset I of V such that no two


vertices of I are connected by an edge in E. If each vertex of G is associated with
a weight, the weight of an independent set I in G is the total weight of vertices
in I. Given a vertex-weighted graph G = (V, E), the maximum independent set
(MIS) problem requires the computation of an independent set of maximum
weight in G. The special case where each vertex of G has weight 1, is called the
unweighted maximum independent set (UMIS) problem. The MIS problem is a
fundamental problem in many areas; unfortunately, even the UMIS problem is
widely known to be NP-hard.
Since the MIS problem is NP-hard, we are interested in designing approximation algorithms, i.e. polynomial-time algorithms that find an independent set
of large but not necessarily maximum weight in a given graph. An approximation algorithm A achieves a ratio of if for every vertex-weighted graph G, the
independent set I found by A on input G has weight at least OP T (G) , where
OP T (G) is the maximum weight of an independent set in G.
Hastad

[6] gave strong evidence that no approximation algorithm for the


UMIS problem achieves a ratio of n1 for any  > 0, where n is the number
of vertices in the input graph. Due to this, a lot of work has been devoted to
designing approximation algorithms for the MIS problem restricted to certain
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 105114, 2000.
c Springer-Verlag Berlin Heidelberg 2000

106

Zhi-Zhong Chen

classes of graphs (such as planar graphs, bounded-degree graphs, etc). This paper
considers the MIS problem restricted to map graphs, which were introduced by
Chen et al. [5] recently.
Intuitively speaking, a map is a plane graph whose faces are classified into
nations and lakes. Traditional planarity says that two nations on a map M are
adjacent if and only if they share at least a borderline. Motivated by topological
inference, Chen et al. [5] considered a modification of traditional planarity, which
says that two nations on M are adjacent if and only if they share at least a
border-point. Consider the simple graph G whose vertices are the nations on M
and whose edges are all {f1 , f2 } such that f1 and f2 are nations sharing at least
a border-point. G is called a map graph [5,10]; if for some integer k, no point in
M is shared by more than k nations, G is called a k-map graph [5]. The UMIS
problem restricted to map graphs is NP-hard, because planar graphs are exactly
3-map graphs [5] and the UMIS problem restricted to planar graphs is NP-hard.
It is known [1,7] that the MIS problem restricted to planar graphs has a
polynomial-time approximation scheme (PTAS). Recall that a PTAS for a maximization (respectively, minimization) problem is a polynomial-time algorithm
A such that given an instance I of and an error parameter  > 0, A computes
a solution S of I in time polynomial in the size of I such that the value of S is
at least (1 ) OP T (I) (respectively, at most (1 + ) OP T (I)), where OP T (I)
is the optimal value of a solution of I. An interesting question is to ask whether
the MIS problem restricted to map graphs also has a PTAS. Regarding this
question, we show that if the input graph is given together with a map, then
the MIS problem restricted to map graphs has a practical PTAS. Combining
this result and the Thorup algorithm [10] for constructing a map from a given
map graph, we obtain a PTAS for the MIS problem restricted to map graphs.
Unfortunately, the Thorup algorithm is extremely complicated and the exponent
of its polynomial time bound is about 120.
So, it is natural to assume that no map is given as part of the input and no
map construction is allowed in approximation algorithms. Under this assumption, we first show that the MIS problem restricted to k-map graphs for any
fixed integer k has a PTAS. This PTAS runs in linear time, but is impractical
because it uses the impractical Bodlaender algorithm [2] for tree-decomposition.
Using this PTAS, we then obtain an O(n7 )-time approximation algorithm for the
UMIS problem restricted to general map graphs that achieves a ratio of 4. We
also give two relatively more practical approximation algorithms. One of them is
for the MIS problem restricted to general map graphs, runs in O(n7 log n) time,
and achieves a ratio of O(log n). The other is for the UMIS problem restricted
to general map graphs, runs in O(n7 ) time, and achieves a ratio of 5.
Behind the design of our algorithms are several fundamental results for map
graphs; these results can be used to obtain the following results. First, there is
a PTAS for the minimum weighted vertex cover (MWVC) problem restricted to
map graphs. Second, a map graph G with n vertices and m edges can be colored
in O(n2 m) time using at most 2 (G) colors, where (G) is the chromatic
number of G. Third, for all optimization problems such that restricted

Approximation Algorithms for Independent Sets in Map Graphs

107

to planar graphs has a PTAS as shown in [1], restricted to k-map graphs


has a PTAS as well for any fixed integer k. These results do not involve map
constructions. They may find applications to other problems on map graphs as
well.
The rest of this paper is organized as follows. Section 2 gives precise definitions and states known results that are needed later on. Section 3 presents a
PTAS for the MIS problem where the input graph is given together with a map.
Section 4 describes two PTASs for the MIS problem restricted to k-map graphs.
Section 5 presents nontrivial approximation algorithms for the MIS and UMIS
problems restricted to map graphs. Section 6 asks several open questions.
See http://rnc2.r.dendai.ac.jp/chen/papers/mapis.ps.gz, for a full version
of this paper.

Preliminaries

Throughout this paper, a graph may have multiple edges but no loops, while a
simple graph has neither multiple edges nor loops. Let G = (V, E) be a graph.
The subgraph of G induced by a subset U of V is denoted by G[U ]. An independent set of G is a subset U of V such that G[U ] has no edge. The independence
number of G, denoted by (G), is the maximum number of vertices in an independent set of G. Let v V . The degree of v in G is the number of edges
incident to v in G; v is an isolated vertex if its degree is 0. The neighborhood
of v in G, denoted by NG (v), is the set of vertices adjacent to v in G. Note
that |NG (v)| bounds the degree of v in G from below. For a subset U of V , let
NG (U ) = vU NG (v).
Let E be a plane graph. Let f be a face of E. The boundary of f is the
graph (Vf , Ef ), where Vf and Ef are the set of vertices and edges surrounding
f , respectively. The size of f , denoted by |f |, is |Vf |. We call f a cycle face if its
boundary is a simple cycle.
A map M is a pair (E, ), where (1) E is a plane graph (P, EE ) and each
connected component of E is biconnected, and (2) is a function that maps
each inner face f of E to 0 or 1 in such a way that whenever (f ) = 1, f is
a cycle face. A face f of E is called a nation on M if f is an inner face with
(f ) = 1, while called a lake on M otherwise. For an integer k, a k-point in M
is a p P that appears on the boundaries of exactly k nations on M; a k + -point
in M is a p P that appears on the boundaries of more than k nations on M.
M is a k-map if there is no k + -point in M. Two nations are adjacent if their
boundaries share a p P. The graph of M is the simple graph G = (V, EG )
where V consists of the nations on M and EG consists of all {f1 , f2 } such that
f1 and f2 are adjacent. We call G a map graph, while call G a k-map graph if M
is a k-map. For clarity, we call the elements of P points, while call the elements
of V vertices. A nation f on M is isolated if f is an isolated vertex of G.
The half square of a bipartite graph H = (X, Y ; EH ) is the simple graph
G = (X, E) where E = {{x1 , x2 } | there is a y Y with {x1 , y} EH and
{x2 , y} EH }.

108

Zhi-Zhong Chen

Lemma 1. [5] Every map graph G = (V, E) is the half square of a bipartite
planar graph H = (V, P; EH ) with |P| 3|V | 6.
For a map M = (E, ) and a face f in E, we say that f touches a point p if
p appears on the boundary of f .

A PTAS for the Case with a Given Map

Let G = (V, E) be the input map graph given with a map M = ((P, EE ), ) and
a nonnegative weight to each nation on M. Let  be the given error parameter.
Let H be the bipartite planar graph (V, P; EH ) where EH = {{v, p} | v
V, p P, and p is a point on the boundary of nation v}. Obviously, H can be
constructed in linear time from M. Moreover, G is the half square of H. Indeed,
Lemma 1 is proved by further removing all redundant points from H where a
point p P is redundant if for every pair {u, v} of neighbors of p in H, there is
a point q P {p} with {u, v} NH (q).
Our PTAS is a nontrivial application of the Baker approach. Let h = d 1 e. We
may assume that G and hence H are connected. Starting at an arbitrary vertex
r V , we perform a breadth-first search (BFS) on H to obtain a BFS tree TH .
For each vertex v in H, we define the level number `(v) of v to be the number of
edges on the path from r to v in TH . Note that only r has level number 0. For
each i {0, . . . , h 1}, let Hi be the subgraph of H obtained from H by deleting
all vertices v with `(v) 2i (mod 2h). Obviously, each v V appears in exactly
h 1 of H0 through Hh1 . Moreover, Hi is clearly a (2h 1)-outerplanar graph.
For each i {0, . . . , h 1}, let Gi be the half square of Hi . The crux is
that each Gi is an induced subgraph of G, because all p P appear in Hi . Our
strategy is to compute an independent set Ii of maximum weight in Gi for each
i {0, . . . , h 1}. Since each vertex of G appears in all but one of G0 through
Gh1 , the independent set of maximum weight among I0 , . . . , Ih1 has weight at
least (1 h1 ) OP T (G) (1 ) OP T (G). Recall that OP T (G) is the maximum
weight of an independent set in G.
So, it remains to show how to compute a maximum weight independent set Ii
in Gi for each i {0, . . . , h1}. To do this, we first recall the notion of treewidth.
A tree-decomposition of a graph K = (VK , EK ) is a pair ({Xj | j J}, T ), where
{Xj | j J} is a family of subsets of VK and T is a tree with vertex-set J such
that the following hold:
jJ Xj = VK .
For every edge {v, w} EK , there is a j J with {v, w} Xj .
For all j1 , j2 , j3 J, if j2 lies on the path from j1 to j3 in T , then Xj1 Xj3
Xj2 .
Each Xj is called the bag of vertex j. The treewidth of a tree-decomposition
({Xj | j J}, T ) is max{|Xj | 1 | j J}. The treewidth of K is the minimum treewidth of a tree-decomposition of K, taken over all possible treedecompositions of K.

Approximation Algorithms for Independent Sets in Map Graphs

109

It is widely known that the MIS problem restricted to graphs with bounded
treewidth can be solved in linear time. However, the treewidths of our graphs
G0 , . . . , Gh1 may not be bounded. Our strategy is to resort to H0 , . . . , Hh1
instead, and do a dynamic programming on them. The result is the following:
Theorem 1. There is a PTAS for the special case of the MIS problem restricted
to map graphs where the input graph is given together with a map M = (E, ).
It runs in O(h|E|2 + 212h8 h2 |E|) time, where h = d 1 e and  is the given error
parameter.

PTASs for k-Map Graphs

We use an extension of the Baker approach, suggested in [4]. The only difference
between the extension and the Baker approach is that instead of decomposing the
given graph G into k 0 -outerplanar subgraphs, we decompose G into subgraphs
of bounded treewidth such that each vertex of G appears in all but one of these
subgraphs. The next lemma shows that such a decomposition is possible for a
k-map graph.
Lemma 2. Given a k-map graph G and an integer h 2, it takes O(h|G|) time
to compute a list L of h induced subgraphs of G such that (1) each subgraph in
L is of treewidth k(6h 4) and (2) each vertex of G appears in exactly h 1
of the subgraphs in L.
By the proof of Lemma 2, for all optimization problems such that
restricted to planar graphs has a PTAS as shown in [1], we can emulate Baker
[1] to show that restricted to k-map graphs has a PTAS as well for any fixed
integer k. In particular, we have:
Theorem 2. For any fixed integer k, there is a PTAS for the MIS problem
3
restricted to k-map graphs. It runs in O(232(6kh4k) hn) time, where n is the
size of the given k-map graph, h = d 1 e, and  is the given error parameter.
The PTAS in Theorem 2 is impractical. We next show a different PTAS for
the special case of the UMIS problem where the input graph is given together
with a k-map. This PTAS is based on the Lipton and Tarjan approach. Although
this PTAS is not better than the one in Section 3, the tools used in its design
seem to be fundamental. Indeed, the tools will be used in the next section, and
we believe that they can be used in other applications.
A map M = (E, ) is well-formed if (1) the degree of each point in E is at
least 3, (2) no edge of E is shared by two lakes, (3) no lake touches a point whose
degree in E is 4 or more, and (4) the boundary of each lake contains at least 4
edges.
The next lemma shows that a map can easily be made well-formed.
Lemma 3. Given a map M = (E, ) with at least three nations and without
isolated nations, it takes O(|E|) time to obtain a well-formed map M0 such that
(1) the graph of M0 is the same as that of M and (2) for every integer k 2,
M is a k-map if and only if so is M0 .

110

Zhi-Zhong Chen

Let M = (E, ) be a well-formed map. Then, each point on the boundary of


a lake on M is a 2-point in M and has degree 3 in E; moreover, for all integers
i 3, each i-point in M has degree i in E. Using these facts, we can prove the
following lemma which improves a result in [5] significantly.
Lemma 4. Let k 3 and G be a k-map graph with n 3 vertices and m edges.
Then, m kn 2k.
From Lemma 4, we can prove the following corollary.
Corollary 1. The following hold:
1. Given an integer k and a k-map graph G, it takes O(|G|) time to color G
with at most 2k colors. Consequently, given a k-map M = (E, ), it takes
O(k|E|) time to color the graph of M with at most 2k colors.
2. Given a map graph G = (V, E), we can color G in O(|V |2 |E|) time using
at most 2 (G) colors, where (G) is the chromatic number of G.
Indeed it has been known for a long time that k-map graphs are 2k-colorable
[9], but Corollary 1 has the advantage of being algorithmic. It is also known that
k-map graphs with k 8 can be colored with at most 2k 3 colors [3], but the
proof does not yield an efficient algorithm.
Let G be a connected graph with nonnegative weights on its vertices. The
weight of a subgraph of G is the total weight of vertices in the subgraph. A
separator of G is a subgraph H of G such that deleting the vertices of H from
G leaves a graph whose connected components each have weight 2W
3 , where
W is the weight of G. The size of a separator H is the number of vertices in H.
The following lemma shows that k-map graphs have small separators.
Lemma 5. Given a k-map M = (E, ) on which each nation has an associated
nonnegative weight and at least two nations exist, it takes O(|E|) time
p to find a
separator H of the graph G of M such that the size of H is at most 2 2k(n 1).
Using Lemma 5, we can emulate Lipton and Tarjan [8] to prove the following
theorem:
Theorem 3. For any fixed integer k, there is a PTAS for the special case of the
UMIS problem restricted to k-map graphs where the input graph is given together
2 3
with a k-map M = (E, ). It runs in O(|E| log |E| + 2288h k n) time, where n is
1
the number of nations on M, h = d  e, and  is the given error parameter.

Approximation Algorithms for Map Graphs

This section presents four approximation algorithms. The first three are for the
UMIS problem restricted to map graphs. The fourth is for the MIS problem
restricted to map graphs. The input to the first algorithm is a map instead of
a map graph; this algorithm is given here for the purpose of helping the reader

Approximation Algorithms for Independent Sets in Map Graphs

111

understand the other three algorithms. Also, the second algorithm is relatively
more practical than the third.
For a well-formed map M = (E, ), let G(M) be the plane graph obtained
from the dual plane graph E of E by deleting all vertices that are lakes on M.
Note that corresponding to each 2+ -point p in E, there is a unique face Fp in
G(M) such that the vertices on the boundary of Fp are exactly the nations on
M that touch p; the boundary of Fp is a simple cycle. We call Fp a point-face
of G(M). Those faces of G(M) that are not point-faces are called lake-faces.
Consider the following algorithm, called M apIS1 :
Input : A map M = (E, ).
1. If at most two nations are on M, then return a maximum weight independent
set of the graph of M.
2. If there is an isolated nation on M, then find such a nation f ; otherwise,
perform the following substeps:
2.1. Modify M to a well-formed map, without altering the graph of M.
2.2. Construct G(M).
2.3. Find a minimum-degree vertex f in G(M).
3. Construct a new map M0 = (E, 0 ), where for all faces f1 of E, if f1 = f or f1
is a neighbor of f in the graph of M, then 0 (f1 ) = 0, while 0 (f1 ) = (f1 )
otherwise.
4. Recursively call M apIS1 on input M0 , to compute an independent set J in
the graph of M0 .
5. Return {f } J.
Theorem 4. M apIS1 achieves a ratio of 5 and runs in O(|E|2 ) time.
Proof. (Sketch) The number of edges in G(M) is at most 3n 6. So, the degree
of f in G(M) is at most 5. We can then claim that the neighborhood of f in G
can be divided into at most five cliques.
Consider the following algorithm, called M apIS2 :
Input : A map graph G = (V, E).
1. If G has exactly at most two vertices, then return a maximum weight independent set of G.
2. Find a vertex f in G such that (Gf ) 5, where Gf = G[NG (f )].
3. Remove f and its neighbors from G.
4. Recursively call M apIS2 on input G, to compute an independent set J.
5. Return {f } J.
Theorem 5. M apIS2 achieves a ratio of 5, and runs in O(|V |
time.

P
f V

|NG (f )|6 )

Proof. By the proof of Theorem 4, Step 2 of M apIS2 can always be done.

112

Zhi-Zhong Chen

Consider the following algorithm, called M apIS3 :


Input : A map graph G = (V, E), an integer k 4, and a positive real number
 less than 1.
1. If G has exactly at most two vertices, then return a maximum weight independent set of G.
2. Find a vertex f in G such that (Gf ) is minimized among all vertices f of
G, where Gf = G[NG (f )].
3. If (Gf ) 4, then perform the following substeps:
3.1. Remove f and its neighbors from G.
3.2. Recursively call M apIS3 on input G to compute an independent set J.
3.3. Return {f } J.
4. Repeat the following substeps until G has no clique of size k + 1 (and hence
is a k-map graph):
4.1. Find a maximal clique C in G such that C contains at least k + 1
vertices.
4.2. Remove all vertices of C from G.
5. Color G with at most 2k colors (cf. Corollary 1); let J1 be the maximum set
of vertices with the same color.
6. Compute an independent set J2 in G with |J2 | (1 )(G).
7. Return the bigger one among J1 and J2 .
To analyze M apIS3 , we need the following lemma:
Lemma 6. [5] Let G be the graph of a map M = (E, ). Let C be a clique of G
containing at least five vertices. Then, at least one of the following holds:
C is a pizza, i.e., there is a point p in E such that all f C touch p.
C is a pizza-with-crust, i.e., there are a point p in E and an f1 C such
that (1) all f C {f1 } touch p and (2) for each f C {f1 }, some point
q 6= p in E is touched by both f1 and f .
C is a hamantasch, i.e., there are three points in E such that each f C
touches at least two of the points and each point is touched by at least two
nations.
Theorem 6. If we P
fix k = 28 and  = 0.25, then M apIS3 achieves a ratio of 4
and runs in O(|V | f V |NG (f )|6 + |V |3 |E|) time.
Proof. Let G0 be the input graph. We may assume that G0 is connected. By the
proof of Theorem 5, it suffices to prove that if (Gf ) 5, then J1 found in Step
0)
5 or J2 found in Step 6 has size (G
4 . So, suppose that (Gf ) 5.
Let n be the number of vertices in G0 . Fix a well-formed map M of G0 .
For each integer i > k, let hi be the number of cliques C in G0 such that
(1) C contains exactly i vertices and (2) C is found in Substep 4.1 by the
algorithm. We claimPthat the number x of edges in G(M) is bounded from

above by 3n 6 i=k+1 hi (i 4). To see this claim, let F1 , . . . , Ft be the


point-faces in G(M) whose boundaries each contain at least three vertices. For

Approximation Algorithms for Independent Sets in Map Graphs

113

each j {1, . . . , t}, fix a vertex fj on the boundary of Fj . We can triangulate


each face Fj by adding exactly |Fj | 3 new edges incident to fj ; call these new
edges imaginary edges incident to fj . There are exactly |Fj | 3 imaginary edges
Pt
incident to fj . Thus, x 3n 6 j=1 (|Fj | 3). Let C be a clique of G0
found in Substep 4.1. We say that an imaginary edge {fj , f 0 } with j {1, . . . , t}
is contributed by C, if f 0 is contained in C. Let i be the number of vertices in
C. To prove the claim, it remains to prove that the number of imaginary edges
contributed by C is at least i 4. By Lemma 6, only the following three cases
can occur:
Case 1: C is a pizza. Then, there is a point p in M such that all nations f 0
in C touch p on M. Let Fj be the point-face in G(M) that corresponds to p.
No matter whether fj is in C or not, at least i 3 imaginary edges incident
to fj are contributed by C.
Case 2: C is a pizza-with-crust. Then, there is a point p in M such that
|C| 1 nations in C touch p on M. Similarly to Case 1, at least (i 1) 3
imaginary edges are contributed by C.
Case 3: C is a hamantasch. Then, there are three points p1 through p3 in M
such that each nation f 0 C touches at least two of the three points on M
and each point is touched by at least two nations in C. Since i k +1 5, at
most one of p1 through p3 is a 2-point in M. Moreover, if one of p1 through
p3 is a 2-point, then C is actually a pizza-with-crust and Case 2 applies. So,
we may assume that p1 through p3 are 2+ -points in M. Let Fj1 be the pointface in G(M) that corresponds to p1 , and a1 be the number of nations in C
that touch p1 on M. Define Fj2 , a2 , Fj3 , and a3 similarly. Then, the number
of imaginary edges incident to fj1 (respectively, fj2 , or fj3 ) contributed by
C is at least a1 3 (respectively, a2 3, or a3 3). Thus, the number of
imaginary edges contributed by C is at least (a1 +a2 +a3 )9 2i9 i4.
P
By the claim, x 3n 6 i=k+1 hi (i 4). The degree of f in G(M) is
at most b 2x
n c. On the other hand, since (Gf ) 5, the degree of f in G(M)
P
P
is at least 5. Thus, 2 i=k+1 hi (i 4) n. In turn, i=k+1 hi i n(k+1)
2(k3) and
P
n
h

.
i
i=k+1
2(k3)
(1 )((G0 )
Let
J
be
the
bigger one among J1 and J2 . By Step 6, |J|P
P

1
i=k+1 hi ). By Step 5 and Corollary 1, |J| 2k (n
i=k+1 ihi ). Thus,
|J|
|J|
1
n
k7
n

(1

)(1

)
and

(G0 )
2(k3) (G0 )
(G0 )
4k(k3) (G0 ) . As the value of
n
(G0 )

decreases, the first lower bound on

|J|
(G0 )

increases while the second lower

|J|
decreases. The worst case happens
bound on (G
0)
|J|
k7
. By fixing 
Therefore, (G0 ) (1 ) 3k2k7
|J|
1
(G0 ) 4 .

when
=

1
4

n
(G0 )

4k(k3)(1)
3k2k7 .

and k = 28, we have

Finally, the proof of Theorem 4 leads to an approximation algorithm for the


MIS problem restricted to map graphs that achieves a logarithmic ratio.

114

Zhi-Zhong Chen

Theorem 7. Given a vertex-weighted map graph G = (V, E), we can find an


P
log 76
independent set of G whose weight is at least 6 log |V
f V
| OP T (G), in O((
|NG (f )|7 + |G|) log |V |) time.

Concluding Remarks

The impracticalness of the PTAS in Theorem 2 and hence that of M apIS3


mainly result from the impracticalness of the Bodlaender algorithm [2] for treedecomposition. A more practical algorithm for tree-decomposition can make our
algorithms more practical.
Is there a practical PTAS for the MIS or UMIS problem restricted to map
graphs? It would also be nice if one can design approximation algorithms for
the problems that achieve better ratios than ours. Can M apIS1 and M apIS2
be implemented to run faster than as claimed?
Finally, we point out that Lemma 2 can be used to design a PTAS for the
minimum weighted vertex cover (MWVC) problem restricted to map graphs.
Theorem 8. There is a PTAS for the MWVC problem restricted to map graphs.
It runs in O(n2 ) time.

Acknowledgments: I thank Professors Seinosuke Toda and Xin He for


helpful discussions, and a referee for helpful comments on presentation.
References
1. B.S. Baker. Approximation algorithms for NP-complete problems on planar graphs.
J. ACM 41 (1994) 153-180.
2. H.L. Bodlaender. A linear time algorithm for finding tree-decompositions of small
treewidth. SIAM J. Comput. 25 (1996) 1305-1317.
3. O.V. Borodin. Cyclic coloring of plane graphs. Discrete Math. 100 (1992) 281-289.
4. Z.-Z. Chen. Efficient approximation schemes for maximization problems on K3,3 -free
or K5 -free graphs. J. Algorithms 26 (1998) 166-187.
5. Z.-Z. Chen, M. Grigni, and C.H. Papadimitriou. Planar map graphs. STOC98,
514-523. See http://rnc2.r.dendai.ac.jp/chen/papers/mg2.ps.gz for a full version.
6. J. Hastad.

Clique is hard to approximate within n1 . STOC96, 627-636.


7. R.J. Lipton and R.E. Tarjan. A separator theorem for planar graphs. SIAM J. Appl.
Math. 36 (1979) 177-189.
8. R.J. Lipton and R.E. Tarjan. Applications of a planar separator theorem. SIAM J.
Computing 9 (1980) 615-627.
9. O. Ore and M.D. Plummer. Cyclic coloration of plane graphs. Recent Progress in
Combinatorics, pp. 287-293, Academic Press, 1969.
10. M. Thorup. Map graphs in polynomial time. FOCS98, 396-405.

Hierarchical Topological Inference on


Planar Disc Maps
Zhi-Zhong Chen1 and Xin He2
1

Department of Mathematical Sciences, Tokyo Denki University,


Hatoyama, Saitama 350-0394, Japan.
[email protected]
Dept. of Comput. Sci. and Engin., State Univ. of New York at Buffalo,
Buffalo, NY 14260, U.S.A.
[email protected]

Abstract. Given a set V and three relations ./d , ./m and ./i , we wish
to ask whether it is possible to draw the elements v V each as a closed
disc homeomorph Dv in the plane in such a way that (1) Dv and Dw
are disjoint for every (v, w) ./d , (2) Dv and Dw have disjoint interiors
but share a point of their boundaries for every (v, w) ./m , and (3) Dv
includes Dw as a sub-region for every (v, w) ./i . This problem arises
from the study in geographic information systems. The problem is in NP
but not known to be NP-hard or polynomial-time solvable. This paper
shows that a nontrivial special case of the problem can be solved in
almost linear time.

1
1.1

Introduction
Topological Inference Problems

An instance of the planar topological inference (PTI) problem is a triple (V, ./d
, ./m ), where V is a finite set, ./d (subscript d stands for disjoint) and ./m
(subscript m stands for meet) are two irreflexive symmetric relations on V with
./d ./m = . The problem is to determine whether we can draw the elements
v of V in the plane each as a closed disc homeomorph Dv in such a way that
(1) Dv and Dw are disjoint for every (v, w) ./d , and (2) Dv and Dw have
disjoint interiors but share a point of their boundaries for every (v, w) ./m .
The PTI problem and its extensions have been studied for geographic information systems [2,5,6,7,8,9]. In the fully-conjunctive case of the PTI problem,
it holds that for every pair of distinct v, w V , either {(v, w), (w, v)} ./d
or {(v, w), (w, v)} ./m . The fully-conjunctive PTI problem was first studied
by Chen et al. [1] and subsequently by Thorup [10]; the latter gave a complicated inefficient but polynomial-time algorithm for the problem. Motivated by
the maps of contemporary countries in the world, Chen et al. [1] restricts the
fully-conjunctive PTI problem by requiring that no point of the plane is shared
by more than k closed disc homeomorphs Dv with v V . Call this restriction the
fully-conjunctive k-PTI problem. The fully-conjunctive 3-PTI problem is just the
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 115125, 2000.
c Springer-Verlag Berlin Heidelberg 2000

116

Zhi-Zhong Chen and Xin He

problem of deciding whether a given graph is planar. However, even the fullyconjunctive 4-PTI problem is difficult to solve; a very complicated O(n3 )-time
algorithm for it was given in [1].
As has been suggested previously [1,5,6,7,9], a generalization of the PTI
problem is obtained by adding another irreflexive, antisymmetric and transitive
relation ./i (subscript i stands for inclusion) on V with ./i (./d ./m ) = and
requiring that Dv includes Dw as a sub-region for all (v, w) ./i . Unfortunately,
no meaningful result has been obtained for this generalization. A natural restriction on ./i is to require that each Dv with v V and {(v, w) ./i | w V } 6=
is the union of all Dw with (v, w) ./i . We call this generalization the hierarchical topological inference (HTI) problem. In the fully-conjunctive case of the
HTI problem, for every pair of distinct v, w V , exactly one of the following
(1) through (3) holds: (1) {(v, w), (w, v)} ./d; (2) {(v, w), (w, v)} ./m ; (3)
{(v, w), (w, v)} (./d ./m ) = and |{(v, w), (w, v)} ./i | = 1.
Since no efficient algorithm for the fully-conjunctive HTI problem is in sight,
we seek to restrict it in a meaningful way so that an efficient algorithm can
be designed. As Chen et al. [1] restricted the fully-conjunctive PTI problem,
we restrict the fully-conjunctive HTI problem by requiring that no point of the
plane is shared by more than k minimal closed disc homeomorphs Dv , i.e., those
Dv with v V such that {w V | (v, w) ./i } = . Call this restriction the
fully-conjunctive k-HTI problem. Unlike the fully-conjunctive 3-PTI problem,
the fully-conjunctive 3-HTI problem is nontrivial.
1.2

A Graph-Theoretic Formulation

Throughout this paper, a graph may have multiple edges but no loops, while a
simple graph has neither multiple edges nor loops. Also, a cycle in a graph H
always means a vertex-simple cycle in H.
A hierarchical map M is a pair (E, F), where (1) E is a plane graph whose
connected components are biconnected, and (2) F is a rooted forest whose leaves
are distinct faces of E. The faces of E that are not leaves of F are called the
lakes on M, while the rest faces of E are called the leaf districts on M. For each
non-leaf vertex of F, the union of the faces that are leaves in the subtree of F
rooted at is called a non-leaf district on M. M is a planar map if each vertex
of E is incident to at most three edges of E. M is a disc map if (1) the boundary
of each leaf district on M is a cycle and (2) for every non-leaf district D on M,
there is a cycle C such that D is the union of the faces in the interior of C 1 .
The map graph G of M is the simple graph whose vertices are the leaf districts
on M and whose edges are those {f1 , f2 } such that the boundaries of f1 and f2
intersect. Note that two districts on a map M may share two or more disjoint
borderlines (e.g. China and Russia share two disjoint borderlines with Mongolia
in between). However, the map graph G of M is always simple, meaning that
there is at most one edge between each pair of vertices. Note that G is planar
when M is a planar map. We call (G, F) the abstract of M.
1

In topology, D is a closed disc homeomorph.

Hierarchical Topological Inference on Planar Disc Maps

117

A graph-forest pair is a pair of a simple graph G and a rooted forest F whose


leaves are exactly the vertices of G. In the study of geographic information
systems, we are given G and F and need to decide whether the graph-forest
pair (G, F) is the abstract of a disc map. This problem is equivalent to the
fully-conjunctive HTI problem. Its special case where each tree in F is a single
vertex is equivalent to the fully-conjunctive PTI problem. Moreover, its special
case where we ask whether a given graph-forest pair (G, F) is the abstract of a
planar disc map is equivalent to the fully-conjunctive 3-HTI problem.
1.3

Our Result and Its Significance

Our result is an O(|F | + |G| log |G|)-time algorithm for deciding whether a given
graph-forest pair (G, F) is the abstract of a planar disc map M, where |G|
denotes the total number of vertices and the edges in G. The difficulty of this
problem comes from the lack of information in G about whether there are lakes
on M and how many borderlines two leaf districts on M can share.
Since Chen et al.s algorithm [1] for the fully-conjunctive 4-PTI problem is
a reduction to the fully-conjunctive 3-PTI problem, we suspect that our result
may serve as a basis for tackling the fully-conjunctive 4-HTI problem or even
more general cases.
The rest of the paper is organized as follows. 2 gives definitions needed
in later sections. Theorem 1 reduces the problem to the special case where the
input planar graph G is biconnected. For this special case, if we know that two
vertices z1 and z2 of the input planar graph G can be embedded on the outer
face, then the algorithm in 3 works. In 4, we discuss how to identify two such
vertices z1 , z2 .
See http://rnc2.r.dendai.ac.jp/chen/papers/3map.ps.gz for a full version.

Definitions

Let G be a graph. V (G) and E(G) denotes the vertex-set and the edge-set of
G, respectively. |G| denotes the total number of vertices and edges in G. Let
E 0 E(G) and U V (G). The subgraph of G spanned by E 0 , denoted by G[E 0 ],
is the graph (V 0 , E 0 ) where V 0 consists of the endpoints of the edges of E 0 . GE 0
denotes the graph (V (G), E(G)E 0 ). The subgraph of G induced by U is denoted
by G[U ]. G U denotes G[V (G) U ]. If G is a plane graph, then each of G[E 0 ],
G E 0 , G[U ], and G U inherits an embedding from G in the obvious way.
A cut vertex of G is a v V (G) such that G {v} has more connected
components than G. G is biconnected if G is connected and has no cut vertex.
A biconnected component of G is a maximal biconnected subgraph of G. We
simply call connected components 1-components, and biconnected components
2-components.
Let G be a plane graph. A k-face of G is a face of G whose boundary is a
cycle consisting of exactly k edges. A superface of G is G[U ] for some U V (G)
such that G[U ] is connected and each inner face of G[U ] is an inner 2- or 3-face

118

Zhi-Zhong Chen and Xin He

of G. The interior of a superface G[U ] of G is the open set consisting of all points
p in the plane that lie neither on the boundary nor in the interior of the outer
face of G[U ].
A graph-forest pair (G, F) is planar if G is planar. A graph-forest-set (GFS)
triple is a triple (G, F, S) such that (G, F) is a planar graph-forest pair and S is
a subset of V (G). For a rooted forest F and a non-leaf vertex f of F, let LF (f )
denote the set of all leaves of F that are descendants of f . An edge-duplicated
supergraph of a simple graph G is a graph G such that (1) the vertices of G are
those of G and (2) for each pair of adjacent vertices in G, G has an edge between
the two vertices. A plane graph G satisfies a GFS triple (G, F, S) if (1) G is
an edge-duplicated supergraph of G and (2) for every non-leaf vertex f of F,
G[LF (f )] is a superface of G whose interior contains no vertex of S. A GFS triple
is satisfiable if some plane graph satisfies it. A planar graph-forest pair (G, F) is
satisfiable if the GFS triple (G, F, ) is satisfiable.
We can assume that a GFS triple (G, F, S) (resp., graph-forest pair (G, F))
always satisfies that no vertex of F has exactly one child. By this, |F | = O(|G|).
Theorem 1. The problem of deciding whether a given planar graph-forest pair
(G, F) is the abstract of a planar disc map can be reduced in O(|G| log |G|)
time, to the problem of deciding whether a given GFS triple (G, F, S) with G
biconnected is satisfiable.

Biconnected Case

Fix a GFS triple (G, F, S) such that G is biconnected. We want to check if


(G, F, S) is satisfiable. To this end, we first check whether G[LF (f )] is connected
for all vertices f of F. This checking takes O(|G| log |G|) time. If (G, F) fails the
checking, then we stop immediately. So, suppose that (G, F) passes the checking.
3.1

SPQR Decompositions

A two-terminal graph 2 (TTG) G = (V, E) is an acyclic plane digraph with a


pair (s, t) of specified vertices on the outer face such that s is the only source
(i.e. with no entering edge) and t is the only sink (i.e. with no leaving edge).
We denote s and t by s(G) and t(G), respectively. We also call s and t the poles
of G and the rest vertices the nonpoles of G. A two-terminal subgraph of G is a
subgraph H of G such that H is a TTG and no edge of G is incident both to a
nonpole of H and to a vertex outside H. Although G is a digraph, the directions
on its edges are used only in the definition of its two-terminal subgraphs but have
no meaning anywhere else. With this in mind, we will view G as an undirected
graph from now on.
A split pair of G is either an unordered pair of adjacent vertices, or an unordered pair of vertices whose removal disconnects the graph (V (G), E(G)
{{s(G), t(G)}}). A split component of a split pair {u, v} is either an edge {u, v}
2

Previously called a planar st-graph.

Hierarchical Topological Inference on Planar Disc Maps

119

or a maximal two-terminal subgraph H (of G) with poles u and v such that


{u, v} is not a split pair of H. A split pair {u, v} of G is maximal if there is no
other split pair {w1 , w2 } in G such that {u, v} is contained in a split component
of {w1 , w2 }.
The decomposition tree T of G describes a recursive decomposition of G with
respect to its split pairs [3,4]. For clarity, we call the elements of V (T ) nodes.
T is a rooted ordered tree whose nodes are of four types: S, P, Q, and R. Each
node of T has an associated TTG, called the skeleton of and denoted by
Skl(). Also, it is associated with an edge in the skeleton of the parent of ,
called the virtual edge of in Skl(). T is recursively defined as follows.
Trivial case: G consists of a single edge {s(G), t(G)}. Then, T consists of a
single Q-node whose skeleton is G itself.
Series case: G is not biconnected. Let c1 , . . . , ck1 (k 2) be the cut vertices
of G. Since G is a TTG, each ci {c1 , . . . , ck1 } is contained in exactly two
2-components Gi and Gi+1 of G such that s(G) is in G1 and t(G) is in Gk . The
root of T is an S-node . Skl() is a path s(G), e1 , c1 , e2 , . . . , ck1 , ek , t(G).
Parallel case: s(G) and t(G) constitute a split pair of G with split components
G1 , . . . , Gk (k 2). Then, the root of T is a P-node . Skl() consists of k parallel
edges between s(G) and t(G), denoted by e1 , . . . , ek .
Rigid case: none of the above cases applies. Let {s1 , t1 }, . . . , {sk , tk } be the
maximal split pairs of G. For i = 1, . . . , k, let Gi be the union of all the split
components of {si , ti }. The root of T is an R-node . Skl() is obtained from G
by replacing each Gi {G1 , . . . , Gk } with an edge ei = {si , ti }.
In the last three cases, has children 1 , . . . , k (in this order), such that
i is the root of the decomposition tree of graph Gi for all i {1, . . . , k}. The
virtual edge of node i is the edge ei in Skl(). Gi is called the pertinent graph
of i and is denoted by Prt(i ).
By the definition of T , no child of an S-node is an S-node and no child of a
P-node is a P-node. Also note that, for an R-node , the two poles of Skl() are
not adjacent in Skl(). A block of G is the pertinent graph of a node in T . For a
non-leaf node in T and each child of , we call Prt() a child block of Prt().
Lemma 1. Let z1 and z2 be two vertices of G such that adding a new edge
between z1 and z2 does not distroy the planarity of G. Then, it takes O(|G|) time
to convert G to a TTG G with poles z1 and z2 and to construct the corresponding
decomposition tree T of G. Moreover, every TTG G 0 with poles z1 and z2 such
that G 0 satisfies (G, F, S), can be obtained by performing a sequence of O(|G|)
following operations:
1. Flip the skeleton of an R-node of T around the poles of the skeleton.
2. Permute the children of a P-node of T .
3. Add a new Q-node child to a P-node of T such that originally has a
Q-node child; further add a virtual edge to the skeleton of .
A desired pair for (G, F, S) is an unordered pair {z1 , z2 } of two vertices of G
such that if (G, F, S) is satisfiable, then it is satisfied by a plane graph in which
both z1 and z2 appear on the boundary of the outer face.

120

Zhi-Zhong Chen and Xin He

Our algorithm is based on Lemma 1. In order to save time, we want to first


find a desired pair {z1 , z2 } for (G, F, S). If F is not a tree, then we can let {z1 , z2 }
be an edge such that there are two roots f1 and f2 in F with z1 LF (f1 ) and
z2 LF (f2 ). If F is a tree but |S| 2, then we can let z1 and z2 be two arbitrary
vertices in S. In case F is a tree and |S| 1, it is not easy to find out z1 and
z2 ; 4 is devoted to this case.
3.2

Basic Ideas

Suppose that we have found a desired pair {z1 , z2 } for (G, F, S) and have converted G to a TTG G with poles z1 and z2 . Throughout 3.2, 3.3, and 3.4, when
we say that (G, F, S) is not satisfiable, we mean that (G, F, S) is satisfied by no
plane graph in which z1 and z2 are on the boundary of the outer face.
Let T be the decomposition tree of G. Our algorithm processes the P- or
R-nodes of T in post-order. Processing a node is to perform Operations 1
through 3 in Lemma 1 on the subtree of T rooted at , and to modify Prt()
and hence G accordingly.
Before proceeding to the details of processing nodes, we need several definitions. For a block B of G, G B denotes the plane subgraph of G obtained
from G by deleting all vertices in V (B) {s(B), t(B)} and all edges in E(B).
For a plane subgraph H of G and a vertex f of F, H LF (f ) denotes the plane
subgraph of H induced by V (H) LF (f ).
Let be a node of T . Let B = Prt(). A vertex f in F is -through if B
LF (f ) contains a path between s(B) and t(B); is -out-through if (GB)LF (f )
contains a path between s(B) and t(B); is -critical if it is both -through and
-out-through. Note that if a vertex f of F is -critical (resp., -through, or
-out-through), then so is every ancestor of f in F. A vertex f of F is extreme
-critical if f is -critical but no child of f in F is. Define extreme -through
vertices and extreme -out-through vertices similarly.
Let 1 , . . . , k be the children of in T . For each i {1, . . . , k}, let ei be
the virtual edge of i in Skl(), and Bi = Prt(i ). For a vertex f of F, E,f
denotes the set {ei | f is i -through}. We say f is -cyclic, if the plane subgraph
of Skl() spanned by E,f contains a cycle. Note that if f is -cyclic, then so is
every ancestor of f in F. We say f is extreme -cyclic, if f is -cyclic but no
child of f in F is.
Lemma 2. For each node of T , there is at most one extreme -critical (resp.,
-through, or -out-through) vertex in F.
For each node in T , if there is a -through (resp., -out-through, or critical) vertex in F, then let x-thr() (resp., x-out-thr(), or x-crt()) denote the
extreme -through (resp., -out-through, or -critical) vertex in F; otherwise,
let x-thr() = (resp., x-out-thr() = , or x-crt() = ).
Let be a node of T . An embedding of Prt() is a TTG that is an edgeduplicated supergraph of Prt() and has the same poles as Prt(). In an embedding B of Prt(), the poles of B divide the boundary of the outer face of

Hierarchical Topological Inference on Planar Disc Maps

121

B into two paths, which are called the left side and the right side of B, respectively. An embedding B of Prt() is potential if for every vertex f in F with
V (B) LF (f ) 6= , each connected component of B LF (f ) is a superface of
B LF (f ) whose interior contains no vertex of S. When is a P-node (resp.,
R-node), a potential embedding B1 of Prt() is better than another potential
embedding B2 of Prt() if B1 has more sides consisting of exactly one edge
(resp., two edges) than B2 . An embedding of Prt() is optimal if it is potential
and no potential embedding of Prt() is better than it.
Lemma 3. Suppose that an embedding G 0 of G satisfies (G, F, S). Let be a
node of T . Let B be the subgraph of G 0 that is an embedding of Prt(). Let O
be an optimal embedding of Prt(). Then, the embedding of G obtained from G 0
by replacing B with O still satisfies (G, F, S).
Right before the processing of a P- or R-node , the following invariant holds
for all that is a non-S-child of or a child of an S-child of in T :
An optimal embedding B of Prt() has been fixed, except for a possible
flipping around its poles.
In the description of our algorithm, for convenience, we will denote the fixed
embedding of Prt() still by Prt() for all nodes of T that have been processed.
3.3

Processing R-Nodes

Let be an R-node of T . Let B = Prt() and K = Skl(). Let 1 , . . . , k be the


children of in T . For each i {1, . . . , k}, let ei be the virtual edge of i in K,
and Bi = Prt(i ).
Since is an R-node, each side of B contains at least two edges. If x-crt() =
f 6= , at least one side of B must be a part of the boundary of an inner 3-face
of the superface induced by LF (f ). In this case, if {s(B), t(B)} 6 E(G), then
(G, F, S) is not satisfiable because no side of B can be part of the boundary of
a 3-face in an embedding of G. So, we assume that {s(B), t(B)} E(G) when
x-crt() 6= . Processing is accomplished by performing the following steps:
R-Procedure:
1. Compute the rooted forest F 0 obtained from F by deleting all vertices that
are not -cyclic.
2. For all vertices f in F 0 , perform the following substeps:
(a) For every inner face F of K[E,f ], check if F is also an inner 3-face of
K; if not, stop immediately because (G, F, S) is not satisfiable.
(b) For every edge ei E,f that is not on the outer face of K[E,f ], check
if V (Bi ) LF (f ); if V (Bi ) 6 LF (f ), then stop immediately because
(G, F, S) is not satisfiable.

122

Zhi-Zhong Chen and Xin He

3. For all roots f in F 0 , perform the following substeps:


(a) For every edge ei E,f that is not on the outer face of K[E,f ], check
if (1) S (V (Bi ) {s(B), t(B)}) = and (2) both sides of Bi consist of
a single edge; if (1) or (2) does not hold, then stop immediately because
(G, F, S) is not satisfiable.
(b) For every vertex v of K that is not on the boundary of the outer face
of K[E,f ], check if v 6 S; if v S, then stop immediately because
(G, F, S) is not satisfiable.
(c) For every edge ei shared by the boundaries of the outer face of K[E,f ]
and some inner face F of K[E,f ], check if some side of Bi consists of a
single edge and has not been labeled with the index of a face other than
F ; if no such side exists, then stop immediately because (G, F, S) is not
satisfiable, while label one such side with the index of F otherwise.
4. For each side P of K consisting of exactly two edges, and for each edge ei on
P , if some side Pi of Bi consists of a single edge and has not been labeled,
then mark the side Pi of Bi outer.
5. For all child blocks Bj of B, if at least one of the following holds, then modify
B by flipping Bj around the poles of Bj :
A side of Bj is marked outer but is not on the boundary of the outer
face of B.
A side of Bj is labeled with the index of some face F of K but that side
is not on the boundary of the corresponding face of B.
6. If x-crt() = f1 6= , check whether some side of B consists of exactly two
edges and the common endpoint of the two edges is in LF (f1 ); if no such
side of B exists, then stop immediately because (G, F, S) is not satisfiable.
After is processed without failure, the invariant in 3.2 hold for .

3.4

Processing of P-Nodes

Let be a P-node of T . Let B = Prt(). Let 1 , . . . , k be the children of


in T . For each i {1, . . . , k}, let ei be the virtual edge of i in Skl(), and
Bi = Prt(i ).
If there is neither -cyclic vertex nor -critical vertex in F, then the processing of is finished by (1) checking if {s(B), t(B)} E(G) and (2) if so,
modifying B by permuting its child blocks so that edge {s(B), t(B)} forms one
side of B. So, assume that there is a -cyclic or -critical vertex in F. Then,
(G, F, S) is not satisfiable, if {s(B), t(B)}
6 E(G). So, further assume that
{s(B), t(B)} E(G). Since {s(B), t(B)} LF (f ) for all -through vertices
f in F, every -cyclic or -critical vertex must appear on the path P from
f0 = x-thr() to the root fr of the tree containing f0 in F. If fr is a -critical
vertex, we process by calling P-Procedure1 below; otherwise, we process by
calling P-Procedure2 below.

Hierarchical Topological Inference on Planar Disc Maps

123

P-Procedure1:
1. Let E,fr = {ei1 , . . . , eih } where i1 is a Q-node.
2. For all j {2, . . . , h}, mark eij if (1) some side of Bij does not consist of
exactly two edges, or (2) S (V (Bij ) {s(B), t(B)}) 6= , or (3) V (Bij ) 6
LF (f0 ).
3. Depending on the number m of marked edges, distinguish three cases:
Case 1: m = 0. Then, perform the following substeps:
(a) Modify B by permuting its child blocks so that (1) the edge Bi1 is
on the left side of B and (2) Bi1 , . . . , Bih appear consecutively.
(b) For each j {2, . . . , h}, add an edge {s(B), t(B)} right after Bij .
Case 2: m = 1. Let the marked edge be ei` , and perform the following:
(a) If i` is an R-node, perform the following substeps:
i. Check whether some side P 0 of Bi` satisfies that (1) there are
exactly two edges e01 and e02 on P 0 and (2) the common endpoint
of e01 and e02 is not in S but is in LF (f ) where f = x-thr(i` ).
(Comment: f is on P , i.e., f is an ancestor of f0 in F.)
ii. If P 0 does not exist, then stop immediately because (G, F, S) is
not satisfiable; otherwise, flip Bi` around its poles if P 0 is not
the left side of Bi` .
(b) If i` is an S-node, then perform the following substeps:
i. If i` has more than two children, then stop immediately because
(G, F, S) is not satisfiable.
ii. Let the children of i` be 1 and 2 . For each j {1, 2}, if no
side of Prt(j ) consists of a single edge, then stop immediately
for failure; otherwise, flip Prt(j ) around its poles when the left
side of Prt(j ) does not consist of a single edge.
(c) Modify B by permuting its child blocks so that (1) the edge Bi1 is on
the left side of B and (2) Bi1 , . . . , Bi` 1 , Bi` +1 , . . . , Bih , Bi` appear
consecutively in this order.
(d) For all j {2, . . . , h} {`}, add an edge {s(B), t(B)} right after Bij .
Case 3: m 2. Then, stop because (G, F, S) is not satisfiable.
P-Procedure2:
1. Perform Steps 1 and 2 of P-Procedure1.
2. Depending on the number m of marked edges, distinguish three cases:
Case 1: m = 0. Same as Case 1 in P-Procedure1.
Case 2: m = 1. Same as Case 2 in P-Procedure1.
Case 3: m = 2. Let ei` and ei`0 be the two marked edges where i` < i`0 .
Then, perform the following substeps:
(a) If i` is an R-node, then perform Substeps 3(a)i and 3(a)ii of PProcedure1; otherwise, perform Substeps 3(b)i and 3(b)ii of P-Procedure1.

124

Zhi-Zhong Chen and Xin He

(b) If i`0 is an R-node, perform the modification of Substeps 3(a)i and


3(a)ii of P-Procedure1 obtained by (1) changing i` to i`0 and (2)
changing the word left to right; otherwise, perform the modification of Substeps 3(b)i and 3(b)ii of P-Procedure1 obtained by
doing (1) and (2).
(c) Modify B by permuting its child blocks so that Bi`0 , Bi1 , . . . , Bi` 1 ,
Bi` +1 , . . . , Bi`0 1 , Bi`0 +1 , . . . , Bih , Bi` appear consecutively in this
order.
(d) For all j {2, . . . , h} {`, `0 }, add an edge {s(B), t(B)} right after
Bij .
Case 4: m 3. Then, stop because (G, F, S) is not satisfiable.
After is processed without failure, the invariant in 3.2 hold for .
Theorem 2. The overall algorithm can be implemented in O(|G| log |G|) time.

The Single-Tree Case

Assume that F is a tree and |S| 1. A candidate edge is an edge {z1 , z2 } of G


such that (1) the lowest common ancestor of z1 and z2 in F is the root of F,
and (2) if |S| = 1, then {z1 , z2 } S 6= .
A plane graph G witnesses (G, F, S) if (1) G is an edge-duplicated supergraph
of G, (2) for every non-leaf and non-root vertex f of F, G[LF (f )] is a superface
of G whose interior contains no vertex of S, (3) at most one face of G is a k-face
with k 4, and (4) if |S| = 1 and a k-face F with k 4 exists in G, then the
unique vertex of S appears on the boundary of F .
Lemma 4. Let {z1 , z2 } be a candidate edge of G. Then, (G, F, S) is satisfiable
if and only if there is a plane graph H such that (1) H witnesses (G, F, S) and
(2) both z1 and z2 appear on the boundary of the outer face in H.
Using Lemma 4 and modifying the algorithm in 3, we can prove:
Theorem 3. Given a graph-forest pair (G, F), it takes O(|F | + |G| log |G|) time
to decide whether (G, F) is the abstract of a planar disc map.

References
1. Z.-Z. Chen, M. Grigni, and C.H. Papadimitriou. Planar map graphs. Proc. 30th
STOC (1998) 514523. See http://rnc2.r.dendai.ac.jp/chen/papers/mg2.ps.gz for
a full version.
2. Z.-Z. Chen, X. He, and M.-Y. Kao. Nonplanar topological inference and politicalmap graphs. Proc. 10th SODA (1999) 195204.
3. G. Di Battista and R. Tamassia. On-line maintenance of triconnected components
with spqr-trees. Algorithmica 15 (1996) 302318.
4. G. Di Battista and R. Tamassia. On-line planarity testing. SIAM J. Comput. 25
(1996) 956997.

Hierarchical Topological Inference on Planar Disc Maps

125

5. M.J. Egenhofer. Reasoning about binary topological relations. In: O. Gunther and
H.J. Schek (eds.): Proc. Advances in Spatial Database (1991) 143160.
6. M.J. Egenhofer and J. Sharma. Assessing the consistency of complete and incomplete topological information. Geographical Systems 1 (1993) 4768.
7. M. Grigni, D. Papadias, and C.H. Papadimitriou. Topological inference. Proc. 14th
IJCAI (1995) 901906.
8. D. Papadias and T. Sellis. The qualitative representation of spatial knowledge in
two-dimensional space. Very Large Data Bases Journal 4 (1994) 479516.
9. T.R. Smith and K.K. Park. Algebraic approach to spatial reasoning. Int. J. on
Geographical Information Systems 6 (1992) 177192.
10. M. Thorup. Map graphs in polynomial time. Proc. 39th FOCS (1998) 396405.

Efficient Algorithms for the Minimum


Connected Domination on Trapezoid Graphs
Yaw-Ling Lin? , Fang Rong Hsu?? , and Yin-Te Tsai? ? ?
Providence University,
200 Chung Chi Road, Sa-Lu, Taichung Shang, Taiwan 433, R.O.C.
{yllin,frhsu,yttsai}@pu.edu.tw

Abstract. Given the trapezoid diagram, the problem of finding the


minimum cardinality connected dominating set in trapezoid graphs was
solved in O(m + n) time [7]; the results is recently improved to be O(n)
time by Kohler [5]. For the (vertex) weighted case, finding the minimum
weighted connected dominating set in trapezoid graphs can be solved
in O(m + n log n) time [11]. Here n (m) denotes the number of vertices
(edges) of the trapezoid graph.
In this paper, we show a different approach for finding the minimum
cardinality connected dominating set in trapezoid graphs using O(n)
time. For finding the minimum weighted connected dominating set, we
show the problem can be efficiently solved in O(n log log n) time.

Introduction

The intersection graph of a collection of trapezoids with corner points lying on


two parallel lines is called the trapezoid graph. Trapezoid graphs is first proposed
by Dagan et al. [3] showing that the channel routing problem is equivalent to the
coloring problems on trapezoid graphs. Throughout the paper, we use n (m) to
represent the number of vertices (edges) in the given graph. Ma and Spinrad [10]
show that trapezoid graphs can be recognized in O(n2 ) time. Note that trapezoid
graphs are cocomparability graphs, and properly contain both interval graphs
and permutation graphs [1]. Note that interval graphs are the intersection graph
of intervals on a real line; permutation graphs are the intersection graph of line
segments whose endpoints lying on two parallel lines.
A dominating set of a graph G = (V, E) is a subset D of V such that every
vertex not in D is adjacent to at least one vertex in D. Each vertex v V can
be associated with a (non-negative) real weight, denoted by w(v). The weighted
domination
problem is to find a dominating set, D, such that its weight w(D) =
P
w(v)
is
minimized. A dominating set D is independent, connected or total
vD
?

??
???

Corresponding author. Department of Computer Science and Information Management. The work was partly supported by the National Science Council, Taiwan,
R.O.C, grant NSC-88-2213-E-126-005.
Department of Accounting.
Department of Computer Science and Information Management.

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 126136, 2000.
c Springer-Verlag Berlin Heidelberg 2000

Efficient Algorithms for the Minimum Connected Domination

127

if the subgraph induced by D has no edge, is connected, or has no isolated vertex,


respectively. Dominating set problem and its variants have many applications
in areas like bus routing, communication network, radio broadcast, code-word
design, and social network [4].
The decision version of the weighted domination problem is NP-complete
even for cocomparability graphs [2]. For trapezoid graphs, Liang [8] shows that
the minimum weighted domination and the total domination problem can be
solved in O(mn) time. Lin [9] show that the minimum weighted independent
domination in trapezoid graphs can be found in O(n log n) time. Srinivasan et al.
[11] show that the minimum weighted connected domination problem in trapezoid graphs can be solved in O(m + n log n) time. For the unweighted case,
the O(n log n) factor is improved by Liang [7], who show that the minimumcardinality connected domination problem in trapezoid graphs can be solved in
O(m+ n) time. However, since the number of edges, m, can be as large as O(n2 ),
the potential time-complexity of the algorithm is still O(n2 ). In this paper, we
show that the minimum cardinality connected domination problem in trapezoid
graphs can be solved optimally in O(n) time. Further, for the weighted case, we
show the problem can be efficiently solved in O(n log log n) time.
This paper is organized as follows. Section 2 establishes basic notations and
some interesting properties of trapezoid graphs concerning the connected domination problem. Section 3 gives our O(n)-time algorithm of finding the minimumsized connected dominating set in trapezoid graphs. Section 4 shows that finding
the minimum weighted connected domination can be done in O(n log log n) time.
Finally, we conclude our results in Section 5.

Basic Notations and Properties

A graph G = (V, E) is a trapezoid graph if there is a trapezoid diagram T such


that each vertex vi in V corresponds to a trapezoid ti in T and (vi , vj ) E
if and only if ti and tj intersects in the trapezoid diagram. Here the trapezoid
diagram consists of two parallel lines L1 (the upper line) and L2 (the lower line).
Further, a trapezoid ti is defined by four corner points ai , bi , ci , di such that
[ai ..bi ] ([ci ..di ]) is the top (bottom) interval of trapezoid ti on L1 (L2 ); note that
ai < bi and ci < di .
It can be shown that any trapezoid diagram can be transformed into another
trapezoid diagram with all corner points are distinct while the two diagrams still
correspond to the same trapezoid graph. Thus, we assume that the two parallel
lines, L1 and L2 , are labeled with consecutive integer values 1, 2, 3, . . . , 2n from
left to right; that is, ni=1 {ai , bi } = ni=1 {ci , di } = [1..2n]. We assume that these
trapezoids are labeled in increasing order of their corner points bi s. We define
two trapezoids ti tj if bi < aj and di < cj ; that is, the top (bottom) interval
of ti totally lies on the left of the top (bottom) interval of tj . Given a trapezoid
diagram, the corresponded partial ordered set is a trapezoid order. Note that two
trapezoids tk , tl intersect each other (denoted by tk tl ) if and only if neither

128

Yaw-Ling Lin, Fang Rong Hsu, and Yin-Te Tsai

tk tl nor tl tk ; that is, they are incomparable in the trapezoid (partial)


order.
Throughout the paper, we use the words trapezoid and vertex interchangeably for convenience. A vertex vi (vj ) is called a left (right) dominator if
and only if there are no vertices lie on the left (right) of vi (vj )in the trapezoid
diagram. That is, (v V )(v 6 vi ) and (v V )(vj 6 v). Let D be a minimum
cardinality connected dominating set of the trapezoid graph G. Clearly, |D| = 1
if and only if there is a vertex v G that is a left and right dominator at the
same time.
Two adjacent vertices u, v form a source pair (sink pair) if and only if there
are no vertices lie on the left (right) of u and v at the same time. A vertex v is
a source (sink) vertex if there is another vertex u such that {u, v} form a source
(sink) pair.
Proposition 1. Given the trapezoid diagram, v is a source (sink) vertex if and
only if there is a left (right) dominator d V such that v d. It is easily seen
that |D| = 2 if and only if |D| =
6 1 and there is a pair {u, v} G that is a source
pair and a sink pair at the same time. For |D| 3, we have the following lemma
[6] for cocomparability graphs; it thus holds for trapezoid graphs as well.
Lemma 1. For a connected cocomparability graph G, there exists a minimum
cardinality connected dominating set that induces a simple path in G. Furthermore, let P = hp1 , . . . , pk i be such a path with k 3, then pi pi+2 for
1 i k 2, and every vertex before min{p1 , p2 } is covered by {p1 , p2 } and
every vertex after max{pk1 , pk } is covered by {pk1 , pk }.
Now consider the case that |D| 3. Within all left dominators, let b (d) be
the vertex having the rightmost top (bottom) corner; it is possible that b, d are
the same vertex. By Lemma 1 and Proposition 1, it follows that the minimum
cardinality connected dominating set for |D| 3 can be found by finding a
shortest-length path, from b or d, until one of the leftmost left dominators {a, c}
is reached. That is, let Pba , Pbc , Pda , Pdc denote these four shortest paths. Among
these four paths, the one with the smallest cardinality is the desired minimum
cardinality connected dominating set.

Minimum Cardinality Connected Domination

Immediately following the previous discussions, the strategy of the algorithm


can be described as following: for each vertex v, decide whether v is a left (right)
dominator, and check for the special cases for 1 |D| 2. If it turns out that
|D| 3, we can find the shortest-length path from the rightmost corners of left
dominators until reaching the first right dominator.
We first show that all the dominators can be found in O(n) time. Consider
the right (left) tangent edge of a trapezoid ti , the vertical line segment bi di
(ai ci ) connecting L1 and L2 , is called a right (left) stick, denoted by ri = bi di
(li = ai ci ). Treating a stick as a degenerated case of trapezoid, we say sticks

Efficient Algorithms for the Minimum Connected Domination

129

ri rj if and only if bi < bj and di < dj . A group of sticks, S, is called a pencil


if every two sticks of S intersect each other. Consider the set of all right sticks
S = {r1 , r2 , . . . , rn }. A stick in S is eliminated if there is another stick lies on the
left of it; the resulting sticks form a left-pencil, denoted by L = hri1 , ri2 , . . . , rik i.
Note that bi1 < bi2 < < bik , but di1 > di2 > > dik . It is readily seen that
vertices {vi1 , vi2 , . . . , vik } are left dominators. The following discussions concern
properties of the left-pencil; similar properties hold for the right-pencil as well
by symmetry .
Proposition 2. Let L be the left-pencil of the trapezoid diagram. A vertex v is
not a left dominator if and only if (r L)(r v). Further, the left-pencil L
can be found in O(n) time. The left-pencil structure provides an efficient way
of checking whether a given vertex is a left dominator.
Lemma 2. All left (right) dominators of the trapezoid graph can be identified
in O(n) time.
After obtaining all left dominators VL and right dominators VR in O(n) time,
we compute the rightmost top (bottom) corners among all left dominators; let
b = max{bi | vi VL }, d = max{di | vi VL }. The computation of corners b
and d clearly takes O(n) time. Symmetrically, the leftmost top (bottom) corners
among all right dominators, a = min{ai | vi VR }, c = min{ci | vi VR } is
computed in O(n) time. For brevity, when the context is clear, we also use a, c
(b, d) to denote the vertices vi s whose ai s, ci s (bi s, di s) values are minimized
(maximized).
Let D denote the minimum cardinality connected dominating set. Recall
that, |D| = 1 if and only if there is a vertex v being a left and right dominator
at the same time; it can be easily checked within O(n) time. Now consider the
case that |D| = 2. In which case, we say that D = {u, v} is a dominating pair. It
is possible that both vertices of D are dominators, one left dominator and one
right dominator. In which case, we must have a < b or c < d; it follows that
D = {a, b} or {c, d}. However, there is another possibility for |D| = 2:
Proposition 3. Let D = {u, v} be a dominating pair of a trapezoid diagram T .
If none of the left dominators of T intersects with any of the right dominators,
i.e., b < a and d < c, then neither u nor v is a dominator.
Now consider the left-pencil L = hri1 , ri2 , . . . , rig i and the right-pencil R =
h`j1 , `j2 , . . . , `jh i. By Proposition 3 and 2, neither u nor v fully dominates L or
R although {u, v} collectively dominate both L and R. Thus, we have two types
of coverage of L and R in terms of the shapes of intersection of trapezoids u and
v.
Case 1: the X-shaped intersection. That is, we have u {rig0 +1 , . . . , rig }
{`jh0 +1 , . . . , `jh } and v {ri1 , . . . , rig0 } {`j1 , . . . , `jh0 }.
Case 2: the 8-shaped intersection. That is, we have u {rig0 +1 , . . . , rig }
{`j1 , . . . , `jh0 } and v {ri1 , . . . , rig0 } {`jh0 +1 , . . . , `jh }.
We can show that
Lemma 3. The X-shaped (8-shaped) dominating pair of a trapezoid diagram
can be found in O(n) time.

130

Yaw-Ling Lin, Fang Rong Hsu, and Yin-Te Tsai

Theorem 1. The minimum cardinality connected dominating set of a trapezoid


diagram can be found in O(n) time.

Algorithm MCDS(T )
Input: A trapezoid diagram T with n trapezoids. Each trapezoid vi is defined
by four corner points ai , bi , ci , di , 1 i n. They are labeled with consecutive
n
integer values 1, 2, 3, . . . , 2n; that is, n
i=1 {ai , bi } = i=1 {ci , di } = [1..2n].
Output: A minimum cardinality connected dominating set D.
Step 1: Identify all left dominators VL and right dominators VR .
Step 2: |D| = 1 if VL VR 6= ; output any vertex v VL VR as the singleton
dominating set and stop.
Step 3: Compute b = max{bi | vi VL }; d = max{di | vi VL }; a = min{ai |
vi VR }; c = min{ci | vi VR }.
Step 4: (* Deal with |D| = 2. *) Stop and output D = {a, b} if a < b; stop
output {c, d} if c < d. Further, stop and output D if there is a dominating
pair with X-shaped or 8-shaped intersection.
Step 5: (* Now, |D| 3. *) Let Pba , Pbc , Pda , Pdc be the four shortest paths
from {b, d} to {a, c}. Among these four paths, output the one with the smallest
cardinality.
End of MCDS

Fig. 1. Finding the minimum cardinality connected dominating set in trapezoid


graphs.

Proof. The algorithm is shown in Figure 1. Note that Step 1 of the algorithm
takes O(n) time by Lemma 2. Clearly Step 2 and Step 3 can be done in O(n)
time. Step 4 is the most complicated case of the algorithm; it has been shown
in Lemma 3 that the dominating set can be correctly found in O(n) time.

The rest of the proof appears in the complete paper.

Minimum Weighted Connected Domination

A minimal connected dominating set is a connected dominating set such that


the removal of any vertex leaves the resulting subset being no longer a connected
dominating set. It is easily seen that a minimum weighted connected dominating
set is minimal since the assigned weights are non-negative. It can be shown [11]
that a minimal connected dominating set of a trapezoid graph is consisted of
three parts: S, P , and T ; here S denotes the set of a dominating source (a left
dominator or a source pair), T denotes the set of a dominating target (a right
dominator or a sink pair), and P denotes a (lightest) chordless path from S to T .
Note that the dominating source (target) can be a singleton or a pair of vertices.

Efficient Algorithms for the Minimum Connected Domination

131

We associate with each vertex v an aggregated weight, w0 (v), to be the sum


of weights of the minimum connected dominating vertices from the source set to
v, containing the vertex v as the dominating set. In other words,
X
w(u) | P : a path from a left dominator (source pair) to v}
w0 (v) = min{
uP

We first show that the source vertices can be initialized efficiently. The aggregated weight for a left dominator u is, by definition, w0 (u) = w(u). For a nondominator source vertex v, it joins with another vertex x to form a minimum
weighted source pair containing v. It is possible that the joint partner x is a
dominator; the aggregated weight of v can be thus deduced from the dominator.
The general scheme of the algorithm will deal with the situation properly. Otherwise, x is another non-dominator but together {v, x} constitute a minimum
weighted source pair. We call such kind of a source pair a non-dominator source
pair.
Lemma 4. The aggregated weights of all non-dominator source pairs of the
trapezoid graph can be found in O(n) time.
Proof. The proof appears in the complete paper.

Let two adjacent vertices {u, v} form a sink pair. If neither u nor v is a right
dominator, we call such kind of a sink pair a non-dominator sink pair. Note
that the target vertices can either be a singleton right dominator or two vertices
forming a non-dominator sink pair. For each non-dominator sink vertex v, there
is a (possibly none existed) lightest non-dominator vertex x so that together
{v, x} form a non-dominator sink pair. We assign such a non-dominator sink
vertex v a modified weight of v with a value w(v) + w(x). We can show that
Lemma 5. The modified weights of all non-dominator sink pairs of the trapezoid
graph can be found in O(n) time.
Proof. The proof appears in the complete paper.

We now present our method of calculating the aggregated weights of every


vertex. The idea is to set up two priority queues, say Q1 and Q2 , along with
the two parallel lines, L1 and L2 , on the trapezoid diagram. The (so far calculated) aggregated weights of the vertices are stored upon the priority queues.
The algorithm will consider both of the priority queues and sweep along left (top
or bottom) corners of trapezoids in a zigzag fashion. Note that we record the
aggregated weights upon the positions of right corners of the trapezoids considered so far; the aggregated weights are kept according to the increasing order
along the parallel lines. Since the input diagram of the trapezoid graph is given
in a finite range of integers, we can use the data structure of van Emde Boas[12]
to maintain a priority queue such that each operation of inserting, searching,
and deleting an element in the priority queue can be done in O(log log n) time.
Thus, by carefully maintaining the priority queues and balancing the order of
the visited vertices, we can show that

132

Yaw-Ling Lin, Fang Rong Hsu, and Yin-Te Tsai

Lemma 6. The aggregated weights of all vertices of the trapezoid graph can be
found in O(n log log n) time.
Proof. We begin by inserting the aggregated weights of all the left dominators
and non-dominator source pairs into the priority queues Q1 and Q2 . Note that
the top right corners of source vertices are inserted into Q1 , and the bottom
right corners are inserted into Q2 . The aggregated weights are kept on both
priority in increasing (weighted) order. Let the currently maintained list on Q1 =
hvi1 , vi2 , . . . , vik i. It follows that bi1 < bi2 < < bik and w0 (vi1 ) < w0 (vi2 ) <
< w0 (vik ). Symmetrically, let Q2 = hvj1 , vj2 , . . . , vjk i; we have dj1 < dj2 <
< djk and w0 (vj1 ) < w0 (vj2 ) < < w0 (vjk ). In particular, assume that a
vertex v with position b(v) [vig ..vig+1 ] is inserted into Q1 . In the following, we
describe how to join a vertex v into Q1 : The vertex v is discarded if w0 (v) >
w0 (vig+1 ). Otherwise, we insert the vertex v into Q1 and remove all vertices lied
on the left of b(v) with w0 () larger than w0 (v). The operation of joining d(v)s
into Q2 follows symmetrically.
After the source vertices have been properly joined into Q1 and Q2 , let
Q1 = hvi1 , vi2 , . . .i and Q2 = hvj1 , vj2 , . . .i. The algorithm starts by checking
the smaller value of {w0 (vi1 ), w0 (vj1 )}. Assume that w0 (vi1 ) w0 (vj1 ); it follows
that vertices vi s with their top left corners satisfying ai < bi1 now have their
aggregated values decided. That is, w0 (vi ) = w(vi ) + w0 (vi1 ). The situation is
illustrated in Figure 2. Note that the top right corner of the vertex vi will then

a(v)

b(x)

Q1
v

Q1

w'(v) = w(v) + w'(x)


Q2

v
c(v)

d(x)

w'(v) = w(v) + w'(x)


Q2

Fig. 2. Finding the aggregated weights of all vertices.

be joined into Q1 , and the bottom right corner of the vertex vi will be joined
into Q2 . We then discard the vertex vi1 from Q1 . The case that w0 (vj1 ) < w0 (vi1 )
can be handle symmetrically.
It is readily verified that the algorithm described above gives the correct aggregated weights of all vertices, and the total efforts spent is at most O(n log log n)

time. The rest of the proof appears in the complete paper.
Let two adjacent vertices {u, v} form a dominating pair of the trapezoid
graph. There are three kinds of dominating pairs. The first case of a dominating
pair is when one of the vertices is a left dominator and the other vertex is a right
dominator. It is easily seen that the general scheme of the algorithm deal with

Efficient Algorithms for the Minimum Connected Domination

133

the situation correctly. The second case of a dominating pair is when one of the
vertices is a dominator, but the other vertex is not a dominator. Here we show
how to find the minimum weighted connected dominating pair of such kind.
Lemma 7. The minimum weighted connected dominating pair, forming by a
dominator and a non-dominator, can be found in O(n) time given the trapezoid
diagram.
Proof. The proof appears in the complete paper.

The third case of a dominating pair is when none of the vertices is a dominator.
That is, we have a X-shaped or a 8-shaped dominating pair. The case considered
here is actually the most complicated situation of the algorithm. We can also
show that
Lemma 8. The minimum weighted connected, X-shaped or 8-shaped, dominating pair of a trapezoid diagram can be found in O(n log log n) time.
Proof. First we show that the minimum weighted dominating pair with Xshaped intersection can be found in O(n log log n) time. Let the left-pencil L =
hri1 , ri2 , . . . , rig i and the right-pencil R = h`j1 , `j2 , . . . , `jh i. Further, let the minimum weighted dominating pair be the set {v, x}. Without loss of generality we
may assume that vertex v dominates the lower part of L and the upper part of
R, while x dominates the upper part of L and the lower part of R. The idea here
is that, while the bottom left corner of v located at interval [dik+1 ..dik ], the top
left corner of x must be located before the position bik ; i.e., a(x) [bi1 ..bik ]. So,
by pairing these {v, x}s pair and checking their domination of the right-pencil,
we can find the minimum, X-shaped, dominating pair.
Maintain two priority queues: Q1 for the upper intervals of right-pencil and
Q2 for the lower intervals of the right-pencil. Note that Q1 is initialized by inserting all upper positions of the right-pencil R. Scan each vertex x within [bi1 ..bi2 ],
the first upper interval of L. Recall the join operation we defined in Lemma 6.
We will join the bottom right corners of x (as well as their corresponded weights
w(x)s) into the queue Q2 . Then, for each vertex v within the last lower interval
of L, [di1 ..di2 ], we probe the top right corners of v to seek its position in Q1 , say
b(v) [ajk ..ajk+1 ]. It follows that those xs whose bottom right corners greater
than cjk+1 can be paired with v to become a dominating pair. To get the lightest
joint vertex, we can probe cjk+1 into Q2 , seeking to the right, and obtain the desired minimum joint partner x. We maintain the sum of weights of the lightest
dominating pair obtained so far; each time a joint partner is found, the sum of
their weights is compared with it. The minimum weighted dominating pair can
thus be found by this manner. The situation is illustrated in Figure 3.
We obtain the final minimum weighted dominating pair by successively joining the vertices cornered at [bi2 ..bi3 ] into Q2 and probing vertices cornered at
[di2 ..di3 ] into Q1 , and so on, until the final intervals [big1 ..big ] and [dig1 ..dig ]
have been reached. Note that positions d(x)s are accumulatively joined (with
side effects) into Q2 while positions b(v)s are probed into Q1 interleavedly with
joining of d(x)s. Since each operation to the priority queue takes O(log log n)

134

Yaw-Ling Lin, Fang Rong Hsu, and Yin-Te Tsai

probe b(v)
a(x)

L
c(v)

Q1

a(x)

R
c(v)

join d(x)

join b(x)

Q1

Q2

Q2

probe d(v)

Fig. 3. Finding a X-shaped (left), or a 8-shaped (right) minimum weighted


dominating pair.

time, and we spend only a constant number of queue operations for each vertex,
it is not hard to see that the total efforts spent is at most O(n log log n) time.
The case of 8-shaped dominating pair is similar to the case discussed above.

The rest of proof appears in the complete paper.
We are now ready to show that
Theorem 2. The minimum weighted connected dominating set of a trapezoid
diagram can be found in O(n log log n) time.

Algorithm WCDS(T )
Input: A trapezoid diagram T with n trapezoids.
Output: A minimum weighted connected dominating set D.
Step 1: Find the left-pencil (right-pencil) and all left (right) dominators.
Step 2: Initialize the aggregated weights of left-dominators and non-dominator
source pair.
Step 3: Find the non-dominator sink pairs, set their modified weights, and mark
these right dominators and non-dominator sink pairs as the target vertices.
Step 4: Calculate the aggregated weights w0 () of all the vertices along the
two parallel lines. Scan through each right dominator and the modified sink
pairs, and find the one with the minimum aggregated weight. Let the resulting
aggregated weight of the dominating set be w1 .
Step 5: Compute the minimum dominating pair, forming by a dominator and
a non-dominator. Let the resulting weight of the pair be w2 .
Step 6: Compute the minimum dominating pair with X-shaped or 8-shaped
intersection. Let the resulting weight of the minimum dominating pair be w3 .
Step 7: The smallest value within the set {w1 , w2 , w3 } is the desired weight of
the minimum weighted connected dominating set. Output the corresponded
dominating set D by tracing back the predecessor links.
End of WCDS

Fig. 4. Finding the minimum weighted connected dominating set in trapezoid


graphs.

Efficient Algorithms for the Minimum Connected Domination

135

Proof. The algorithm is shown in Figure 4. Note that Step 1 to Step 3 takes O(n)
time by Lemma 2, 4, and 5. Step 4, by Lemma 6, can be done in O(n log log n)
time. Step 5 can be done within O(n) time by Lemma 7. Step 6 is the most
complicated case of the algorithm; Lemma 8 shows that it takes O(n log log n)

time. The rest of the proof appears in the complete paper.

Concluding Remarks

Note that previous results [7, 11] solved the problems by checking all possible
source and sink pairs; thus they had to spend O(m + n) time for the unweighted
case and O(m + n log n) time for the weighted case even when the trapezoid
diagram was given. Note that the size of the trapezoid diagram is just O(n),
but these algorithms still spend potentially (n2 ) time when the size of edges
is large.
Recently, Kohler [5] presents an O(n) time algorithm for finding the minimum cardinality connected dominating set in trapezoid graphs. Using different
approach, our algorithm exploits the pencil structure within the trapezoid diagram to find the minimum-sized connected dominating set in O(n) time. For
the weighted problem, our algorithm again uses the pencil structure as well as
priority queues of finite integers [12] to find the minimum weighted connected
dominating set in O(n log log n) time.

References
[1] Andreas Brandst
adt, Van Bang Le, and Jeremy P. Spinrad. Graph Classes: A Survey. SIAM monographs on discrete mathematics and applications, Philadelphia,
P. A., 1999.
[2] M.-S. Chang. Weighted domination of cocomparability graphs. Discr. Applied
Math., 80:135148, 1997.
[3] I. Dagan, M.C. Golumbic, and R.Y. Pinter. Trapezoid graphs and their coloring.
Discr. Applied Math., 21:3546, 1988.
[4] T.W. Haynes, S.T. Hedetniemi, and P.J. Slater. Fundamentals of Domination in
Graphs. Marcel Dekker, Inc., N. Y., 1998.
[5] E. Kohler. Connected domination and dominating clique in trapezoid graphs.
Discr. Applied Math., 99:91110, 2000.
[6] D. Kratsch and L. K. Stewart. Domination on cocomparability graphs. SIAM J.
Discrete Math., 6(3):400417, 1993.
[7] Y. D. Liang. Steiner set and connected domination in trapezoid graphs. Information Processing Letters, 56(2):101108, 1995.
[8] Y. Daniel Liang. Dominations in trapezoid graphs. Information Processing Letters,
52(6):309315, December 1994.
[9] Yaw-Ling Lin. Fast algorithms for independent domination and efficient domination in trapezoid graphs. In ISAAC98, LNCS 1533, pages 267276, Taejon,
Korea, December 1998. Springer-Verlag.
[10] T.-H. Ma and J.P. Spinrad. On the 2-chain subgraph cover and related problems.
J. Algorithms, 17:251268, 1994.

136

Yaw-Ling Lin, Fang Rong Hsu, and Yin-Te Tsai

[11] Anand Srinivasan, M.S. Chang, K. Madhukar, and C. Pandu Rangan. Efficient algorithms for the weighted domination problems on trapezoid graphs. Manuscript,
1996.
[12] P. van Emde Boas. Preserving order in a forest in less than logarithmic time and
linear space. Information Processing Letters, 6:8082, 1977.

Parameterized Complexity of Finding Subgraphs


with Hereditary Properties?
Subhash Khot1 and Venkatesh Raman2
1

Department of Computer Science, Princeton University, New Jersey, USA


[email protected]
2
The Institute of Mathematical Sciences, Chennai-600113, INDIA
[email protected]

Abstract. We consider the parameterized complexity of the following


problem under the framework introduced by Downey and Fellows[4]:
Given a graph G, an integer parameter k and a non-trivial hereditary
property , are there k vertices of G that induce a subgraph with property ? This problem has been proved NP-hard by Lewis and Yannakakis[9]. We show that if includes all independent sets but not all
cliques or vice versa, then the problem is hard for the parameterized
class W [1] and is fixed parameter tractable otherwise. In the former
case, if the forbidden set of the property is finite, we show, in fact, that
the problem is W [1]-complete (see [4] for definitions). Our proofs, both of
the tractability as well as the hardness ones, involve clever use of Ramsey
numbers.

Introduction

Many computational problems typically involve two parameters n and k, e.g.


finding a vertex cover or a clique of size k in a graph G on n vertices. The
parameter k contributes to the complexity of the problem in two qualitatively
different ways. The parameterized versions of Vertex Cover and Undirected
Feedback Vertex Set problems can be solved in O(f (k)n ) time where n is
the input size, is a constant independent of k and f is an arbitrary function
of k (against a naive (nck ) algorithm for some constant c). This good behavior, which is extremely useful in practice for small values of k, is termed fixed
parameter tractability in the theory introduced by Downey and Fellows[2,3,4].
On the other hand, for problems like Clique and Dominating Set, the
best known algorithms for the parameterized versions have complexity (nck )
for some constant c. These problems are known to be hard for the parameterized
complexity classes W [1] and W [2] respectively and are considered unlikely to
be fixed parameter tractable (denoted by FPT) (see [4] for the definitions and
more on the parameterized complexity theory). In this paper, we investigate
the parameterized complexity of finding induced subgraphs of any non-trivial
hereditary property in a given graph.
?

Part of this work was done while the first author was at IIT Bombay and visited the
Institute of Mathematical Sciences, Chennai

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 137147, 2000.
c Springer-Verlag Berlin Heidelberg 2000

138

Subhash Khot and Venkatesh Raman

A graph property is a collection of graphs. A graph property is nontrivial if it holds for at least one graph and does not include all graphs. A
non-trivial graph property is said to be hereditary if a graph G is in property
implies that every induced subgraph of G is also in . A graph property is said
to be interesting [9] if the property is true (as well as false) for infinite families of
graphs. Lewis and Yannakakis[9] (see also [6]) showed that if is a non-trivial
and interesting hereditary property, then it is NP-hard to decide whether in a
given graph, k vertices can be deleted to obtain a graph which satisfies .
For a hereditary property , let F be the family of graphs not having the
property. The set of minimal members (minimal with respect to the operation
of taking induced subgraphs) of F is called the forbidden set for the property
. For example, the collection of all bipartite graphs is a hereditary property
whose forbidden set consists of all odd cycles. Conversely, given any family F of
graphs, we can define a hereditary property by declaring its forbidden set to be
the set of all minimal members of F.
Cai[1] has shown that the graph modification problem for a non-trivial hereditary property with a finite forbidden set is fixed parameter tractable (FPT).
This problem includes the node deletion problem addressed by Lewis and Yannakakis (mentioned above). While the parameterized complexity of the question,
when is a hereditary property with an infinite forbidden set, is open, we address the parametric dual problem in this paper. Given any property , let
P (G, k, ) be the problem defined below.
Given: A simple undirected graph G(V, E)
Parameter: An integer k |V |
Question: Is there a subset V 0 V with |V 0 | = k such that the subgraph
of G induced by V 0 has property ?
This problem is the same as |V | k node deletion problem (i.e. can we
remove all but k vertices of G to get a graph with property ) and hence NPhard. However the parameterized complexity of this problem doesnt follow from
Cais result. We prove that if includes all independent sets, but not all cliques
or vice versa, then the problem P (G, k, ) is W [1]-complete when the forbidden
set of is finite and W [1]-hard when the forbidden set is infinite. The proof is
by a parametric reduction from the Independent Set problem. If includes
all independent sets and all cliques, or excludes some independent sets and some
cliques then we show that the problem is fixed parameter tractable.
Note, from our and Cais result, that the parameterized dual problems dealt
with, have complimentary parameterized complexity. This phenomenon has been
observed in a few other parameterized problems as well. In a graph G(V, E),
finding a vertex cover of size k is FPT whereas finding an independent set of size
k (or a vertex cover of size |V | k) is W [1]-complete; In a given boolean 3-CNF
formula with m clauses, finding an assignment to the boolean variables that
satisfies at least k clauses is FPT whereas finding an assignment that satisfies
at least (m k) clauses (i.e. all but at most k clauses) is known to be W [P ]hard [2] (k is the parameter in both these problems). The k-Irredundant Set
problem is W [1]-hard whereas Co-Irredundant set or (n k) Irredundant

Parameterized Complexity of Finding Subgraphs with Hereditary Properties

139

Set problem is FPT [5]. Our result adds one other (general) problem to this
list.
Throughout the paper, by a graph we mean an undirected graph with no
loops or multiple edges. By a non-trivial graph, we mean a graph with at least
one edge. Given a graph G and A V (G), by IG (A) we mean the subgraph
of G induced by vertices in A. For two graphs H and G, we use the notation
H G to mean that H is isomorphic to an induced subgraph of G. For the
graph properties we will be concerned with in this paper, we assume that
is recursive; i.e. given a graph G on n vertices, one can decide whether or not G
has property in f (n) time for some function of n.
We had already defined the notion of fixed parameter tractable problems. To
understand the hardness result, we give below some definitions. See [4] for more
details.
A parameterized language L is a subset of N where is some finite
alphabet and N is the set of all natural numbers. For (x, k) L, k is the
parameter. We say that a parameterized problem A reduces to a parameterized
problem B, if there is an algorithm which transforms (x, k) into (x0 , g(k)) in
time f (k)|x| where f, g : N N are arbitrary functions and is a constant
independent of k, so that (x, k) A if and only if (x0 , g(k)) B. The essential
property of parametric reductions is that if A reduces to B and if B is FPT,
then so is A.
Let F be a family of boolean circuits with and, or and not gates; We allow that
F may have many different circuits with a given number of inputs. Let the weight
of a boolean vector be the number of 1s in the vector. To F we associate the parameterized circuit problem LF = {(C, k) : C accepts an input vector of weight
k}. Let the weft of a circuit be the maximum number of gates with fan-in more
than two, on an input-output path in the circuit.
A parameterized problem L belongs to W [t] if L reduces to the parameterized
circuit problem LF (t,h) for the family F (t, h) of boolean circuits with the weft
of the circuits in the family bounded by t, and the depth of the circuits in the
family bounded by a constant h. This naturally leads to a completeness program
based on a hierarchy of parameterized problem classes:

F P T W [1] W [2] . . .
The parameterized analog of NP is W [1], and W [1]-hardness is the basic
evidence that a parameterized problem is unlikely to be FPT.
The next section deals with the hereditary properties for which the problem
is fixed parameter tractable, and Section 3 proves the W [1]-hardness result for
the remaining hereditary properties. Section 4 concludes with some remarks and
open problems.

140

Subhash Khot and Venkatesh Raman

Hereditary Properties That Are FPT to Find

Lemma 1. If a hereditary property includes all independent sets and all


cliques, or excludes some independent sets as well as some cliques, then the
problem P (G, k, ) is fixed parameter tractable.
Proof. For any positive integers p and q, there exists a minimum number R(p, q)
(the Ramsey number) such that any graph on at least R(p, q) vertices contains
either a clique of size p or an independent set of size q. It is well-known that
R(p, q) p+q2
q1 [8].
Assume that includes all cliques and independent sets. For any graph G
with |V (G)| R(k, k), G contains either a clique of size k or an independent set
of size k. Since all independent sets and all cliques have property , the answer
to the problem P (G, k, ) in this case is yes.
When |V (G)| R(k, k), we can use brute force by picking all k-elements subsets of V (G) and checking whether the induced subgraph on the subset has prop
f (k) where f (k) is the time to decide whether
erty . This will take time R(k,k)
k
a given graph on k vertices has property . Thus the problem P (G, k, ) is fixed
parameter tractable.
If excludes some cliques and some independent sets, let s and t respectively
be the sizes of the smallest clique and independent set which do not have property
. Since any graph with at least R(s, t) vertices has either a clique of size s or
an independent set of size t, no graph with at least R(s, t) vertices can have
property (since is hereditary). Hence any graph in has at most R(s, t)
vertices and hence contains only finitely many graphs. So if k > R(s, t), then
the answer to the P (G, k, ) problem is NO for any graph G. If k R(s, t), then
check, for each k subset of the given vertex set, whether
 the induced subgraph
on the subset has property . This will take time nk f (k) CnR(s,t) for an n
vertex graph, where C is time taken to check whether a graph of size at most
R(s, t) has property . Since s and t depend only on the property , and not
on k or n, and k R(s, t), the problem P (G, k, ) is fixed parameter tractable
2
in this case also.
We list below a number of hereditary properties (dealt with in [11]) each of
which includes all independent sets and cliques, and hence for which the problem
P (G, k, ) is fixed parameter tractable.
Corollary 1. Given any simple undirected graph G, and an integer k, it is fixed
parameter tractable to decide whether there is a set of k vertices in G that induces
(a) a perfect graph, (b) an interval graph (c) a chordal graph, (d) a split graph,
(e) an asteroidal triple free (AT-free) graph, (f ) a comparability graph, or (g) a
permutation graph. (See [11] or [7] for the definitions of these graphs.)

Hereditary Properties That Are W-Hard to Find

In this section, we show that the problem P (G, k, ) is W [1]-hard if includes


all independent sets but not all cliques or vice versa.

Parameterized Complexity of Finding Subgraphs with Hereditary Properties

141

For a graph G, let G denote the edge complement of G. For a property ,


let = {G | G has property }. We note that is hereditary if and only if
is hereditary, and includes all independent sets but not all cliques if and only
if includes all cliques but not all independent sets. Thus it suffices to prove
W [1]-hardness when includes all independent sets, but not all cliques.
First we will show that, the problem is in W [1] if the forbidden set for is
finite.
Lemma 2. Let be a non-trivial hereditary property having a finite forbidden
set F ={H1 , H2 , . . . , Hs }. Then the problem P (G, k, ) is in W [1].
Proof. Let = max(|Hi |). Let A1 , . . . , Aq be all the subsets of V (G) such that
for every 1 j q, IG (Aj ) is isomorphic to some Hi . The sets Aj s can be
determined in O(f ()n ) time by trying every subset of V (G) of size at most .
Here f is some function of alone.
Consider the boolean formula
Vq W
j=1 ( uAj xu )
If this formula has a satisfying assignment with weight (the number of true
variables in the assignment) k, then the subset X of V (G) defined by X = {u
V |xu = 1} is a subset of V (G) of cardinality k such that Aj 6 X for any j. This
implies that G has an induced subgraph of size k with property .
Conversely if G has an induced subgraph of size k with property , then setting xu = 1 for vertices u in the induced subgraph gives a satisfying assignment
with weight k. Since q n+1 and |Ai | (a constant) for all i, it follows from
2
the definitions that the problem is in W [1].
We now show that the problem is W [1]-hard when one of the graphs in the
forbidden set of is a complete bipartite graph.
Lemma 3. Let be a hereditary property that includes all independent sets but
not all cliques, having a finite forbidden set F ={H1 , H2 , . . . , Hs }. Assume that
some Hi , say H1 is a complete bipartite graph. Then the problem P (G, k, ) is
W [1]-complete.
Proof. In Lemma 2 we have shown that the problem is in W [1].
S
Let be as specified in the Lemma. Let t = max(|V1 |, |V2 |) where V1 V2
is bipartition of H1 . If t = 1, H1 = K2 , and the given problem P is identical
to the k-independent set problem, hence W [1]-hard. So assume t 2. Note that
H1 Kt,t . Let Hs be the clique of smallest size that is not in , hence in the
forbidden set F.
Now we will show that the problem is W [1]-hard by a reduction from the
Independent Set Problem. Let G1 be a graph in which we are interested in finding
an independent set of size k1 . For every vertex u G1 we take r independent
vertices ( r to be specified later) u1 , . . . , ur in G. If (u, v) is an edge in G1 , we
add all r2 edges (ui , v j ) in G. G has no other edges.

142

Subhash Khot and Venkatesh Raman

We claim that that G1 has an independent set of size k1 if and only if G has
rk1 vertices that induce a subgraph with property .
Suppose G1 has an independent set {ui |1 i k1 } of size k1 . Then the set
of rk1 vertices {uji | 1 i k1 , 1 j r} is an independent set in G and hence
has property .
Conversely let S be a set of rk1 vertices in G which induces a subgraph with
property . This means IG (S) does not contain any Hi , in particular it does
not contain H1 . Group the rk1 vertices according to whether they correspond
to the same vertex in G1 or not. Let X1 , . . . , Xh , Y1 , . . . , Yp be the groups and
u1 , . . . , uh , v1 , . . . , vp be the corresponding vertices in G1 such that |Xi | t i
and |Yj | < t j. Observe that {u1 , . . . , uh } must be independent in G1 because
if we have an edge (ui , uj ), H1 Kt,t IG (Xi , Xj ) IG (S), a contradiction.
If h k1 we have found an independent
Ph set of size at least k1 in G1 . There
1.
Then
fore
assume
that
h

k
1
i=1 |Xi | r(k1 1) which implies that
Pp
|Y
|

r
or
p

r/(t

1).
Since
vertices
in distinct groups (one vertex per
j
j=1
group) in G and the corresponding vertices in G1 induce isomorphic subgraphs,
the vertices v1 , . . . , vp induce a subgraph of G1 with property (since is
hereditary). Since this subgraph has property , it does not contain Hs as an
induced subgraph. We choose r large enough so that any graph on r/(t 1)
vertices that does not contain a clique of size |Hs | has an independent set of size
k1 . With this choice of r, it follows that G1 does contain an independent set of
size k1 . The number r depends only on |Hs | and the parameter k1 and not on
n1 = |V (G1 )|. So the reduction is achieved in O(f (k1 )n1 ) time where f is some
2
function of k1 and is some fixed constant independent of k1 .
Next, we will show that the problem is W [1]-hard even if none of the graphs
in the forbidden set is complete-bipartite.
Theorem 1. Let be a hereditary property that includes all independent sets
but not all cliques, having a finite forbidden set F ={H1 , H2 , . . . , Hs }. Then the
problem P (G, k, ) is W [1]-complete.
Proof. The fact that the problem is in W [1] has already been proved in Lemma
2. Assume that none of the graphs Hi in the forbidden set of is completebipartite. Let Hs be the clique of smallest size that is not in , hence in the
forbidden set F.
For a graph Hi in F, select (if possible) a subset of vertices Z such that the
vertices in Z are independent and every vertex in Z is connected to every vertex
in Hi \Z. Let {Hij |1 j si } be the set of graphs obtained from Hi by removing
such a set Z for every possible choice of Z. Since
Hi is not complete-bipartite,
S
every Hij is a non-trivial graph. Let F 1 = F {Hij |1 i s, 1 j si }. Note
that F 1 contains a clique of size |Hs | 1 because a set Z, consisting of a single
vertex, can be removed from the clique Hs . Let 1 be the hereditary property
defined by the forbidden set F 1 . Observe that 1 also includes all independent
sets but not all cliques. Let P1 be the problem P (G1 , k1 , 1 ).
We will prove that P1 is W [1]-hard later. Now, we will reduce P1 to the
problem P (G, k, ) at hand.

Parameterized Complexity of Finding Subgraphs with Hereditary Properties

143

S
Given G1 , we construct a graph G as follows. Let V (G) = V (G1 ) D where
D is a set of r independent vertices (r to be specified later). Every vertex in
V (G1 ) is connected to every vertex in D. Let = maxi (|Hi |).
We claim that G1 has an induced subgraph of size k1 with property 1 if
and only if G has k1 + r vertices that induce a subgraph with property .S
Let A be a subset of V (G1 ), |A| = k1 such that IG1 (A) 1 . Let S = A D.
Suppose on the contrary that IG (S) contains some Hi as a subgraph. If this Hi
contains some vertices from D, we throw away these independent vertices. The
remaining portion of Hi , which is some Hij , 1 j si , must lie in IG (A). But
this is a contradiction because IG (A) = IG1 (A) and by hypothesis, IG1 (A) has
property 1 and it cannot contain any Hij . Similarly Hi cannot lie entirely in
IG (A) because F F 1 , so IG (A) does not contain any Hi as induced subgraph.
Therefore IG (S) does not contain any Hi , hence it has property and |S| =
k1 + r.
Conversely, suppose we can choose a set S, |S| = k1 + r such that IG (S)
does not contain any
T Hi . Since |D| = r we must choose at least k1 vertices from
V (G1 ). Let A S V (G1 ) with cardinality k1 . If IG (A) does not contain any
Hij , we are through. Otherwise let Hi0 j0 IG (A) for some i0 , j0 . Now Hi0 j0
is obtained from Hi0 by deleting an independent set of size at most . Hence
S can contain at most 1 vertices from D, otherwise we could add sufficient
number of vertices T
from D to the graph Hi0 j0 to get
T a copy of Hi0 which is not
possible.
Hence
|S
D|
<

which
implies
that
|S
V (G1 )| > k1 + r . Thus
T
IG1 (S V (G1 )) is an induced subgraph of G1 of size at least k1 + r that
does not contain any Hi , in particular it does not contain Hs which is a clique
of size say . We can select r (as before, by Ramsey Theorem ) such that any
graph on k1 + r vertices that does not contain a -clique has an independent
set of size k1 . Hence G1 has an independent set of size k1 which has property
1 . The number r depends only on the family F and parameter k1 and not on
n1 = |V (G1 )|. So the reduction is achieved in O(g(k1 )n1 ) time where g is some
function of k1 and is a constant. Also |V (G)| = |V (G1 )| + r, so the size of the
input problem increases only by a constant.
We will be through provided the problem P1 is W [1]hard. If any of the Hij
is complete-bipartite, then it follows from Lemma 3. Otherwise, we repeatedly
apply the construction, given at the beginning of the proof, of removing set
Z of vertices from each graph in the forbidden set, to get families F 2 , F 3 , . . .
and corresponding problems P2 , P3 , . . . such that there is a parametric reduction
from Pm+1 to to Pm . Since F m+1 contains a smaller clique than a clique in
F m , eventually some family F m0 contains a clique of size 2 (the graph K2 )
or a complete-bipartite graph. In the former case, the problem Pm0 is same as
parameterized independent set problem, so W [1]-hard. In the latter case Pm0 is
2
W [1]-hard by Lemma 3.
We can extend Theorem 1 to the case when the forbidden set is infinite.
However we could prove the problem only W [1]-hard; we dont know the precise
class in the W -hierarchy the problem belongs to.

144

Subhash Khot and Venkatesh Raman

Theorem 2. Let be a hereditary property that includes all independent sets


but not all cliques (or vice versa). Then the problem P (G, k, ) is W [1]-hard.
Proof. Every hereditary property is defined by a (possibly infinite) forbidden
set [9] and so let the forbidden family for be F = {H1 , H2 , . . .}. The proof
is almost the same as in Theorem 1. Note that Lemma 3 does not depend on
finiteness of the forbidden family. Also the only point where the finiteness of F
is used in Theorem 1 is in the argument that if IG (A) does contain some Hi0 j0
then S can contain at most 1 vertices from the set D. This argument can
be modified as follows. Since IG (A) contains some Hi0 j0 , |V (Hi0 j0 )| |A| = k1 .
Also Hi0 j0 is obtained from some Hi by removing an independent set adjacent
to all other vertices of Hi . (If there are more than one such Hi s from which Hi0 j0
is obtained, we choose an arbitrary Hi .) Let 1 = max (|V (Hi )| |V (Hij )|)
where the maximum is taken over all Hij such that |V (Hij )| k1 . Hence if
IG (A) does contain some Hi0 j0 , we can add at most 1 vertices from D to get
Hi0 . So S must contain less than 1 vertices from D. The choice of r will have
2
to be modified accordingly.
Corollary 2 follows from Theorem 2 since the collection of forests is a hereditary property with the forbidden set as the set of all cycles. This collection
includes all independent sets and does not include any clique of size 3.
Corollary 2. The following problem is W [1]-hard:
Given (G, k), does G have k vertices that induce a forest?
This problem is the parametric dual of the Undirected Feedback Vertex
Set problem which is known to be fixed parameter tractable [4].
Corollary 3. Following problem is W [1]-complete:
Given (G, k), does there exist an induced subgraph of G with k vertices that is
bipartite ?
Proof. Hardness follows from Theorem 2 since all independent sets are bipartite
and no clique of size at least 3 is bipartite.
To show that the problem is in W [1], given the graph G, consider the boolean
formula
V
V
V
uV (G) (xu yu )
(u,v)E(G) ((xu xv ) (yu yv ))
We claim that G has an induced bipartite subgraph of size k if and only if
the above formula has a satisfying assignment with weight k. Suppose G has an
induced bipartite subgraph with k vertices with partition V1 and V2 . Now for each
vertex in V1 assign xu = 1, yu = 0, for each vertex in V2 assign xu = 0, yu = 1
and assign xu = yu = 0 for the remaining vertices. It is easy to see that this
assignment is a weight k satisfying assignment for the above formula.
Conversely, if the above formula has a weight k satisfying assignment, the
vertices u such that xu = 1, yu = 0 or xu = 0, yu = 1 induce a bipartite subgraph
of G with k vertices.
The corollary follows as the above formula can be simulated by a W [1]-circuit
2
(i.e. a circuit with bounded depth, and weft 1).

Parameterized Complexity of Finding Subgraphs with Hereditary Properties

145

Corollary 4 can be proved along similar lines of Corollary 3.


Corollary 4. Following problem is W [1]-complete: Given (G, k) and a constant
l, does there exist an l-colorable induced subgraph of size k?
Finally we address the parametric dual of the problem addressed in Corollary
3. Given a graph G, and an integer k, are there k vertices in G whose removal
makes the graph bipartite? We will call this problem n k bipartite.
The precise parameterized complexity of this problem is unknown since
though bipartiteness is a hereditary property, it has an infinite forbidden set,
and so the problem is not covered by Cais result [1].
The edge counterpart of the problem, given a graph G with m edges, and
an integer k, are there k edges whose removal makes the graph bipartite, is the
same as asking for a cut in the graph of size m k. It is known[10] that there
exists a parameterized reduction from this problem to the following problem,
which we call all but k 2-SAT.
Given: A Boolean 2 CNF formula F
Parameter: An integer k
Question: Is there an assignment to the variables of F that satisfies all but
at most k clauses of F ?
We show that there is also a parameterized reduction from the nk bipartite
problem to the all but k 2-SAT problem.
Theorem 3. There is a parameterized reduction from the n k bipartite problem to the all but k 2-SAT problem.
Proof. Given a graph G, for every vertex, we set two variables (xu , yu ) and construct clauses in the same manner as in the proof of Corollary 3. The clauses are
as follows:
Set 1:
xu yu u V (G)
xu xv ; yu yv (u, v) E(G)
Each clause in Set 1 is repeated k + 1 times.
Set 2: xu yu

u V (G).

We show that it is possible to remove k vertices to make the given graph bipartite
if and only if there is an assignment to the variables in the above formula that
makes all but at most k clauses true.
If there is an assignment that makes all but at most k clauses true, then
the clauses in Set 1 must be true because each of them occurs k + 1 times.
This ensures that the variables xu , yu corresponding to the vertices are assigned
respectively 0,0 or 0,1 or 1,0 and each edge e = (u, v) has xu = xv = yu = yv = 0
or xu = 0, yu = 1 and xv = 1, yu = 0 or vice versa. The vertices s for which

146

Subhash Khot and Venkatesh Raman

xs = ys = 0 are removed to get a bipartite graph. At most k clauses in Set 2 are


false. This ensures that at most k vertices are removed.
Conversely if there
S exist k vertices whose removal results in a bipartite graph
with partition V1 V2 , consider the assignment corresponding to each vertex u
in the graph, xu = yu = 0 if the vertex u is removed, xu = 1, yu = 0 if u V1
and xu = 0, yu = 1 if u V2 .
It is easy to see that this assignment makes all but at most k clauses of the
formula true.
2
Note that the reduction is actually a polynomial time reduction.

Concluding Remarks

We have characterized the hereditary properties for which finding an induced


subgraph with k vertices having the property in a given graph is W [1]- hard. In
particular, using Ramsey Theorem, we have shown that if the property includes
all independent sets and all cliques or if it excludes some independent sets as
well as cliques, then the problem is fixed parameter tractable. However, for some
of these specific properties, we believe that a more efficient fixed parameter
algorithms (not based on Ramsey numbers) is possible.
It remains an open problem to determine the parameterized complexity of
both the problems stated in Theorem 3 (the n k bipartite problem and the
all but k 2-SAT problem). More generally, the parameterized complexity of the
node-deletion problem for a hereditary property with an infinite forbidden set is
open.
Finally we remark that our results prove that the parametric dual of the problem considered by Cai[1] (and was proved FPT) is W [1]-hard. This observation
adds weight to the conjecture (first made in [10]) that typically parametric dual
problems have complimentary parameterized complexity. It would be interesting
to explore this in a more general setting.

References
1. L. Cai, Fixed Parameter Tractability of Graph Modification Problem for Hereditary
Properties, Information Processing Letters, 58 (1996), 171-176.
2. R.G. Downey, M.R. Fellows, Fixed Parameter Tractability and Completeness I:
Basic theory, SIAM Journal on Computing 24 (1995) 873-921.
3. R.G. Downey, M.R. Fellows, Fixed Parameter Tractability and Completeness II:
Completeness for W[1], Theoretical Computer Science 141 (1995) 109-131.
4. R.G. Downey, M.R. Fellows, Parameterized Complexity, Springer Verlag New York,
1999.
5. R.G. Downey, M.R. Fellows, V. Raman, The Complexity of Irredundant sets Parameterized by Size, Discrete Applied Mathematics 100 (2000) 155-167.
6. M. R. Garey and D. S. Johnson, Problem [GT21], Computers and Intractability,
A Guide to The Theory of NP-Completeness, Freeman and Company, New York,
1979.
7. M. C. Golumbic, Algorithmic Graph Theory and Perfect Graphs. Academic Press,
New york, 1980.

Parameterized Complexity of Finding Subgraphs with Hereditary Properties

147

8. Harary, Graph Theory, Addison-Wesley Publishing Company, 1969.


9. J. M. Lewis and M. Yannakakis, The Node-Deletion Problem for Hereditary Properties is NP-complete, Journal of Computer and System Sciences 20(2) (1980)
219-230.
10. M. Mahajan and V. Raman, Parameterizing above Guaranteed Values: MaxSat
and MaxCut, Journal of Algorithms 31 (1999) 335-354.
11. A. Natanzon, R. Shamir and R. Sharan, Complexity Classification of Some Edge
Modification Problems, in Proceedings of the 25th Workshop on Graph-Theoretic
Concepts in Computer Science (WG99), Ascona, Switzerland (1999); Springer Verlag Lecture Notes in Computer Science.

Some Results on Tries with Adaptive Branching


Yuriy A. Reznik1
RealNetworks, Inc., 2601 Elliott Avenue, Seattle, WA 98121
[email protected]
Abstract. We study a modification of digital trees (or tries) with adaptive
multi-digit branching. Such tries can dynamically adjust degrees of their nodes
by choosing the number of digits to be processed per each lookup. While we do
not specify any particular method for selecting the degrees of nodes, we assume
that such selection can be accomplished by examining the number of strings
remaining in each sub-tree, and/or estimating parameters of the input
distribution. We call this class of digital trees adaptive multi-digit tries (or
AMD-tries) and provide a preliminary analysis of their expected behavior in a
memoryless model. We establish the following results: 1) there exist AMD-tries
attaining a constant (O(1)) expected time of a successful search; 2) there exist
AMD-tries consuming a linear (O(n), n is the number of strings inserted)
amount of space; 3) both constant search time and linear space usage can be
attained if the (memoryless) source is symmetric. We accompany our analysis
with a brief survey of several known types of adaptive trie structures, and show
how our analysis extends (and/or complements) the previous results.

Introduction

Digital trees (also known as radix search trees, or tries) represent a convenient way
of organizing alphanumeric sequences (strings) of variable lengths that facilitates
their fast retrieving, searching, and sorting (cf. [11,17]). If we designate a set of n
distinct strings as S = {s1 ,..., sn } , and assume that each string is a sequence of symbols
from a finite alphabet = {1 ,..., v } ,

= v , then a trie T ( S ) over S can be

constructed recursively as follows. If n = 0 ( n = S ), the trie is an empty external


node. If n = 1 (i.e. S has only one string), the trie is an external node containing a
pointer to this single string in S . If n > 1 , the trie is an internal node containing v
pointers to the child tries: T ( S1 ),..., T ( Sv ) , where each set Si ( 1 i v ) contains
suffixes of all strings from S that begin with a corresponding first symbol. For
example, if a string s j = u j w j ( u j is a first symbol, and w j is a string containing the
remaining symbols from s j ), and u j = i , then the string w j will go into Si . Thus,
after all child tries T ( S1 ),..., T ( Sv ) are recursively processed, we arrive at a tree-like
data structure, where the original strings S = {s1 ,..., sn } can be uniquely identified by
the paths from the root node to non-empty external nodes (cf. Fig 1.a).
1

The author is also on leave from the Institute of Mathematical Machines and Systems of
National Academy of Sciences of Ukraine.

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 148-158, 2000.
Springer-Verlag Berlin Heidelberg 2000

Some Results on Tries with Adaptive Branching

149

A simple extension of the above structure is obtained by allowing more than one
symbol of input alphabet to be used for branching. Thus, if a trie uses some constant
number of symbols r 1 per lookup, then the effective branching coefficient is v r ,
and we essentially deal with a trie built over an alphabet r (cf. Fig.1.c).
To underscore the fact that branching is implemented using multiple input symbols
(digits) at a time, such tries are sometimes called multi-digit tries (cf. [2]).

00

01

000

0...
011

s3
s1

s4

s6

0... 1/21

s5

s1

(a) regular trie (r=1)

s6

6/7

...1

s7

...1/7
s3

s5

(c) multidigit trie (r=2)

11

00

10

0111
s4

s5

4/7 5/7

(b) N-tree (adaptive radix trie)

s6

0000
s1 s2 s3

s2

11
01

2/7 3/7

s4

s7

s2

00

1/7

01

000

s7

011

0000
s1

10

s3

s4

s6

s7

s5

s2

(d) LC-trie (adaptive multi-digit trie)

Fig. 1. Examples of tries built from 7 binary strings: s1=0000, s2=0001, s3=0010,
s4=0100, s5=0110, s6=10, s7=11 .

The behavior of regular tries is thoroughly analyzed (cf. [5, 9, 10, 11, 16, 19]). For
example, it has been shown (cf. [16]), that the expected number of nodes examined
during a successful search in a v-ary trie is asymptotically O (log n h ) , where h is the
entropy of a process used to produce n input strings. The expected size of such trie is
asymptotically O ( nv h ) . These estimates are known to be correct for a rather large
class of stochastic processes, including memoryless, Markovian, and -mixed
models (cf. [16, 2]). In many special cases (e.g. when a source is memoryless, or
Markovian) the complete characterizations (expectation, variance and higher
moments) of these parameters have been obtained, and their precise (up to O (1) term)
asymptotic expansions have been deducted (cf. [19, 10]).
Much less known are modifications of tries that use adaptive branching. That is,
instead of using nodes of some fixed degree (e.g., matching the cardinality of an input
alphabet), adaptive tries select branching factor dynamically, from one node to

150

Yuriy A. Reznik

another. Perhaps the best-known example of this idea is sorting by distributive


partitioning, due to Dobosiewicz (cf. [6]). This algorithm (also known as an N-tree
(cf. Ehrlich [8]) selects the degrees of nodes to be equal exactly the number of strings
inserted in the sub-tries they originate. For example, the N-tree displayed on Fig.1.b,
contains seven strings overall, and therefore its root node has seven branches. In turn,
its first branch receives three strings to be inserted, and thus the N-tree creates a node
with three additional branches, and so on.
While N-trees have extremely appealing theoretical properties (thus, according to
Tamminen [20], they attain a constant ( O (1) ) expected search time, and use a linear
O ( n ) amount of memory), there are several important factors that limit their practical
usage. The main problem is that the N-tree is not a dynamic data structure. It is more
or less suitable for a multi-pass construction when all n strings are given, but an
addition or removal of a string in an existing structure is rather problematic. In the
worst case, such an operation may involve the reconstruction of the entire tree,
making the cost of its maintenance extremely high. Somewhat more flexible is a B-b
parametrized version of the distributive partitioning proposed in [7]. This algorithm
selects the branching factors to be equal n b ( b 1 ), and split child nodes only when
the number of strings there becomes larger than B. When both B and b equal one, we
have a normal N-tree, however, when they are large, the complexity of updates can be
substantially reduced.
Unfortunately, this does not help with another problem in adaptive tries. Since the
degrees of nodes are being selected dynamically, N-trees cannot use simple persymbol lookups. Instead, they must implement dynamic conversions from one size
alphabet to another, or even treat the input strings as real numbers in [0,1) (cf. [6, 8]).
In either scenario, the transition between levels in N-trees (and their B-b variants) is
much slower than one in regular tries, and combined with the complexity of the
maintenance, it creates serious constraints for the usage of N-trees in practice.
In this paper, we focus on another implementation of adaptive branching that
promises to be (at least partially) free from the above mentioned shortcomings. We
are trying to create an adaptive version of multi-digit tries by allowing the number of
digits processed by their nodes (parameter r) to be selected dynamically. Due to the
luck of the standard name, we will call these structures adaptive multi-digit tries (or
AMD-tries). To cover a wide range of possible implementations of such tries, we (at
least initially) do not specify any particular algorithm for selecting the depths
(numbers of digits) of their nodes. Instead, we assume that such selection can be
accomplished by examining the number of strings remaining in each sub-tree, and
estimating parameters of the input distribution, and attempt to study the resulting
class of data structures. The goal of this research is to find performance bounds (in
both search time and space domains) attainable by AMD-tries, and deduct several
particular implementations, that can be of interest in practice.
Somewhat surprising, there were only few attempts to explore the potential of the
adaptive multi-digit branching in the past. Perhaps the only studied implementation in
this class is a level-compressed trie (or LC- trie) by Andersson and Nilsson (cf. [2]).
The node depth selection heuristic in a LC-trie is actually very simple; it combines the
(v-ary) levels of the corresponding regular trie until it reaches the first external node
(cf. Fig 1.c). It has been shown (cf. [2, 15]), that in a memoryless model this algorithm
produces nodes with depths r = E r = O (log k log log k ) , where k is the number of

Some Results on Tries with Adaptive Branching

151

strings in a sub-trie originated by the node. When source is symmetric, the expected
search time in a LC-trie is only O (log* n ) , however, it grows as O (log log n ) in the
asymmetric case (cf. [15]).
In our analysis, we extend the above results, and in particular, we show that there
exist implementations of AMD-tries attaining the constant ( O (1) ) complexity of a
successful search in both symmetric and asymmetric cases. Moreover, if source
distribution is symmetric, such tries can be implemented in linear ( O ( n ) ) amount of
space. Compared to an N-tree, an equally fast AMD-trie appears to have a larger
memory usage, however, it is a much more suitable scheme for dynamic
implementation, and combined with the benefits of fast multi-digit processing, it
promises to be a structure of choice for many practical situations.
This paper is organized as follows. In the next section, we will provide some basic
definitions and present our main results. The proofs are delayed until Section 3, where
we also derive few recurrent expressions necessary for the analysis of these
algorithms. Finally, in our concluding remarks, we emphasize the limitations of our
present analysis and show several possible directions for future research.

Definitions and Main Results

In our analysis, we only consider AMD-tries built over strings from a binary alphabet
= {0,1} , but the extension to any finite alphabet is straightforward. We also limit our
study to a situation when n strings to be inserted in a trie are generated by a
memoryless (or Bernoulli) source (cf. [3]). In this model, symbols of the alphabet
occur independently of one another, so that if x j - is the j-th symbol produced by this
source, then for any j: Pr {x j = 0} = p , and Pr {x j = 1} = q = 1 p . If p = q = 1 2 , such
source is called symmetric, otherwise it is asymmetric (or biased). In our analysis, we
will also use the following additional parameters of memoryless sources:
h = p log p q log q;
h2 = p log 2 p + q log 2 q;

= log pmin ;
= log pmax ;

(1)

where: h is the (Shannons) entropy of the source (cf. [3]), and are special cases
of the Rnyis k-order entropy (cf. [18]): k = k1 log ( p k +1 + q k +1 ) , pmax = max { p, q} ,

and pmin = min { p, q} . Observe that , , and h have the following relationship:
(2)
h
(the equality is attained when the source is symmetric, however in the asymmetric
case, these bounds are rather weak).
In this paper, we will evaluate two major the performance characteristics of the
AMD-tries: the expected time of a successful search and the expected amount of
memory used by a trie built over n strings. To estimate the search time we can use the
expected depth Dn or the external path length (i.e. the combined length of paths from
root to all non-empty external nodes) Cn in a trie Dn = Cn n . To estimate the size of a
trie we will use the expected number of its branches Bn . Note that the last metric is
slightly different from one used for the regular tries (cf. [11, 9]). In that case, it was

152

Yuriy A. Reznik

sufficient to find the number of internal nodes An in a trie. However, since internal
nodes in adaptive tries have different sizes by themselves, we need to use another
parameter ( Bn ) to take into account these differences as well.
As we have mentioned earlier, we allow AMD-tries to use an arbitrary (but not
random) mechanism for selecting the depths of their nodes. However, in a Bernoulli
model, there are only two parameters that can affect the expected outcome of such
selection applied to all sub-tries in a trie: a) the number of strings inserted in a subtrie, and b) the parameters of source distribution. Thus, without significant loss of
generality or precision, we can assume that node-depth selection logic can be
presented as a (integer-valued) function:
rn := r ( n, p ) ,
(3)
where n indicates the number of strings inserted in the corresponding sub-trie, and p
is a probability of 0 in the Bernoulli model.
We are now ready to present our main results regarding the expected behavior of
AMD-tries. The following theorem establishes the existence of AMD-tries attaining
the constant expected time of a successful search.
THEOREM 1. There exist AMD-tries such that:
(4)
1 < 1 C n n 2 < ,
where 1 , 2 are some positive constants. The upper bound holds if:

rn 1 log 1 exp

and the lower bound holds if:

rn 1 log 1 exp

log 2
n 1

)) =

log 1
n 1

)) =

(log n log log 2 ) + O ( 1n ) ,

(5)

(log n log log 1 ) + O ( 1n ) .

(6)

Notice that the above conditions are based on parameters and , which, in
turn, can be considered as bounds for the entropy h of the source (2). This may
suggest that there should be a more accurate way to estimate the depth of nodes
needed to attain a certain performance (and vice versa), expressed in terms of the
entropy h. The following theorem answers this conjecture in affirmative.
THEOREM 2. Let
rn* = log n h ,
(7)
and assume that the actual depths of nodes rn in an AMD-trie are selected to be
sufficiently close to rn* :
rn rn* = O

( r ).

(8)

*
n

Then the complexity of a successful search in such trie is (with n ):


Cn n

where:

1 ( rn rn* ) log n
(x) =

1
2

t2

))(1 + O (1

log n

)) ,

(9)

dt ,

(10)

is the distribution function of the standard normal distribution (cf.[1]), and = h h h .


2

Now, we will try to evaluate AMD-tries from the memory usage perspective. The
next theorem establishes bounds for AMD-tries that attain a linear (with the number of
strings inserted) size.

Some Results on Tries with Adaptive Branching

153

THEOREM 3. There exist AMD-tries such that:


1 < 1 Bn n 2 < ,
where 1 , 2 are some positive constants. The upper bound holds if:
rn

1
log 2

(log n + log

1
=
(log n ( n, 2 , 2 ) log log 2

and the lower bound holds if:


rn

1
log 2

(log n + log +

= 1

)) + O ( )
,
) + O(
)

+ 12 W1 2 2 2 n1 2

1
n

log log n
log n

)) + O ( )
,
(log n ( n, , ) log log ) + O (
)
1

1
1

W1 111 n11
1

1
n

log log n
log n

(11)

(12)

(13)

where: 1 = log 2 , 2 = log 2 , W1 ( x ) is a branch W ( x ) 1 of the Lambert W


function: W ( x ) eW ( x ) = x (cf. [4]), and

( n, , ) = log 1 + ( log n log ( n )) ( log ) .

(14)

Observe that in the symmetric case ( p = q = 1 2 ), we have 1 = 2 = 1 , and thus, the


term (14) becomes zero: ( n,1, ) = 0 . The resulting bounds for rn (12) and (13) will
be identical to one we have obtained in the Theorem 1 (5), and (6), and thus, we have
the following conclusion.
COROLLARY 4. In the symmetric Bernoulli model, an AMD-trie can attain a
constant expected depth Dn = Cn n = O (1) and have a linear size Bn = O ( n ) at the
same time.
Unfortunately, in the asymmetric case the situation is not the same. Thus, if 1 ,
the term ( n, , ) can be as large as O (log log n ) , and the conditions for the constant
time search (5), (6) may not hold. Actually, from the analysis of LC-tries (cf.. [15]),
we know that the use of depths r = O (log n log log n ) leads to the expected search
time of O (log log n ) , and it is not yet clear if this bound can be improved considering
the other linear in space implementations of the AMD-tries.

Analysis

In this section, we will introduce a set of recurrent expressions for various parameters
in AMD-tries, derive some necessary asymptotic expansions, and will sketch the
proofs of our main theorems.
For the purposes of compact presentation of our intermediate results, we will
introduce the following two variables. A sequence {xn } will represent an abstract
property of AMD-tries containing n strings, and a sequence {yn } will represent a
property of root nodes of these tries that contribute to {xn } . The following mapping to
the standard trie parameters is obvious:

154

Yuriy A. Reznik
xn An
yn 1

Bn
2

Cn
,
n

rn

(15)

where: An is the average number of internal nodes, Bn is the average number of


branches, Cn is the external path length in an AMD-trie containing n strings.
Using the above notation, we can now formulate the following recurrent
relationship between these parameters of AMD-tries.
LEMMA 1. The properties xn and yn of an AMD-trie in a Bernoulli model satisfy:
n

rn

k =2

s =0

xn = yn + ( nk )

( )( p q ) (1 p q )
rn
s

rn s

nk

rn s

xk ; x0 = x1 = y0 = y1 = 0;

(16)

where: n is the total number of strings inserted in an AMD-trie, and the rest of
parameters are as defined in (3) and (16).
Proof. Consider a root node of depth rn in an AMD-trie. If n < 2 the result is 0 by
definition. In n 2 , the property of trie xn should include a property of a root node yn
plus the sum of properties of all the child tries. It remains to enumerate child tries and
estimate probabilities of them having 2 k n strings inserted. This could be done
using the following approach.
Assume that each of the 2r possible bit-patterns of length rn has a probability of
n

occurrence i = Pr {Binr ( s j ) = i} ( Binr ( s j ) means first rn bits of a string s j ),


n

0 i < 2 rn ,

i = 1 , and that this is a memoryless scheme ( i is the same for all

strings). Then, the probability that exactly k strings match the i-th pattern
N k
is ( kN ) ik (1 i ) . The i-th pattern corresponds to a child trie only if there are at least
two strings that match it. Therefore, the contribution of the i-th pattern to the property
nk
xn is ( nk ) ik (1 i ) xk , and it remains to scan all 2r patterns to obtain the
n

k 2

complete expression for xn .


Recall now, that the actual strings we are inserting in the trie are produced by a
binary memoryless source with probability of 0 equal p. Therefore, the probabilities
of the rn -bit sequences produced by this source will only depend on the number of 0s
(s) they contain: ( s ) = p s q r s . Also, given s zeros, the total number of patterns
n

( ) . Combining all these formulas, we arrive at


( ) ( ) ( p q ) (1 p q ) x ,

yielding this probability is

rn
s

rn
s

0 s rn

n
k

rn s

rn s

nk

(17)

k 2

which, after the addition of yn yields the claimed expression (16).


It should be stressed that due to dependency upon the unknown parameter rn the
rigorous analysis of a recurrent expression (16) appears to be a very difficult task. It is
not clear for example, if it is possible to convert (16) to a closed form (for any of the
parameters involved). Moreover, the attempts to use some particular formulas (or
algorithms) for rn can actually make the situation even more complicated.
The analysis of (16) that we provide in this paper is based on a very simple
approach, which nevertheless is sufficient to evaluate few corner cases in the behavior
of these algorithms. Thus, most of our theorems claim the existence of a solution in

Some Results on Tries with Adaptive Branching

155

linear form, and we use (16) to find conditions for rn such that the original claim
holds. We perform the first step in this process using the following lemma.
LEMMA 2. Let 1 and n be two positive constants ( 1 < 1 2 < ), such that
(18)
1n xn 2 n .
Then, the recurrent expression (16) holds when:
(19)
1 yn f ( n, p, rn ) 2 ,
where:
rn

f ( n, p, rn ) = n
s=0

( ) p q (1 p q )
rn
s

rn s

rn s n 1

(20)

Proof. Consider the upper bound in (18) first, and substitute xk with k 2 in the
right side of (16). This yields:
rn

xn yn +
s=0

( ) ( )( p q ) (1 p q )
rn
s

n
k

rn s k

rn s n k

k =2

rn

yn + 2 n
s=0

( )
rn
s

p s q rn s 1 1 p s q rn s

n 1

2k =

(21)
= yn + 2 n 2 f ( n, p , rn ).

Now, according to (18), xn 2 n , and combined with (21), the upper bound holds
only when yn 2 f (n, p, rn ) 0 . Hence 2 yn f ( n, p, rn ) , and repeating this procedure
for the lower bound ( xn 1n ), we arrive at formula (19), claimed by the lemma.
The next step in our analysis is to find bounds for the sum (20) that would allow us
to separate rn . The following lemma summarizes few such results.
LEMMA 3. Consider a function f (n, p , rn ) defined in (20). The following holds:

(
) ,
f ( n, p, r ) n (1 e
) n exp ( (n 1)e ) ,
f ( n, p, r ) n (1 e
) n exp ( (n 1)e (1 e
f ( n, 12 , rn ) = n 1 2 rn

n 1

rn h

rn h

n 1

rn h

n 1

In addition, if n, rn , and rn log n h = O

(22.a)

rn h

(22.b)
rn h

)) ,

(22.c)

log n h , then asymptotically:

f ( rn , n, p ) = n ( rn log n h ) log n

))(1 + O (1

log n

)) ,

(22.d)

where ( x ) and are as defined in the Theorem 2 (7-10).


Proof. The equality for the symmetric case (22.a) follows from by direct
substitution. Two other bounds (22.b) and (22.c) can be obtained with the help of the
following estimate:
r
r
e r = pmin
p s q r s pmax
= e r ,
where pmax , pmin , , and are as defined in (1). We apply these bounds to the last
component in the sum (20):
n

(1 e

n 1

1 p s q rn s

) ,
which allows the first portion of sum (20) to converge: ( ) p q
rn

n 1

1 e rn

rn
s

n 1

rn s

=1 .

The additional (right-side) inequalities in (22.b) and (22.c) are due to:
1 x e x , 0 x < 1 , (cf. [1], 4.2.29).

x (1 x )

156

Yuriy A. Reznik

The derivation of an asymptotic expression (22.d) is a complicated task, and here


we will rather refer to a paper of Louchard and Szpankowski (cf. [14]) which
discusses it in detail. A somewhat different approach of solving it has also been
provided in [12] and [13].
Now using the results of the above lemmas, we can sketch the proofs of our main
theorems. Consider the problem of evaluating the behavior of AMD-tries from the
expected complexity of a successful search perspective first.
We can use a recurrent expression (16) where, according to (15), we can substitute
xn with a parameter of the external path length Cn , and yn with n. Observe that the
bounds for Cn (4) claimed by the Theorem 1 and condition (18) in Lemma 2 are
equivalent, and the combination of the result of this lemma (18) with (22.b) and (22.c)
yields the following:
1 (1 e rn )

1 n

n f ( n, p, rn ) 1 e rn

1 n

2 .

(23)

Here, it remains to find an expression for rn such that 1 < 1 2 < regardless of n .
Considering the right part of 18 (upper bound), the last requirement is obviously
satisfied when e r = n11 . More precisely, for any given constant 1 < 2 < we need:
n

rn 1 log 1 exp

log 2
n 1

)) =

(log n log log 2 ) + O ( 1n ) ,

which is exactly the condition (5) claimed by the Theorem (1). The expression for the
lower bound (6) is obtained in a similar way.
The result of the Theorem 2 follows directly from (19), (20) and asymptotic
expression (22.d).
To evaluate the expected size an AMD-trie in memory we will use a very similar
technique. Consider a recurrent expression (16) with xn substituted by the expected
number of branches Bn , and yn with 2r . Following the Theorem 3 and Lemma 2, we
will assume that Bn is bounded (11), and using (18) combined with (22.b) and (22.c)
we arrive at:
n

1 2rn n 1 (1 e rn )

1 n

2rn f ( n, p, rn ) 2rn n 1 1 e rn

1 n

2 .

(24)

Compared to (23) this appears to be a slightly more complicated expression, which


does not yield an exact solution for rn (unless the source is symmetric). To find an
asymptotic (for large n) solution of (24), we will write:

log ( n 2 ) 1
r
1
rn 1 log 1 exp
= log n log log ( 2 n 2 ) + O ( n ) ,
n 1
2

rn

and after some manipulations we arrive at:


rn

1
log 2

(log n + log

+ 12 W1 2 2 2 n1 2

)) + O ( ) ,
1
n

(25)

where according to (12) 2 = log 2 , and W1 ( x ) is a branch W ( x ) 1 of the


Lambert W function W ( x ) eW ( x ) = x (cf. [4]). To perform further simplifications in
(25), we can use the following asymptotic expansion of W1 ( x ) (cf. [4]):
W1 ( x ) = log ( x ) log ( log ( x )) + O

log ( log ( x ))
log ( x )

), e

<x<0,

(26)

Some Results on Tries with Adaptive Branching

157

which, after some algebra yields the second part of inequality (12) claimed by the
Theorem 3. The expression for the lower bound (13) is obtained in essentially the
same way.

Concluding Remarks

We absolutely believe that AMD-tries have great potential that should be explored in
practice. To that end, our conclusion that they attain O (1) expected search time, while
preserving all the benefits of the regular tries, should be a good starting point.
At the same time, AMD-tries pose several interesting theoretical problems, and
from this perspective, our results just scratch the surface. Our analysis was only
sufficient to produce (rather coarse) bounds for the expected characteristics of AMDtries, and the derivation of their exact expressions (including lower-magnitude terms
and oscillating components) remains an open (and difficult) problem.
Another interesting problem is to find parameters of an AMD-trie that uses the
minimum possible amount of memory. Thus, analyzing the set of expressions in the
proof of the Theorem 3 we can conjecture that such trie exists, but finding its actual
parameters requires a more solid analytical framework.

Acknowledgment
The author wishes to express his gratitude to Prof. W. Szpankowski from Purdue
University, for many useful discussions and encouragement in starting this research.

References
1. M. Abramowitz, and I. Stegun, Handbook of Mathematical Functions, Dover, NY (1972)
2. Andersson, and S. Nilsson, Improved Behaviour of Tries by Adaptive Branching,
Information Processing Letters, 46 (1993) 295-300.
3. T. M. Cover and J. M. Thomas, Elements of Information Theory, John Wiley & Sons, New
York (1991)
4. R. M. Corless, G. H. Gonnet, D. E. G. Hare, D. J. Jeffrey, and D. E. Knuth, On the Lambert
W Function, Advances in Computational Mathematics, 5 (1996) 329-359
5. L. Devroye, A Note on the Average Depths in Tries, Computing, 28 (1982) 367-371
6. W. Dobosiewitz, Sorting by Distributive Partitioning, Information Processing Letters, 7, 1,
(1978) 1-6
7. W. Dobosiewitz, The Practical Significance of DP Sort Revisited, Information Processing
Letters, 8, 4 (1979) 170-172
8. G. Ehrlich, Searching and Sorting Real Numbers, J. Algorithms, 2 (1981) 1-14
9. P. Flajolet and R. Sedgewick, Digital Search Trees Revisited, SIAM J. Computing, 15,
(1986) 748-767
10. P. Jacquet and W. Szpankowski, Analysis of Digital Trees with Markovian Dependency,
IEEE Trans. Information Theory, 37 (1991) 1470-1475
11. D. Knuth, The Art of Computer Programming. Sorting and Searching. Vol. 3., AddisonWesley (1973)
12. G. Louchard, The Brownian Motion: A Neglected Tool for the Complexity Analysis of
Sorted Tables Manipulations, RAIRO Theoretical Informatics, 17 (1983) 365-385
13. G. Louchard, Digital Search Trees Revisited, Cahiers du CERO, 36 (1995) 259-27

158

Yuriy A. Reznik

14. G. Louchard and W. Szpankowski, An Exercise in Asymptotic Analysis, reprint (1995)


15. S. Nilsson, Radix Sorting and Searching, Ph.D. thesis, Department of Computer Science,
Lund University (1996)
16. Pittel, Paths in a Random Digital Tree: Limiting Distributions. Advances in Applied
Probability, 18 (1986) 139-155
17. R. Sedgewick, and P. Flajolet, An Introduction to the Analysis of Algorithms, AddisonWesley, Reading, MA (1996)
18. W. Szpankowski, Techniques for the Average Case Analysis of Algorithms on Words, John
Wiley & Sons, to be published
19. W. Szpankowski, Some results on V-ary asymmetric tries, Journal of Algorithms, 9 (1988)
224-244
20. M. Tamminen, Analysis of N-Trees, Information Processing Letters, 16, 3 (1983) 131-137

Optimal Coding with One Asymmetric Error:


Below the Sphere Packing Bound
Ferdinando Cicalese1 and Daniele Mundici2
1

Dipartimento di Informatica ed Applicazioni, University of Salerno,


84081 Baronissi (SA), Italy
[email protected],
http://www.dia.unisa.it/cicalese
2
Dipartimento Scienze Informazione, University of Milan,
Via Comelico 39-41, 20135 Milan, Italy
[email protected]

Abstract. Ulam and Renyi asked what is the minimum number of yesno questions needed to find an unknown m-bit number x, if up to `
of the answers may be erroneous/mendacious. For each ` it is known
that, up to only finitely many exceptional m, one can find x asking
Berlekamps minimum number q` (m) of questions, i.e., the smallest integer q satisfying the sphere packing bound for error-correcting codes. The
Ulam-Renyi problem amounts to finding optimal error-correcting codes
for the binary symmetric channel with noiseless feedback, first considered
by Berlekamp. In such concrete situations as optical transmission, error
patterns are highly asymmetricin that only one of the two bits can be
distorted. Optimal error-correcting codes for these asymmetric channels
with feedback are the solutions of the half-lie variant of the Ulam-Renyi
problem, asking for the minimum number of yes-no questions needed
to find an unknown m-bit number x, if up to ` of the negative answers
may be erroneous/mendacious. Focusing attention on the case ` = 1, in
this self-contained paper we shall give tight upper and lower bounds for
the half-lie problem. For infinitely many ms our bounds turn out to be
matching, and the optimal solution is explicitly given, thus strengthening
previous estimates by Rivest, Meyer et al.

Introduction

In his autobiographical book Adventures of a Mathematician [11, p.281], Ulam


posed the problem of optimal binary search in the presence of faulty tests. Independently, the very same problem had been formulated by Renyi [8, p.47]. In fact,
the search of an unknown m-bit number by asking the minimum number of yesno questions, when up to ` of the answers may be erroneous/mendacious, is the
same as the problem of finding shortest `-error-correcting codes for Berlekamps
noiseless delayless feedback channel [1].
As a typical example, let us consider a Transmitter sending binary messages
(e.g., m-bit numbers) on a noisy channel. Assume that the received bits can
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 159169, 2000.
c Springer-Verlag Berlin Heidelberg 2000

160

Ferdinando Cicalese and Daniele Mundici

be sent back to the Transmitter on a noiseless channel. Thus Transmitter-toReceiver bits are interleaved with Receiver-to-Transmitter bits. In other words,
before sending the (i + 1)th bit, the Transmitter does know which ones among
the previously sent i bits b have been distorted and received as 1 b because of
the noise effect. The main problem here is to minimize the number of bits sent
by the Transmitter, while still guaranteeing that the m-bit number can be fully
recovered by the Receiver.
Assuming the 1 and 0 bits to be equally subject to distortion, it is known that
an optimal solution to this problem is given by sending q` (m) bits, where q` (m)

P
is the smallest integer q satisfying the Sphere Packing Bound `j=0 qj 2qm .
Trivially, no solution exists using less than q` (m) bits.
In other concrete situations the distribution of errors/distortions is highly
asymmetric: for instance, in optical communication systems photons may fail to
be detected (10), but the creation of spurious photons (01) is impossible [7].
Similarly, in most LSI memory protection schemes one can safely assume that
only one of the two possible error patterns (10) and (01) can occur [4].
Optimal error-correcting codes for these asymmetric channels with feedback
are the same as shortest binary strategies to find an m-bit number, when only
negative tests can be erroneous.
To the best of our knowledge, the first paper dealing with this half-lie variant of the Ulam-Renyi problem was [9]. The authors proved an asymptotic result
to the effect that the half-lie game has the same complexity as the original Ulam
problemhenceforth referred to as the full-lie game. They also proved that the
half-lie variant of the Ulam-Renyi game with comparison questions corresponds
to the problem of finding the minimum root of a set of unimodal functions.
Focusing on the case ` = 1, in this paper we improve the result of [9], by
giving very tight and non-asymptotic, lower and upper bounds for the half-lie
game. More precisely, we prove that
for each m, q1 (m) 1 questions suffice;
for each m, q1 (m) 3 questions do not suffice;
for infinitely many m, q1 (m) 2 questions do not suffice, and we give an
optimal strategy using exactly q1 (m) 1 questions;
for infinitely many m, q1 (m) 2 questions suffice, and we give a (necessarily
optimal) strategy using exactly q1 (m) 2 questions.

Preliminaries

We shall consider a game between two players, Paul (the Questioner), and Carole
(the Responder). The rules are as follows: Paul and Carole first fix an integer m,
and a search space E coinciding with the set of m-bit integers E = {0, 1, . . . , 2m
1}. Now Carole chooses a number x in E, and Paul must find x by asking
questions, to which Carole can only answer yes or no. Carole can lie at most
once, but only by answering no to a question whose correct (sincere) answer
is yes. Thus, only Caroles negative answers are dubious for Paul. This is the
the half-lie game over the search space E.

Optimal Coding with One Asymmetric Error

161

Pauls state of knowledge is completely represented by a pair (A0 , A1 ) of


disjoint subsets of E, where A0 (the truth-set) is the set of those elements of E
satisfying all of Caroles answers, and A1 (the lie-set) is the set of elements of E
falsifying exactly one (necessarily negative) answer. By a question we understand
any arbitrary subset T E. Thus T represents Pauls question Does the secret
number x belong to T ?.
In particular, Pauls initial state of knowledge, before any question is asked,
is represented by the pair (E, ). At any stage of the game, suppose that Pauls
state of knowledge is given by = (A0 , A1 ), and his next question is T. If
Caroles answer is yes (whence, by hypothesis, this answer is correct) then the
resulting state of knowledge of Paul is given by
yes = (A0 T, A1 T ).
On the other hand, if Caroles answer is no, Pauls new state of knowledge
is given by
no = (A0 \ T, (A0 T ) (A1 \ T )).
This is so because the lie-set of no has two kinds of elements: (i) members of
the truth-set of that falsify Caroles answer, and (ii) members in the lie-set of
that satisfy Caroles answer.
The game is over when Pauls state = (A0 , A1 ) satisfies |A0 A1 | 1,
where | | denotes cardinality. As a matter of fact, if |A0 A1 | = 1 then the only
element of A0 A1 must coincide with Caroles secret number. On the other
hand, if |A0 A1 | = 0 then every element x E falsifies at least two of Caroles
answersagainst the rules of the game.
Our main concern here is to estimate the minimum number of questions
needed to find x, rather than actually exhibiting such questions. Accordingly,
only the number of elements of A0 and A1 is relevant here, and we can safely
represent Pauls state (A0 , A1 ), by the pair of integers (|A0 |, |A1 |). Similarly, any
question T E will be conveniently represented by the pair of integers [t0 , t1 ],
where ti = |Ai T |.
Using this notation, for any state = (x0 , x1 ) and question [t0 , t1 ] the two
possible states resulting from Caroles answer are given by
yes = (t0 , t1 )

and

no = (x0 t0 , t0 + x1 t1 )

(1)

Definition 1. A final state is a state = (x0 , x1 ) such that x0 + x1 1.


Starting with the state , suppose that questions T1 , . . . , Tt have been asked,
and a corresponding t-tuple of answers b = b1 , . . . , bt , has been received. Iterated
application of the above formulas yields a sequence of states 0 , 1 , . . . , t , where
0 = ,

bt
1 = 0b1 , 2 = 1b2 , . . . , t = t1
.

(2)

By a strategy S with q questions we mean the full binary tree of depth q,


where each node is mapped into a question T , and the two edges lef t , right

162

Ferdinando Cicalese and Daniele Mundici

below are respectively labeled yes and no. Let = 1 , . . . , q be a path in


S, from the root to a leaf, with respective labels b1 , . . . , bq , generating nodes
1 , . . . , q and associated questions T1 , . . . , Tq . Fixing an arbitrary state ,
iterated application of (1) naturally transforms into  (where the dependence
on the bj s and Tj s is understood). We say that strategy S is winning for iff
for every path from the root to a leaf, the state  is final.
Definition 2. We say that = (x0 , x1 ) is a winning q-state iff there exists a
strategy with q questions which is winning for .
Trivially, is a winning q-state iff there exists a question T such that both
resulting states yes and no are winning (q 1)-states.
Definition 3. We say that 0 = (y0 , y1 ) is a substate of a state = (x0 , x1 ) iff
yj xj , for each j = 0, 1.
Lemma 1. Let = (x0 , x1 ) be a winning q-state. Then every substate of is a
winning q-state.
To help the reader, we shall recall here two basic definitions concerning the
full-lie game [5,6,10].
Definition 4. For every integer m 1, Berlekamps minimum number of questions q(m) is defined by q(m) = min{q | q + 1 2qm }.
Definition 5. For every integer s 0 the sth critical index ms is defined by
ms = max{m | m + s + 1 2s }.
It turns out [6] that q(m) is the minimum number of questions that are not
only necessary, but also sufficient to solve the full-lie game with one lie over the
search space of cardinality 2m . The critical index ms is the largest integer m
such that m + s questions are necessary and sufficient to solve the full-lie game
with one lie over a search space of cardinality 2m .

Lower Bounds

Definition 6. Fix two integers m P


= 1, 2, 3,
 . . . and q > m. Then the integer
(m, q) is the smallest k such that ki=0 qi > 2m . The integer = (m, q) is
P(m,q)1 q
defined by = 2m i=0
i .

q
.
Trivially, 1 (m, q) q and 0 < (m,q)
Theorem 1. Fix an integer m = 1, 2, 3, . . .. Let q be the smallest integer q such
that
(m,q)1  
X
q
i
+ (m, q)(m, q).
2q 2m +
i
i=0

Optimal Coding with One Asymmetric Error

163

Note that 1 q q(m). Assume there exists a winning strategy with q questions to find an unknown integer in the set E = {0, 1, . . . 2m 1} in the half-lie
game, i.e., when up to one of the no answers may be mendacious and all yes
answers are true. Then q q .
Proof. Let S be such strategy, where we can safely assume that the number q
of questions in S is the smallest possible. By a path in S we shall understand
a path from the root to a leaf of S. For each x E there exists precisely one
path x in S leading to the final state ({x}, ). This final state is obtained if
Carole chooses x as the secret number and then decides to give true answers to
all q questions. Let southwestx be the number of left branches (i.e., branches
whose label is yes) in this path. The southwestx many branches of x are
a record of Caroles yes answers, once she decides to choose x as the secret
number, and to always tell the truth. If, on the other hand, Carole decides to
give one mendacious answer, she can deviate from this path in southwestx many
ways, replacing a yes true answer by a mendacious no answer. 1 Since S is
a winning strategy, there exist in S precisely southwestx many paths leading to
the final state (, {x}). Furthermore, whenever x 6= y E the state (, {y}) will
be obtained by a different path. Now, each path in S has q branches, and paths
are in one-one correspondence with subsets of {1, . . . , q } (giving the depths
of their left branches). To obtain a set of 2m paths having the smallest possible
total number of left branches, with reference to Definition 6, one must proceed as
follows: first take the
q  paths with
only path in S with no left branch, then qthe

q
1 left branch, the 2 paths with 2 left branches, . . . , the (m,q )1 paths with
(m, q ) 1 left branches, and finally, (m, q ) many paths with (m, q ) left
branches. Then the total number Nonce of possibilities for Carole to lie precisely
once in S will satisfy the inequality
(m,q )1

Nonce

X
i=0

 
q
+ (m, q )(m, q ).
i

On the other hand, if Carole decides not to lie, she can still choose x E, and
the corresponding path leading to the leaf ({x}, ), in 2m ways. Summing up, the

2q many paths of the winning strategy S cannot be less than the total number
of Caroles answering strategies, whence
(m,q )1

2 + Nonce

X
i=0

 
q
i
+ (m, q )(m, q ).
i

We shall now prove that, for all integers m 1, at least q(m) 2 questions are necessary to find a number in the half-lie game over the search space
{0, 1, . . . , 2m 1}. We prepare the following
1

Note the effect of the assumed asymmetry in Caroles lies: in the classical Ulam game
Carole can choose to lie in q many ways.

164

Ferdinando Cicalese and Daniele Mundici

Lemma 2. Let m = 2, 3, . . . . Let the integer q have the property that there exists
a winning strategy S for the state = (2m , 0) with q questions. Then there exists
a winning strategy for the state 0 = (2m1 , 0) with q 1 questions.
Proof. Let T = [t0 , 0] be the first question in S. The resulting states are yes =
(t0 , 0) and no = (2m t0 , t0 ), both having a winning (q 1)-strategy. According
as t0 2m1 or t0 < 2m1 , the state (2m1 , 0) is either a substate of yes or
a substate of no , respectively. In either case, (2m1 , 0) has a winning (q 1)strategy.
Notation: For each real number t we let btc (resp., dte) denote the largest integer
t (resp., the smallest integer t). For each integer r > 0, we let powersetr
denote the powerset of the set {1, 2, . . . , r}. For any family of subsets of
{1, 2, . . . , r} we let
card()
denote the average cardinality of the sets in . For all real numbers 0 a b r
we let
powersetr [a, b] = powersetr [dae, bbc] = {G {1, 2, . . . , r} | a |G| b}.
Given an integer 0 k 2r , the initial k-segment
powersetr |`k
of powersetr is the family of the first k smallest subsets
 of {1, 2, . . . , r}, i.e., the
0-element subset, the r many 1-element subsets, the r2 many 2-element subsets,
. . . , until k subsets have been collected having the smallest possible cardinality.
Lemma 3. The following inequalities hold:
(i)
(ii)
(iii)
(iv)

For
For
For
For

all
all
all
all

q
q
q
q

57, |powersetq [0, q/3]| < 22q ;


2q
;
171, |powersetq [0, 2q/5]| < 1.1q
12, card(powersetq , [0, q/3]) > 4q ;
23, card(powersetq , [0, 2q/5]) > q3 .

Proof. A routine inspection, using the properties of the binomial coefficients.


Theorem 2. For each m 1, let q(m) be Berlekamps minimum number of
questions. Then at least q(m) 2 questions are necessary to win the half-lie
game (with one lie) over the search space {0, 1, . . . 2m 1}.
Proof. First we consider the case 1 m 50. Let qhalflie (m) denote the length
of the shortest winning strategy for the half-lie game (with one lie) over the
search space {0, 1, . . . 2m 1}. By Definition 5 we have m0 = 0 and m6 = 57.
Hence for each 1 m 50 we have m0 + 1 m m6 . For all 0 s 5, a
direct inspection using Theorem 1 yields qhalflie (ms + 1) q(ms + 1) 2. By
Lemma 2, the desired result now follows for all ms + 1 m ms+1 .

Optimal Coding with One Asymmetric Error

165

We now consider the case m 51. It follows that q(m) 57. Writing q
instead of q(m), we have
(3)
2q1 < q2m ,
whence, a fortiori,

2q3 < 2m (1 + q/4).

(4)

2q3 < 2m (1 + card(powersetq [0, q/3]).

(5)

By Lemma 3(iii) we get

From Lemma 3(i) it follows that


j=bq/3c 

X
j=0

q
j


<

2q
.
2q

(6)

Since by (3) 22q < 2m , the monotonicity properties of the binomial coefficients,
together with inequality (6) imply
card(powersetq [0, q/3]) = card(powersetq [0, bq/3c]) < card(powersetq |`2m ).
Recalling (5) we can write
2q3 < 2m (1 + card(powersetq |`2m )).

(7)

A moments reflection shows that


card(powersetq |`2m ) < card(powersetq3 |`2m ).

(8)

Let S be a strategy with q 3 of questions (absurdum hypothesis). As in


the proof of Theorem 1, let Nonce be the total number of possibilities for Carole
to lie precisely once in S: this is the same as the number of left branches in the
totality of paths of depth q 3 leading to a final state ({x}, ), for all possible
x E. In the light of (7)-(8), and recalling the estimates in the proof of Theorem
1, we can now write in a self-explanatory notation

P
q3
powersetq3 |`2m j j
q3
m
m
m
m

< 2 (1 + card(powersetq3 |`2 )) = 2 + 2 P
2
q3
powersetq3 |`2m

= 2m +



q3
j
2m + Nonce
j
m

(m = 51, 52, 53, . . .),

powersetq3 |`2

which is impossible.
Theorem 3. With reference to Definitions 4 and 5, fix an integer s 1, and
let m = ms and q = q(ms ). Then at least q 1 questions are necessary to solve
the half-lie game with one lie, over the search space of cardinality 2m .

166

Ferdinando Cicalese and Daniele Mundici

Proof. By definition, m = ms = 2s s 1, and q = q(ms ) = m + s = 2s 1. For


1 s 8, direct verification shows that the integer q (ms ) defined in Theorem 1
coincides with q(ms )1, and hence the thesis is a direct consequence of Theorem
1.
Let us now consider the case s 9. Suppose that there exists a winning
strategy for Paul using q 2 questions (absurdum hypothesis). In the light of
Theorem 1, in order to reach a contradiction, it is sufficient to show
2s < 4(1 + card(powersetq2 |`2m )).

(9)

Claim: card(powersetq2 |` 2m )) > m/3.


As a matter of fact, for all s 9, by Lemma 3(iv) and (ii) we have m/3 < q/3 <
2q
card(powersetq [0, 2q/5]) = card(powersetq [0, b2q/5c]) < card(powersetq |`1.1q
).
2q
2q
It follows that m/3 < card(powersetq2 |` 1.1q ). Since for all s 4, 1.1q =
s

22 1
1.1(2s 1)

2s 1

< 2 2s = 22 s1 = 2m , we then get m/3 < card(powersetq2 |`2m )


and the claim is proved.
From equation (9) we now see that, to complete the proof of the theorem it
is sufficient to settle the inequality 2s < 4(1 + m/3). Since m = 2s s 1, this
inequality trivially holds for all integers s 1.

Upper Bounds

For all m 1, we shall construct a winning strategy to solve the half-lie game
over the search space {0, 1, . . . , 2m 1} using no more than q(m) 1 questions.
Moreover, we shall show that for infinitely many m this strategy uses no more
than q(m) 2 questions.
Theorem 4. For every integer m 1, let = (2m , 0). Then there exists a
winning strategy for in the half-lie game, using exactly m 1 + dlog(m + 3)e
questions.
Proof. The proof proceeds through several claims:
Claim 1: For each integer r 1, the state = (1, 2r 1) has a winning r-strategy.
By induction on r. For r = 1, we have = (1, 1). Upon asking the question
[0, 1], we obtain the two final states (0, 1) and (1, 0). For the induction step,
suppose the claim is true for r 1, with the intent of proving it for the state
(1, 2r+1 1). Let = (1, 2r+1 1) and ask the question [0, 2r ]. We then obtain
the two states yes = (0, 2r ) and no = (1, 2r 1). It is easy to see that yes is
a winning r-state. Moreover, no is a winning r-state by induction hypothesis.
Therefore, is a winning (r + 1)-state, and the claim is settled.
Claim 2: For each integer r 1, the state = (2, 2r 3) is a winning r-state.
Upon asking question [1, 2r1 1], the two resulting states are yes = no =
(1, 2r1 1). By Claim 1, both states have a winning strategy with r1 questions.
A fortiori, there exists a winning strategy with r questions for the state (2, 2r 3).

Optimal Coding with One Asymmetric Error

167

Claim 3: For every integer m 1, the state = (2, m) has a winning strategy
with dlog(m + 3)e questions.
As a matter of fact, let r = dlog(m + 3)e. Then r = min{i | 2i1 3 < m
i
2 3}. Therefore, is a substate of (2, 2r 3) and the desired result directly
follows, by Claim 2 and Lemma 1.
Claim 4: For any two integers m 1 and k = 1, 2, . . . , m, there exists a winning
strategy for the state = 2k , (m k + 1)2k1 , using exactly k 1 + dlog(m +
3)e questions.
We proceed by induction on k. The basis is a direct consequence
 of Claim
i+1
i
,
(m

i)2
. By asking
3. For the induction
step,
let
k
=
i
+
1.
Then

=
2


two
resulting
states
coincidespecifically,
the question 2i , (m i + 1)2i1 , the

yes = no = 2i , (m i + 1)2i1 . By induction one immediately sees that
yes = no is a winning (i 1 + dlog(m + 3)e)-state. Therefore, is a winning
(k 1 + dlog(m + 3)e)-state, as required to settle the claim.
End of the Proof of Theorem 4. Let = (2m , 0). Then is a substate of
(2m , 2m1 ) and we have the desired result by Claim 4 and Lemma 1.
In the following two lemmas, upper bounds on the number of questions in the
shortest winning strategy for the half-lie game over a search space of cardinality
2m , are given in terms of Berlekamps minimum number q(m).
Lemma 4. For every integer m 1, let E = {0, 1, . . . , 2m 1}. Then there
exists a winning strategy to solve the half-lie game over E, using q(m) 1
questions.
Proof. By Theorem 4 there exists a winning strategy using m 1 + dlog(m + 3)e
questions. Then we need only show that for all m 1,
m 1 + dlog(m + 3)e q(m) 1.
Let k = m 1 + dlog(m + 3)e. By definition of Berlekamps number q(m), it is
sufficient to settle the inequality k + 1 > 2km , that is,
m + dlog(m + 3)e > 2dlog(m+3)e1 .

(10)

To this purpose, let s 0 be the smallest integer such that m = 2s t for some
0 t < 2s1 . Then we argue by cases:
Case 1: t 3. Then (10) becomes 2s t + s > 2s1 . This latter inequality holds
true, because 2s1 > t 3 implies s > 2, whence 2s1 + s > t.
Case 2: 0 t 2. Then (10) becomes 2s t + s + 1 > 2s , or equivalently,
s + 1 > t.

(11)

Since 2s1 > t, the only possible cases to be considered are


t = 0, s 0;

t = 1, s 2;

t = 2, s 3.

In every case, inequality (11) is satisfied and the proof is complete.

168

Ferdinando Cicalese and Daniele Mundici

Lemma 5. Fix integers n 1 and 3 t n. Let m = 2n t. Then there exists


a winning strategy for the state = (2m , 0) using q(m) 2 questions.
Proof. Let k = m 1 + dlog(m + 3)e. By Theorem 4 there exists a winning
strategy for using k questions. Then we need only prove that k < q(m) 1.
Recalling the definition of q(m), it is enough to settle the inequality k + 2 >
2k+1m , that is, m + 1 + dlog(m + 3)e > 2dlog(m+3)e . From our hypotheses
m = 2n t 2n 3 and t n 2n1 , we obtain dlog(m + 3)e = n. It follows
that m + 1 + dlog(m + 3)e = 2n t + 1 + n > 2n = 2dlog(m+3)e , as required to
conclude the proof.

Conclusion: Main Results

Theorem 5. For each m = 1, 2, . . . , let q(m) be the (Berlekamp) minimum


integer q such that q + 1 2qm . Let qhalflie(m) denote the number of questions
of the shortest winning strategy for the half-lie game over the search space E =
{0, 1, . . . , 2m 1}. Let the sets of integers C and Es (s = 1, 2, 3, . . .) be defined by
C = {m 0 | q(m) = 2q(m)m 1} and Es = {m 0 | ms +1 m ms +s2}.
Then
(A) q(m) 2 qhalflie (m) q(m) 1, for each m = 1, 2, . . . .
(B) qhalflie (m) = q(m) 1, for all m C.
(C) qhalflie (m) = q(m) 2, for each s = 1, 2, . . . and m Es .
Proof. (A) By Lemma 4 and Theorem 2. (B) By Lemma 4 and Theorem 3. (C)
By Theorem 2 and Lemma 5.
Acknowledgment
We thank Andrzej Pelc for drawing our attention to the half-lie variant of the
Ulam-Renyi game.

References
1. E. R. Berlekamp, Block coding for the binary symmetric channel with noiseless,
delayless feedback, In: Error-correcting Codes, H.B. Mann (Editor), Wiley, New
York (1968) pp. 61-88.
2. F. Cicalese, D. Mundici, Optimal binary search with two unreliable tests and minimum adaptiveness, In: Proc. European Symposium on Algorithms, ESA 99, J.
Nesetril, Ed., Lecture Notes in Computer Science 1643 (1999) pp.257-266.
3. F. Cicalese, U. Vaccaro, Optimal strategies against a liar, Theoretical Computer
Science, 230 (1999) pp. 167-193.
4. S.D. Constantin, T.R.N. Rao, On the Theory of Binary Asymmetric Error Correcting Codes, Information and Control 40 (1979) pp. 20-26.
5. R. Hill, Searching with lies, In: Surveys in Combinatorics, Rowlinson, P. (Editor),
Cambridge University Press (1995) pp. 4170.

Optimal Coding with One Asymmetric Error

169

6. A. Pelc, Solution of Ulams problem on searching with a lie, J. Combin. Theory,


Ser. A, 44 (1987) pp. 129-142.
7. J.R. Pierce, Optical Channels: Practical limits with photon counting, IEEE Trans.
Comm. COM-26 (1978) pp. 1819-1821.
8. A. Renyi, Napl
o az inform
aci
oelmeletr
ol, Gondolat, Budapest, 1976. (English
translation: A Diary on Information Theory, J.Wiley and Sons, New York, 1984).
9. R. L. Rivest, A. R. Meyer, D. J. Kleitman, K. Winklmann, J. Spencer, Coping
with errors in binary search procedures, Journal of Computer and System Sciences,
20 (1980) pp. 396-404.
10. J. Spencer, Ulams searching game with a fixed number of lies, Theoretical Computer Science, 95 (1992) pp. 307-321.
11. S.M. Ulam, Adventures of a Mathematician, Scribners, New York, 1976.

Closure Properties of Real Number Classes


under Limits and Computable Operators
Xizhong Zheng
Theoretische Informatik, FernUniversit
at Hagen,
58084-Hagen, Germany
[email protected]
Abstract. In effective analysis, various classes of real numbers are discussed. For example, the classes of computable, semi-computable, weakly
computable, recursively approximable real numbers, etc. All these classes
correspond to some kind of (weak) computability of the real numbers.
In this paper we discuss mathematical closure properties of these classes
under the limit, effective limit and computable function. Among others,
we show that the class of weakly computable real numbers is not closed
under effective limit and partial computable functions while the class of
recursively approximable real numbers is closed under effective limit and
partial computable functions.

Introduction

In computable analysis, a real number x is called computable if there is a computable sequence (xn )nN of rational numbers which converges to x effectively.
That is, the sequence satisfies the condition that |xn x| < 2n , for any n N .
In this case, the real number x is not only approximable by some effective procedure, there is also an effective error-estimation in this approximation. In practice,
it happens very often that some real values can be effectively approximated, but
an effective error-estimation is not always available. To characterize this kind
of real numbers, the concept of recursively approximable real numbers is introduced. Namely, a real number x is recursively approximable (r.a., in short) if
there is a computable sequence (xn )nN of rational numbers which converges to
x. It is first noted by Ernst Specker in [15] that there is a recursively approximable real number which is not computable by encoding the halting problem
into the binary expansion of a recursively approximable real numbers.
The class Ce of computable real numbers and the class Cra of recursively
approximable real numbers shares a lot of mathematical properties. For example, both Ce and Cra are closed under the arithmetical operations and hence
they are algebraic fields. Furthermore, these two classes are closed under the
computable real functions, namely, if x is computable (r.a.) real number and f
is a computable real function in the sense of, say, Grzegorczyk [6], then f (x) is
also computable (resp. r.a.).
The classes of real numbers between Ce and Cra are also widely discussed
(see e.g. [12,13,4,2,18]). Among others, the class of, so called, recursively enumerable real numbers might be the first widely discussed such class. A real
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 170179, 2000.
c Springer-Verlag Berlin Heidelberg 2000

Closure Properties of Real Number Classes

171

number x is called recursive enumerable if its left Dedekind cut is an r.e. set
of rational numbers, or equivalently, there is an increasing computable sequence
(xn )nN of rational numbers which converges to x. We prefer to call such real
numbers left computable because it is very naturally related to the left topology
< := {(a; ) : a R} of the real numbers by the admissible representation
of Weihrauch [16]. Similarly, a real number x is called right computable if it is
a limit of some decreasing computable sequence of rational numbers. Left and
right computable real numbers are called semi-computable. Robert Soare [12,13]
discusses widely the recursion-theoretical properties of the left Dedekind cuts of
the left computable real numbers. G. S. Cetin [4] shows that there is an r.a. real
number which is not semi-computable. Another very interesting result, shown by
a series works of Chaitin [5], Solovay [14], Calude et al. [2] and Slaman [10], says
that a real number x is r.e. random if and only if it is an -number of Chaitin
which is the halting probability of an universal self-delimiting Turing machine.
We omit the details about these notions here and refer the interested readers to
a nice survey paper of Calude [3].
Although the class of left computable real numbers has a lot of nice properties, it is not symmetrical in the sense that the real number x is right
computable but usually not left computable for a left computable real number x. Furthermore, even the class of semi-computable real numbers is also not
closed under the arithmetical operations as shown by Weihrauch and Zheng [18].
Namely, there are left computable real numbers y and z such that y z is neither
left nor right computable. As the arithmetical closure of semi-computable real
numbers, Weihrauch and Zheng [18] introduces the class of weakly computable
real numbers. That is, a real number x is weakly computable if there are two left
computable real numbers y and z such that x = y z. It is shown in [18] that x is
weakly computable if and only if there is a computable sequence
(xn )nN which
P
converges to x weakly effectively, i.e. limn xn = x and
n=0 |xn xn+1 | is
finite. By this characterization, it is also shown in [18] that the class of weakly
computable real numbers is an algebraic field and is strictly between the classes
of semi-computable and r.a. real numbers. In this paper we will discuss other
closure properties of weakly computable real numbers for limits, effective limits
and computable real functions. We show that weakly computable real numbers
are not closed under the effective limits and partial computable real functions.
For other classes mentioned above, we carry out also a similar discussion.
At the end of this section,
let us explain some notions at first. For any set
P
A N , denote by xA := nA 2n the real number whose binary expansion corresponds to set A. For any k N , we define kA := {kn : n A}. For any function
f : N N , a set A is called f -r.e. if there is a computable sequence (An )nN of
finite subsets of N such that A = iN ji Aj and |{s : n As As+1 }| < f (n)
for all n N , where AB := (A\B) (B\A). If f (n) := k is a constant function, then f -r.e. sets are also called k-r.e. A is called -r.e. iff there is a recursive
function f such that A is f -r.e.

172

Xizhong Zheng

Computability of Real Numbers

In this section we give at first the formal definition of various versions of computability of real numbers and then recall some important properties about these
notions. We assume that the reader familiar the computability about subsets of
the natural nmbers N and number-theoretical functions. A sequence (xn )nN of
rational numbers is computable iff there are recursive functions a, b, c : N N
such that xn = (a(n)b(n))/(c(n)+1). We summarize the computability notions
for real numbers as follows.
Definition 1. For any real number x R,
1. x is computable iff there is a computable sequence (xn )nN of rational
numbers such that x = limn xn and n (|xn xn+1 | < 2n ). In this case, the
sequence (xn )nN is called fast convergent and it converges to x effectively.
2. x is left (right) computable iff there is an increasing (decreasing) computable sequence (xn )nN of rational numbers such that x = limn xn . Left
and right computable real numbers are all called semi-computable.
3. x is weakly computable (w.c. in short) iff there is a computable
sequence
P
(xn )nN of rational numbers such that x = limn xn and n=0 |xn xn+1 | is
finite. (xn )nN is called converging to x weakly effectively.
4. x is recursively approximable (r.a., in short) iff there is a computable sequence (xn )nN of rational numbers such that x = limn xn .
The class of computable, left computable, right computable, semi-computable,
w.c., r.a. real numbers is denoted by Ce , Clc , Crc , Csc , Cwc , Cra , respectively.
As shown in [18], the relationship among these classes looks like the following
Ce = Clc Crc

lc
(C
( Csc = Clc Crc ( Cwc ( Cra .
Crc

Note that in above definition, we define various versions of computability


of real numbers in a similar way. Namely, a real number x is of some version
of computability iff there is a computable sequence of rational numbers which
satisfies some special property and converges to x. For example, if Plc [(xn )]
means that (xn )nN is increasing, then x Clc iff there is a computable sequence
(xn )nN of rational numbers such that Plc [(xn )] and limn xn = x. In general,
for any reasonable property on sequences, we can define a corresponding class of
real numbers which have some kind of (weaker) computability. This can even be
extended to the case of sequences of real numbers as in the following definition.
Definition 2. Let P be any property about the sequences of real numbers. Then
1. A real number x is called P -computable if there is a computable sequence
(xn )nN of rational numbres which satisfies property P and converges to x. The
class of all P -computable real numbers is denoted by CP
2. A sequence (xn )nN of real numbers is called P -computable, or it is a
computable sequence of CP iff there is a computable double sequence (rnm )nmN
of rational numbers such that (rnm )mN satisfies P and limm rnm = xn for
all n N .

Closure Properties of Real Number Classes

173

3. The class CP is called closed under limits, iff for any computable sequences (xn )nN of CP , the limits x := limn xn is also in CP whenever
(xn )nN satisfies P and converges.
4. The class CP defined in 2. is called closed under effective limits , iff
for any fast convergent computable sequences (xn )nN of CP , the limits x :=
limn xn is also in CP .
Now we remind the notion of computable real function. There are a lot of approaches to define the computability of real functions. Here we use GrzegorczykKo-Weihrauchs approach and define computable real function in terms of Typetwo Turing Machine (TTM, in short) of Weihrauch.
Let be any alphabet. and are sets of all finite strings and infinite
sequences on , respectively. Roughly, TTM M extends the classical Turing machine in such a way that it can be inputed and also can output infinite sequences
as well as finite strings. For any p , M (p) outputs a finite string q,
if M (p) writes q in output tape and halt in finite steps similar to the case of
classical Turing machine. M (p) outputs an infinite sequence q means that M (p)
will compute forever and keep writing q on the output tape. We omit the formal
details about TTM here and refer the interested readers to [16,17]. We will omit
also the details about the encoding of rational numbers by and take directly
the sequences of rational numbers as inputs and outputs to TTMs.
Definition 3. A real function f : R R is computable if there is a TTM M
such that, for any x dom(f ) and any sequence (un )nN of rational numbers
which converges effectively to x, M ((un )nN ) outputs a sequence (vn )nN of
rational numbers which converges to f (x) effectively.
Note that, in this definition we do not add any restriction on the domain of
computable real function. Hence a computable real function can have any type
of domain, because f  A is always computable whenever f is computable and
A dom(f ). Furthermore, for a total function f : [0, 1] R, f is computable
iff f is sequentially computable and effectively uniformly continuous (see [9]).
Definition 4. For any subset C R,
1. C is closed under computable operators, iff f (x) C for any x C and
any total computable real function f : R R.
2. C is closed under partial computable operators, iff f (x) C, for any x C
and any partial computable real function f : R R with x dom(f ).
Following proposition follows immediately from the definition. Remember
that, A N is 02 iff A is Turing reducible to the halting problem 0 .
Proposition 1. 1. xA Ce A is rcursive.
2. xA Cra A is a 02 -set, or equivalently, A T 0 .
3. Ce and Cra are closed under arithmetical operations +, , and , hence
they are algebraic fields.

174

Xizhong Zheng

4. Ce are closed under limits and computable real functions.


5. Clc and Crc are closed under addition.
Some other non-trivial closure properties are shown in [18] and [19].
Theorem 1 (Weihrauch and Zheng). 1. Csc is not closed under addition,
i.e. there are left computable y and right computable z such that y + z is neither
left nor right computable.
2. Cwc is closed under arithmetical operations. In fact Cwc is just the closure
of Csc under the arithmetical operations.
It is not very surprising that the classes Clc and Crc are not closed under
subtraction and, in general, under computable real functions, because they are
not symmetrical. On the other hand, the class Cwc is symmetrical and closed under arithmetical operations. So it is quite natural to ask whether it is also closed
under limits and computable real functions. In the following we will give the negative answers to both questions. To this end we need the following observations
about weakly computable real numbers.
Theorem 2 (Ambos-Spies, [1]). 1. If A, B N are incomparable under Turing reduction, then xAC is not semi-computable.
2. For any set A N , if x2A is weakly computable, then A is f -r.e. for
f (n) := 23n , hence A is -r.e.
Theorem 3 (Zheng [20]). There is a non--r.e. 02 -set A such that xA is
weakly computable.

Closure Property under Limits

In this section, we will discuss the closure properties of several classes of real
numbers under limits. We first consider the classes of left and right computable
real numbers. The following result is quite straightforward.
Theorem 4. The classes of left and right computable real numbers are closed
under limits, respectively.
For semi-computable real numbers, the situation is different.
Theorem 5. The class Csc is not closed under limits.

Proof. Define, for any n, s N , at first the following sets:


A := {e N : e is total}
An := {e N : (x n)e (x) }

An,s := {e N : (x n)e,s (x) }


Since An,s Ae,s+1 , (xAn,s )n,sN is obviously a computable sequence of rational
numbers such that, for and n N , (xAn,s )sN is nondecreasing and converges to
xAn . That is, (xAn )nN is a computable sequence of Clc , hence it is a computable
sequence of Csc . But its limit xA is not semi-computable. In fact xA is even not
t
u
r.a. by Proposition 1, since A is not a 02 -set.

Closure Properties of Real Number Classes

175

Note that in above proof, as a computable sequence of Clc , (xAn )nN is also
a computable sequence of Cwc and Cra . Then the folowing corollary follows
immediately.
Corollary 1. The classes Cwc and Cra are not closed under the limit.
Now we discuss the closure property under the effective limits. We will show
that the class of semi-computable real numbers is closed under effective limits
and the class of weakly computable real numbers, hence also the class of r.a. real
numbers, is not closed under effective limits.
Theorem 6. The class Csc is closed under the effective limits.
Proof. Let (xn )nN be a computable sequence of Csc which satisfies the condition
that n(|xn xn+1 | < 2(n+1) ) and converges to x. We shall show that x Csc .
By Definition 2, there is a computable sequence (rij )i,jN of rational numbers
such that, for any n N , (rnj )nN is monotonic and converges to xn . For any
n, we can effectively determine whether xn is left or right computable by comparing, say, rn0 and rn1 . Therefore, the sequence (xn )nN can be split into two
computable subsequences (xni )iN and (xmi )iN of left and right computable
real numbers, respectively. At least one of them is infinite. Suppose w.l.o.g.
that (xni )iN is an infinite sequence. Obviously it is also a fast convergent computable sequence, i.e., |xni xni+1 | < 2i , since (xn )nN converges fast. Define
a new sequence (yn )nN by yi := xni 2(i1) . Since yi+1 = xni+1 2i =
(xni+1 xni + 2i + (xni 2(i1) ) xni 2(i1) = yi (yi )iN is an increasing
0
0
:= rij 2(i1) . Then (rij
)i,jN is a computable sequence of
sequence. Let rij
0
rational numbers such that, for any i, (rij )jN is increasing and converges to
yi . Namely, (yi )iN is an increasing computable sequence of Clc . By Theorem 4,
its limit limi yi = limi xni = limi xi = x is also left computable, i.e.,
t
u
x Clc Csc .
Theorem 7. The class Cwc is not closed under effective limits.
Proof. Suppose by Theorem 3 that A is a non--r.e. 02 -set such that xA is
weakly computable. Then x2A is not weakly computable by Theorem 2. Let
approximation of A such that (xAs )sN converges to xA
(As )sN be a recursive P

weakly effectively, i.e.


s=0 |xAs xAs+1 | C for some C N . Define, for
n, s N ,
Bn,s := 2(As  (n + 1)) (As  2n)
Bn := 2(A  (n + 1)) (A  2n)
It is easy to see that (Bn,s )n,sN is a computable sequence of finite subsets
of N , hence (xBn,s )n,sN is a computable sequence of rational numbers.
Since lims As = A, there is an N (n), for any n N such that, for any
P (n)
s N (n), As  (n + 1) = A  (n + 1). Let C1 = N
s=0 |xBn,s xBn,s+1 |. Then

176

Xizhong Zheng

PN (n)
P
|xBn,s xBn,s+1 | = s=0 |xBn,s xBn,s+1 | + s>N (n) |xBn,s xBn,s+1 |
P
= C1 + s>N (n) |xAn,s xAn,s+1 | < C1 + C. On the other hand, it is easy to
see that lims xBn,s = xBn . Therefore, the sequence (xBn,s )n,sN converges
to xBn weakly effectively. Hence (xBn )nN is a weakly computable sequence of
real numbers. By the definition of Bn , Bn 2A {2n + 1, 2n + 2, . . .}. It follows
that |xBn x2A | 22n 2n This means that (xBn )nN converges to x2A
effectively and this ends the proof of the theorem.
t
u
s=0

Theorem 8. The class Cra is closed under effective limits.


Proof. Let (xn )nN be any computable sequence of Cra which converges effectively to x. Assume w.l.o.g. that it satisfies, for all n N , the condition
|xn xn+1 | < 2(n+1) . By Definition 2, there is a computable sequence (rij )i,jN
of rational numbers such that, for any n N , lims rns = xn . We shall show
that x Cra .
It suffices to construct a computable sequence (us )sN of rational numbers
such that lims us = x. This sequence will be constructed from (rij )i,jN in
following stages:
The construction of sequence (us )sN :
Stage s = 0: Define u0 := r00 , t(0, 0) := 0 and i(0) := 0.
Stage s + 1: Given i(s), u0 , . . . , ui(s) and t(j, s) for all j s. If there is j s
satisfying |ut(j1,s) rjs | < 2(j1) such that either t(j, s) 6= 1 & |ut(j,s) rjs |
2(j+1) or t(j 1, s) 6= 1 & t(j, s) = 1, then choose j0 as minimal such j and
define

i(s + 1) := i(s) + 1

:= rj0 ,s
ui(s+1)

()
if 0 j < j0
t(j, s)

i(s)
+
1
if
j = j0
t(j,
s
+
1)
:=

1
if j0 < j s + 1.
Otherwise, if no such j exists, then define, i(s + 1) := i(s), t(s + 1, s + 1) := 1
and t(j, s + 1) := t(j, s) for all j s.
To show this construction succeeds, we need only to prove the following
claims.
1. For any j N , the limit t(j) := lims t(j, s) exists and satisfies the conditions that t(j) 6= 1 and |ut(j) xj | 2(j+1) .
2. lims i(s) = +.
3. For any j N , (s t(j))(|ut(j) us | 2j ).
Now it is clear that the sequence (us )sN constructed above is a computable
infinite sequence of rational numbers. Furthermore, this sequence converges to
x. This completes the proof of Theorem.
t
u

Closure Properties of Real Number Classes

177

Closure Property under Computable Operators

In this section we will discuss the closure property under computable operators.
The following result about left and right computable real numbers is immediate
by the fact that the real function f defined by f (x) = x is computable.
Proposition 2. The classes Clc and Crc are not closed under the computable
operators, hence is also not closed under partial computable operators.
To discuss the closure property under partial computable operators for other
classes, we will apply the following observation of Ko [7].
Theorem 9 (Ker-I Ko [7]). For any sets A, B N , A T B iff there is a
(partial) computable real function f : R R such that f (xB ) = xA .
From this result, it is easy to show that a lot of classes of real numbers are
not closed under the partial computable operators.
Theorem 10. The classes Csc and Cwc are not closed under the partial computable operators. The class Cra is closed under partial computable operators.
Proof. 1. For class Csc . By Muchnik-Friedberg Theorem (see [11]), there are
two r.e. sets A and B such that they are incomparable under Turing reduction.
Then xAB is not semi-computable by Theorem 2. On the other hand, xAB
is left computable since A B is r.e. Obviously, we have the reduction that
A B T A B. By Theorem 9, there is a computable real function f such
that f (xAB ) = xAB . Therefore, Csc is not closed under partial computable
operators.
2. For class Cwc . By Theorem 3, there is a non--r.e. set A such that xA
is weakly computable. On the other hand, x2A is not weakly computable by
Theorem 2 since 2A is obviously not -r.e. Because 2A T A, by Theorem 9,
there is a computable real function f such that f (xA ) = x2A . That is, Cwc is
not closed under the partial computable operators.
3. For class Cra , it follows immediately from the fact that a real number xA
is r.a iff A is a 02 -set and the class of all 02 -sets is closed under the Turing
t
u
reduction, i.e. if A T B and B is 02 -set, then A is also 02 -set.
It is shown in Theorem 1 that the class Csc is not closed under addition.
Hence it is not closed under the polynomial functions with several arguments.
Namely, if p(x, , xn ), n 2, is a polynomial with rational coefficients and
a1 , , an are semi-computable real numbers, then p(a1 , , an ) is not necessary
semi-computable. But for the case of n = 1, it is not clear. Furthermore it is also
not known whether the class of semi-computable real numbers is closed under
the total computable real functions.
Similarly, it remains still open whether the class Cwc is closed under (total)
computable operators. We guess it is not. One possible approach is to define a
computable real function which maps some weakly computable xA for a non-r.e. set A to a not weakly computable real number x2A . Using the idea in the

178

Xizhong Zheng

proof of Theorem 9, it is not difficult to show that there is a computable real


function f : R R such that f (xA ) = x2A for any irrational xA . Unfortunately, such function cannot be extended to a total computable real function as
shown by next result.
Theorem 11. 1. Let f : N N be a function such that f (xA ) = x2A for any
irrational xA . If xA is a rational number, then there is a sequence (xn )nN of
irrational numbers such that limn xn = x2A and limn f (xn ) = x2A .
2. The function f : [0; 1] R defined by f (xA ) := x2A for any A N is not
continuous at any rational points, hence it is not computable.
Proof. 1. Suppose that function f : N N satisfies f (xA ) = x2A for any
irrational xA . Let xA be rational, hence A isa finite set. We define a sequence
(xn )nN of irrational numbers by xn := xA
+ 22(n+1) . Let n0 be the maximal
element of A. Define a set An by xAn = 2 2(n+1) for any n N . Then for
any n > n0 , xAn < 2n 2n0 . This implies that An contains only the elements
which are
bigger than n0 . Therefore, for any n n0 , A An = and f (xn ) =
f (xA + 2 2(n+1) ) = f (xA + xAn ) = f (xAAn ) = x2(AAn ) = x(2A)(2An ) =
x2A + x2An . Since limn xAn = 0, it is easy to see that limn x2An = 0 too.
So we conclude that limn f (xn ) = x2A .
2. Suppose that f : [0; 2] R satisfies f (xA ) = x2A for any A N . For any
rational xA , A is finite. Let n0 be the maximal element of A and A0 := A\{n0 }
and define, for all n N , a finite set An by An := A0 {n0 +1, n0 +2, , n0 +n}.
Then it is easy to see that limn xAn = xA . On the other hand we have:
f (xAn ) = x2An = x2A0 +
= x2A 2

2n0

n
X

22(n0 +i)

i=1
2n0

+2

(1 22n )/3

This implies that limn f (xAn ) = x2A 22n0 +1 /3 6= x2A .

t
u

In summary, the closure properties of several classes of real numbers under


arithmetic operations (+, , and ), limits, effective limits, partial computable operators and computable operators are listed in the following table:

Ce
Clc
Crc
Csc
Cwc
Cra

arithmetic
effective computable partial computable
operations limits
limits
operators
operators
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
No
No
Yes
Yes
No
No
No
No
Yes
?
No
Yes
No
No
?
No
Yes
No
Yes
Yes
Yes

Closure Properties of Real Number Classes

179

References
1. K. Ambos-Spies A note on recursively approximable real numbers, Research Report on Mathematical Logic, University of Heidelberg, No. 38, September 1998.
2. C. Calude, P. Hertling, B. Khoussainov, and Y. Wang, Recursive enumerable reals
and Chaintins -number, in STACS98, pp596606.
3. C. Calude. A characterization of c.e. random reals. CDMTCS Research Report
Series 095, March 1999.
4. G. S. Cetin A pseudofundamental sequence that is not equivalent to a monotone
one. (Russian) Zap. Naucn. Sem. Leningrad. Otdel. Mat. Inst. Steklov. (LOMI) 20
1971 263271, 290.
5. G. J. Chaitin A theory of program size formally identical to information theory,
J. of ACM., 22(1975), 329340.
6. A. Grzegorczyk. On the definitions of recursive real continuous functions, Fund.
Math. 44(1957), 6171.
7. Ker-I Ko Reducibilities of real numbers, Theoret. Comp. Sci. 31(1984) 101123.
8. Ker-I Ko Complexity Theory of Real Functions, Birkh
auser, Berlin, 1991.
9. M. Pour-El & J. Richards Computability in Analysis and Physics. SpringerVerlag, Berlin, Heidelberg, 1989.
10. T. A. Slaman Randomness and recursive enumerability, preprint, 1999.
11. R. Soare Recursively Enumerable Sets and Degrees, Springer-Verlag, Berlin, Heidelberg, 1987.
12. R. Soare
Recursion theory and Dedekind cuts, Trans, Amer. Math. Soc.
140(1969), 271294.
13. R. Soare Cohesive sets and recursively enumerable Dedekind cuts, Pacific J. of
Math. 31(1969), no.1, 215231.
14. R. Solovay. Draft of a paper (or series of papers) on Chaitins work . . . done for
the most part during the period of Sept. Dec. 1975, unpublished manuscript, IBM
Thomas J. Watson Research Center, Yorktoen Heights, New York, May 1975.
15. E. Specter Nicht konstruktive beweisbare S
atze der Analysis, J. Symbolic Logic
14(1949), 145158
16. K. Weihrauch Computability. EATCS Monographs on Theoretical Computer
Science Vol. 9, Springer-Verlag, Berlin, Heidelberg, 1987.
17. K. Weihrauch. An Introduction to Computable Analysis. Springer-Verlag, 2000.
(to appear).
18. K. Weihrauch & X. Zheng A finite hierarchy of the recursively enumerable real
numbers, MFCS98 Brno, Czech Republic, August 1998, pp798806.
19. K. Weihrauch & X. Zheng Arithmetical hierarchy of ral numbers. in MFCS99,
Szklarska Poreba, Poland, September 1999, pp 2333.
20. X. Zheng. Binary enumerability of real numbers. in Computing and Combinatorics, Proc. of COCOON99, Tokyo, Japan. July 2628, 1999, pp300309.

A Characterization of Graphs
with Vertex Cover Six
Michael J. Dinneen and Liu Xiong
Department of Computer Science, University of Auckland,
Private Bag 92019, Auckland, New Zealand
([email protected] & [email protected])

Abstract. The complete list of forbidden minors (obstructions) for the


family of graphs with vertex cover 6 have been found. This paper shows
how one can limit the search space of graphs and how to simplify the process for deciding whether a graph is an obstruction for kVertex Cover.
The upper bounds 2k + 1 (2k + 2) on the maximum number of vertices
for connected (disconnected) obstructions are shown to be sharp for all
k > 0.

Introduction

The main contribution of this paper is the characterization of graphs with vertex
cover at most 6 by its obstruction set (forbidden minors). The general problem
of vertex cover (which is N P -complete; see [GJ79]) asks whether a graph has a
set of vertices of size at most k that covers all edges (a more formal definition
is given below). Earlier Cattell and Dinneen in [CD94] classified the families of
graphs with vertex cover at most 5 by using the computational machinery now
described in [CDD+ 00]. Our current results are based on a more family-specific
approach where we limit the search space of graphs. In this paper, as our primary
limiting factor, we prove an exact upper bound on the number of vertices for an
obstruction to any kVertex Cover family.
The numbers of obstructions for 1Vertex Cover to 5Vertex Cover,
along with our new result for 6Vertex Cover, are listed below in Table 1.
We had known that the set of obstructions for 6Vertex Cover is finite
by the now-famous Graph Minor Theorem (GMT) of Robertson and Seymour
[RS85]. They proved Wagners conjecture which states that there are a finite
number of obstructions for any graph family closed under the minor order. Unfortunately the proof of the GMT does not indicate how to find these obstructions. The set of planar graphs are the best known example of a family with
forbidden graphs, where Kuratowskis characterization provides us with K5
and K3,3 as the only obstructions to planarity. A lot of work has recently been
done concerning the development of general methods for computing minor-order
obstructions, such as mentioned in the papers [FL89, APS91, LA91, Pro93].
In this paper we use standard graph theory definitions. A graph is a pair
(V, E), where V is a finite set of vertices and E is a set of undirected edges
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 180192, 2000.
c Springer-Verlag Berlin Heidelberg 2000

A Characterization of Graphs with Vertex Cover Six

181

Table 1. Numbers of obstructions for kVertex Cover, 1 k 6.


k
1
2
3
4
5
6

Connected Disconnected
Total
obstructions obstructions obstructions
1
1
2
2
2
4
3
5
8
8
10
18
31
25
56
188
72
260

connecting two vertices of V . An edge between vertices x and y of V will be


denoted by xy.
A graph H is a minor of a graph G, denoted H m G, if a graph isomorphic
to H can be obtained from G by a sequence of a operations chosen from: (1)
delete a vertex, (2) delete an edge, or (3) contract an edge (removing any multiple
edges or loops that form). The minor order is the set of finite graphs ordered
by m and is easily seen to be a partial order.
A family F of graphs is a (minor-order) lower ideal, if whenever a graph
G F implies that H F for any H m G. An obstruction (often called
forbidden minor ) O for a lower ideal F is a minor-order minimal graph not in F.
Thus, for example, K5 and K3,3 are the smallest non-planar graphs (under the
minor order). Recall that by the GMT, a complete set of obstructions provides
a finite characterization for any (minor-order) lower ideal F.
The graph families of interest in this paper are based on the following problem
[GJ79].
Problem. Vertex Cover
Input: Graph G = (V, E) and a positive integer k |V |.
Question: Is there a subset V 0 V with |V 0 | k such that V 0 contains at least
one vertex from every edge in E?
A set V 0 in the above problem is called a vertex cover for the graph G. The
family of graphs that have a vertex cover of size at most k will be denoted by
kVertex Cover, which is easily seen to be a lower ideal (see [CD94]). For a
given graph G, let V C(G) denote the least k such that G has vertex cover of
cardinality k. Figure 1 shows an example of a graph G with V C(G) = 4.
We now describe the organization of our paper. In the next section we first
explain our computational model and give some general results relating to how to
compute obstructions for any kVertex Cover lower ideal. We then state some
specific results regarding 6Vertex Cover, namely vertex and edge bounds.
After a short conclusion and references, we compactly list all of the connected
obstructions for 6Vertex Cover in Figures 45. Complete proofs for some of
the results and larger drawings of the obstructions may be found in [DX00].

182

Michael J. Dinneen and Liu Xiong

Fig. 1. An example of a graph of vertex cover 4. The black vertices denote one
possible vertex cover.

Computing Minor-Order Obstructions

Our basic computational method is simply to generate and check all graphs
that are potential obstructions. In practice, this search method can be used
for an arbitrary lower ideal if one can (1) bound the search space of graphs
to a reasonable size and (2) easily decide whether an arbitrary graph is an
obstruction. With respect to kVertex Cover, we can do both of these tasks
efficiently.
In earlier work, Cattell and Dinneen in [CD94] bounded the search space to
graphs of pathwidth at most k + 1 when they computed the kVertex Cover
obstructions for 1 k 5. Their generation process was self-terminating but,
unfortunately, many isomorphic graphs were created during the generation of
the search space. These superfluous graphs had to be either caught by an isomorphism checking program or eliminated by other means. For k = 6 using this
approach did not seem feasible. For 6Vertex Cover, we utilized McKays
graph generation program geng (part of his Gtools/Nauty package [McK90])
and obtained some tight new upper bounds on the structure of vertex cover
obstructions.
2.1

Directly Checking Non-isomorphic Graphs

We now discuss a natural method for finding a set of obstructions for a lower
ideal from an available set of non-isomorphic graphs. We need to generate a
complete set of non-isomorphic (connected) graphs, which is large enough to
contain the set of obstructions sought.
To decide if a graph is an obstruction it helps to have an efficient membership
algorithm GA for the targeted lower ideal F. For the 6Vertex Cover family
of graphs we used an implementation of the Balasubramanian et. al. linear-time
vertex cover algorithm [BFR98]. By using GA for F, an algorithm to decide if
a graph is an obstruction is almost trivial. If a given graph G is an obstruction
for F, then G is a minimal graph such that G
/ F. For a lower ideal F we only
need to check that each one-step minor of G is in F. A general algorithm to
decide if G is an obstruction for F is presented below.

A Characterization of Graphs with Vertex Cover Six

183

Procedure IsObstruction(GraphMembershipAlgorithm GA, Graph G)


if GA(G) = true then return false
for each edge e in G do
G0 = the resulting graph after deleting e in G
if GA(G0 ) = false then return false
+
G00 = the resulting graph after contracting e in G
+
if GA(G00 ) = false then return false
endfor
return true
end
The above algorithm IsObstruction will work for any minor-order lower
ideal. For a given input finite graph G, if the graph family membership algorithm GA operates in polynomial time, then this algorithm IsObstruction has
polynomial-time complexity. However, for some particular lower ideals, the algorithm can be simplified (e.g., remove lines marked with +s).
Lemma 1. A graph G = (V, E) is an obstruction for kVertex Cover if and
only if V C(G) = k + 1 and V C(G\uv) = k for all uv E.
Proof. Let the graph G be an obstruction for kVertex Cover. This implies
that if any edge in G is deleted then the vertex cover decreases, by the definition
of an obstruction. The size of the vertex cover decreases by one to exactly k,
otherwise V C(G) < k + 1.
Now we prove the other direction. Let G = (V, E) be a graph, and F denote
a fixed kVertex Cover lower ideal such that G 6 F. Suppose if any edge in
G is deleted, then the resulting graph G0 F. Thus for each edge uv in G, a set
of vertices V 0 of cardinality k can be found which covers all edges in G except
edge uv.
Let u be the reserved vertex and v be the deleted vertex after uv is contracted.
Since V 0 covers all edges in G except uv, V 0 covers each edge wv where w 6= u. We
have w V 0 . After contraction of uv, for each edge wv, a new edge wu is made
in G0 . Since w V 0 , V 0 covers wu. Thus all new edges are covered by V 0 . Hence
after doing any edge contraction for any edge uv in G, a vertex cover V 0 where
|V 0 | = k covers all edges in the resulting graph G0 . That is G0 F. Therefore if
2
each edge deletion causes G0 F and G 6 F, then G is an obstruction.
Thus according to the above lemma, for kVertex Cover, our obstruction
deciding algorithm is simplified. This means it does not have to check edge
contraction minors (i.e., create the graphs G00 in the IsObstruction procedure).
This greatly reduces the overall computation time for deciding if a graph is
an obstruction since doing any one edge contraction, with most graph data
structures, is not relatively efficient (as compared with the actual time needed
to delete any one edge).

184

2.2

Michael J. Dinneen and Liu Xiong

Properties of Connected kVertex Cover Obstructions

The number of connected non-isomorphic graphs of order n increases exponentially. For n = 11, the number of connected graphs is 1006700565. If we could
process one graph per microsecond we would still need over 11 days of running
time. Since there exist obstructions larger than this for 6Vertex Cover we
clearly need a more restricted search space. Thus we will filter the input by
exploiting other properties of the kVertex Cover obstructions.
A few important properties for the kVertex Cover obstructions are now
systematically presented.
Lemma 2. Any connected obstruction for the kVertex Cover lower ideal is
a biconnected graph.
Proof. Let v be a cut-vertex in a connected obstruction O for kVertex Cover.
Also let C1 , C2 , . . . , Cm2 be the connected components of O\{v} and Ci0 =
O[V (Ci ) {v}], where O[X] denotes the subgraph induced by vertices X. Each
Ci0 denotes the part of the graph containing the component Ci , the vertex v, and
to kVertex Cover. We
the edges
Sm
Pm between v and Ci . Since O is an obstruction
is also a vertex cover for O,
have i=1 V C(Ci ) = k. Any vertex cover for i=1 Ci0 P
m
where vertex v may be repeated in several Ci0 . Thus, i=1 V C(Ci0 ) V C(O) =
k + 1. S
This implies that there exists an i such that V C(Ci0 ) = V C(Ci ) + 1. Now
0
O = ( j6=i Cj ) Ci0 is a proper subgraph of O. But V C(O0 ) = k + 1 contradicts
O being an obstruction. So O does not have any cut-vertices. Therefore, O is a
2
biconnected graph.
A nice filter for our graph generator is the following result.
Lemma 3. A vertex in an obstruction for kVertex Cover has degree at most
k + 1.
Proof. Suppose u is a vertex with degree at least k + 2 in an obstruction O =
(V, E) for kVertex Cover. Let O0 be the resulting graph by deleting any edge
uv of O. Since O is an obstruction for kVertex Cover, we have V C(O0 ) = k.
Hence, in G there is a set of vertices V 0 V which covers all edges in G except
/ V 0 and v
/ V 0.
uv and |V 0 | = k. Since V 0 does not cover edge uv, u
0
Thus V must contain all the neighbors of u except v. Hence V 0 contains at
least k + 2 1 vertices in the neighborhood of u. Thus we have |V 0 | k + 1 > k,
contradicting V 0 being a witness vertex cover to O0 .
Hence the degree of u is at most k + 1. Therefore a vertex in an obstruction
2
for kVertex Cover has maximum degree k + 1.
Using the above result, along with Lemma 1, we can easily derive the following.
Lemma 4. There is only one connected obstruction for kVertex Cover with
k + 2 vertices, which is the complete graph Kk+2 . Furthermore, no other obstruction for kVertex Cover has fewer vertices.

A Characterization of Graphs with Vertex Cover Six

185

The previous lemma shows that Kk+2 is the smallest connected obstruction
for kVertex Cover. We can also show that this is the unique obstruction
with maximum degree.
Lemma 5. If a vertex in a connected obstruction for kVertex Cover has
degree k + 1, then this obstruction is the complete graph with k + 2 vertices
(Kk+2 ).
Proof. Suppose O = (V, E) is a connected obstruction for kVertex Cover
and u is a vertex in O with degree k + 1 and let N (u) be the neighborhood of
u. Thus |N (u)| = k + 1.
Let uv be any edge incident to u. Let O0 = O\uv; we know V C(O0 ) = k.
This is illustrated in Figure 2. Let V 0 be a minimum vertex cover of O0 . We have
/ V 0 (otherwise O0 is not an obstruction).
u
/ V 0 and v

N (u)

Fig. 2. A vertex u in O with degree k + 1. The black vertices must be in the


vertex cover whenever uv is deleted.
Since V 0 covers all edges incident to u except uv, we have V 0 = N (u)\{v}.
Since N (u)\{v} is the vertex cover for O0 , v is not adjacent to any other vertex
w where w
/ N (u), otherwise, w must also be in V 0 . Thus N (v) N (u) {u}.
Since v is any vertex in N (u), any vertex in N (u) is connected to u or vertices
in N (u). Thus {u} N (u) = V . Hence O has k + 2 vertices. By Lemma 4, a
connected obstruction with k + 2 vertices for kVertex Cover is the complete
2
graph Kk+2 , thus O = Kk+2 in this case.
This lemma shows that for any obstruction O = (V, E) for kVertex Cover,
if is the maximum degree of O and |V | > k + 2 then < k + 1.
2.3

Vertex Bounds for kVertex Cover

We now present two important results that yield sharp upper bounds on the
number of vertices for connected and disconnected kVertex Cover obstruc-

186

Michael J. Dinneen and Liu Xiong

tions. Later we will give some edge bounds that may be generalized (with some
effort) to kVertex Cover.
Theorem 1. A connected obstruction for kVertex Cover has at most 2k +1
vertices.
Proof. Assume O = (V, E) is a connected obstruction for kVertex Cover,
where |V | = 2k + 2. We prove O is not a connected obstruction for kVertex
Cover by contradictions. The same argument also holds for graphs with more
vertices.
If O is a connected obstruction of kVertex Cover, then V C(O) = k + 1.
Hence V can be split into two subsets V1 and V2 such that V1 is a k + 1 vertex
cover and V2 = V \V1 . Thus |V2 | = 2k + 2 (k + 1) = k + 1. Obviously, no
edge exists between any pair of vertices in V2 , otherwise V1 is not a vertex cover.
Each vertex in V1 has at least one vertex in V2 as a neighbor, otherwise it can
be moved from V1 to V2 . (i.e., the vertex is not needed in this minimal vertex
cover).
Thus the neighborhood of V2 , N (V2 ) is V1 . We now prove that no subset S
of V2 has |N (S)| < |S|. [This result, in fact, will immediately exclude the case
|V | > 2k + 2.]
By way of contradiction, assume V3 = S is a minimal subset in V2 such that
|N (V3 )| < |V3 |. We say V3 is minimal whenever if T is any subset in V3 then
|N (T )| |T |. Note V3 will contain at least 3 vertices since every vertex has
degree at least 2 in biconnected graphs (see Lemma 2).
Let V4 = N (V3 ). Thus all edges adjacent to V3 are covered by V4 . Thus
V4 V1 and |V4 | < |V3 |. Let V5 = V2 \V3 and V6 = V1 \V4 . The graph O can be
split as indicated in Figure 3.

V4

V3

V6

V5

Fig. 3. Splitting the vertex set of O into four subsets.

A Characterization of Graphs with Vertex Cover Six

187

We now prove that the existence of such a set V3 forces O to be disconnected.


Since V3 is assumed minimal, no subset T in V3 has |N (T )| < |T |. Thus if we
delete any vertex in V3 , leaving V30 , then any subset T in V30 has |N (T )| |T |.
Recall that a matching in a bipartite graph is a set of independent edges
(with no common end points). Recall Halls Marriage Theorem [Hal35]:
Halls Marriage Theorem:
A bipartite graph B = (X1 , X2 , E) has a matching of cardinality |X1 | if and only
if for each subset A X1 , |N (A)| |A|.
Thus there is a matching of cardinality |V30 | in the bipartite induced subgraph
O0 = (V30 , N (V3 )) in O. Thus there are |V30 | = |V3 |1 independent edges between
the set V3 and the set V4 .
Let us now delete all edges between V4 and V5 and all edges between V4 and
V6 . Let C1 = O[V3 V4 ], C2 = O[V5 V6 ] be these disconnected components
in the resulting graph. (The induced graph C1 is connected, while the induced
graph C2 may or may not be.)
As discussed above, there exists |V3 | 1 independent edges in C1 . Thus to
cover these edges, V C(C1 ) |V3 | 1. We know |V4 | < |V3 | and all edges incident
to V3 are covered by V4 , thus V C(C1 ) = |V4 |.
Now consider the graph C2 . Suppose, V C(C2 ) < |V6 |. Since all deleted edges
are also covered by V4 , V4 V C(C2 ) must cover all edges in O. Thus V C(O) =
|V4 | + V C(C2 ) < |V4 | + |V6 | = k + 1. This contradicts that O is an obstruction
for kVertex Cover. Thus the assumption that V C(C2 ) < |V6 | is not correct.
Hence V C(C2 ) = |V6 | even though edges between C1 and C2 were deleted.
Thus V C(C1 C2 ) = |V4 | + |V6 | = k + 1. Therefore O can not be a connected
obstruction for kVertex Cover since the resulting graph still requires a k + 1
vertex cover whenever all edges between V4 and V5 and all edges between V4 and
V6 are deleted.
Therefore the assumption that there exists a minimal subset V3 in V2 is not
correct. Hence any subset S in V2 has |N (S)| |S|.
Once again, by applying Halls Marriage Theorem, there is a matching of
cardinality k + 1 in the induced bipartite subgraph O0 = (V2 , V1 ) of O. To cover
these k + 1 independent edges, a vertex cover of size k + 1 is necessary. We
know that if O is a connected graph, there must exist other edges in O except
these k + 1 independent edges. If those edges are deleted, the resulting graph
still has vertex cover k + 1. Thus O can not be a connected obstruction for
2
kVertex Cover if it has more than 2k + 1 vertices.
By extending the above result, we can prove the following corollary by induction.
Corollary 1. Any obstruction for kVertex Cover has order at most 2k + 2.
We now mention some observations about the kVertex Cover obstructions. The known obstructions for the small cases (see [CD94] for k 5, in

188

Michael J. Dinneen and Liu Xiong

addition to this papers k = 6) indicate a very interesting feature: the more vertices, the fewer edges. As proven above, a complete graph Kk+2 is the smallest
obstruction (and only one), but it seems to have the largest number of edges. The
cycle obstruction C2k+1 appears to be the only connected obstruction with the
largest number of vertices (and appears to have the smallest number of edges).
2.4

Computing All Obstructions for 6Vertex Cover

We divide our computational task for finding all the connected obstructions for
6Vertex Cover into two steps.
(1) We find all connected obstructions with order at most 11 for 6Vertex Cover. This step is very straight forward. Our algorithm IsObstruction is applied
to all non-isomorphic biconnected graphs with a number of vertices between 9
and 11, of maximum degree 6, and of maximum number of edges 33.
(2) To find all connected obstructions of order 12 and 13 for 6Vertex Cover,
new degree and edge bounds were found and used, as indicated below.
By the Lemma 5, we know that if a connected obstruction O has a vertex of
degree 7 for 6Vertex Cover, then this obstruction must be K8 . Thus we only
have to consider graphs with maximum degree 6. Furthermore, if the degree for
O is 6, we can easily prove the following statement by cases.
Statement 1. If a connected obstruction O = (V, E) for 6Vertex Cover has
a vertex of degree 6, then |V | 10. Furthermore, if |V | = 10 then |E| 24, and
if |V | = 9 then |E| 25.
A consequence of the proof for Statement 1 (see [DX00]) is the following: if
a connected obstruction O for 6Vertex Cover has 11 or more vertices then
the degree of every vertex is less than or equal to 5. With another series of case
studies of graphs with vertices of degree 5 we have the following.
Statement 2. If a connected obstruction O = (V, E) for 6Vertex Cover has
12 vertices then |E| 24. Further, if O has 13 vertices then |E| 26.
The proof of this statement (see [DX00]) also gives a degree bound of 4 for
any obstruction with 13 vertices. The search space for finding all obstructions
with orders 12 and 13 for 6Vertex Cover has been extremely reduced.

Final Remarks

Our obstruction checking procedure for kVertex Cover (primarily based on


Lemmata 1 and 5) was efficient enough to process all biconnected graphs of
order at most 11 for k = 6. To find all of the obstructions with 12 vertices
for 6Vertex Cover, we only needed to test all non-isomorphic (biconnected)
graphs with maximum degree 5 and at most 24 edges. For finding all obstructions
with 13 vertices for 6Vertex Cover, we only need to check all non-isomorphic
graphs with maximum degree 4 and at most 26 edges. This search space is very

A Characterization of Graphs with Vertex Cover Six

189

manageable; it requires about two months of computation time! In Figures 45,


we display all 188 connected obstructions for 6Vertex Cover.
We now mention a couple of areas left open by our research. It would be
nice to have a proof that C2k+1 is the only connected obstruction for kVertex
Cover, since we now known that 2k + 1 is an upper bound on the number
of vertices. There are some interesting open questions regarding edge bounds
for kVertex Cover. As we pointed out earlier, the obstructions start having
fewer edges as the number of vertices increases. More theoretical results that
generalizes our specific bounds for k = 6 seem possible.

References
[APS91]

S. Arnborg, A. Proskurowski, and D. Seese. Monadic second order logic,


tree automata and forbidden minors. In Proceedings of the 4th Workshop on Computer Science Logic, CSL90, volume 533 of Lecture Notes on
Computer Science, pages 116. Springer-Verlag, 1991.
[BFR98]
R. Balasubramanian, M. R. Fellows, and V. Raman. An improved fixedparameter algorithm for vertex-cover. Information Processing Letters,
65(3):163168, 1998.
[CD94]
K. Cattell and M. J. Dinneen. A characterization of graphs with vertex
cover up to five. In V. Bouchitte and M. Morvan, editors, Orders, Algorithms and Applications, ORDAL94, volume 831 of Lecture Notes on
Computer Science, pages 8699. Springer-Verlag, July 1994.
[CDD+ 00] K. Cattell, M. J. Dinneen, R. G. Downey, M. R. Fellows, and M. A.
Langston. On computing graph minor obstruction sets. Theoretical Computer Science, 233(1-2):107127, February 2000.
[DX00]
M. J. Dinneen and L. Xiong. The minor-order obstructions for the
graphs of vertex cover six.
Research Report CDMTCS-118, Centre for Discrete Mathematics and Theoretical Computer Science,
University of Auckland, Auckland, New Zealand, 29 pp. January 2000.
(http://www.cs.auckland.ac.nz/CDMTCS/researchreports/118vc6.pdf)
[FL89]
M. R. Fellows and M. A. Langston. An analogue of the Myhill-Nerode
Theorem and its use in computing finite-basis characterizations. In IEEE
Symposium on Foundations of Computer Science Proceedings, volume 30,
pages 520525, 1989.
[GJ79]
M. R. Garey and D. S. Johnson. Computers and Intractability: A Guide
to the Theory of NP-completeness. W. H. Freeman and Company, 1979.
[Hal35]
P. Hall. On representation of subsets. J. London Math. Soc., 10:2630,
1935.
[LA91]
J. Lagergren and S. Arnborg. Finding minimal forbidden minors using
a finite congruence. In Proceedings of the International Colloquium on
Automata, Languages and Programming, volume 510 of Lecture Notes on
Computer Science, pages 533543. Springer-Verlag, 1991. 18th ICALP.
[McK90]
B. D. McKay. nauty Users Guide (version 2.0). Tech Report TR-CS90-02, Australian National University, Department of Computer Science,
1990.
[Pro93]
A. Proskurowski. Graph reductions, and techniques for finding minimal
forbidden minors. In N. Robertson and P. D. Seymour, editors, Graph

190

Michael J. Dinneen and Liu Xiong

Fig. 4. All connected obstructions for 6Vertex Cover.

A Characterization of Graphs with Vertex Cover Six

Fig. 5. All connected obstructions for 6Vertex Cover (continued).

191

192

[RS85]

Michael J. Dinneen and Liu Xiong


Structure Theory, volume 147 of Contemporary Mathematics, pages 591
600. American Mathematical Society, 1993.
N. Robertson and P. D. Seymour. Graph Minors A survey. In Surveys in
Combinatorics, volume 103, pages 153171. Cambridge University Press,
1985.

On the Monotonicity of Minimum Diameter with


Respect to Order and Maximum Out-Degree
Mirka Miller and Slamin
Department of Computer Science and Software Engineering,
The University of Newcastle, NSW 2308, Australia
{mirka, slamin}@cs.newcastle.edu.au

Abstract. Considering the three parameters of a directed graph: order,


diameter and maximum out-degree, there are three optimal problems
that arise if we optimise in turn each one of the parameters while holding the other two parameters fixed. These three problems are related
but as far as we know not equivalent. One way to prove the equivalence of the three problems would be to prove that the optimal value
of each parameter is monotonic in each of the other two parameters.
It is known that maximum order is monotonic in both diameter and
maximum out-degree and that minimum diameter is monotonic in maximum out-degree. In general, it is not known whether the other three
possible monotonicity implications hold. In this paper, we consider the
problem of determining the smallest diameter K(n, d) of a digraph G
given order n and maximum out-degree d. Using a new technique for
construction of digraphs, we prove that K(n, d) is monotonic for all n
k
d
such that dd1
< n dk + dk1 , thus solving an open problem posed in
1988 by Miller and Fris.

Introduction

In communication network design, there are several factors which should be


considered. For example, each processing element should be directly connected
to a limited number of other processing elements in such a way that there always
exists a connection route from one processing element to another. Furthermore,
in order to minimize the communication delay between processing elements, the
directed connection route must be as short as possible.
A communication network can be modelled as a digraph, where each processing element is represented by a vertex and the directed connection between two
processing elements is represented by an arc. The number of vertices (processing
elements) is called the order of the digraph and the number of arcs (directed
connections) from a vertex is called the out-degree of the vertex. The diameter
is defined to be the largest of the shortest paths (directed connection routes)
between any two vertices.
In graph-theoretical terms, the problems in the communication network designs can be modelled as optimal digraph problems. The example described above
corresponds to the so-called order/degree problem: Construct digraphs with the
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 193201, 2000.
c Springer-Verlag Berlin Heidelberg 2000

194

Mirka Miller and Slamin

smallest possible diameter K(n, d) for a given order n and maximum out-degree
d. Before we discuss in more detail optimal digraph problems, we give more
formal definitions of the terms in graph theory that will be used.
A directed graph or digraph G is a pair of sets (V, A) where V is a finite
nonempty set of distinct elements called vertices; and A is a set of ordered pair
(u, v) of distinct vertices u, v V called arcs.
The order n of a digraph G is the number of vertices in G, that is, n = |V |.
An in-neighbour (respectively out-neighbour) of a vertex v in G is a vertex u
(respectively w) such that (u, v) A (respectively (v, w) A). The set of all
in-neighbour (respectively out-neighbour) of a vertex v is denoted by N (v)
(respectively N + (v)). The in-degree (respectively out-degree) of a vertex v is the
number of its in-neighbour (respectively out-neighbour). If the in-degree equals
the out-degree (= d) for every vertex in G, then G is called a diregular digraph
of degree d.
A walk of length l in a digraph G is an alternating sequence v0 a1 v1 a2 ...al vl
of vertices and arcs in G such that ai = (vi1 , vi ) for each i, 1 i l. A walk
is closed if v0 = vl . If all the vertices of a v0 vl walk are distinct, then such a
walk is called a path. A cycle is a closed path.
The distance from vertex u to v, denoted by (u, v), is the length of the
shortest path from vertex u to vertex v. Note that in general (u, v) is not
necessarily equal to (v, u). The diameter of digraph G is the longest distance
between any two vertices in G.
Let v be a vertex of a digraph G with maximum out-degree d and diameter
k. Let ni , for 0 i k, be the number of vertices at distance i from v. Then
ni di , for 0 i k, and so
n=

k
X
i=0

ni 1 + d + d2 + . . . + dk =

dk+1 1
d1

(1)

The right-hand side of (1) is called the Moore bound and denoted by Md,k . If
the equality sign holds in (1) then the digraph is called Moore digraph. It is well
known that Moore digraphs exist only in the trivial cases when d = 1 (directed
cycles of length k + 1, Ck+1 , for any k 1) or k = 1 (complete digraphs of order
d + 1, Kd+1 , for any d 1) [10,3]. Thus for d 2 and k 2, inequality (1)
becomes
dk+1 d
(2)
n d + d2 + . . . + dk =
d1
Let G(n, d, k) denotes the set of all digraphs G, not necessarily diregular, of
order n, maximum out-degree d, and diameter k. Given these three parameters,
there are three problems for digraphs G G(n, d, k), namely,
1. The degree/diameter problem: determine the largest order N (d, k) of a digraph given maximum out-degree d and diameter k.
2. The order/degree problem: determine the smallest diameter K(n, d) of a
digraph given order n and maximum out-degree d.

On the Monotonicity of Minimum Diameter

195

3. The order/diameter problem: determine the smallest degree D(n, k) of a


digraph given order n and diameter k.
Miller [6] pointed out the following implications regarding to the three problems above.
a. d1 < d2 N (d1 , k) < N (d2 , k);
b. k1 < k2 N (d, k1 ) < N (d, k2 );
c. d1 < d2 K(n, d1 ) K(n, d2 ).
It is not known whether the following three implications hold or not.
1. k1 < k2 D(n, k1 ) D(n, k2 ), for (k1 , k2 n 1);
2. n1 < n2 K(n1 , d) K(n2 , d);
3. n1 < n2 D(n1 , k) D(n2 , k), for (n1 , n2 k + 1).
Miller and Fris [7] posed the problem of whether or not K(n, d) is monotonic
k
d
< n dk +
on restricted intervals of n, for example, for all n such that dd1
k1
. In this paper, we solve the open problem using a new technique for the
d
construction of digraphs.

Construction

In this section we introduce a new technique for the construction of digraphs, as


described in the following theorems. This construction will be used to prove the
main results presented in the next section.
Theorem 1 If G G(n, d, k) and N + (u) = N + (v) for any vertex u, v G,
then there exists G1 G(n 1, d, k 0 ), k 0 k.
Proof. Suppose that N + (u) = N + (v) for any vertex u, v G. Let G1 be a
digraph deduced from G by deleting vertex u together with its outgoing arcs
and reconnecting the incoming arcs of u to the vertex v. Obviously, the new
digraph G1 has maximum out-degree the same as the maximum out-degree of
G. To prove that the diameter of G1 is at most k, we only need to consider
the distance from vertices of N (u) to other vertices in G reached through u.
Just deleting u might cause a vertex in N (u) not to reach some vertex within
distance at most k. However, this is overcome when we reconnect the vertices of
N (u) to v. Thus we obtain a digraph G1 with order n1, maximum out-degree
2
d and diameter k 0 , where k 0 k.
Figure 1(a) shows an example of digraph G G(6, 2, 2) with the property
N + (1) = N + (5), N + (2) = N + (6), and N + (3) = N + (4). Applying Theorem
1 to the digraph by deleting vertex 6 together with its outgoing arcs and then
reconnecting its incoming arcs to vertex 2 (since N + (2) = N + (6)), we obtain a
new digraph G1 G(5, 2, 2) as shown in Figure 1(b).

196

Mirka Miller and Slamin


1

(a)

(b)

(c)

Fig. 1. The digraphs G G(6, 2, 2), G1 G(5, 2, 2), and G2 G(4, 2, 2)

Digraphs which are obtained from line digraph construction contain some
pairs of vertices with the same out-neighbourhoods. The line digraph L(G) of
a digraph G is the digraph where each vertex of L(G) corresponds to arc of G;
and a vertex uv of L(G) is adjacent to a vertex wx if and only if v = w, that is,
if the arc (u, v) is adjacent to the arc (w, x) in G.
The order of the line digraph L(G) is equal to the number of arcs in the
digraph G. For a diregular digraph G of out-degree d 2, the sequence of line
digraph iterations
L(G), L2 (G) = L(L(G)), ..., Li (G) = L(Li1 (G)), ...
is an infinite sequence of diregular digraphs of degree d. For more detail explanations about line digraph iterations, see [4]. The following facts about line digraph
are obvious.
Fact 1 If a digraph G is a diregular of degree d 2, diameter k and order n
then the line digraph L(G) is also diregular of degree d, order dn and diameter
k + 1.
Fact 2 If L(G) is a line digraph of diregular digraph G with degree d 2,
diameter k and order n then there are n tuples of d vertices in L(G) with identical out-neighbourhood. In other words, if ui N (v) and wj N + (v) where
v, ui , wj V (G) for every i = 1, 2, ..., d and j = 1, 2, ..., d then
N + (u1 v) = N + (u2 v) = ... = N + (ud v) = {vw1 , vw2 , ..., vwd }
where ui v, vwj V (LG).
Applying Theorem 1 to line digraphs, we obtain
Theorem 2 If LG G(dn, d, k) is a line digraph of a diregular digraph G
G(n, d, k 1), then there exists digraph LGr G(dn r, d, k 0 ), k 0 k, for every
1 r (d 1)n 1.

On the Monotonicity of Minimum Diameter

197

Proof. Suppose that LG is a line digraph of the digraph G. By Fact 1, LG is


also diregular digraph of degree d, order dn and diameter k. From Fact 2, we
have n tuples of d vertices in LG with identical out-neighbourhood. One of the
tuples is
N + (u1 v) = N + (u2 v) = ... = N + (ud v) = {vw1 , vw2 , ..., vwd }
where ui v, vwj V (LG) for every i = 1, 2, ..., d and j = 1, 2, ..., d.
We apply Theorem 1 by deleting vertex u1 v together with its outgoing arcs
and reconnecting its incoming arcs to the vertex ui v for any i = 2, 3, ..., d, we
obtain the digraph with order one less than the order of LG. Repeating this
notion can be done d 1 times for each tuple. Since there are n tuples of d
vertices with identical out-neighbourhood in LG, we can delete the vertices as
many as (d 1)n 1 vertices to obtain the digraph with diameter at most k.
Thus the digraphs LGr G(dn r, d, k 0 ), k 0 k, for every 1 r (d 1)n 1
2
do exist.
Every time we delete a vertex u and reconnect its incoming arcs to other
vertex v with the same out-neighbourhood as u leads to the number of incoming
arcs of v increases. This implies that the resulting digraphs is not regular with
respect to the in-degree, but still regular in out-degree. Therefore the resulting
digraphs LGr are non-diregular.
This situation becomes more interesting, when we consider Kautz digraphs,
Ka G(dk + dk1 , d, k) for d 3 and k 2. Since Kautz digraphs can be
obtained by (k 1)-fold iterations of the line digraph construction applied to
complete digraph Kd+1 , Theorem 2 immediately implies that
Corollary 1 For dk1 + dk2 < n dk + dk1 , there exist digraphs G
2
G(n, d, k 0 ), k 0 k.
Figure 1(a) shows an example of the Kautz digraph G G(6, 2, 2) which is
a line digraph of K3 and the non-diregular digraphs G1 G(5, 2, 2) and G2
G(4, 2, 2) (Figure 1(b) and Figure 1(c)) deduced from digraph G. In this example,
to obtain G1 G(5, 2, 2) we delete the vertex 6 from G together with its outgoing
arcs and reconnect its incoming arcs to the vertex 2. Furthermore, to obtain
G2 G(4, 2, 2), we delete the vertex 5 from G1 together with its outgoing arcs
and reconnect its incoming arc to the vertex 1.

The Diameter

Kautz digraphs Ka G(dk + dk1 , d, k) are the largest known digraphs of maximum out-degree d 3 and diameter k 2. Kautz digraph Ka can be regarded
as a line digraph Lk1 (Kd+1 ) of the complete directed graph Kd+1 . There are
exactly d + 1 different out-neighbourhoods, each shared by dk1 vertices. Therefore Kautz digraphs can be used as base digraphs in our construction (Theorem
2) to produce other digraphs with smaller order while keeping the diameter no
larger than Ka and the maximum out-degree the same. Consequently, we have

198

Mirka Miller and Slamin

Theorem 3 If

dk d
d1

< n dk + dk1 for d 2 and k 2, then K(n, d) = k.

Proof. If the diameter of the digraph is k 1, the inequality (2) becomes


N (d, k)

dk d
.
d1

(3)

d
, then K(n, d) k. By Corollary 1, there exist digraphs
Obviously, if n > dd1
k1
+ dk2 < n dk + dk1 , out-degree d and diameter at
of order n, for d
k
d
k1
+ dk2 < dd1
, it follows that for digraphs with maximum
most k. Since d

out-degree d, order n, where


k, i.e., K(n, d) = k.

dk d
d1

< n dk + dk1 , the minimum diameter is

Theorem 3 can be restated as


Theorem 30 K(n, d) is monotonic for all n such that

dk d
d1

< n dk + dk1 .

The interval of order n can be tightened if we consider particular cases of outdegree d and if we utilise some additional known results, as described below.
Let us first consider the case of maximum out-degree 3. Baskoro et al [1]
proved that there is no digraph of maximum out-degree 3 and diameter k 3
with order one less than the Moore bound. Therefore, for d = 3 and k 3,
k+1
k
n 3 2 5 . For diameter k 1, n 3 25 .
k
Consequently, if n > 3 25 , then K(n, 3) k. Combining this result and
Corollary 1, we have
Theorem 4 For every k > 3 and

3k 5
2

< n 4 3k1 , K(n, 3) = k.

Another special case we can consider is digraphs of maximum out-degree 2.


Alegre constructed diregular digraph of (constant) out-degree 2, diameter 4 and
order 25, that is, Al G(25, 2, 4). This digraph is larger than Kautz digraph of
the same maximum out-degree and diameter. Applying line digraph iterations
and Theorem 2 to Al, we obtain
Lemma 1 For every k 5 and 25 2k5 < n 25 2k4 , G(n, d, k) is not
2
empty.
an
Furthermore, Miller and Sir
[9] proved that
Theorem 5 If d = 2 and k > 2, then n 2k+1 4.

This result implies that for n > 2k 3, K(n, 2) k. Combining this result and
Lemma 1, we have
Theorem 6 For every k 5 and 2k 3 n 25 2k4 , K(n, 2) = k.

We conclude this paper with our current knowledge of the K(n, 2) problem
for n 200 (Table 1). New results as displayed in bold-type, for example G
G(49, 2, 5) which is obtained by applying Theorem 2 to the line digraph of Alegre
digraph (see Figure 2).

On the Monotonicity of Minimum Diameter

199

L(Al)

L(Al)

Fig. 2. The line digraph of Alegre digraph L(Al) and non-diregular digraph of
order 49 L(Al)0

200

Mirka Miller and Slamin

n
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

K(n, 2)
0
1
1
2
2
2
3
3
3
3
3
3
4
4
4
4
4
4
4
4
4
4
4
4
4
4 or 5
4 or 5
4 or 5
5
5
5
5
5
5
5
5
5
5
5
5

n
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80

K(n, 2)
5
5
5
5
5
5
5
5
5
5
5 or 6
5 or 6
5 or 6
5 or 6
5 or 6
5 or 6
5 or 6
5 or 6
5 or 6
5 or 6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6

n
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120

K(n, 2)
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6 or 7
6 or 7
6 or 7
6 or 7
6 or 7
6 or 7
6 or 7
6 or 7
6 or 7
6 or 7
6 or 7
6 or 7
6 or 7
6 or 7
6 or 7
6 or 7
6 or 7
6 or 7
6 or 7
6 or 7

n
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160

K(n, 2)
6 or 7
6 or 7
6 or 7
6 or 7
6 or 7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7

n
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200

K(n, 2)
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7

Table 1. The values of K(n, d) for d = 2 and n 200.

On the Monotonicity of Minimum Diameter

201

References
an
1. E.T. Baskoro, Mirka Miller, J. Sir
and M. Sutton, Complete characterisation of
almost Moore digraphs of degree 3, Discrete Mathematics, to appear.
Zn
2. E.T. Baskoro, Mirka Miller, J. Plesnk and S.
am, Digraphs of degree 3 and
order close to the Moore bound, Journal of Graph Theory 20 (1995) 339349
3. W.G. Bridges and S. Toueg, On the impossibility of directed Moore graphs, J.
Combinatorial Theory Series B29 (1980) 339341
4. M.A. Fiol, J.L.A. Yebra and I. Alegre, Line digraph iterations and the (d, k) digraph
problem, IEEE Transactions on Computers C-33 (1984) 400403
5. M. Imase and M. Itoh, A design for directed graphs with minimum diameter, IEEE
Trans. on Computers C-32 (1983) 782784
6. Mirka Miller, M. A. Thesis, Dept. of Math, Stats and Comp. Sci., U NE, Armidale
(1986)
7. Mirka Miller and I. Fris, Minimum diameter of diregular digraphs of degree 2,
Computer Journal 31 (1988) 7175
8. Mirka Miller and I. Fris, Maximum order digraphs for diameter 2 or degree 2, Pullman volume of Graphs and Matrices, Lecture Notes in Pure and Applied Mathematics 139 (1992) 269278
an
9. Mirka Miller and J. Sir
, Digraphs of degree two and defect two, submitted.
Zn
10. J. Plesnk and S.
am, Strongly geodetic directed graphs, Acta F. R. N. Univ.
Comen. - Mathematica XXIX (1974) 2934

Online Independent Sets


Magn
us M. Halld
orsson? , Kazuo Iwama?? , Shuichi Miyazaki, and
Shiro Taketomi
School of Informatics, Kyoto University, Kyoto 606-8501, Japan
{mmh, iwama, shuichi, taketomi}@kuis.kyoto-u.ac.jp

Abstract. At each step of the online independent set problem, we are


given a vertex v and its edges to the previously given vertices. We are
to decide whether or not to select v as a member of an independent
set. Our goal is to maximize the size of the independent set. It is not
difficult to see that no online algorithm can attain a performance ratio
better than n 1, where n denotes the total number of vertices. Given
this extreme difficulty of the problem, we study here relaxations where
the algorithm can hedge his bets by maintaining multiple alternative
solutions simultaneously.
We introduce two models. In the first, the algorithm can maintain a
polynomial number of solutions (independent sets) and choose the largest
one as the final solution. We show that ( logn n ) is the best competitive
ratio for this model. In the second more powerful model, the algorithm
can copy intermediate solutions and grow the copied solutions in different
ways. We obtain an upper bound of O(n/(k log n)), and a lower bound of
n/(ek+1 log 3 n), when the algorithm can make nk operations per vertex.

Introduction

An independent set (IS) in a graph is a set of vertices that are mutually nonadjacent. In the online independent set problem, a graph is given one vertex at
a time along with edges to previous vertices. The algorithm is to maintain a
proper solution, and must at each step decide irrevocably whether to keep the
presented vertex as a part of the solution. Its goal is to find as large a set as
possible, relative to the size of the largest independent set in the graph.
Online computation has received considerable attention as a natural model
of some properties of the real world such as the irreversibility of time and the
unpredictability of the future. Aside from modeling real-time computation, it
also has been found to be important in contexts where access to data is limited,
e.g. because of unfamiliar terrain, space constraints, or other factors determining
the order of the input.
The online IS problem occurs naturally in resource scheduling. Requests for
resources or sets of resources arrive online, and two requests can only be serviced
?
??

Current address: Science Institute, University of Iceland ([email protected])


Supported in part by Scientific Research Grant, Ministry of Japan, 10558044,
09480055 and 10205215.

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 202209, 2000.
c Springer-Verlag Berlin Heidelberg 2000

Online Independent Sets

203

simultaneously if they do not involve the same resource. When the objective is
to maximize the throughput of a server, we have a (possibly weighted) online IS
problem. Previously, this has primarily been studied in the context of scheduling
intervals [7].
The usual measure of the quality of an online algorithm A is its competitive
ratio or performance ratio. For the online IS problem, it is defined to be (n) =
maxIIn opt(I)/A(I), where In is the set of all the sequences of vertices and
corresponding edges given as n-vertex graphs, opt(I) is the cardinality of the
maximum independent set of I, and A(I) is the size of the independent set
found by A on I.
One reason why the online IS problem has not received a great deal of attention is that any algorithm is bound to have a poor competitive ratio. It is not
hard to see that in the basic model, once the algorithm decides to add a vertex
to its set, the adversary can ensure that no further vertices can be added, even
though all the other n 1 vertices form an independent set. Thus, the worst
possible performance ratio of n 1 holds for any algorithm, even when the input
graph is a tree. As a result, we are interested in relaxations of the basic model
and their effects on the possible performance ratios.
In the coloring model studied recently in [3], the online algorithm constructs
a coloring online. The IS solution output will be the largest color class. This
circumvents the strait-jacket that the single current solution imposes on the
algorithm, allowing him to hedge his bets. This model relates nicely to online
coloring that has been studied for decades. In particular, positive results known
for some special classes of graphs carry over to this IS problem: O(log n) for
trees and bipartite graphs [1,2,8], and n1/k! for k-colorable graphs [5]. Also,
2-competitive ratio is immediate for line graphs, as well as ratio k for k + 1claw free graphs. On the other hand, for general graphs, no algorithm has a
competitive ratio better than n/4 [3], a ratio that is achieved by the FirstFit
coloring algorithm.
Our results. We propose the multi-solutions model, where the algorithm can
maintain a collection of independent sets. At each step, the current vertex can
be added to up to r(n) different sets. The coloring model is equivalent to the
special case r(n) = 1. We are particularly interested in polynomially bounded
computation, thus focusing on the case when r(n) = nk , for some constant k.
For this case, we derive an upper and a lower bound of (n/ log n) on the best
possible competitive ratio. For r(n) constant, we can argue a stronger (n) lower
bound. These results are given in Section 2.
A still more powerful model proposed here is the inheritance model. Again
each vertex can participate in limited number of sets. However, the way these
sets are formed is different. At each step, r(n) different sets can be copied and
the current vertex is added to one copy of each of the sets. Thus, adding a vertex
to a set leaves the original set still intact. This model can be likened to forming
a tree, or a forest, of solutions: at each step, r(n) branches can be added to trees
in the forest, all labeled by the current vertex. Each path from a root to a node
(leaf or internal) corresponds to one current solution.

204

Magn
us M. Halld
orsson et al.

The inheritance model is the most challenging one in terms of proving lower
bounds. This derives from the fact that all the lower bounds used the other
models, as well as for online graph coloring [4,3], have a property called transparency: once the algorithm makes his choice, the adversary immediately reveals
her classification of that vertex to the algorithm. This transparency property,
however, trivializes the problem in the inheritance model. Still we are able to
prove lower bounds in the same ballpark, or (n/(ek log3 n)) when r(n) = nk .
These results are given in Section 3.
Notation. Throughout this paper, n denotes the total number of given vertices, and we write vertices v1 , v2 , , vn , where vertices are given in this order.
Namely, at the ith step, the vertex vi is given and an online algorithm decides
whether it selects vi or not.

Multi-solutions Model

In the original online IS problem, the algorithm can have only one bin, one
candidate solution. In the multi-solutions model, the algorithm can maintain a
collection of independent sets, choosing the largest one as the final solution. The
model is parameterized by a function r(n); each vertex can be placed online
into up to r(n) sets. When r(n) = 1, this corresponds to forming a coloring
of the nodes. When r(n) = 2n , an online algorithm can maintain all possible
independent sets and the problem becomes trivial. We are primarily interested
in cases when r(n) is polynomially bounded.
We find that the best possible performance ratio in this model is (n/ log r(n)).
In particular, when r(n) is constant, the ratio is linear, while if r(n) is polynomial, the ratio is (n/ log n).
Remark. In online problems, the algorithm does not know the length n of the
input sequence. Thus, in the multi-solutions model, the algorithm can assign the
i-th node to r(i) different sets, rather than r(n). However, it is well known that
not informing of the value of n has very limited effect on the performance ratio,
affecting at most the constant factor. Thus, in order to simplify the arguments,
we may actually allow the algorithm r(n) assignments for every vertex.
Theorem 1. There is an online algorithm with competitive ratio at most
O(n/ log r(n)) in the multi-solutions model.
Proof. Let t = dlog r(n) 1e. View the input as sequence of blocks, each with t
vertices. For each block, form a bin corresponding to each non-empty subset of
the t vertices. Greedily assign each vertex as possible to the bins corresponding
to sets containing that vertex. This completes the specification of the algorithm.
Each node is assigned to at most r(n) bins. Each independent set in each
block will be represented in some bin. Thus, the algorithm finds an optimal
solution within each block. It follows that the performance ratio is at most n/t,
the number of blocks.

Online Independent Sets

Lower Mounds
constant.

205

We first give a linear lower bound for the case of r(n) being

Theorem 2. Any online IS algorithm has a competitive ratio at least


in the multi-solutions model.

n
2(r(n)+1)

Proof. We describe the action of our adversary. Vertices have one of two states:
good and bad. When a vertex is presented to an online algorithm, its state is
yet undecided. Immediately after an online algorithm decides its action for that
vertex, its state is determined. If a vertex v becomes good, no subsequent vertex
has an edge to v. If v becomes bad, all subsequent vertices have an edge to v.
Note that all good vertices constitute an independent set, in fact the optimal
one. Also, note that once a bad vertex is added to a bin, no succeeding vertex
can be put into that bin.
The adversary determines the state of each vertex as follows: If an online
algorithm put the vertex v into a bin with r(n) vertices or more, then v becomes
a bad vertex; otherwise its good. Thus, no bin contains more than r(n) + 1
vertex. This upper bounds the algorithms solution.
Each bad node becomes the last node in a bin with r(n) copies of other good
nodes. Since each node appears in at most r(n) bins, we have that the number
of good nodes is at least the number of bad nodes, or at least n/2. This lower
bounds the size of the optimal solution.
Theorem 3. Any online IS algorithm has a competitive ratio at least
in the multi-solutions model.

n
2 log(n2 r(n))

Proof. In the lower bound argument here, we consider a randomized adversary.


As before, we use good vertices and bad vertices. This time, our adversary makes
each vertex good or bad with equal probability. We analyze the average performance of an arbitrary online algorithm. The probability that a fixed bin contains
1
since all but the
more than C = log(n2 r(n)) vertices is at most ( 12 )C = n2 r(n)
last vertex must be good. The online algorithm can maintain at most nr(n) bins.
Thus, the probability that there is a bin with more than C vertices is at most
1
= n1 . Namely, with high probability the online algorithm outputs
nr(n) n2 r(n)
an independent set of size at most C. On the other hand, the expected value of
the optimal cost, namely the expected number of good vertices, is 12 n = n2 .
Hence, the competitive ratio is at least n/2(log(n2 r(n))).
Remark. Observe that the graphs constructed have a very specific structure. For
one, they are split graphs, as the vertex set can be partitioned into an independent
set (the good nodes) and a clique (the bad nodes). The graphs also belong to
another subclass of chordal graphs: interval graphs. Vertex i can be seen to
correspond to an interval on the real line with a starting point at i. If the
node becomes a bad node, then the interval reaches far to the right with an
endpoint at n. If it becomes a good node, then the right endpoint is set at

206

Magn
us M. Halld
orsson et al.

i + 1/2. It follows that the problem of scheduling intervals online for maximizing
throughput is hard, unless some information about the intervals endpoints are
given. This contrasts with the case of scheduling with respect to makespan,
which corresponds to online coloring interval graphs, for which a 3-competitive
algorithm is known [6].
Also, observe that the latter lower bound (as well as the construction in the
following section) is oblivious (in that it does not depend on the actions of the
algorithm), and hold equally well against randomized algorithms.

Inheritance Model

The model we shall introduce in this section is much more flexible than the
previous one. At each step, an algorithm can copy up to r(n) bins and put the
current vertex into those copies or a new empty bin. (We restrict the number
of copies to r(n) 1 when an online algorithm uses an empty bin, because it
is natural to restrict the number of bins each vertex can be put into to r(n)
considering the consistency with multi-solutions model.) Note that this model is
at least as powerful as the multi-solutions model with the same r(n).
The upper bound follows from Theorem 1.
Corollary 4. There is an online algorithm with competitive ratio at most
O(n/ log r(n)) in inheritance model.
3.1

A Lower Bound

As mentioned before, a lower bound argument is a challenging one. Before showing our result, we discuss some natural ideas and see why those arguments only
give us poor bounds.
Discussion 1 Consider the transparent adversary strategy of the proof of
Theorem 3. There is an online algorithm that against this adversary always
outputs an optimal solution for split graphs. The algorithm uses only two bins
at each step. At the first step, it maintains the empty bin and the bin that
contains v1 . At the ith step (i 2), the algorithm knows that the vertex vi1
is good or bad by observing whether there is an edge (vi1 , vi ) or not. If vi1
is good, the algorithm copies the bin containing vi1 , adds vi to the copy, and
forgets about the bin not containing vi1 . Otherwise, if vi1 is bad, exchange
the operations for the two bins. Observe that this algorithm outputs a solution
consisting of all good vertices.
What then is the difference between our new model and the old one? Note
that, in the inheritance model, an algorithm can copy bins it currently holds.
To simulate this operation in the multi-solutions model, an algorithm has to
construct in advance two bins whose contents are the same. Since the above
algorithm in the inheritance model copies at each step, an algorithm in the
multi-solution model must prepare exponential number of bins in the worst case

Online Independent Sets

207

to simulate it. Hence, for the current adversary, the inheritance model is exponentially more powerful than the multi-solutions model. Thus, to argue a lower
bound in the inheritance model, we need a more powerful adversary.
Discussion 2 In the discussion of the previous section, what supported the
online algorithm in the new model is the information that the vertex is good
or bad given immediately after the algorithm processed that vertex. Hence the
algorithm knows whether it is good or bad at the next step. We now consider
the possibility of postponing this decision of the adversary.
Divide the vertex sequence into rounds. At the end of each round, the adversary determines the states of vertices it gave in that round. A vertex then acts
as a good vertex while its state is undetermined. Until the end of the round,
it is impossible for an online algorithm to make a decision depending on states
of vertices given in that round. If, at the end of a round, an online algorithm
maintains a bin that contains many vertices of that round, we kill that bin
by making one of those vertices bad. This can be easily done by setting an
appropriate probability that a vertex becomes bad.

This approach still allows for an algorithm with a competitive ratio of n.


The algorithm maintains an independent set I containing one vertex from each
round that contains a good vertex. It also puts all the vertices of each round i
into an independent
set Ii . It is easy to see that the largest of I and the Ii s is

of size at least opt, when the optimal solution contains opt vertices.
A Better Lower Bound The reason why the above argument did not give
a satisfactory lower bound is that the adversary strategy was still weak: Once
a decision is made, the algorithm knows that a good vertex will never become
bad. Here, we consider an adversary that makes a probabilistic decision more
than once (approximately log n times) to each vertex.
n
Theorem 5. Any online IS algorithm has a competitive ratio at least ek+1 (log
n)3
in the inheritance model with r(n) = nk where e is the base of the natural
logarithm.

Proof. We first describe informally the action of the adversary. He presents


l0 = log2 n new vertices in each round. Between rounds he makes a decision to
make vertices bad, not only for vertices given in the previous round, but also for
some other vertices already given.
The goal of the adversary is to stunt the growth of bins containing many
vertices by making some of them bad. At the same time, it needs to ensure that
the fraction of vertices that are good in the end is large. The adversary repeats
the following steps n/l0 times:
(1) The adversary presents a block of l0 new vertices. All those vertices
are good and each of them has edges to all bad vertices previously given.
(2) As long as there are two blocks b1 , b2 of the same size, replace them
by the union of the two. At the same time, each vertex of the combined
k+1
block is changed into a bad vertex independently with probability log
n.

208

Magn
us M. Halld
orsson et al.

Let t = log(n/l0 ). Note that each block is of size 2i l0 , 0 i < t, and the
number of blocks is at most t + 1.
Each time blocks are merged, the adversary is said to attack the respective
vertices by probabilistically changing them to bad. The probability of a vertex
k+1
surviving an attack is 1 log
n . Each vertex receives at most t attacks. Hence, the
k+1 t
probability that a vertex is good at the end of the game is at least (1 log
n)
1
.
The
expected
number
of
good
vertices,
which
is
the
measure
of
the
optimal
ek+1
solution, is then at least n/ek+1 .
We now evaluate the performance of the online algorithm. It then appears
that a smaller l0 is harder for the algorithm to keep large bins. Unfortunately,
a smaller l0 also makes proofs harder. The following setting, l0 = (log n)2 , is
somewhat conservative:
Lemma 6. Suppose that l0 = (log n)2 . Then any online IS algorithm in the
inheritance model with r(n) = nk cannot produce independent sets whose size is
(log n)3 or more in the worst case.
Proof. We maintain the following invariant ():
There is no bin B containing only good vertices that has
()
more than (log n)2 vertices from a single block.
When the first l0 = (log n)2 vertices are given, () is obviously true. Suppose now that () is true at some moment. It then also remains true when the
adversary introduces in step (1) a new block of l0 vertices. Consider now the
case when two blocks b1 and b2 are merged. Let S be the set of good vertices
in b1 b2 contained in a particular bin B. If |S| l0 the invariance remains
true, so suppose otherwise. Recall that the adversary attacks each vertex in S
k+1
with probability log
n . Therefore, the probability that all vertices in S survive
the attacks is at most
(1

1
k + 1 (log n)2
)
= (k+1) log e .
log n
n

The probability that there is some bin that contains more than l0 vertices from
b1 b2 is at most
nk+1
= n(k+1)(1log e) < 1.
n(k+1) log e
That is, it holds with some positive probability that no bin includes (log n)2
or more good vertices in this combined block. This implies that there exists an
adversary strategy (a choice of assignments to at most (k + 1)/ log n-fraction of
the vertices of b1 b2 ) that maintains the invariant ().
It follows that no bin contains more than t l0 < log3 n vertices.

Online Independent Sets

209

References
1. D. Bean, Effective coloration, J. Symbolic Logic, Vol. 41, pp. 469480, 1976.
2. A. Gy
arf
as and J. Lehel, On-line and first fit colorings of graphs, J. Graph
Theory, Vol. 12(2), pp. 217227, 1988.
3. M. Halld
orsson Online coloring known graphs, Electronic J. Combinatorics, Vol.
7, R6, 2000. www.combinatorics.org.
4. M. Halld
orsson and M. Szegedy, Lower bounds for on-line graph coloring, Theoretical Computer Science, Vol. 130, pp. 163174, 1994.
5. H. Kierstead, On-line coloring k-colorable graphs, Israel J. of Math, Vol. 105,
pp. 93104, 1998.
6. H. A. Kierstead and W. T. Trotter, An extremal problem in recursive combinatorics, Congressus Numerantium Vol. 33, pp. 143153, 1981.
7. R. J. Lipton and A. Tomkins, Online interval scheduling, Proc. SODA 94, pp.
302311, 1994.
8. L. Lov
asz, M. Saks, and W. T. Trotter, An online graph coloring algorithm with
sublinear performance ratio, Discrete Math., Vol. 75, pp. 319325, 1989.

Two-Dimensional On-Line Bin Packing Problem


with Rotatable Items
Satoshi Fujita and Takeshi Hada
Faculty of Engineering, Hiroshima University
Higashi-Hiroshima, 739-8527, JAPAN
{fujita,hada}@se.hiroshima-u.ac.jp

Abstract. In this paper, we consider a two-dimensional version of the


on-line bin packing problem, in which each rectangular item that should
be packed into unit square bins is rotatable by 90 degrees. An on-line
algorithm that uses an unbounded number of active bins is proposed.
The worst case ratio of the algorithm is at least 2.25 and at most 2.565.

Introduction

The bin packing problem is one of the basic problems in the fields of theoretical
computer science and combinatorial optimization. It has many important realworld applications, such as memory allocation and job scheduling, and is wellknown to be NP-hard [4]; that is a main motivation of the study and development
of approximation algorithms for solving the problem.
The classical (one-dimensional) on-line bin packing problem is the problem
of, given a list L of items hx1 , x2 , . . . , xn i where xi (0, 1], packing all items
in L into a minimum number of unit-capacity bins. Note that term on-line
implies that items in L are consecutively input, and the packing of an item must
be determined before the arrival of the next item. In the literature, it is known
that the worst case ratio1 of an optimal on-line bin packing algorithm OP T ,

denoted by ROP
T , is at least 1.5401 [7] and at most 1.588 [6] if the number of
active bins2 used by the algorithm is unbounded; and is exactly 1.69103 [5] if it
is bounded by some constant k.
In this paper, we consider a two-dimensional version of the problem, in which
each rectangular item that should be packed into unit square bins is rotatable
by 90 degrees. The goal of the problem we consider is to pack all items in L
into a minimum number of unit square bins in such a way that 1) each item is
entirely contained inside its bin with all sides parallel to the sides of the bin, and
2) no two items in a bin overlap. It should be worth noting that in the normal
setting of higher dimensional bin packing problems, it is further requested that
3) the orientation of any item is the same as the orientation of the bin, i.e., each
1
2

A formal definition will be given in Section 2.


We consider a class of algorithms in which each bin becomes active when it receives
its first item; and once a bin is declared to be inactive (or closed ), it can never
become active again.

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 210220, 2000.
c Springer-Verlag Berlin Heidelberg 2000

Two-Dimensional On-Line Bin Packing Problem with Rotatable Items

211

item must not be rotated; and under such a setting, it is known that an optimal

2
on-line algorithm OP T fulfills 1.907 ROP
T 2.85958 (= 1.69103 ) [1,3].
The two-dimensional on-line bin packing problem with rotatable items has
several interesting applications, e.g., job scheduling on two-dimensional mesh
computers and the floor planning of VLSI layouts, while the rotation of items is
prohibited in some of other applications, such as the assignment of newspaper
articles to newspaper pages. A naive conjecture is that the worst case ratio
could be improved by removing the condition on the rotatability since there is
an instance in which the removal of the condition reduces an optimal number of
bins to a half (e.g., consider a sequence of items of height 38 and width 58 each;
by rotating a half of items, we can pack four such items into a bin, while each
bin can accommodate at most two items without rotation). Another conflicting
conjecture is that it is not very easy to improve the ratio, since the lower bound
can also be improved by allowing rotations. In the following, we propose two

2.6112 and 2.25 RA


2.565,
algorithms A1 and A2 such that 2.5624 RA
1
2
where the second algorithm is an extension of the first algorithm.
The remainder of this paper is organized as follows. Section 2 introduces some
basic definitions. The classifications of items and strips used in the proposed
algorithms will also be given. Sections 3 and 4 describe the proposed algorithms.
Section 5 concludes the paper with some future directions of research.

Preliminaries

2.1

Basic Definitions

Let A be an on-line bin packing algorithm, and A(L) the number of bins used by
algorithm A for input sequence L. The asymptotic worst case ratio (or simply,

, is defined as follows:
worst case ratio) of algorithm A, denoted as RA

n
= lim sup RA
RA
n


A(L)
n def
| OP T (L) = n .
where RA = max
OP T (L)
def

where OP T (L) denotes the number of bins used by an optimal bin packing
problem provided that the input is L. An on-line bin packing problem is said to
use k-bounded-space (or, simply bounded ) if, for each item, that is given in an
on-line manner, the choice of bins into which it may be packed is restricted to
a set of k or fewer active bins. If there is no such restriction, we say that the
problem uses unbounded space (or, simply unbounded ).
2.2

Classification of Items

Let T be the set of all rectangular items, denoted as (x, y), such that 0 <
x y 1,3 where x and y represent the height and width of the rectangle,
3

Note that we may assume x y without loss of generality, since each item is
rotatable by 90 degrees.

212

Satoshi Fujita and Takeshi Hada

respectively. We first classify items in T into four subsets by the value of the
x-coordinate, as follows: T0 = {(x, y)| 23 < x 1 }, T1 = {(x, y)| 12 < x 23 },
T2 = {(x, y)| 13 < x 12 }, and T3 = {(x, y)| 0 < x 13 }. See Figure 1 (a) for
illustration. Subsets T2 and T3 are further partitioned into subsets by the value
of the y-coordinate, as follows.
Definition 1 (Partition of T3 ). Subset T3 is partitioned into four subsets
T30 , T31 , T32 , T33 by the value of the y-coordinate, as follows: T30 = {(x, y) T3 | 23 <
y 1 }, T31 = {(x, y) T3 | 12 < y 23 }, T32 = {(x, y) T3 | 13 < y 12 }, and
T33 = {(x, y) T3 | x y 13 }.
In order to define a partition of T2 , let us consider a sequence a0 , a1 , . . . of
reals defined as follows:
def 1
2

a0 =

def 1
3

and ai =

1
62i1 +3

for i = 1, 2, . . . .

(1)

1
1
= 25 , and a3 = 13 + 27
= 10
For example, a1 = 13 + 19 = 49 , a2 = 13 + 15
27 . Note
1
1
that 3 < ai 2 holds for any i 0. Let  be a positive real that will be used
as a parameter in the analysis of our algorithms, and a function from R+ to
Z defined as follows:
def
(2)
(t) = dlog2 (2/(9t) 1)e .

By using above definitions, the partition of subset T2 is described as follows.


Definition 2 (Partition of T2 ). Given parameter  > 0, subset T2 is partitioned into three subsets T20 , T21 , T22 , as follows:
()1
def
T20 =

{(x, y)| aj+1 < x aj , 1 aj < y 1}

j=0

{(x, y)|

1
3

< x a() , 1 a() < y 1}

()1
def

T21 =

{(x, y)| aj+1 < x aj , 12 < y 1 aj }

j=0

{(x, y)|
def
T22 =

1
3

< x a() ,

{(x, y) T2 |

1
3

<y

1
2

< y 1 a() }

1
2 }.

The overall partitioning of T into 9 subsets is also illustrated in Figure 1 (a).


4
) then it belongs to subset T22
Note that, for example, if the given item is ( 49 , 10
1
4
1
1
4
1
since 3 < 9 2 and 3 < 10 2 . As for the minimum size of items in each
subset, we have the following two lemmas (proofs are omitted here).

2
1 then 13 (1 ai ) > 29 2 .
Lemma 1. If i > log2 9
Lemma 2. 1) The size of items in T0 is greater than 49 ; 2) the size of items in
T1 is greater than 14 ; and 3) the size of items in T20 is greater than 29 2 .

Two-Dimensional On-Line Bin Packing Problem with Rotatable Items

2.3

213

Strips

In the proposed algorithms, each bin is split into small strips, and a given item is
packed into a strip of an appropriate size. Before describing the ways of splitting
of each bin into strips, let us consider the following infinite set X of reals:
def

X = {

1
i2j

| i = 3, 4, 5, 7, 9, 11, 13 and j = 0, 1, 2, . . . }.

By using X, two (infinite) sets of reals, Xlong and Xmed , are defined as follows:
def

def

Xlong = X
Xmed = X

1
2

a1 , a2 , . . . , a()

(3)
(4)

1
denote
where ai = 13 + 62i1
+3 for i 1. In what follows, given 0 < x 1, let x
denote
the smallest element in Xlong that is greater than or equal to x, and let x
the smallest element in Xmed that is greater than or equal to x. Note that for
x (= x/
x) > 34 .
any x < 13 , x/
Three types of strips used in the proposed algorithms are defined as follows.

Definition 3 (Strips). A subregion of a bin is said to be a long strip if it has


a fixed width 1 and a height that is drawn from set Xlong . A subregion of a bin
is said to be a short strip if it has a fixed width 12 and a height that is drawn
from set Xlong . A subregion of a bin is said to be a medium strip if 1) it has
a fixed width (resp. height) 23 and a height (resp. width) that is drawn from set
X, or 2) it has a width (resp. height) 1 ai and a height (resp. width) ai , for
some 1 i ().

3
3.1

The First Algorithm


Algorithm Description

In this section we describe our first on-line algorithm. The algorithm is described
in an event-driven manner; i.e., it describes the way of packing an input item
(x, y) into an active bin of an appropriate size.
Algorithm A1
If (x, y) T0 T1 , then open a new bin, put the item into the bin, and close the
bin; otherwise (i.e., if (x, y) T2 T3 ) execute the following operations:
(as
Case 1: if (x, y) T20 T30 , then obtain an unused long strip of height x
an active strip) by calling get long strip(x), put the item into the returned
strip, and close the strip.
Case 2: if (x, y) T21 T31 , then obtain an unused medium strip of height
x
(as an active strip) by calling get medium strip(x), put the item into the
returned strip, and close the strip.
(as
Case 3: if (x, y) T22 T32 , then obtain an unused short strip of height x
an active strip) by calling get short strip(x), put the item into the returned
strip, and close the strip.

214

Satoshi Fujita and Takeshi Hada

Case 4: if (x, y) T33 , then put the item into an active long strip of height x
if such a strip with enough space is available. If there exist no such strips,
after closing all active long strips of height x
, obtain an unused long strip
of height x
by calling get long strip(x), and put the item into the returned
strip. Note that the strip is not closed at this time.
Figure 1 (b) illustrates the correspondence of items with strips, in algorithm
A1 . The performance of the algorithm, in terms of the occupation ratio of each
closed strip, is estimated as follows (proofs of Lemmas 4 and 5 are omitted).
Lemma 3 (Long strips). Any closed long strip of size S is occupied by items
with total size at least ( 49 + )S if the height of the strip is 12 , and with size at
most S2 , if the height is less than 12 .
Proof. By Lemma 2, a closed long strip of height 12 is filled with items of size at
least 29 2 ; i.e., the occupation ratio of the bin is at least 49 . On the other
hand, by the same lemma, it is shown that a closed long strip of height 1i , for
1
, that is at least 12 .
i 3, is filled with items of total size more than 23 i+1
Hence the lemma follows.
Lemma 4 (Short strips). Any closed short strip of size S is occupied by an
item with size at least 49 S if the height of the strip is 12 , and with size at most
S
1
2 , if the height is less than 2 .
Lemma 5 (Medium strip). 1) A medium strip with height ai for 1 i
(), is filled with an item with size more than 16 (= 13 12 ); and 2) a medium
strip with height 1i , for some i 3, is filled with an item with size more than
1
1
1
2(i+1) (= i+1 2 ).
3.2

How to Split a Bin into Strips ?

Next, we consider the ways of splitting (unused) bins into strips. In the following,
we give a formal description of three procedures, get long strip, get medium strip,
and get short strip, that have been used in the proposed algorithm.
procedure get long strip(x)
1. Recall that x denotes the smallest element in Xlong that is greater than or
equal to x. If there is no unused long strip with height x
2j (< 1) for any
j 0, then execute the following operations:
0
0
0
2 j < 1 x
2j +1 . Note that x
2 j =
(a) Let j 0 be an integer such that x
1 1 1 1 1 1
1
2 , 3 , 5 , 7 , 9 , 11 , or 13 .
(b) Open an unused bin, and partition it into x21j0 long strips with height
0
x2j each.
2. Select one of the lowest strips, say Q, with height x
2j (< 1) for some j 0.
j 00
Let x
2 be the height of strip Q.

Two-Dimensional On-Line Bin Packing Problem with Rotatable Items

215

3. If j 00 = 0 (i.e., if the height of Q is x


) then return Q as an active strip;
00
00
2j 1 , x
2j 2 , . . . , x
, x
,
otherwise, partition Q into j 00 + 1 strips of heights x
respectively, and return a strip of height x
as an active one.
procedure get short strip(x)
1. If there is an unused short strip of height x, then return it as an active one.
2. Otherwise, obtain an unused long strip with height x
by calling procedure
get long strip(x), partition the obtained one into two unused short strips with
height x
each, and return one of them as an active one.
procedure get medium strip(x)
1. Recall that x
denotes the smallest element in Xmed that is greater than or
equal to x. If there is an unused horizontal medium strip with height x
(or,
vertical medium strip with width x
), then return it as an active one.
2. Otherwise, if x
> 13 , then open an unused bin, partition it into two horizontal
medium strips of height x
and two vertical medium strips of width x
as in
Figure 2 (a), and return one of the four strips as an active one.
3. Otherwise, i.e., if x
13 , execute the following operations:
(a) If there is no unused medium strip with height x
2j (< 1) for any j 0,
then open an unused bin, partition it into x21j0 horizontal medium strips
0
0
2j as in
of height x
2j and b 3x12j0 c vertical medium strips of width x
0
0
2j < 1 x
2j +1 .
Figure 2 (b), where j 0 is an integer such that x
(b) Select one of the lowest medium strips, say Q, with height x
2j (< 1)
j 00
for some j 0. Let x
2 be the height of strip Q.
(c) If j 00 = 0 (i.e., if the height of Q is x) then return Q as an active
00
00
2j 1 , x
2j 2 ,
strip; otherwise, partition Q into j 00 + 1 strips of heights x
...,x
, x, respectively, and return a strip of height x as an active one.
By Lemma 5 and get medium strip, we immediately have the following lemma.
Lemma 6. Any closed bin that is split into medium strips is filled with items
with total size at least 12 .
3.3

Analysis

2.6112 +  for any  > 0.


Theorem 1. RA
1

Proof. Let L be a sequence of n items, consisting of n0 items in T0 , n1 items in


T1 , where n0 + n1 n. Note that algorithm A1 requires b0 (= n0 ) bins for items
in T0 and b1 (= n1 ) bins for items in T1 . Suppose that it also uses b2 ( 0) bins
split into long strips of height 1/2, and b3 ( 0) bins split into medium strips of
height more than 1/3. Let S be the total size of items in L, and S4 the total size
of items that are not packed into the above n0 + n1 + b2 + b3 bins; i.e., items of
height at most 1/3.
If  is a constant, algorithm A1 uses at most n0 + n1 + b2 + b3 + 2S4 + O(1)

bins and OP T requires at least max{n0 + max{n1 , b2 }, S} bins. Hence RA


1

216

Satoshi Fujita and Takeshi Hada

{n0 + n1 + b2 + b3 + 2S4 }/{max{n0 + max{n1 , b2 }, S}}. Since S4 S 49 n0


( 49 )b2 23 b3 n41 by Lemmas 3, 4, and 6, we have

RA
1

2S + 19 n0 + 12 n1 + ( 19 + 0 )b2 13 b3
.
max{n0 + max{n1 , b2 }, S}

When n0 + max{n1 , b2 } < S, RA


2 + ( S1 ){ 19 n0 + ( 19 + 0 )b2 + 12 n1 }. If
1
11

0
0
2 + (1/S){ 91 n0 + ( 11
n1 b2 , RA
18 +  )b2 } 2 + 18 +  , and if n1 > b2 ,
1
1
11
11

0
0
RA1 2 + (1/S){ 9 n0 + ( 18 +  )n1 } 2 + 18 +  . On the other hand, when

2 + { 19 n0 + ( 19 + 0 )b2 + 12 n1 }/{n0 +
n0 + max{n1 , b2 } S, it is at most RA
1
11

0
0
2 + { 91 n0 + ( 11
max{n1 , b2 }}. If n1 b2 , RA
18 +  )b2 }/(n0 + b2 ) 2 + 18 +  ,
1
1
11
11

0
0
and if n1 > b2 , RA1 2 + { 9 n0 + ( 18 +  )n1 }/(n0 + n1 ) 2 + 18 +  . Hence
the theorem follows.

2.5624.
Theorem 2. RA
1

Proof. Consider the following eight items


1
+ , 12 + )
A : ( 12 + , 12 + ) B : ( 13 + , 23 ) C : ( 13 + , 13 + ) D : ( 11
1
1
1
1
1
1
1
1
+ )
E : ( 13 + , 2 + ) F : ( 11 + , 11 + ) G : ( 11 + , 13 + ) H : ( 13 + , 13

where is a sufficiently small constant such that item B is in T20 .


Let L be a sequence of items consisting of n copies of items A, C, F, H, and
1
1
24
1
+ 13
= 143
= 16 853
, by
2n copies of items B, D, E, G. Note that since 11
selecting to be sufficiently small, we can pack one copy of A, C, F, H and two
copies of B, D, E, G, as in Figure 3. Hence OP T (L) = n.
On the other hand, in algorithm A1 , 1) n copies of item A require n bins;
2) 2n copies of item B require n bins, since B is classified into T20 ; 3) n copies
of item C require n4 bins, since C is classified into T21 ; 4) 2n copies of item D
2n
require 2n
13 bins; 5) 2n copies of item E require 16 bins; 6) n copies of item F
n
2n
require 100 bins; 7) 2n copies of item G require 120 bins; and 8) n copies of item
n
bins. Hence, in total, it requires at least
H require 144
n+n+

n
2n
n
n 2n 2n
+
+
+
+
+
> 2.5624n
4
13
16
100 120 144

bins. Hence the theorem follows.

The Second Algorithm

In this section, we propose an extension of the first algorithm. The basic idea
behind the extension is to pack an item in T1 and item(s) in T3 in the same bin,
as much as possible. Recall that under the on-line setting, we cannot use any
knowledge about the input sequence L in the algorithm.

Two-Dimensional On-Line Bin Packing Problem with Rotatable Items

4.1

217

Algorithm Description

In our second algorithm, called Algorithm A2 , when an item in T1 is packed into


a new bin, the bin is split into two subregions; a square region of size 23 23
that will be filled with the item in T1 , and the remaining L-shaped region that
is reserved for possible usage by items in T3 (note that the reserved L-shaped
region will never be used, in the worst case). On the other hand, when an item
in T3 is packed into a new bin, under a certain condition described below, the
bin is partitioned into two subregions, and the square region of size 23 23 is
reserved for possible usage by items in T1 (note again that the reserved square
region will never be used, in the worst case).
In order to balance the advantage and disadvantage of the above scenario,
we partition 20% of bins devoted to items in T3 for the above use; the remaining
80% of bins are used in the same manner to Algorithm A1 . A formal description
of the algorithm is given as follows.
Algorithm A2
Case 1: If (x, y) T0 T2 , then it acts as in Algorithm A1 .
Case 2: If (x, y) T1 , then put the item into an active bin if there is an active
bin that has been split into two subregions, and the small square region has
not accommodated any item; if there is no such bin, then open a new bin,
split it into two subregions, and pack the item into the small square region.
Case 3: If (x, y) T3 , then it obtains a strip of height x (= x) by calling
procedures described in Section 3.2 with a minor modification such that an
unused L-shaped region is a possible candidate for the splitting into strips,
and pack the item into a strip to satisfy the following conditions: 80% of bins
dedicated to items in T3 are filled with closed strips; and 20% of such bins
are filled with strips in such a way that there remains an available square
region of size 23 23 .
4.2

Analysis

2.565 +  for any  > 0.


Theorem 3. RA
2

Proof. Let L be a sequence of n items. In this proof, we use the same symbols
as in the proof of Theorem 1; e.g., n0 and n1 denote the numbers of items in T0
and T1 , respectively.
Recall that algorithm A1 uses at most n0 + n1 + b2 + b3 + 2S4 + O(1) bins and
an optimal algorithm OP T requires at least max{n0 + max{n1 , b2 }, S} bins.
If n1 S24 , then since all items in T1 are packed into bins that is split into
small square region and an L-shaped region, the average occupation ratio of
every closed bin can be increased from at least 14 to at least 49 (note that the
average occupation ratio of bins with strips of height at most 13 , on the other
hand, reduces from 12 to 25 ); i.e., the worst case ratio is bounded by 52 = 2.5.
Hence, in the following, we assume that n1 > S24 .
If n1 > S24 , we can imaginally suppose that the number of bins split into strips
of height at most 13 each reduces from 2S4 to S4 for some constant < 2, by

218

Satoshi Fujita and Takeshi Hada

using the splitting method illustrated in Figure 5. If the number of (imaginal)


bins used by items in T3 is S4 , then by using a similar argument to Theorem 1,
we have
11

2+
RA
2
36
(note that if = 2, we have the same bound with Theorem 1). The number of
(imaginal) bins reduces from 2S4 to at most 24
13 if all items are packed into strips
24
(<
)
if
all
items
are
packed into strips of height 14 ; and
of height 13 ; at most 30
17
13
45
24
at most 26 (< 13 ) if all items are packed into strips of height at most 15 . Hence
we have 24
13 for any sequence L; i.e.,

2+
RA
2

22
11 24

= 2+
2.565.
36 13
39

Hence the theorem follows.


Finally, by using a similar technique to Theorem 2 we have the following
theorem (we may simply consider a sequence consisting of items A, B and C).

2.25.
Theorem 4. RA
2

Concluding Remarks

In this paper, we proposed two on-line algorithms for solving the two-dimensional
bin packing problem with rotatable rectangular items.
The proposal of a nontrivial lower bound is an important open problem
to be solved (currently best lower bounds on the worst case ratio of an optimal
algorithm for rotatable setting are the same as the one-dimensional case; i.e., it
is at least 1.5401 for unbounded algorithms [7], and at least 1.69103 for bounded
algorithms [5]). An extension to higher dimensional cases (e.g., three-dimensional
box packing) would also be promising.
Acknowledgments: This research was partially supported by the Ministry
of Education, Science and Culture of Japan, and Research for the Future Program from Japan Society for the Promotion of Science (JSPS): Software for
Distributed and Parallel Supercomputing (JSPS-RFTF96P00505).

References
1. D. Blitz, A. van Vliet, and G. J. Woeginger. Lower bounds on the asymptotic
worst-case ratio of on-line bin packing algorithms. unpublished manuscript, 1996.
2. D. Coppersmith and P. Raghavan. Multidimensional on-line bin packing: Algorithms
and worst case analysis. Oper. Res. Lett., 8:1720, 1989.
3. J. Csirik and A. van Vliet. An on-line algorithm for multidimensional bin packing.
Oper. Res. Lett., 13:149158, 1993.
4. M. R. Garey and D. S. Johnson. Computers and Intractability: A Guide for the
Theory of NP-Completeness. Freeman, San Francisco, CA, 1979.

Two-Dimensional On-Line Bin Packing Problem with Rotatable Items

219

packed into long strips


packed into medium strips
1

1
T2

T3

T1

T0

T3

T2

2/3

2/3

1/2

1/21111111
0000000

1111111
0000000
0000000
1111111
0000000
1111111
1/31111111
0000000

1/3

T1

T0

packed into
individual bins

packed into short strips

1/3

1/2

2/3

1/3

1/2

2/3

1
x

(a) Boundaries for the classication of (b) Correspondence of items with strips.
items by the values of x- and y-coordinates.

Fig. 1. Classication of items.

(a)

(b)

Fig. 2. Partition of a bin into medium strips.


1/3+
F

B
1/11+
1/13+

C
D

1/3+

G
H

1/2+

A
1/2+
1/13+ 1/11+

Fig. 3. A bad instance to give a lower bound.

220

Satoshi Fujita and Takeshi Hada

5. C. C. Lee and D. T. Lee. A simple on-line bin packing algorithm. J. Assoc. Comput.
Mach., 32:562572, 1985.
6. M. B. Richey. Improved bounds for harmonic-based bin packing algorithms. Discrete
Appl. Math., 34:203227, 1991.
7. A. van Vliet. An improved lower bound for on-line bin packing algorithms. Information Processing Letters, 43:277284, 1992.

Better Bounds on the Accommodating Ratio for


the Seat Reservation Problem
(Extended Abstract)
Eric Bach1? , Joan Boyar2?? , Tao Jiang3,4? ? ? , Kim S. Larsen2?? , and
Guo-Hui Lin4,5
1

Computer Sciences Department, University of Wisconsin Madison,


1210 West Dayton Street, Madison, WI 53706-1685.
[email protected]
2
Department of Mathematics and Computer Science,
University of Southern Denmark, Odense, Denmark.
{joan,kslarsen}@imada.sdu.dk
3
Department of Computer Science, University of California,
Riverside, CA 92521.
[email protected]
4
Department of Computing and Software, McMaster University,
Hamilton, Ontario L8S 4L7, Canada.
5
Department of Computer Science, University of Waterloo,
Waterloo, Ontario N2L 3G1, Canada.
[email protected]

Abstract. In a recent paper [J. Boyar and K.S. Larsen, The seat reservation problem, Algorithmica, 25(1999), 403417], the seat reservation
problem was investigated. It was shown that for the unit price problem,
where all tickets have the same price, all fair algorithms are at least
1/2-accommodating, while no fair algorithm is more than (4/5+O(1/k))accommodating, where k is the number of stations the train travels. In
this paper, we design a more dextrous adversary argument, such that we
improve the upper bound on the accommodating ratio to (7/9+O(1/k)),
even for fair randomized algorithms against oblivious adversaries. For
deterministic algorithms, the upper bound is lowered to approximately
.7699. It is shown that better upper bounds exist for the special cases
with n = 2, 3, and 4 seats. A concrete on-line deterministic algorithm
First-Fit and an on-line randomized algorithm Random are also examined for the special case n = 2, where they are shown to be asymptotically
optimal.
?
??

???

Supported in part by NSF Grant CCR-9510244.


Part of this work was carried out while the author was visiting the Department of
Computer Sciences, University of Wisconsin Madison. Supported in part by SNF
(Denmark), in part by NSF (U.S.) grant CCR-9510244, and in part by the esprit
Long Term Research Programme of the EU under project number 20244 (alcom-it).
Supported in part by NSERC Research Grant OGP0046613, a CITO grant, and a
UCR startup grant.
Supported in part by NSERC Research Grant OGP0046613 and a CITO grant.

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 221231, 2000.
c Springer-Verlag Berlin Heidelberg 2000

222

Eric Bach et al.


Keywords: The seat reservation problem, on-line algorithms, accommodating ratio, adversary argument.

Introduction

In many train transportation systems, passengers are required to buy seat reservations with their train tickets. The ticketing system must assign a passenger a
single seat when that passenger purchases a ticket, without knowing what future requests there will be for seats. Therefore, the seat reservation problem is
an on-line problem, and a competitive analysis is appropriate.
Assume that a train with n seats travels from a start station to an end
station, stopping at k 2 stations, including the first and the last. The start
station is station 1 and the end station is station k. The seats are numbered
from 1 to n. Reservations can be made for any trip from a station s to a station
t as long as 1 s < t k. Each passenger is given a single seat number when
the ticket is purchased, which can be any time before departure. The algorithms
(ticket agents) may not refuse a passenger if it is possible to accommodate him
when he attempts to make his reservation. That is, if there is any seat which
is empty for the entire duration of that passengers trip, the passenger must be
assigned a seat. An on-line algorithm of this kind is fair.
The algorithms attempt to maximize income, i.e., the sum of the prices of
the tickets sold. Naturally, the performance of an on-line algorithm will depend
on the pricing policies for the train tickets. In [6] two pricing policies are considered: one in which all tickets have the same price, the unit price problem; and
one in which the price of a ticket is proportional to the distance traveled, the
proportional price problem. This paper focuses on fair algorithms for the unit
price problem.
The seat reservation problem is closely related to the problem of optical
routing with a number of wavelengths [1,5,9,14], call control [2], interval graph
coloring [12] and interval scheduling [13]. The off-line version of the seat reservation problem can be used to solve the following problems [8]: minimizing spill
in local register allocation, job scheduling with start and end times, and routing
of two point nets in VLSI design. Another application of the on-line version of
the problem could be assigning vacation bungalows (mentioned in [15]).
The performance of an on-line algorithm A is usually analyzed by comparing
with an optimal off-line algorithm. For a sequence of requests, I, define the competitive ratio of algorithm A applied to I to be the income of algorithm A over
the optimal income (achieved by the optimal off-line algorithm). The competitive
ratio of algorithm A is the infimum over all possible sequences of requests. The
definition of the accommodating ratio of algorithm A [6,7] is similar to that of
the competitive ratio, except that the only sequences of requests allowed are sequences for which the optimal off-line algorithm could accommodate all requests
therein. This restriction is used to reflect the assumption that the decision as
to how many cars the train should have is based on expected ticket demand.
Note that since the input sequences are restricted and this is a maximization

Better Bounds on the Accommodating Ratio

223

problem, the accommodating ratio is always at least as large as the competitive


ratio. Formally, the accommodating ratio is defined as follows:
Definition 1. Let earnA (I) denote how much a fair on-line algorithm A earns
with the request sequence I, and let value(I) denote how much could be earned
if all requests in the sequence I were accommodated. A fair on-line algorithm A
is c-accommodating if, for any sequence of requests which could all have been
accommodated by the optimal fair off-line algorithm, earnA (I) cvalue(I)
b, where b is a constant which does not depend on the input sequence I. The
accommodating ratio for A is the supremum over all such c.
Note that in general the constant b is allowed to depend on k. This is because k
is a parameter to the problem, and we quantify first over k.
1.1

Previous Results

First, we note that in the case where there are enough seats to accommodate
all requests, the optimal off-line algorithm runs in polynomial time [10] since it
is a matter of coloring an interval graph with the minimum number of colors.
As interval graphs are perfect [11], the size of the largest clique is exactly the
number of colors needed. Let (k mod 3) denote the residue of k divided by 3,
then we have the following known results:
Lemma 1. [6] Any fair (deterministic or randomized) on-line algorithm for the
unit price problem is at least 1/2-accommodating.
Lemma 2. [6] No fair (deterministic or randomized) on-line algorithm for the
unit price problem (k 6) is more than f (k)-accommodating, where
f (k) = (8k 8(k mod 3) 9)/(10k 10(k mod 3) 15).
Lemma 2 shows that no fair on-line algorithm has an accommodating ratio
much better than 4/5. It is also proven in [6] that the algorithms First-Fit and
Best-Fit are at most k/(2k 6)-accommodating, which is asymptotically 1/2.
Let rA denote the asymptotic accommodating ratio of a fair on-line algorithm A
as k approaches infinity, then the above two lemmas tell that 1/2 rA 4/5.
The lower bound 1/2 is also the upper bound for First-Fit and Best-Fit. This
leaves an open problem whether or not a better algorithm exists [6].
1.2

Our Contributions

In the next section, we lower the asymptotic upper bound on the accommodating ratio from 4/5 to 7/9, and later show that this upper bound holds, even
for fair randomized algorithms against oblivious adversaries. For deterministic
algorithms, the upper bound is further lowered to approximately .7699. Furthermore, it is shown that better upper bounds exist for the special cases with n = 2,
3, and 4 seats. As a positive result, a concrete on-line deterministic algorithm

224

Eric Bach et al.

First-Fit is examined with regards to the unit price problem for the special
case n = 2. We show that First-Fit is ck -accommodating, where ck approaches
3/5 as k approaches infinity, and that it is asymptotically optimal. We also examine an on-line randomized algorithm Random for the special case n = 2.
We show that Random is 3/4-accommodating and that is also asymptotically
optimal, in the randomized sense.
Due to the space constraint, we only provide the proofs for some upper bound
results in this extended abstract. Detailed proofs of all other results can be found
in the full manuscript [3].

A General Upper Bound

The upper bound on the accommodating ratio is lowered from 4/5 to 7/9, and
later to approximately .7699.
Theorem 1. No deterministic fair on-line algorithm for the unit price problem
(k 9) is more than f (k)-accommodating, where

(7k 7(k mod 6) 15)/(9k 9(k mod 6) 27),

when (k mod 6) = 0, 1, 2;
f (k) =
(14k

14(k
mod
6)
+
27)/(18k

18(k
mod 6) + 27),

when (k mod 6) = 3, 4, 5.
Proof. The proof of this theorem is an adversary argument, which is a more
dextrous design based on the ideas in the proof of Lemma 2 in [6]. Assume that
n is divisible by 2. The adversary begins with n/2 requests for the intervals
[3s + 1, 3s + 3] for s = 0, 1, , b(k 3)/3c. Any fair on-line algorithm is able
to satisfy this set of bk/3c n/2 requests. Suppose that after these requests are
satisfied, there are qi seats which contain both interval [3i+1, 3i+3] and interval
[3i + 4, 3i + 6], i = 0, 1, , b(k 6)/3c. Then there are exactly qi seats which
are empty from station 3i + 2 to station 3i + 5.
In the following, rather than considering each qi at a time (as in [6]), we
consider q2i , q2i+1 together for i = 0, 1, , b(k 9)/6c. Let pi = q2i +q2i+1 ( n).
We distinguish between two cases:
Case 1: pi 5n/9; and
Case 2: pi > 5n/9.
In the first case pi 5n/9, the adversary proceeds with n/2 requests for the
interval [6i + 2, 6i + 5] and n/2 requests for the interval [6i + 5, 6i + 8]. For these n
additional requests, the on-line algorithm can accommodate exactly pi of them.
Figure 1(a) shows this configuration. Thus, for those 2n requests whose starting
station s [6i + 1, 6i + 6], the on-line algorithm accommodates n + pi of them.
In the second case pi > 5n/9, the adversary proceeds with n/2 requests for
the interval [6i + 3, 6i + 7], followed by n/2 requests for interval [6i + 2, 6i + 4] and
n/2 requests for the interval [6i + 6, 6i + 8]. For these 3n/2 additional requests,
the on-line algorithm can accommodate exactly 3n/2 pi of them. Figure 1(b)

Better Bounds on the Accommodating Ratio


1

r1

225

r1

r2

r2

r3

r3

r4

r4

r5

r5

r6

r6

r7

r7

r8

r8

(a) case 1: pi 5n/9.

(b) case 2: pi > 5n/9.

Fig. 1. Example configurations for the two cases.

shows this configuration. Thus, for the 5n/2 requests whose starting station
s [6i + 1, 6i + 6], the on-line algorithm accommodates 5n/2 pi of them.
In this way, the requests are partitioned into b(k 3)/6c + 1 groups; each
of the first b(k 3)/6c groups consists of either 2n or 5n/2 requests and the
last group consists of either n (if (k mod 6) {0, 1, 2}) or n/2 (if (k mod 6)
{3, 4, 5}) requests. For each of the first b(k 3)/6c groups, the on-line algorithm
can accommodate up to a fraction 7/9 of the requests therein. This leads to
the theorem. More precisely, let S denote the set of indices for which the first
case happens, and let S denote the set of indices for which the second case
happens. When (k mod 6) {0, 1, 2}, the accommodating ratio of this fair online algorithm applied to this sequence of requests is
P
P
P
P
n+
(n+p )+
(5n/2pi )
n+
14n/9+
35n/18

iS
iS
iS
P i PiS
P
P
n+
n+
2n+
5n/2
2n+
5n/2

iS
iS
P iS P iS
1+
14/9+
35/18
iS
P
P iS
=
1+

iS

2+

iS

5/2

1+14((k6(k mod 6))/6)/9


1+2((k6(k mod 6))/6)

7k7(k mod 6)15


9k9(k mod 6)27 ,

where the last inequality holds because in general a/b = c/d < 1 and a < c
imply that (e + ax + cy)/(e + bx + dy) (e + a(x + y))/(e + b(x + y)). When
(k mod 6) {3, 4, 5}, the ratio is
P
P
P
P
n/2+
(n+p )+
(5n/2pi )
n/2+
14n/9+
35n/18
iS
iS
P i PiS
P
P iS

n/2+
2n+
5n/2
n/2+
2n+
5n/2

iS
iS
P iS P iS
1/2+
14/9+
35/18
iS
P iS
= 1/2+P
2+
5/2
iS

This completes the proof.

iS

1/2+14((k(k mod 6))/6)/9


1/2+2((k(k mod 6))/6)

14k14(k mod 6)+27


18k18(k mod 6)+27 .

226

Eric Bach et al.

When k, the number of stations, approaches infinity, the f (k) in the above
theorem converges to 7/9 .7778. Therefore, for any fair on-line algorithm A,
we have 1/2 rA 7/9. The following theorem shows that rA is marginally
smaller than 7/9.
Theorem 2. Any deterministic fair on-line algorithm A for the unit
price prob
lem (k 9) has its asymptotic accommodating ratio 12 rA 73 22 < .7699.
Proof. This theorem is proven using the following modification to the proof of
Theorem 1. After algorithm A accommodates
the set of bk/3c
n/2 requests, we

distinguish between two cases: pi 5( 22 4)n/6 and pi > 5( 22 4)n/6.


The second case can be analyzed similarly to Case 2 in the proof ofTheorem
1, yielding that algorithm A accommodates at most a fraction (7 22)/3 of
the subset of 5n/2 requests whose starting station s [6i + 1, 6i + 6].
For the first case, we define p0i to be the number of seats which contain
none of the
three intervals [6i + 1, 6i + 3], [6i + 4, 6i + 6] and [6i + 7, 6i + 9]. If
p0i (5 22)n/2, then the adversary proceeds with n/2 requests for the interval
[6i + 2, 6i + 8]. Then, algorithm A can accommodate only n + p0i requests among
the subset of 3n/2 requests
whose startingstation s [6i + 1, 6i + 6], which is at

most a fraction (7 22)/3. If p0i > (5 22)n/2, then the adversary proceeds
first with p0i requests for the interval [6i + 2, 6i + 8] and then with n/2 p0i
requests for the interval [6i + 2, 6i + 5] and n/2 p0i requests for the interval
[6i + 5, 6i + 8]. Obviously, algorithm A can accommodate only pi p0i of them,
or equivalently, it can only accommodate n + pi p0i requests among the subset
of 2n p0i requests
whose starting station s [6i + 1, 6i + 6], which is at most a
portion of (7 22)/3 again.
An argument similar to that in the proof of Theorem 1
says that the asymptotic accommodating ratio of algorithm A is at most (7 22)/3 .7699. 2
It is unknown if extending this grouping technique to more than two qi s
would lead to a better upper bound.

Upper Bounds for Small Values of n

In this section, we show better upper bounds for small values of n. This also
demonstrates the power of the adversary argument and the grouping technique. However, we note that in train systems, it is unlikely that a train has a
small number of seats. So the bounds obtained here are probably irrelevant for
this application, but they could be relevant for others such as assigning vacation
bungalows.
Trivially, for n = 1, any on-line algorithm is 1-accommodating. As a warm
up, let us show the following theorem for n = 2.

Better Bounds on the Accommodating Ratio

227

Theorem 3. If n = 2, then no deterministic fair on-line algorithm for the unit


price problem (k 9) is more than f (k)-accommodating, where

(3k 3(k mod 6) 6)/(5k 5(k mod 6) 18),

when (k mod 6) {0, 1, 2};


f (k) =
(3k 3(k mod 6) + 6)/(5k 5(k mod 6) + 6),

when (k mod 6) {3, 4, 5}.


Proof. The adversary begins with one request for the interval [3s + 1, 3s + 3]
for each s = 0, 1, , b(k 3)/3c. After these requests are satisfied by the online algorithm, consider for each i = 0, 1, , b(k 9)/6c how the three requests
[6i + 1, 6i + 3], [6i + 4, 6i + 6], and [6i + 7, 6i + 9] are satisfied. Suppose that the
intervals [6i + 1, 6i + 3], [6i + 4, 6i + 6], and [6i + 7, 6i + 9] are placed on the same
seat. Then the adversary proceeds with a request for the interval [6i + 3, 6i + 7]
and then requests for each of the intervals [6i + 2, 6i + 4] and [6i + 6, 6i + 8]. The
on-line algorithm will accommodate the first request, but fail to accommodate
the last two. In the second case, suppose only two adjacent intervals (among
[6i + 1, 6i + 3], [6i + 4, 6i + 6], and [6i + 7, 6i + 9]) are placed on the same seat,
say [6i + 1, 6i + 3] and [6i + 4, 6i + 6], then the adversary proceeds with three
requests for the intervals [6i + 2, 6i + 4], [6i + 3, 6i + 5], and [6i + 5, 6i + 8]. The
on-line algorithm will accommodate the first request but fail to accommodate
the last two. In the last case, only the intervals [6i + 1, 6i + 3] and [6i + 7, 6i + 9]
are placed on the same seat. Then the adversary proceeds with two requests for
the intervals [6i + 2, 6i + 5] and [6i + 5, 6i + 8]. The on-line algorithm will fail to
accommodate both of them.
It then follows easily that the accommodating ratio of the on-line algorithm
2
applied to this sequence of requests is at most f (k) for k 9.
A specific on-line algorithm called First-Fit always processes a new request
by placing it on the first seat which is unoccupied for the length of the journey.
It has been shown [6] that First-Fit is at most k/(2k 6)-accommodating
for general n divisible by 3. However, in the following, we will show that for
n = 2, First-Fit is c-accommodating, where c is at least 3/5. Combining this
with the previous theorem, First-Fit is (3/5 + )-accommodating, where  > 0
approaches zero as k approaches infinity. This means that for n = 2, First-Fit
is an asymptotically optimal on-line algorithm.
Theorem 4. First-Fit for the unit price problem is c-accommodating, where
c 3/5.
Proof. See the full manuscript [3].

When n = 3, 4, we have the following theorems.


Theorem 5. If n = 3, no deterministic fair on-line algorithm for the unit price
problem (k 11) is more than f (k)-accommodating, where
f (k) = (3k 3((k 3) mod 8) 1)/(5k 5((k 3) mod 8) 14)
Proof. See the full manuscript [3].

228

Eric Bach et al.

Theorem 6. If n = 4, no deterministic fair on-line algorithm for the unit price


problem (k 9) is more than f (k)-accommodating, where

(5k 5(k mod 6) 6)/(7k 7(k mod 6) 18),

when (k mod 6) {0, 1, 2};


f (k) =
(5k

5(k
mod
6)
+
12)/(7k
7(k mod 6) + 12),

when (k mod 6) {3, 4, 5}.


Proof. See the full manuscript [3].

Generally, let fn (k) denote the upper bound on the accommodating ratio of
the deterministic fair on-line algorithms for instances in which there are n seats
and k stations. Let fn denote the asymptotic value of fn (k). So far, we have
f2 = 3/5, f3 3/5, f4 5/7, and fn < .7699 for n 5. Are fn (k) and fn
non-increasing in n? So far we dont know the answer.
It is known that the accommodating ratio for First-Fit cannot be better
than k/(2k 6) when n = 3 [6]. So it is interesting to examine for n = 3, if
there is some algorithm whose asymptotic accommodating ratio is better than
1/2 or not. The problem of finding a better fair on-line algorithm for the unit
price problem, for the general case n 3, is still open.

Randomized Algorithms

In this section, we examine the accommodating ratios for randomized fair online algorithms for the unit price problem, by comparing them with an oblivious
adversary. Some results concerning randomized fair on-line algorithms for the
proportional price problem can be found in [4].
Theorem 7. No randomized fair on-line algorithm for the unit price problem
(k 9) is more than f (k)-accommodating, where

(7k 7(k mod 6) 15)/(9k 9(k mod 6) 27),

when (k mod 6) = 0, 1, 2;
f (k) =
(14k 14(k mod 6) + 27)/(18k 18(k mod 6) + 27),

when (k mod 6) = 3, 4, 5.
Proof. The oblivious adversary behaves similarly to the adversary in the proof
of Theorem 1. The sequence of requests employed by the oblivious adversary
depends on the expected values of pi = q2i + q2i+1 , which are defined in the
proof of Theorem 1. The oblivious adversary starts with the same sequence as
the adversary in the proof of Theorem 1. Then, for each i = 0, 1, , b(k 9)/6c,
it decides on Case 1 or Case 2, depending on the expected value E[pi ] compared
with 5n/9. By generating corresponding requests, the linearity of expectations
implies that the expected number of requests accommodated by the randomized
2
algorithm is at most a fraction f (k) of the total number of requests.

Better Bounds on the Accommodating Ratio

229

Although it is straight forward to show that Theorem 1 holds for randomized


algorithms, as in the above, one cannot use the same argument and show the
same for the other theorems. In fact, one can show that Theorem 3 is false
when considering randomized algorithms against oblivious adversaries. The most
obvious randomized algorithm to consider for this problem is the one we call
Random. When Random receives a new request and there exists at least one
seat that interval could be placed on, Random chooses randomly among the
seats which are possible, giving all possible seats equal probability.
Theorem 8. For n = 2, Random for the unit price problem is at least
accommodating.

3
4-

Proof. See the full manuscript [3].

This value of 34 is, in fact, a very tight lower bound on Randoms accommodating ratio when there are n = 2 seats.
Theorem 9. For n = 2, Random for the unit price problem (k 3) is at most
f (k)-accommodating, where
f (k) =

1
3
+
.
4 4(k ((k 1) mod 2))

Proof. We first give the request [1, 2] and then the requests [2i, 2i + 2] for i
{1, . . . , b(k 2)/2c}. If k is odd, we then give the request [k 1, k].
Random will place each of these requests, and, since there is no overlap,
each of them is placed on the first seat with probability 12 .
Now we continue the sequence with [2i + 1, 2i + 3] for i {0, . . . , b(k 3)/2c}.
Each interval in this last part of the sequence overlaps exactly two intervals
from earlier and can therefore be accommodated if and only if these two intervals
are placed on the same seat. This happens with probability 12 .
Thus, all requests from the first part of the sequence, and expected about
half of the requests for the last part, are accepted. More precisely we obtain:
k+1((k1) mod 2)
2

+ 12 k1((k1)
2
k ((k 1) mod 2)

mod 2)

= f (k).

The accommodating ratio of 34 for Random with n = 2 seats does not extend
to more seats. In general, one can show that Randoms accommodating ratio is
bounded above by approximately 17/24 = 0.70833. The request sequence used
to prove this is very similar to the sequence given to First-Fit and Best-Fit
in the proof of Theorem 3 in [6], but it is given in a different order, to make the
accommodating ratio lower.
Theorem 10. The accommodating ratio for Random is at most
unit price problem, when k 2 (mod 4).
Proof. See the full manuscript [3].

17k+14
24k ,

for the

230

Eric Bach et al.

For other k, not congruent to 2 modulo 4, similar results hold. Using the same
sequence of requests (and thus not using the last stations) gives upper bounds
1
of the form 17kc
24kc2 for constants c1 and c2 which depend only on the value of k
(mod 4).

Acknowledgments
The second author would like to thank Faith Fich for interesting discussions
regarding the seat reservation problem with n = 2 seats. Guo-Hui Lin would like
to thank Professor Guoliang Xue for many helpful suggestions.

References
1. B. Awerbuch, Y. Bartal, A. Fiat, S. Leonardi and A. Rosen, On-line competitive
algorithms for call admission in optical networks, in Proceedings of the 4th Annual
European Symposium on Algorithms (ESA96), LNCS 1136, 1996, pp. 431444.
2. B. Awerbuch, Y. Bartal, A. Fiat and A. Rosen, Competitive non-preemptive call
control, in Proceedings of the 5th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA94), 1994, pp. 312320.
3. E. Bach, J. Boyar, T. Jiang, K.S. Larsen and G.-H. Lin, Better bounds on the
accommodating ratio for the seat reservation problem, PP-2000-8, Department of
Mathematics and Computer Science, University of Southern Denmark (2000).
4. E. Bach, J. Boyar and K.S. Larsen, The accommodating ratio for the seat reservation problem, PP-1997-25, Department of Mathematics and Computer Science,
University of Southern Denmark, May, 1997.
5. A. Bar-Noy, R. Canetti, S. Kutten, Y. Mansour and B. Schieber, Bandwidth allocation with preemption, in Proceedings of the 27th Annual ACM Symposium on
Theory of Computing (STOC95), 1995, pp. 616625.
6. J. Boyar and K.S. Larsen, The seat reservation problem, Algorithmica, 25(4)
(1999), 403417.
7. J. Boyar, K.S. Larsen and M.N. Nielsen, The accommodating function a generalization of the competitive ratio, in Proceedings of the Sixth International Workshop
on Algorithms and Data Structures (WADS99), LNCS 1663, 1999, pp. 7479.
8. M.C. Carlisle and E.L. Lloyd, On the k-coloring of intervals, in Advances in Computing and Information ICCI91, LNCS 497, 1991, pp. 90101.
9. J.A. Garay, I.S. Gopal, S. Kutten, Y. Mansour and M. Yung, Efficient on-line call
control algorithms, Journal of Algorithms, 23 (1997) 180194.
10. F. Gavril, Algorithms for minimum coloring, maximum clique, minimum covering
by cliques, and maximum independent set of a chordal graph, SIAM Journal on
Computing, 1(2) (1972), 180187.
11. T.R. Jensen and B. Toft, Graph coloring problems, Wiley, New York, 1995.
12. H.A. Kierstead and W.T. Trotter, Jr., An extremal problem in recursive combinatorics Congressus Numerantium, 33 (1981) 143153.
13. R.J. Lipton and A. Tomkins, On-line interval scheduling, in Proceedings of the
5th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA94), 1994, pp.
302311.

Better Bounds on the Accommodating Ratio

231

14. P. Raghavan and E. Upfal, Efficient routing in all-optical networks, in Proceedings


of the 26th Annual ACM Symposium on Theory of Computing (STOC94), 1994,
pp. 134143.
15. L. Van Wassenhove, L. Kroon and M. Salomon, Exact and approximation algorithms for the operational fixed interval scheduling problem, Working paper
92/08/TM, INSEAD, Fontainebleau, France, 1992.

Ordinal On-Line Scheduling on Two Uniform


Machines?
Zhiyi Tan and Yong He
Department of Mathematics, Zhejiang University
Hangzhou 310027, P.R. China
[email protected]

Abstract. We investigate the ordinal on-line scheduling problem on two


uniform machines. We present a comprehensive lower bound of any ordinal algorithm, which constitutes a piecewise function of machine speed
ratio s 1. We further propose an algorithm whose competitive ratio
matches the lower bound for most of s [1, ). The total length of
the intervals of s where the competitive ratio does not match the lower
bound is less than 0.7784 and the biggest gap never exceeds 0.0521.

Introduction

In this paper, we consider ordinal on-line scheduling problem on two uniform


machines with objective to minimize the makespan (i.e., the last job completion
time). We are given n independent jobs J = {p1 , , pn }, which has to be
assigned to two uniform machines M = {M1 , M2 }. We identify the jobs with
their processing times. Machine M1 has speed s1 = 1 and machine M2 has speed
s2 = s 1. If pi is assigned to machine Mj , then pi /sj time units are required
to process this job. Both machines and jobs are available at time zero, and no
preemption is allowed. We further assume that jobs arrive one by one and we
know nothing about the value of the processing times but the order of the jobs
by processing times. Hence without loss of generality, we suppose p1 p2
pn . We are asked to decide the assignment of all the jobs to some machine
at time zero by utilizing only ordinal data rather than the actual magnitudes.
For convenience, we denote the problem as Q2|ordinal on line|Cmax.
Competitive analysis is a type of worst-case analysis where the performance
of an on-line algorithm is compared to that of the optimal off-line algorithm
[11]. For an on-line algorithm A, let C A denote the makespan of the solution
produced by the algorithm A and C OP T denote the minimal makespan in an
off-line version. Then the competitive ratio of the algorithm A is defined as the
smallest number c such that C A cC OP T for all instances. An algorithm with
?

This research is supported by National Natural Science Foundation of China (grant


number: 19701028) and 973 National Fundamental Research Project of China (Information Technology and High-Performance Software).

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 232241, 2000.
c Springer-Verlag Berlin Heidelberg 2000

Ordinal On-Line Scheduling on Two Uniform Machines

233

a competitive ratio c is called c-competitive algorithm. An on-line deterministic


(randomized) algorithm A is called the best possible (or optimal) algorithm
if there is no deterministic (randomized) on-line algorithm for the discussed
problem with a competitive ratio better than that of A.
Problems with ordinal data exist in many fields of combinatorial optimization
such as matroid, bin-packing, and scheduling [7, 8, 9, 1]. Algorithm which utilizes
only ordinal data rather than actual magnitudes are called ordinal algorithm.
For ordinal scheduling, Liu et al. [8] gave thorough study on P m||Cmax . Because
ordinal algorithm is, in some extent, stricter than the non-clairvoyant one in that
we must assign all jobs at time zero, classical on-line algorithms depending on
machine loads, such as List Scheduling (LS), are of no use. For m = 2, 3, [8] has
presented respective optimal ordinal algorithms. In the same paper, an algorithm
with competitive ratio 101/70 was given while the lower bound is 23/16 for
m = 4, and an algorithm with competitive ratio 1 + (m 1)/(m + dm/2e) 5/3
was developed while the lower bound is 3/2 for general m > 4.
On the other hand, our discussed problem also belongs to a kind of semi online scheduling, a variant of on-line where we do have some partial knowledge on
job set which makes the problem easier to solve than standard on-line scheduling problems. In our problem we know the order of jobs by their processing
times. Although there are many results on semi on-line scheduling problem on
identical machines [2, 5, 6, 10], to the authors knowledge, little is known about
uniform machine scheduling. Due to the above motivation, this paper considers
the scheduling problem Q2|ordinal online|Cmax. We will give the lower bound
of any ordinal algorithm, which is, denoted by clow , a piecewise function dependent on speed ratio s [1, ). We further present one algorithm Ordinal whose
competitive ratio matches the lower bound for the majority of the value of machine speed ratio s. The total length of the intervals of s where the competitive
ratio does not match the lower bound is less than 0.7784, and the biggest gap
between them never exceeds 0.0521.
Another related problem is the classical clairvoyant on-line scheduling problem Q2||Cmax , which is deeply studied.
Cho and Sahni [3] has shown that comet al. [4]o have proved that
petitive ratio of LS algorithm is (1 + 5)/2. Epstein
n
1
the parametric competitive ratio of LS is min 2s+1
s+1 , 1 + s , and LS is thus
the best possible on-line algorithm for any s. They further proved that randomization does not help for s 2, presented a simple memoryless randomized
algorithm with a competitive ratio of (4 s)(1 + s)/4 1.5625, and devised
barely random algorithms with competitive ratio at most 1.53 for any s < 2.
The paper is organized as follows. Section 2 gives the lower bound dependent
on s. Section 3 presents the algorithm Ordinal and proves its competitive ratio.

Parametric Lower Bound

This section presents the parametric lower bound of any deterministic ordinal
algorithm applied to Q2|ordinal on line|Cmax . We generalize the results in
the following two theorems.

234

Zhiyi Tan and Yong He

 h
h


Theorem 1. For any s 1, 5+20265 1+3 7 , , the competitive ratio of any


deterministic ordinal algorithm is at least clow (s), where

2s+2

2s+1

2s

s+1

3s+2

3s

s+2

4s+3
clow (s) =

4s

s+3

5s+4

5s

s+4

6s+5

s 6s

2s+1
s

265
s [1, 5+
) [1, 1.064),
20
1+ 7 1+ 5
s [ 3 , 2 ) [1.215, 1.618),
s [ 1+25 , 3+6 57 ) [1.618, 1.758),
s [ 3+6 57
, 2) [1.758, 2),

1+ 10
s [2, 2 )
[2, 2.081),
10 1+ 13
s [ 1+
,
) [2.081, 2.303),
2
2

1+ 13 5+ 345
s[
, 10 ) [2.303, 2.357),
2
345 1+ 17
s [ 5+
, 2 ) [2.357, 2.562),
10
1+ 17 3+ 159
s[
,
2
6 ) [2.562, 2.602),
s [ 3+ 6159 , 3+23 6 ) [2.602, 2.633),

s [ 3+23 6 , 1 + 3) [2.633, 2.732),


s [1 + 3, ) [2.732, ).

Theorem 2. For any s [ 5+20265 , 1+3 7 ), the competitive ratio of any deterministic ordinal algorithm is at least clow (s), where

5s+2

5s
clow (s) =

(3k4)s+(2k2)

4k5

(2k+1)s+k
(2k+1)s

s [ 5+20265 , s2 (2)),
s [s2 (k 1), s1 (k)), k = 3, 4, . . . ,
s [s1 (k), s2 (k)), k = 3, 4, . . . ,

and for each k 3,


s1 (k) =

(2k + 1)(2k 3) +

p
(2k + 1)2 (2k 3)2 + 4k(2k + 1)(3k 4)(4k 5)
2(2k + 1)(3k 4)

is the positive root of the equation


(3k 4)s + 2k 2
(2k + 1)s + k
=
(2k + 1)s
4k 5
and
s2 (k) =

(2k 1)(2k + 1) +

p
(2k + 1)2 (2k 1)2 + 4k(2k + 1)(3k 1)(4k 1)
2(2k + 1)(3k 1)

is the positive root of the equation


(3k 1)s + 2k
(2k + 1)s + k
=
.
(2k + 1)s
4k 1

Ordinal On-Line Scheduling on Two Uniform Machines

235

From the definition of s1 (k) and s2 (k),


we can see that s1 (k1) < s2 (k1) <

s1 (k) < s2 (k) and limk s2 (k) = 1+3 7 , so the lower bound is well-defined for
any s 1 through Theorem 1 and 2.
The proofs will be completed by adversary method. We analyze the performance of the best possible algorithm applied to several instances. For easier
reading and understanding, we show Theorem 1 by proving the following Lemmas 1-7 separately.

Lemma 1. For any s [1, 5+20265 ) and any ordinal on-line algorithm A, there
exists some instance such that C A /C OP T clow (s) = (2s + 2)/3.
Proof. If an algorithm A assigns p1 to M1 and p2 , p3 , p4 to M2 , consider the
instance with job set {p1 = p2 = 1, p3 = p4 = 1/s}. It follows that C A
(1 + 2/s)/s, C OP T = 2/s, C A /C OP T (s + 2)/(2s) > (2s + 2)/3. If A assigns
p1 and at least one of p2 , p3 , p4 to M1 , consider the instance with job set {p1 =
1, p2 = p3 = p4 = 1/(3s)}. It implies that C A 1 + 1/(3s), C OP T = 1/s,
C A /C OP T (3s + 1)/3 > (2s + 2)/3. So we know that the competitive ratio
will be greater than (2s + 2)/3 as long as A assigns p1 to M1 .
Now we analyze the case that A assigns p1 to M2 . Firstly, we deduce that both
p2 and p3 cannot be assigned to M2 . Because otherwise consider the instance
{p1 = 1, p2 = p3 = 1/(2s)}, it implies that C A (1 + 1/(2s))/s, C OP T =
1/s, C A /C OP T (2s + 1)/(2s) > (2s + 2)/3. Denote the instance by (I1)
for future use. Secondly, p4 must be assigned to M2 . Otherwise we have the
instance {p1 = p2 = p3 = 1, p4 = (2 s)/s}, which follows that C A 1 + 2/s,
C OP T = 2/s,C A /C OP T = (s + 2)/2 > (2s + 2)/3. Denote the instance by
(I2). Thirdly, if A assigns at least one of p5 and p6 to M2 , consider {p1 =
1, p2 = = p6 = 1/(5s)}. It is clear that C A (1 + 2/(5s))/s, C OP T = 1/s,
C A /C OP T (5s + 2)/(5s) > (2s + 2)/3. Lastly, we are left to consider the case
where A assigns p1 , p4 to M2 and p2 , p3 , p5 , p6 to M1 . At this moment, we choose
{p1 = p2 = p3 = 1, p4 = p5 = p6 = 1/s}. Therefore, C A 2 + 2/s, C OP T = 3/s,
C A /C OP T (2s + 2)/3.
In summary, we have proved for any s in the given interval, any algorithm A
t
u
is such that C A /C OP T (2s + 2)/3.

Lemma 2. For any s [ 1+3 7 , 1+2 5 ) and any ordinal on-line algorithm A,
there exists some instance such that C A /C OP T clow (s) = (2s + 1)/(2s).
Proof. Similarly we can get the result by considering the following series of
instances: {p1 = 1, p2 = = p5 = 1/(4s)}, {p1 = = p4 = 1, p5 = 2s 2},
{p1 = 1, p2 = = p6 = 1/(5s)}, {p1 = = p5 = 1, p6 = 2s 3}, (I1), (I2),
{p1 = p2 = p3 = 1, p4 = p5 = (2 s)/(2s)}, and {p1 = 1, p2 = = p5 =
1/(4s)}.
t
u
Before going to other lemmas, consider two instances. If algorithm A assigns
p1 to M1 , let p1 = 1 and no other job arrives, then we know that C A /C OP T s.
If algorithm A assigns p1 and p2 to M2 , let p1 = 1, p2 = 1/s and no other job

236

Zhiyi Tan and Yong He

comes, then C A /C OP T (s + 1)/s. Because s and


(s + 1)/s are no less than
clow (s) defined in Theorem 1 as long as s (1 + 5)/2, in the remainder of the
proof of Theorem 1, we assume that M1 processes p2 and M2 processes p1 by
any algorithm A.

Lemma 3. For any s [ 1+2 5 , 2) and any ordinal on-line algorithm A, there
exists some instance such that
(

s+1
CA
s [ 1+25 , 3+6 57 ),
2
clow (s) = 3s+2
3+ 57
C OP T
, 2).
3s s [
6
Proof. If an algorithm A assigns p3 to M1 , consider the instance {p1 = p2 =
1, p3 = s 1}. Then C A /C OP T s. Therefore A should assign p3 to M2 . If
p4 is assigned to M1 , consider the instance {p1 = p2 = 1, p3 = p4 = 1/s}. We
know C A /C OP T (s + 1)/2. If p4 is assigned to M2 , Consider {p1 = 1, p2 =
p3 = p4 = 1/(3s)}. We have C A /C OP T (3s + 2)/(3s). Thus we know that
C A /C OP T min{(s + 1)/2, (3s + 2)/(3s)}. The result can be got by comparing
the two functions.
t
u

Lemma 4. For any s [ 2+23 6 , ) and any ordinal on-line algorithm A, there
exists some instance such that
(

s
CA
s [ 2+23 6 , 1 + 3),
2
clow (s) = s+1
C OP T
3, ).
s s [1 +
Proof. If p2 is assigned to M1 by an algorithm A, the instance {p1 = p2 =
1} deduces C A /C OP T s/2. As illustrated in the content before Lemma 3,
C A /C OP T (s+1)/s, the lemma can be proved by comparing s/2 with (s+1)/s.
t
u
By considering the following two instances: {p1 = 1, p2 = p3 = 1/(s 1)}
and {p1 = p2 = 1, p3 = p4 = 1/s}, we conclude that M1 should process p2 and
M2 should process p1 , p3 , p4in any algorithm A in order to get the desired lower
bound for 2 s < (2 + 2 6)/3. Hence we assume it holds in the rest of the
proof.

Lemma 5. For any s [2, 1+2 13 ) and any ordinal on-line algorithm A, there
exists some instance such that
(

s+2
1+ 10
CA
s

[2,
),
3
2
clow (s) = 4s+3
1+ 10 1+ 13
C OP T
s

[
,
).
4s
2
2
Proof. Similar to the proof of Lemma 4, we can get the results by the instances
{p1 = p2 = 1, p3 = p4 = p5 = (s 1)/3} and {p1 = 1, p2 = = p5 = 1/(4s)}.
t
u

Ordinal On-Line Scheduling on Two Uniform Machines

237

Lemma 6. For any s [ 1+2 13 , 1+2 17 ) and any ordinal on-line algorithm A,
there exists some instance such that
(

s+3
13 5+ 345
CA
s [ 1+
, 10 ),
4
2
clow (s) = 5s+4
5+ 345 1+ 17
C OP T
, 2 ).
5s s [
10
Proof. The instances {p1 = p2 = 1, p3 = p4 = p5 = (s 1)/3}, {p1 = p2 =
1, p3 = = p6 = (s 1)/4}, and {p1 = 1, p2 = = p6 = 1/(5s)} can reach
the goal.
t
u

Lemma 7. For any s [ 1+2 17 , 2+23 6 ) and any ordinal on-line algorithm A,
there exists some instance such that
(

s+4
1+ 17 3+ 159
CA
s

[
,
5
2
6 ),

clow (s) = 6s+5


3+ 159 2+2 6
C OP T
s

[
,
).
6s
6
3
Proof. By considering the following instances, we can have the results: {p1 =
p2 = 1, p3 = p4 = p5 = (s 1)/3},{p1 = p2 = 1, p3 = = p6 = (s 1)/4},
{p1 = p2 = 1, p3 = = p7 = (s 1)/5} and {p1 = 1, p2 = = p7 = 1/(6s)}.
t
u
Through Lemma 1 to 7, we have finished the proof of Theorem 1. To prove
Theorem 2, we rewrite it as follows:
h

Theorem 3. For any l(l 3) and s 5+20265 , 1+3 7 , the competitive ratio of
any deterministic ordinal algorithm is at least clow (s, l), where

5s+2
s [ 5+20265 , s2 (2)),

5s

(3k4)s+(2k2) s [s (k 1), s (k)), k = 3, 4, , l


2
1
4k5
clow (s, l) = (2k+1)s+k

[s
(k),
s
(k)),
k = 3, 4, , l,
1
2

(2k+1)s

3s+2
1+ 7
s [s2 (l), 3 ).
4
} is an increasing sequence of k and
Because { (3k4)s+2k2
4k5
limk

3s + 2
(3k 4)s + 2k 2
=
,
4k 5
4

one can easily verify the equivalence of Theorem 2 and Theorem 3 as l .


Proof. We prove the results by induction. For l = 3, by using the similar methods
in the proof of Lemma 1 and Lemma 2, it is not difficult to prove
(

5s+2
265 5+ 145
CA
s [ 5+
,
),
5s
20
15
clow (s) = 3s+2
OP
T
5+
145
1+
7
C
s [ 15 , 3 ).
4
But it is a little bit different from the desired bound described in the theorem,
to reach the goal, we need more careful analysis. By the same arguments as in

238

Zhiyi Tan and Yong He

the proof of Lemma 1 and 2, we only need consider the following assignment: A
assigns p2 , p3 , p5 to M1 , and p1 , p4 , p6 to M2 . Because for other assignments, the
ratio is no less than clow (s) already.
Instead of using the instances which we did in the proof of Lemma 2 to
achieve the lower bound of (3s + 2)/4, we now distinguish three cases according
to the assignment of the next two jobs p7 , p8 .
Case 1 Algorithm A assigns p7 to M2 . By considering the instance {p1 = 1, p2 =
= p7 = 1/(6s)}, we have C A (1 + 1/(2s))/s, C OP T = 1/s, C A /C OP T
(2s + 1)/(2s).
Case 2 Algorithm A assigns p7 , p8 to M1 . By considering the instance {p1 =
p2 = p3 = 1, p4 = = p8 = (2 s)/(4s 1)}, we have C A (5s + 4)/(4s 1),
C OP T = 7/(4s 1), C A /C OP T (5s + 4)/7.
Case 3 Algorithm A assigns p7 to M1 and p8 to M2 . The instance {p1 = 1, p2 =
= p8 = 1/(7s)} deduces that C A 1/s(1 + 3/(7s)), C OP T = 1/s and
C A /C OP T (7s + 3)/(7s).
By straight arithmetic calculation, we have

5s+2
265 3+ 65

s [ 5+
, 10 ) = [ 5+20265 , s2 (2)),

5s
20

5s+4
65 3+ 69
CA
s [ 3+10
, 10
) = [s2 (2), s1 (3)),
7

c
(s,
3)
=
low
OP
T
7s+3
3+
7s s [ 10 69 , 7+21301 ) = [s1 (3), s2 (3)),
C

3s+2
s [ 7+21301 , 1+3 7 ) = [s2 (3), 1+3 7 ).
4
Hence the theorem holds for l = 3. By induction, we assume that the theorem
is true for all l < k, and further we can assume M1 processes {p2 , p3 , p5 , p7 ,
, p2k1 } and M2 processes {p1 , p4 , p6 , , p2k } in any algorithm A with the
desired bound. For l = k we distinguish three cases according to the assignment
of the next two jobs:
Case 1 Algorithm A assigns p2k+1 to M2 . By consider the instance {p1 = 1, p2 =
= p2k+1 = 1/(2ks)}, we have that C A 1/s(1 + 1/(2s)), C OP T = 1/s, and
C A /C OP T (2s + 1)/(2s).
Case 2 Algorithm A assigns p2k+1 , p2k+2 to M1 . By considering {p1 = p2 = p3 =
4

1, p4 = = p2k+2 = (2 s)/((2k 2)s 1) = x}, we have that C A 2 + kx,


.
C OP T = 1 + (2k 2)x, and C A /C OP T (3k4)s+(2k2)
4k5
Case 3 Algorithm A assigns p2k+1 to M1 and p2k+2 to M2 . By considering {p1 =
1, p2 = = p2k+2 = 1/((2k + 1)s)},we have that C A (1 + k/((2k + 1)s))/s,
C OP T = 1/s, and C A /C OP T ((2k + 1)s + k)/((2k + 1)s).
, (2k+1)s+k
We thus have shown that C A /C OP T min{ (3k4)s+(2k2)
4k5
(2k+1)s }, and
the proof is completed.
t
u

The Algorithm Ordinal

In this section, we present an ordinal algorithm for Q2|ordinal on line|Cmax .


The algorithm consists of an infinite series of procedures. For any s, it definitely
chooses exactly one procedure to assign the jobs. First we give the definition of
procedures.

Ordinal On-Line Scheduling on Two Uniform Machines

239

Procedure(0): Assign all jobs to M2 .


Procedure(1): Assign jobs in the subset {p3i+2 , p3i+3 |i 0} to M1 ; Assign
jobs in the subset J = {p3i+1 |i 0} to M2 .
Procedure(l), l 2: Assign jobs in the subset {pli+2 |i 0} to M1 ; Assign
jobs in the subset {p1 } {pli+3 , pli+4 , . . . , pli+l+1 |i 0} to M2 .
Algorithm Ordinal

1. If s 1 + 3, assign jobs by Procedure(0).


2. If s [s(l 1), s(l)), assign jobs by Procedure(l), where

1
l = 0,


1+ 13
l
= 1,
s(l) =
4

l2 1+ (l2 1)2 +2l3 (l+1)


l 2.
l(l+1)
In the above definition, s(l) is the positive root of equation

(l+1)s+l
(l+1)s

ls+2
2l

for any l 2. Because it is an increasing sequence of l and liml s(l) = 1 + 3,


the algorithm is well-defined for all s 1.
Theorem 4. The parametric competitive ratio of the algorithm Ordinal is
2s+2
s [s(0), s(1)),

ls+l1
s [s(l 1), s0 (l)), l = 2, 3, . . . ,
ordinal
ls
(s) = ls+2
c
s [s0 (l),

2l

s(l)), l = 2, 3, . . . ,
s+1
s

1
+
3,
s
where s0 (l) =

l1+

(l1)2 +2l(l1)
l

(l 2) is the positive root of

ls+l1
ls

ls+2
2l .

Proof. We first show that C ordinal /C OP T cordinal (s). Let 1 and 2 be the
completion times of M1 and M2 after processing all jobs by our algorithm respectively, and b be the total processing time of all jobs. Obviously, C OP T b/(s+1)
and C OP T p1 /s, C ordinal = max{1 , 2 }. We prove the ratio by distinguishing
the speed ratio s.
Case 1 s > 1 + 3. In this case, Ordinal chooses Procedure(0). It is clear that
s+1 OP T
b
. This is the desired ratio.
1 = 0 and 2 = sb = s+1
s s+1 s C
Case 2 s [s(0), s(1)). In this case, Ordinal chooses Procedure(1). We prove
the case of n = 3k, the other cases of n = 3k + 1 and 3k + 2 can be proved
similarly. By the rule of the procedure, we have
1 =

k1
X
i=0

2(s + 1) b
2(s + 1) OP T
2b
=

C
,
3
3
s+1
3

1 X
b
3s + 1 OP T
1X
p1
2p1
+
+

C
p3i+1
pi =
.
s i=0
s
3s i=2
3s
3s
3s
k1

2 =

2X
(p3i+1 + p3i+2 + p3i+3 )
3 i=0
k1

(p3i+2 + p3i+3 )

240

Zhiyi Tan and Yong He

2(s+1)
Note that for s [s(0), s(1)), we have 3s+1
, we thus get the desired
3s
3
ratio for this case.
Case 3 s [s(1), s(2)). At this moment, we need analyze Procedure(2). We
prove the case of n = 2k, the another case of n = 2k + 1 can be proved similarly.
In fact, we have
k1
X
s + 1 OP T
b
C
p2i+2
,
1 =
2
2
i=0

X
1 X
b
2s + 1 OP T
1
p1
p1
(p1 +
+
+

C
p2i3 )
pi =
.
s
s
2s i=2
2s 2s
2s
i=0
k2

2 =

By comparing (s + 1)/2 and (2s + 1)/(2s), we know that


 2s+1
0
C ordinal
2s s [s(1), s (2)) ,

s+1
0
s [s (2), s(2)) ,
C OP T
2
where s0 (2) is defined in the theorem.
Case 4 s [s(l 1), s(l)) , (l 3). Consider Procedure(l) as follows. We only
P
prove the
case of n = kl + 1 as above. Obviously we have 1 = k1
i=0 pil+2
P
n
p2 + 1l i=3 pi . To get the ratio between 1 and C OP T , we distinguish two
subcases according to the assignment of the first two jobs in the optimum.
Subcase 1 p1 and p2 are processed in the same machine in the optimal schedule.
Then C OP T (p1 + p2 )/s. Therefore we get
1

ls + 2 OP T
l2
b
(p1 + p2 ) +
C
.
2l
l
2l

Subcase 2 p1 and p2 are not processed in the same machine in the optimal
schedule. Then C OP T p2 and
1

l + s 1 OP T
l2
b
p2 +
C
.
l
l
l

Now we remain to get the ratio between 2 and C OP T . By straight computation, we have
XX
l1X
1
p1
(p1 +
+
pil+j )
pi
s
s
ls i=2
i=1 j=3
k1 l+1

2 =

(l 1)b
1 (l 1)(s + 1) OP T
p1
+
( +
)C
ls
ls
l
ls
ls + l 1 OP T
C
=
.
ls
Note for l 3, and s > 2, we have (ls + l 1)/(ls) > (l + s 1)/l, and (ls +
, ls+2
2)/(ls) > (l + s 1)/l, which imply that C ordinal /C OP T max{ ls+l1
ls
2l }.
The desired ratio can thus be obtained.

Ordinal On-Line Scheduling on Two Uniform Machines

241

To show the algorithm Ordinal is cordinal -competitive algorithm, we consider


the following instances. If s [s(0), s(1)), let p1 = p2 = p3 = 1, p4 = p5 = p6 =
pl = 1/(ls). If s [s0 (l), s(l)),
1/s. If s [s(l 1), s0 (l)), let p1 = 1, p2 = =
t
u
let p1 = p2 = 1, p3 = = pl = 2/(ls). If s 1 + 3, let p1 = 1, p2 = 1/s.
Comparing the lower bound with the competitive ratio of Ordinal, we conclude that our algorithm is optimal in the following intervals of s
# "
# "
"

# h

1+ 7
1 + 10 3 + 33
5 + 265

,2
,
1 + 3, ,
1,
20
3
2
4
the total length of the intervals where the ratio does not match the lower bound
is less than0.7784 and the biggest gap is approximately 0.0520412 which occurs
at s = 35+1128617 1.14132.

References
[1] Agnetis, A.: No-wait flow shop scheduling with large lot size. Rap 16.89, Dipartimento di Informatica e Sistemistica, Universita Degli Studi di Roma La
Sapienza, Rome, Italy, 1989.
[2] Azar, Y., Regev, O.: Online bin stretching. Proc. of RANDOM98, 71-82(1998).
[3] Cho, Y., Sahni, S.: Bounds for list scheduling on uniform processors. SIAM J.
Computing 9, 91-103(1980).
[4] Epstein, L., Noga, J., Seiden, S. S., Sgall, J., Woeginger, G.J.: Randomized online
scheduling for two related machines. Proc. of the 10th ACM-SIAM Symp. on
Discrete Algorithms, 317-326(1999).
[5] He, Y., Zhang, G.: Semi on-line scheduling on two identical machines. Computing,
62, 179-197(1999).
[6] Kellerer, H., Kotov, V., Speranza, M., Tuza, Z.: Semi online algorithms for partition problem. Oper. Res. Letters, 21, 235-242(1997).
[7] Lawler, E. L.: Combinatorial Optimization: Networks and Matroids. Holt, Rinehart and Winston, Toronto, 1976.
[8] Liu, W. P., Sidney, J. B., Van Vliet, A.: Ordinal algorithms for parallel machine
scheduling. Oper. Res. Letters, 18, 223-232(1996).
[9] Liu, W. P., Sidney, J. B.: Bin packing using semi-ordinal data. Oper. Res. Letters,
19, 101-104(1996).
[10] Seiden, S., Sgall, J., Woeginger, G.: Semi-online scheduling with decreasing job
sizes. Technical Report, TU Graz, Austria, 1999.
[11] Sleator, D., Tarjan, R.E.: Amortized efficiency of list update and paging rules.
Communications of ACM 28, 202-208(1985).

Agents, Distributed Algorithms, and


Stabilization
Sukumar Ghosh?
The University of Iowa, IA 52242, USA
[email protected]

Abstract. This note illustrates the use of agents in the stabilization


of distributed systems. The goal is to build stabilizing systems on the
Internet, where the component processes are not under the control of a
single administration. Two examples are presented to illustrate the idea:
the first is that of mutual exclusion on a unidirectional ring, and the
second deals with the construction of a DFS spanning tree.

Introduction

An agent [7] is a program that can migrate from one node to another, perform
various types of operations at these nodes, and can take autonomous routing
decisions. In contrast with messages that are passive, an agent is an active entity
that can be compared with a messenger. In the past few years, agents have proven
to be an attractive tool in the design of various types of distributed services.
This note examines the use of agents in the design of stabilizing distributed
systems [4]. Conventional stabilizing systems expect processes to run predefined
programs that have been carefully designed to guarantee recovery from all possible bad configurations. However, in an environment like the Internet, where
processes are not under the control of a single administration, expecting every
process to run predefined programs for the sake of stabilization is unrealistic.
This paper explores an alternative mechanism for stabilizing a distributed system, in which processes are capable of accommodating visiting agents.
Consider a network of processes, where each process communicates with its
immediate neighbors using messages. Each process, in addition to sending out its
own state, can read incoming messages, and update its own state (using a set of
rules). The state of the network consists of the states of each of the processes, and
can be classified into the categories legal and illegal. Each update action modifies
the state of the network. A stabilizing system guarantees that regardless of the
starting state, the network reaches a legal state in a bounded number of steps,
and remains in the legal state thereafter. Convergence and closure are the two
cornerstones of stabilizing systems [1].
?

This research was supported in part by the National Science Foundation under grant
CCR-9901391, and by the Alexander Von Humboldt Foundation, Germany while the
author was visiting the University of Dortmund.

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 242251, 2000.
c Springer-Verlag Berlin Heidelberg 2000

Agents, Distributed Algorithms, and Stabilization

243

We assume that in addition to the ongoing activities in the above network


of processes, one or more processes can send out agents that can migrate from
one process to another. While the individual processes maintain the closure of
legal configurations, agents help the system converge to a legal configuration as
soon as it detects that the configuration is illegal. The detection involves taking
a total or partial snapshot of the system state. Corrective actions by the agent
involve the modification of shared variables of one or more processes that the
agent is scheduled to visit.
In seeking a solution to the problem of stabilization with agents, we make
the following assumption:
[Non-interference] The normal operation of the system neither depends on,
nor is influenced by the presence of agents.
Only at convenient intervals, agents are sent out to initiate a clean-up phase,
but otherwise the operation of the system continues as usual. The individual
processes are oblivious to the presence of the agent(s). We do not take into
consideration any minor slowdown in the operation of a node due to the sharing
of the resources by the visiting agent.
Our solution can be viewed as a stabilizing extension of a distributed system as proposed Katz & Perry [6]. However, agents make the implementation
straightforward, and sometimes elegant. We consider two well-known problems
to illustrate our idea: the first deals with stabilizing mutual exclusion on a unidirectional ring first illustrated by Dijkstra [4], and the second is a stabilizing
algorithm for constructing a DFS spanning tree for a given graph.

Model and Notations

Consider a strongly connected network of processes. The processes communicate


with one another through messages. Any process can send out a message containing its current state to its immediate neighbors, and receive similar messages
from its immediate neighbors. Each channel is of unit capacity. Furthermore,
channels are FIFO, i.e. through any channel, messages are received in the order
they are sent.
The program for each process consists of a set of rules. Each rule is a guarded
action of the form g A, where g is a boolean function of the state of that
process and those of its neighbors received via messages, and A is an action
that is executed when g is true. An action by a process consists of operations
that update its own state, followed by the sending of messages that contain the
updated state. The execution of each rule is atomic, and it defines a step of a
computation. Furthermore, when multiple rules are applicable, any one of them
can be chosen for execution. A computation is a sequence of atomic steps. It can
be finite or infinite.
The other component of the algorithm is the program that the agent executes
every time it visits a node. The variables of the agent will be called briefcase variables. A guard is a boolean function of the briefcase variables, and the variables

244

Sukumar Ghosh

of the process that the agent is currently visiting. An action consists of one or
more of the following three operations: (i) modification of its briefcase variables,
(ii) modification of the variables of the process that it is currently visiting, and
(iii) identification of the next process to visit. This next process can either be
predetermined, or it can be computed on-the-fly, and will be represented by the
variable next. We will use guarded commands to express the agent program.
A privileged process, in addition to everything that an ordinary process does,
can test for the arrival of an agent as a part of evaluating its guard, and can send
out an agent (with appropriate initialization) as a part of its action. These agents
use the same channel that the messages use. However, agents always receive a
higher priority over messages, as represented by the following assumption:
[Atomicity] At any node, the visit of an agent is an atomic event. Once an
agent arrives at a node, the node refrains from sending or receiving any message
until the agent leaves that node.
Thus from the nodes point of view, an agents visit consists of an indivisible
set of operations. Exceptions may be made for privileged processes only. This
assumption is important to make any total or partial snapshot of the system
state taken by the agent a meaningful or consistent one. For further details
about this issue, we refer the readers to [2]

Mutual Exclusion

We consider here the problem of stabilizing mutual exclusion on a unidirectional


ring, first illustrated by Dijkstra in [4]. The system consists of a unidirectional
ring of N processes numbered 0 through N 1. Process i can only read the
state of its left neighbor (i 1) mod N in addition to its own state. The state of
process i is represented by the boolean b(i). Process 0 is a privileged process, and
behaves differently from other processes. A process is said to have a token, when
its guard is true. We need to design a protocol, so that regardless of the starting
configuration, (1) eventually a state is reached in which exactly one process has
a token, (2) the number of tokens always remains one thereafter, and (3) in an
infinite computation, every process receives a token infinitely often.
Consider the program of the individual processes first. Process i has a boolean
variable b(i) that is sent out to its neighbor (i + 1) using a message.
(Program for process i : i 6= 0) b(i) 6= b(i 1) b(i) := b(i)
(Program for process 0) b(0) = b(N 1) b(0) := b(0)
It can be easily shown that the number of tokens is greater than 0, and this
number never increases. Therefore, once the system is in a legal state (i.e., it has
a single token) it continues in that state.
The states of the processes may be corrupted at unpredictable moments. To
steer the system into a legal configuration, process 0 sends out an agent from
time to time. This is done after process 0 executes its current action, if any,

Agents, Distributed Algorithms, and Stabilization

245

and appropriately initializes the briefcase variables. Furthermore, the following


condition must hold:
Condition 1. Until the agent returns home, process 0 suspends subsequent
actions1 .
The briefcase consists of two booleans, B and token, that are initialized by
process 0 when the agent is sent out. As the agent traverses the ring, it determines
if the number of tokens is greater than one. In that case, the agent modifies the
state of a process to possibly reduce the number of tokens. The program for the
agent consists of the three rules ME1, ME2, and ME3 and is shown below.
Program for the agent while visiting node i
Initially, token = f alse, B = b(0) (initialization done by process 0)
if
(ME1) B 6= b(i) token B := b(i); token := true; next := (i+1) mod N
(ME2) B =
6 b(i) token b(i) := B; next := (i + 1) mod N
(ME3) B = b(i) next := (i + 1) mod N
fi
Note that the briefcase variables can also be badly initialized, or corrupted.
However, the agent is guaranteed to return to process 0, which initializes the
briefcase variables. In the remainder of this section, we assume that the briefcase
variables have correct values.
Theorem 1. When the agent returns to process 0, the system returns to a legal
configuration.
Proof. When the agent returns to process 0 , the following two cases are possible.
Case 1 : token = true.
This implies that the agent has detected a token at some process j, Thereafter, the state b(k) of any other process k (k > j) that had a token when the
agent visited it, has been complemented, making that token disappear. Thus,
in the state observed by the agent, the values of b(i) are the same for all i j,
and are the complement of the values of b(i) for all i < j. This means that the
system is in a legal configuration.
Case 2 : token = f alse.
In this case, the agent has not been able to detect any token. Since process
0 did not execute a move in the mean time, in the observed state, the values of
b(i) for every process i are identical. This means that process has a token, and
the system is in a legal configuration.
1

To monitor the arrival of the agent, we rely on a built-in timeout mechanism that is
an integral part of any message-passing system. We elaborate on this further in the
concluding section.

246

Sukumar Ghosh

It takes only one traversal of the ring by the agent to stabilize the system, where
a traversal begins and ends at process 0. However, if a transient failure hits a process immediately after the agents visit, then the resulting illegal configuration
may persist until the next traversal of the agent.
It is important here to note that unlike the original solution in [4], the space
complexity of the processes as well as the agent is constant. This makes the
solution scalable to rings of arbitrary size. In terms of space complexity, it is
comparable to [5] that uses only three bits per process, and no agents. However,
the communication complexity, defined as the number of bits that are sent (and
received) to move the token from one process to the next, is substantially lower
(in fact, it is 1-bit) in our solution, as opposed to O(N ) bits in [5].
Why cant we get rid of all these, and define a process having a token
only when the agent visits that process? This violates the condition of noninterference. Since the agents are periodically invoked, the system will come to
a standstill during the interim period, when the agent is absent!

4
4.1

DFS Tree Generation


The Algorithm

Consider a connected network of processes. The network is represented by a


graph G = (V, E), where V denotes a set of nodes representing processes, and
E denotes the set of undirected edges joining adjacent processes, through which
interprocess communication takes place. A special process 0 is designated as the
root. Every process i (i 6= 0) has a parent process P (i) that is chosen from
its neighbors. By definition, the root does not have a parent. The spanning tree
consists of all the processes and the edges connecting them with their parents. By
definition, a spanning tree is acyclic. However, transient failures may corrupt the
value of P (i) from one or more process i, leading to the formation of cycles in the
subgraph, or altering the tree to another spanning tree that is not DFS, making
the resulting configuration illegal. The individual processes will remain oblivious
to it. So, we will entrust the root node with the task of sending out agents to
detect such irregularities. If required, the agent will appropriately change the
parents of certain processes to restore the spanning tree.
For the convenience of presentation, we will use the following abbreviations:
child(i) {j : P (j) = i}
N (i) {j : (i, j)}
f riend(i) {j : j N (i) j 6= P (i) P (j) 6= i)
A node k f riend(i) will also be called a non-tree neighbor of node i.
One of the key issues here is that of graph traversal. Assume that each process
has a boolean flag f . Initially, f = f alse. This flag is set whenever the process
is visited by the agent. Then, the following two rules will help an agent traverse
the graph down the spanning tree edges, and eventually return to the root. Note
that the set of briefcase variables is empty.

Agents, Distributed Algorithms, and Stabilization

247

(DFS1) j child(i) : f (j) next := j


(Note: After reaching j, the agent will set f (j) to true)
(DFS2) j N (i) : f (j) next := P (i)
This will also maintain closure of the legal configuration. The boolean flag f (j)
has to be reset before a subsequent traversal begins.
Unfortunately, this traversal may be affected when the DFS spanning tree
is corrupted. For example, if the parent links form a cycle, then no tree edge
will connect this cycle to the rest of the graph. Accordingly, using DFS1, the
nodes in the cycle will be unreachable for the agent, and the traversal will remain incomplete. As another possibility, if the agent reaches one of these nodes
contained in a cycle before the cycle is formed, then the agent is trapped, and
cannot return to the root using DFS2.
To address the first problem, we add the following rule to force open a
path to the unreachable nodes.
(DFS3) j child(i) : f (j) k f riend(i) : f (k) next := k
(Note: After reaching k, the agent will set f (k) to true, and P (k) to i, i.e., i will
adopt k as a child).
If the unreachable nodes form a cycle, then this rule will break it. This rule will
also help restore the legal configuration, when the spanning tree is acyclic, but
not a DFS tree.
To address the second problem, we ask the agent to keep track of the number
of nodes visited while returning to the root via the parent link. For this purpose, the briefcase of the agent will include a non-negative integer counter C.
Whenever the agent moves from a parent to a child using DFS1 or DFS3, C is
reset to 0, and and when the agent moves from a node to its parent using DFS2,
C is incremented by 1. (Note: This will modify rules DFS1 and DFS2). When
C exceeds a predetermined value bigger than the size N of the network, a new
parent has to be chosen, and the counter has to be reset.
(DFS4) (C > N ) k f riend(i) P (i) := k; C := 0, next := k
This will break the cycle that trapped the agent.
The only remaining concern is about the flag f being corrupted, and appropriately initializing them before a new traversal begins. For this purpose, we
include a boolean flag R to the briefcase to designate the round number of the
traversal. Before a new traversal begins, the root complements this flag. When
f (i) 6= R, the node i is considered unvisited, and to indicate that node i has
been visited, f (i) is set to R. This leads us to the overall agent program for
stabilizing a DFS spanning tree.
The program adds a extra variable pre to the briefcase of the agent. It stores
the identity of the previous node that it is coming from. A slightly folded version
of the program is shown below.

248

Sukumar Ghosh

Program for the agent while visiting node i


if f (i) 6= R f (i) := R fi;
if pre f riend(i) P (i) := pre fi;
if
(DFS1) j child(i) : f (j) 6= R next := j; C := 0
(DFS2) j N (i) : f (j) = R (C < N f riend(i) = )
next := P (i); C := C + 1
(DFS3) j child(i) : f (j) = R k N (i) : f (k) 6= R
next := k; C := 0
(DFS4) (C > N ) k f riend(i) next := k; P (i) := k; C := 0
fi;
pre := i
4.2

Correctness Proof

Define j to be a descendant of node i, if j child(i), or j is a descendant of


child(i). In a legal configuration, the following three conditions must hold:
1. i V (i 6= root), the edges joining i with P (i) form a tree.
2. j f riend(i) j is a descendant of node i.
3. i, j V , f (i) = f (j)
When the first condition does not hold, the tree edges form more than one
disconnected subgraph or segment. The segment containing the root will be
called the root segment.
When the agent returns to the root, i V : f (i) = R. During the subsequent
traversal, the root complements R, and i V : f (i) 6= R holds. If for some
node j this is not true, then we say that node j has an incorrect flag. Note that
if only the first two conditions hold but not the third one, then any application
using the DFS tree will remain unaffected.
Lemma 1. In a DFS tree, when the agent returns to a node after visiting all its
children, every non-tree neighbor is also visited.
Proof. Follows from the definition of DFS traversal.
Lemma 1 shows that DF S1 and DF S2 maintain the closure of the legal configuration.
Lemma 2. Starting from an arbitrary configuration, the agent always returns
to the root.
Proof. If the agent is in the root segment, and C does not exceed N during this
trip when the agent moves towards the root, then DF S2 guarantees that the
statement holds.
If C exceeds N , then either (1) C is corrupted, or (2) the agent is trapped
into a loop. In Case 1, the number of disconnected segments possibly increases
(using DFS3), and the agent moves to a segment away from the root segment.

Agents, Distributed Algorithms, and Stabilization

249

However, this eventually triggers DF S4. The execution of DF S4 breaks the


loop, connects it with another segment, and routes the agent to that segment.
At the same time, C is re-initialized. In a bounded number of steps, the number
of segments is reduced to one, which becomes the root segment. Using DF S2,
the agent returns to the root.
Lemma 3. If no node i has an incorrect flag f (i), then the DFS tree is restored
in at most one traversal of the graph.
Proof. We consider three cases here.
Case 1. Assume that the root segment consisting of all the nodes in V and their
parents form a spanning tree, but it is not a DFS tree. This allows for unvisited
non-tree neighbors even after all the children have been visited. This triggers
DF S3, the repeated application of which transforms the given spanning tree
into a DFS tree.
Case 2. Assume that the agent is in the root segment, and there is no tree edge
connecting it to the rest of the graph. In this case, eventually DF S3 will be
executed, and that will establish a new tree edge connecting the root segment
with the rest of the graph. This will augment the size of the root segment,
and the number of segments will be reduced by one. Repeated application of
this argument leads to the fact that the root segment will include all the nodes
before the agent completes its traversal.
Case 3 Assume that the agent is in a segment away from the root segment, and
in that segment, the edges connecting nodes with their parents form a cycle. In
this case, within a bounded number of steps, DF S4 will be executed, causing the
agent to move away from the current segment by following the newly updated
parent link, and re-initializing C. This will also reduce the number of segments
by one. In a finite number of steps, the agents will return to the root segment,
and eventually the DFS tree will be restored.
Lemma 4. If there are nodes with incorrect flags, then after each traversal by
the agent, the number of nodes with incorrect flags is decremented by at least
one.
Proof. Assume that there are some nodes with incorrect flags when the agent
begins its traversal. This means that there are some nodes that have not been
visited by the agent, but their flags incorrectly show that they have been visited.
We will demonstrate that the flag of at least one such node is set correctly, before
the current traversal ends and the next traversal begins.
Using DF S2, the agent moves from a node to its parent, when every neighbor
has been visited. This may include a neighbor k that has not yet been visited
by the agent, but its flag has been incorrectly set as visited (i.e., f (k) = R).
However, during the next traversal, R is complemented, and so f (k) 6= R holds
- this corresponds to k being unvisited, and the flag is now correct.
An unpleasant consequence of Lemma 4 is that the agent may need upto
N 1 traversals to set all the flags correctly. When it encounters as little as one

250

Sukumar Ghosh

incorrect flag, it can potentially abandon the task of stabilizing the rest of the
graph during that traversal, and postpone it to the next round.
Theorem 2. In at most N traversals by the agent, the DFS tree returns to a
legal configuration.
Proof. From Lemma 4, it may take at most (N 1) traversals to set all the flags
correctly. From Lemma 3, it follows that within the next traversal, the DFS tree
is reconstructed.
4.3

Complexity Issues

The agent model is stronger than the classical message passing or shared memory
models. Note that we are measuring the stabilization time in terms of the number
of traversals made by the agent, where a traversal begins when the agent leaves
the root, and ends when it returns to the root. It is possible for the agent to be
corrupted in the middle of a traversal, or the state variables of the processes to
be corrupted while the agent is in transit. In such cases, the stabilization time
will be measured after the failure has occurred, and the agent has returned to
the root, which is guaranteed by Lemma 2.
It is feasible to cut down the stabilization time to one traversal with a high
probability by using signatures. The agent, while visiting a process i for the first
time during a traversal, will append its signature to f (i). A failure at that node
will make that signature unrecognizable with a high probability. If the agent
cannot recognize its own signature at any node, then it will consider that node
to be unvisited.
We make another observation while comparing the space complexity of this
solution with those of the more traditional stabilizing spanning tree algorithms
like [3]. In [3], each process has to keep track of the size of the network, that
requires log2 N bits per process. In our solution, the space complexity of each
process is constant - only the agent needs to know the value of N , and will need
log2 N bits in its briefcase. It appears that the N copies of log2 N bits has been
traded by just one copy of log2 N , which is a favorable trade, and contributes
to the scalability. The additional space complexity for the briefcase variable pre
should not exceed log2 bits (where is the maximum degree of a node), since
the choice of a parent is limited to only the immediate neighbors of a node.

Conclusion

Agents can be a powerful tool in the design of distributed algorithms on systems


with a heterogeneous administrative structure. In contrast with self-stabilization
where processes execute the stabilizing version of the program, here processes
execute the original program, but are ready to accommodate corrective actions
by one or more visiting agents.
Since the task of inconsistency detection and consistency restoration is delegated to a separate entity, agent-based stabilization is conceptually simpler that
self-stabilization. However, in some cases, it can cause new and tricky problems,

Agents, Distributed Algorithms, and Stabilization

251

like the trapping of an agent in the DFS spanning tree algorithm. On the other
hand, we believe that algorithms for controlled recovery, like fault-containment
algorithms, can be painlessly built into an existing distributed system by using
agents.
To send and receive agents, the privileged process relies on a timeout mechanism. In case an agent does not return within the timeout period, it is assumed
to be lost, and a new agent is generated. A side effect is the possibility of multiple agents patroling the network simultaneously. For some protocols (like the
mutual exclusion protocol), this does not pose a problem, except that it wastes
network resources. In others, the agent management system has to take the responsibility of eventually reducing the number of agents to one. A presentation
of such a protocol is outside the scope of this paper.
Since the agents are invoked periodically, a possible criticism is that the
illegal configuration may persist for a long period. However, in the classical
asynchronous self-stabilizing systems also, we do not put an upper bound on the
real time that a process will take to detect or correct an illegal configuration. The
frequency of invocation of the agent will be determined by the failure probability,
the maximum duration for which a faulty behavior can be tolerated, and the
failure history of the system.
One of our future goals is to demonstrate that besides being viable, agents
make it easier to design stabilizing algorithms for distributed system when compared with the classical approach. In non-reactive systems, the agent basically
walks through a distributed data structure, and modifies it as and when necessary. In reactive systems, the critical issues are taking a distributed snapshot
of a meaningful part of the system, and making appropriate alterations to the
states of some processes on-the-fly (i.e., a total or partial distributed reset) such
that legitimacy is restored.

References
1. Arora, A., Gouda, M.G.: Closure and Convergence: A Foundation of Fault-tolerant
Computing. IEEE Transactions on Software Engineering, Volume 19 (1993) 10151027.
2. Chandy K.M., Lamport L.: Distributed Snapshots: Determining Global States of
a Distributed System. ACM Trans. Computer Systems, Volume 3, No.1 (1985)
63-75.
3. N. S. Chen, H. P. Yu, S. T. Huang.: A Self-Stabilizing Algorithm for Constructing
a Spanning Tree. Information Processing Letters, Volume 39 (1991) 147-151.
4. Dijkstra, E.W.: Self-Stabilizing Systems In Spite of Distributed Control. Communications of the ACM, Volume 17 (1974) 643-644.
5. Gouda M.G., Haddix F.: The Stabilizing Token Ring in Three Bits. Journal of
Parallel and Distributed Computing, Volume 35 (1996) 43-48.
6. Katz, S., Perry K.: Self-Stabilizing Extensions for Message-passing Systems. Proc.
9th Annual Symposium on Principles of Distributed Computing (1990) 91-101.
7. Gray Robert, Kotz D., Nog S., Rus D., Cybenko G.: Mobile Agents for Mobile
Computing. Proceedings of the Second Aizu International Symposium on Parallel
Algorithms/Architectures Synthesis, Fukushima, Japan (1997).

A Fast Sorting Algorithm and Its Generalization


on Broadcast Communications?
Shyue-Horng Shiau and Chang-Biau Yang??
Department of Computer Science and Engineering,
National Sun Yat-Sen University,
Kaohsiung, Taiwan 804, R.O.C.,
{shiaush, cbyang}@cse.nsysu.edu.tw,
http://par.cse.nsysu.edu.tw/cbyang

Abstract. In this paper, we shall propose a fast algorithm to solve the


sorting problem under the broadcast communication model (BCM). The
key point of our sorting algorithm is to use successful broadcasts to build
broadcasting layers logically and then to distribute the data elements into
those logic layers properly. Thus, the number of broadcast conflicts is reduced. Suppose that there are n input data elements and n processors
under BCM are available. We show that the average time complexity
of our sorting algorithm is (n). In addition, we expand this result to
the generalized sorting, that is, finding the first k largest elements with
a sorted sequence among n elements. The analysis of the generalization
builds a connection between the two special cases which are maximum
finding and sorting. We prove that the average time complexity for finding the first k largest numbers is (k + log (n k)).

Introduction

One of the simplest parallel computation models is the broadcast communication


model (BCM)[1,2,5,6,14,13,4,9,7,11,12,15]. This model consists of some processors sharing one common channel for communications. Each processor in this
model can communicate with others only through this shared channel. Whenever a processor broadcast messages, any other processor can hear the broadcast
message via the shared channel. If more than one processor wants to broadcast
messages simultaneously, a broadcast conflict occurs. When a conflict occurs, a
conflict resolution scheme should be invoked to resolve the conflict. This resolution scheme will enable one of the broadcasting processors to broadcast successfully. The Ethernet, one of the famous local area networks, is an implementation
of such a model.
The time required for an algorithm to solve a problem under BCM includes
three parts: (1) resolution time: spent to resolve conflicts, (2) transmission time:
?
??

This research work was partially supported by the National Science Council of the
Republic of China under NSC89-2213-E110-005.
To whom all correspondence should be sent.

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 252261, 2000.
c Springer-Verlag Berlin Heidelberg 2000

A Fast Sorting Algorithm and Its Generalization

253

spent to transmit data, (3) computation time: spent to solve the problem. For
the sorting problem, it does not seem that transmission time and computation
time can be reduced. Therefore, to minimize resolution time is the key point to
improve the time complexity.
The probability concept, proposed by Martel [7], is to estimate a proper
broadcasting probability, which can reduce conflict resolution time. Another idea
to reduce conflict resolution time is the layer concept proposed by Yang [13]. To
apply the layer concept for finding the maximum among a set of n numbers [11],
we can improve the time complexity from (log2 n) to (log n) [12]. As some
research has also been done on the BCM when processors have a known order,
our paper is the case that processors have a unkown order.
Some researchers [8,2,4,5,15,10] have solved the sorting algorithm under BCM.
The selection sort can be simulated as a straightforward method for sorting under BCM. The method is to have all processors broadcast their elements and to
find the maximum element repeatedly. In other words, the maximum elements
which are found sequentially form the sorted sequence. Levitan and Foster [5,6]
proposed a maximum finding algorithm, which is nondeterministic and requires
O(log n) successful broadcasts in average. Martel [7], and Shiau and Yang [11]
also proposed maximum finding algorithms, which require O(log n) and (log n)
time slots (including resolution time slots) in average respectively. Thus, the time
required for the straightforward sorting method based on the repeated maximum
finding is O(n log n).
Martel et al. [8] showed the sorting problem can be solved in O(n). They also
proved that the expected time for finding the first k largest numbers is O(k +
log n). They used a modified version of selection sort, i.e., sort by repeatedly
finding maximum based on the results from previous iterations. It can be viewed
as a modified Quicksort. Until now, Martels algorithm is the fastest one for
solving the sorting problem under BCM. However, the constants associated with
O(n) and O(k + log n) bounds proved by Martel et al. [8] are not very tight.
This paper can be divided into two main parts. In the first part, we shall
propose a sorting algorithm under BCM. In the algorithm, we make use of the
maximum finding method [11] to build layers and reduce conflicts. After the
process of maximum finding terminates, we can use these successful broadcasts
to build broadcasting layers logically and then to distribute the data elements
into those logic layers properly. Thus, conflict resolution time can be reduced.
And we shall give the time complexity analysis of our algorithm. The average
number of time slots (including conflict slots, empty slots, and slots for successful
7
broadcast) required for sorting n elements is Tn , where 72 n 12 Tn 23
6 n 6.
Here, it is assumed that each time slot requires constant time. As we can see
that the bound of our time complexity is very tight.
In the second part, we shall generalize the result of the first part. We prove
that the average number of time slots required for finding the first k largest num
bers with a sorted sequence is Tkn , where 72 k + 4 ln (n (k 2)) 12 + 4 ln 2
7
Tkn 23
6 k + 5 ln (n (k 1)) 6 . The time complexity is also very tight. By the

254

Shyue-Horng Shiau and Chang-Biau Yang

analysis of the generalization, we figure out the connection between maximum


finding and sorting, which are two special cases of our generalization.
On the high level view, our sorting algorithm and generalization algorithm
have a similar approach as that proposed by Martel et al. [8]. On the low level
view, our algorithms are based on the layer concept, thus they can be analyzed
easily and a tighter bound can be obtained. And Lemma 1 of this paper can be
regarded as a generalization for the work which has the same high level approach.
If there is another maximum finding algorithm under BCM whose bound can
be analyzed , not only it can be applied into our sorting and generalized sorting
approaches, but also the approaches based on it can be analyzed immediately
by our lemmas in this paper.
This paper is organized as follows. In Section 2, we review the previous results
for our maximum finding[11]. Based on the maximum finding, we present the
sorting algorithm and its analysis in Section 3 and 4. In Section 5, we present
the generalization of the sorting. In Section 6, we provide the analysis of the
generalization. Finally, Section 7 concludes the paper.

The Previous Results for Maximum Finding

We shall first briefly review the maximum finding algorithm under BCM, which
is proposed and analyzed by Shiau and Yang [11]. In the maximum finding
algorithm, each processor holds one data element initially. The key point of the
maximum finding algorithm is to use broadcast conflicts to build broadcasting
layers and then to distribute the data elements into those layers. For shortening
the description in our algorithm, we use the term data element to represent
the processor storing the data element and to represent the data element itself
at different times if there is no ambiguity. When a broadcast conflict occurs, a
new upper layer is built up. Each data element which joins the conflict flips a
coin with equal probabilities. That is, the probability of getting a head is 12 . All
which get heads continue to broadcast in the next time slot, and bring themselves
up to the new upper layer. This new layer becomes the active layer. The others
which get tails abandon broadcasting, and still stay on the current layer. At any
time, only the processors which are alive and on the active layer may broadcast.
In this paper, we shall use the notation hx0 , x1 , x2 , , xt i to denote a linked
list, where xt is the head of the list. Suppose L1 = hx0 , x1 , x2 , , xt i and
L2 = hy0 , y1 , y2 , , yt0 i, then hL1 , L2 i represents the concatenation of L1 and
L2 , which is hx0 , x1 , x2 , , xt , y0 , y1 , y2 , , yt0 i.
The maximum finding algorithm can be represented as a recursive function:
M axf ind(C, Lm ), where C is a set of data elements (processors). Initially, each
processor holds one alive data element and sets an initial linked list Lm = hx0 i,
where x0 = .
Algorithm Maximum-Finding: M axf ind(C, Lm )
Step 1: Each alive data element in C broadcasts its value. Note that a data
element is alive if its value is greater than the head of Lm . Each element
smaller than or equal to the head drops out (becomes dead).

A Fast Sorting Algorithm and Its Generalization

255

Step 2: There are three possible cases:


Case 2a If a broadcast conflict occurs, then do the following.
Step 2a.1: Each alive data element in C flips a coin. All which get heads
form C 0 and bring themselves to the upper layer, and the others form
C and stay on the current layer.
Step 2a.2: Perform Lm = M axf ind(C 0 , Lm ).
Step 2a.3: Perform Lm = M axf ind(C , Lm ).
Step 2a.4: Return Lm .
Case 2b: If exactly one data element successfully broadcasts its value y,
then return hLm , yi.
Case 2c: If no data element broadcasts, then return Lm . (C is empty or all
data elements of C are dead.)
In the above algorithm, we can get a sequence of successful broadcasts, which
is represented by the linked list Lm = hx0 , x1 , x2 , , xt1 , xt i, where xi1 < xi ,
1 i t and x0 = . Note that Lm is held by each processor and the
head xt is the maximum. A new upper layer is built up when the recursive
function M axf ind is called and the current layer is revisited after we return
from M axf ind. In Case 2c, there are two possible situations. One is that no
element goes up to the upper layer. The other is that no alive element remains
on the current layer after the current layer is revisited because all elements go
up to the upper layer, or some elements broadcast successfully on upper layers
and they kill all elements on the current layer.
Shiau and Yang [11] proved that the total number of time slots, including
conflict slots, empty slots and slots for successful broadcasts, is Mn in average,
where 4 ln n 4 < Mn < 5 ln n + 52 . Grabner et al. [3] gave a precise asymptotic
2
formula that Mn ( 3 ln 2 ) ln n (4.74627644 . . . ) ln n.
Here we use the lemma
4
n

Mn Mn1

5
n,

which was proved by Yang et al. [11], rather than the precise asymptotic formula
2
Mn ( 3ln 2 ) ln n (4.74627644 . . . ) ln n. This is done because it is hard to apply
the precise asymptotic formula and its fluctuation into the proof directly.

The Sorting Algorithm

In our sorting algorithm, each processor holds one data element initially. The
key point of our algorithm is to use successful broadcasts which occur within the
progress of maximum finding to build broadcasting layers and then to distribute
the data elements into those layers properly.
When a series of successful broadcasts occur within the progress of maximum
finding, some correspondent layers are built up. All processors which participated
in the maximum finding are divided into those layers. Each layer performs the
sorting algorithm until the layer is empty or contains exactly one data element.

256

Shyue-Horng Shiau and Chang-Biau Yang

Our algorithm can be represented as a recursive function: Sorting(M ), where


M is a set of data elements (processors). In the algorithm, each processor holds
one data element and maintains a linked list Ls . Our sorting algorithm is as
follows:
Algorithm Sorting: Sorting(M )
Step 1: Each data element in M broadcasts its value.
Step 2: There are three possible cases:
Case 2a: If exactly one data element successfully broadcasts its value y,
then return hyi.
Case 2b: If no data element broadcasts, then return N U LL.
Case 2c: If a broadcast conflict occurs, then perform
Lm = M axf ind(M, hx0 i), where Lm = hx0 , x1 , x2 , , xt1 , xt i is a
series of successful broadcasts and xi1 < xi , 1 i t and x0 = .
Step 2c.1: Set Ls = N U LL.
Step 2c.2: For i = t down to 1
Set Ls = hxi , Ls i.
do Ls = hSorting(Mi ), Ls i,
where Mi = {x|xi1 < x < xi }.
Step 2c.3: Return Ls .
In the above algorithm, x1 is the element of the first successful broadcast,
and xt is the element of the last successful broadcast and also the largest element
in M .
For example, suppose that M has 2 data elements {1, 2}. We can get a
series of successful broadcasts Lm after M axf ind(M, hx0 i) is performed. The
first successful broadcast may be one of the two elements randomly, each case
having probability 12 . If the first successful broadcast is 2, then Lm = hx0 , 2i,
and the final sorted linked list is hx0 , Sorting(M1 ), 2i, where M1 = {x|x0 < x <
x1 } = {x| < x < 2} = {1}. If the first successful broadcast is 1, then Lm =
hx0 , 1, 2i, and the final sorted linked list is hx0 , Sorting(M1 ), 1, Sorting(M2 ), 2i
, where M1 = {x|x0 < x < x1 } = {x| < x < 1} = N U LL, M2 = {x|x1 <
x < x2 } = {x|1 < x < 2} = N U LL.
Martel et al. [8] showed the sorting problem can be solved in O(n). They also
proved that the expected time for finding first k largest numbers is O(k + log n).
However, the constants associated with O(n) and O(k + log n) bounds proved
by Martel et al. [8] are not very tight.
On the high level view, our sorting algorithm has a similar approach as that
proposed by Martel et al. [8]. On the low level view, our algorithm is based on
the layer concept, thus it can be analyzed easily and a tighter bound can be
obtained. And the analysis can be applied to other sorting algorithms which
have the same high level approach under BCM.

Analysis of the Sorting Algorithm

In this section, we shall prove that the average time complexity of our sorting
algorithm is (n), where n is the number of input data elements. Suppose that

A Fast Sorting Algorithm and Its Generalization

257

there are n data elements held by at least n processors in which each processor
holds at most one data element. Let Tn denote the average number of time slots,
including conflict slots, empty slots and slots for successful broadcasts, required
when the algorithm is executed. When there is zero or one input data element
for the algorithm, one empty slot or one slot for successful broadcast is needed.
Thus T0 = 1 and T1 = 1.
If n = 2, we have the following recursive formula:
 1

[
T1 ]
2
.
(1)
T2 = M2 + R2 , where R2 =
+ 12 [T0 +T0 ]
We shall explain the above two equations. In the first equation, the first
term M2 is the average number of time slots required for the maximum finding
algorithm while n = 2. The second term R2 is the average number of time slots
required for finishing the sorting after the maximum finding ends.
In the equation for R2 , the first successful broadcast may be either one of the
2 elements randomly, each case having probability 12 . The subterm of first term,
T1 , arises when the first successful broadcast is the largest element. Thus, the
layer between x0 = and the largest element contains one element, which is
the second largest element, and needs T1 time slots.
In second term, the subterm, [T0 + T0 ], arises when the first successful broadcast is the second largest element and the second successful broadcast is the
largest element. Thus, the layers between x0 = , the second and the largest
element are both empty and needs T0 time slots in both layers.
Shiau and Yang [11] have proved that M2 = 5, then we have
1
13
1
.
T2 = 5 + { [1] + [1 + 1]} =
2
2
2
If n = 3, we also have the following recursive formula:

1
T2 ]
3[
T3 = M3 + R3 , where R3 = + 13 [T0 +T1 ] .

1
+ 3 [R2 +T0 ]

(2)

In the equation for R3 , the first successful broadcast may be any one of the
3 elements randomly, each case having probability 13 . The subterm of first term,
T2 , arises when the first successful broadcast is the largest element. Thus, the
layer between x0 = and the largest element contains two elements, which is
the second and third largest element, and needs T2 time slots for sorting.
In the second term, the subterm, [T0 + T1 ], arises when the first successful
broadcast is the second largest element and the second successful broadcast is
the largest element. Thus, the layer between the second and the largest element
is empty and needs T0 time slots. And the layer between x0 = and the
second largest element contains one element and needs T1 time slots.
In third term, the subterm, [R2 +T0 ], arises when the first successful broadcast
is the third largest element. Thus, after the first successful broadcast, there are
two possible successful broadcast sequences, each having probability 12 . The first

258

Shyue-Horng Shiau and Chang-Biau Yang

case is that the second successful broadcast is the largest data element. Thus, the
layer between the first two successful broadcasts contains only one data element
which is the second largest data element. The second case is that the second successful broadcast is the second largest data element, and the largest data element
will be broadcast in the third successful broadcast. Thus, the layers between the
first, second and third successful broadcasts, are both empty. Comparing with
R2 in Eq.(1), we can find that the above two cases are equivalent to those in R2 .
Thus, R2 represents the number of time slots required for the layers bounded by
the sequence of successful broadcasts Lm in finding the maximum. Note that the
time slots required for Lm is counted in M3 . Finally, the layer between x0 =
and the third largest element is empty and needs T0 time slots.
Generalizing Eq.(2), we have
1

n[

n [T0

+ n1 [R2
Tn = Mn + Rn , where Rn = +

+ n1 [Rk1

1
+ n [ Rn1

Tn1 ]

+Tn2 ]

+Tn3 ]

+Tnk ]

+T0 ]

(3)

In the above equations, Mn represents the average number of time slots


required for finding the maximum among n data elements, and Rn represents
the average number of time slots required for finishing sorting after the maximum
is found.
In the equation for Rn , the first successful broadcast may be any one of
the n elements randomly, each case having probability n1 . The subterm Tn1 of
the second term arises when the first successful broadcast is the largest element.
Thus, the layer between x0 = and the largest element contains n1 elements
and needs Tn1 time slots for sorting.
In the second term, the subterm, T0 + Tn2 , arises when the first successful
broadcast is the second largest element and the second successful broadcast is
the largest element. Thus, the layer between the second and the largest element
is empty and needs T0 time slots. And the layer between x0 = and the
second largest element contains n 2 elements and needs Tn2 time slots for
sorting.
In the kth term, the subterm, Rk1 + Tnk , arises when the first successful
broadcast is the kth largest element. Thus, Rk1 is the number of time slots
required for finishing the sorting on the k 1 elements after the maximum
is found. And the layer between x0 = and the first successful broadcast
element contains n k data elements and needs Tnk time slots for sorting n k
data elements.

A Fast Sorting Algorithm and Its Generalization

Substituting Rk = Tk Mk , 2 k n 1 into Eq.(3), we have

1
[
Tn1 ]

+Tn2 ]
+ n1 [T0

+Tn3 ]

+ n [(T2 M2 )
.
Tn = Mn + +

[(T

M
)
+T
]
+

k1
k1
nk
n

1
+ n [(Tn1 Mn1 ) +T0 ]

259

(4)

Lemma 1.
X
1
1
1
Tn T2 =
(Mk Mk1 ).
n+1
3
k+1
3kn

Lemma 2.
X
1
1
1
1
1
)
(Mk Mk1 ) 5(
).
4(
3 n+1
k+1
3 n+1
3kn

Theorem 1.
1
7
23
7
n Tn
n .
2
2
6
6

Analysis of the Generalization

Tn in Eq.(4) can be regarded as Tnn . Therefore generalizing Eq.(4), we obtain

n1
[
Tk1
]

n2

+Tk2
]
+ [T00

n3
2

+Tk3 ]
+ [(T2 M2 )

n(k2)
k3
1

M
)
+T
]
+
[(T
k3
2
k3
.
Tkn = Mn +
n(k1)
k2
n
Mk2 ) +T1
]
+ [(Tk2

k1

Mk1 ) +0]
+ [(Tk1

M
)
+0]
+
[(T
k
k

n1
Mn1 ) +0]
+ [(Tk
In the above equations, the first term, Mn , is the average number of time
slots required for the maximum finding algorithm on n data elements.
The second term, n1 , is one of the cases that each data element in Mn successfully broadcasts its value. Then, the first successful broadcast may be one of
the n elements randomly, each case having probability n1 .

260

Shyue-Horng Shiau and Chang-Biau Yang

 n1 
The third term Tk1
is that the first successful broadcast is the largest
data element in the progress of the maximum finding algorithm. Since we have
the largest data element, we need to find the k 1 largest data elements among
n1
.
the n 1 data elements, which is presented by Tk1

 0
n2
The fourth term T0 + Tk2 is that the first successful broadcast is the
second largest data element. Obviously the second successful broadcast is the
largest data element. T00 represents a N U LL layer because it is empty between
n2
represents
the largest and second largest data elements. And the subterm Tk2
that we need to find the k 2 largest data elements among n 2 data elements
after the largest and second
broadcasting.

 k1largest data elements
Mk1 ) + 0 is that the first successful broadcast
The (k +3)th term (Tk1
k1
Mk1 ) is the number of time slots
is the kth largest data element. Thus, (Tk1
required for finishing the sorting on the k 1 elements after the maximum is
found. And since the first k, k 1, largest elements was found in the layers
upper than the first successful broadcast element, thus it dose not need any time
slots for sorting data elements in the lower layer.
We omit the explanation of the rest of the equation, since it is quite similar
to the above cases.
Lemma 3. Let Ln = Mn Mn1 , then
Tkn Tkn1 = Ln +

1
1
1
Ln1 +
Ln2 + +
Ln(k1) .
n
n1
n (k 2)

Lemma 4.
Tkk + 4 [ln (n (k 2)) ln 2] Tkn Tkk + 5 ln (n (k 1)) .
Theorem 2.
7
k + 4 ln (n (k 2))
2

1
+ 4 ln 2
2

Tkn

7
23
k + 5 ln (n (k 1)) .
6
6

Martel et al. [8] showed that the expected time for finding the first k largest
numbers is O(k + log n). However, the constants associated with O(k + log n)
bounds proved by Martel et al. [8] are not very tight. And they did not point out
the relationship between the two special cases maximum finding and sorting.
By Theorem 2, we prove that the average time complexity of finding the first
k numbers is (k + log (n k)). And the connection between the two special
cases, maximum finding and sorting, is built by the analysis of our generalization.

Conclusion

The layer concept [13] can help us to reduce conflict resolution when an algorithm
is not conflict-free under BCM. In this paper, we apply the layer concept to solve

A Fast Sorting Algorithm and Its Generalization

261

the sorting problem and get a tighter bound. The total average number of time
slots, including conflict slots, empty slots and slots for successful broadcasts, is
(n). And the generalization of our sorting algorithm can be analyzed that the
average time complexity for selecting k largest numbers is (k + log (n k)).
On the high level view, our sorting algorithm has a similar approach as that
proposed by Martel et al. [8]. On the low level view, our algorithm is based on
the layer concept, thus it can be analyzed easily and a tighter bound can be
obtained.
We are interested in finding other maximum finding algorithms which can be
applied into our sorting approach and can get better performance. That is one
of our future works. And the other future work is to find the native bound of
the sorting approach under BCM.

References
1. Capetanakis, J.I.: Tree algorithms for packet broadcast channels. IEEE Transactions on Information Theory, 25(5) (May 1997) 505515
2. Dechter, R., Kleinrock, L.: Broadcast communications and distributed algorithms.
IEEE Transactions on Computers, 35(3) (Mar. 1986) 210219
3. Grabner, P.J., Prodinger, H.: An asymptotic study of a recursion occurring in
the analysis of an algorithm on broadcast communication. Information Processing
Letters, 65 (1998) 8993
4. Huang, J.H., Kleinrock, L.: Distributed selectsort sorting algorithm on broadcast
communication. Parallel Computing, 16 (1990) 183190
5. Levitan, S.: Algorithms for broadcast protocol multiprocessor. Proc. of 3rd International Conference on Distributed Computing Systems, (1982) 666671
6. Levitan, S.P., Foster C.C.: Finding an extremum in a network. Proc. of 1982 International Symposium on Computer Architechure, (1982) 321325
7. Martel, C.U.: Maximum finding on a multi access broadcast network. Information
Processing Letters, 52 (1994) 713
8. Martel, C.U., Moh, M.: Optimal prioritized conflict resolution on a multiple access
channel. IEEE Transactions on Computers, 40(10) (Oct. 1991) 11021108
9. Martel, C.U., Moh W.M., Moh T.S.: Dynamic prioritized conflict resolution on multiple access broadcast networks. IEEE Transactions on Computers, 45(9) (1996)
10741079
10. Ramarao, K.V.S.: Distributed sorting on local area network. IEEE Transactions
on Computers, C-37(2) (Feb. 1988) 239243
11. Shiau, S.H., Yang, C.B.: A fast maximum finding algorithm on broadcast communication. Information Processing Letters, 60 (1996) 8196
12. Shiau, S.H., Yang, C.B.: The layer concept and conflicts on broadcast communication. Journal of Chang Jung Christian University, 2(1) (June 1998) 3746
13. Yang, C.B.: Reducing conflict resolution time for solving graph problems in broadcast communications. Information Processing Letters, 40 (1991) 295302
14. Yang, C.B.,Lee, R.C.T., Chen, W.T.: Parallel graph algorithms based upon broadcast communications. IEEE Transactions on Computers, 39(12) (Dec. 1990) 1468
1472
15. Yang, C.B., Lee, R.C.T., Chen, W.T.: Conflict-free sorting algorithm broadcast
under single-channel and multi-channel broadcast communication models. Proc. of
International Conference on Computing and Information, (1991) 350359

Efficient List Ranking Algorithms on


Reconfigurable Mesh?
Sung-Ryul Kim and Kunsoo Park
School of Computer Science and Engineering,
Seoul National University,
Seoul 151-742, Korea
{kimsr, kpark}@theory.snu.ac.kr

Abstract. List ranking is one of the fundamental techniques in parallel


algorithm design. Hayashi, Nakano, and Olariu proposed a deterministic
list ranking algorithm that runs in O(log n) time and a randomized one
that runs in O(1) expected time, both on a reconfigurable mesh of size
nn. In this paper we show that the same deterministic and randomized
time complexities can be achieved using only O(n1+ ) processors, where 
is an arbitrary positive constant < 1. To reduce the number of processors,
we adopt a reconfigurable mesh of high dimensions and develop a new
technique called path embedding.

Introduction

The reconfigurable mesh [11] or RMESH combines the advantages of the mesh
with the power and flexibility of a dynamically reconfigurable bus structure.
Recently, efficient algorithms for the RMESH have been developed for graph
problems [2,3,15,12], image problems [8,12], geometric problems [6,11,12], and
some other fundamental problems in computer science [2,4,7,?].
The problem of list ranking is to determine the rank of every node in a given
linked list of n nodes. The rank of a node is defined to be the number of nodes
following it in the list. In weighted list ranking every node of a linked list has
a weight. The problem of weighted list ranking is to compute, for every node
in the list, the sum of weights of the nodes following it in the list. Since the
unweighted version is a special case of the weighted version of the list ranking
problem, we will solve the weighted version.
The list ranking problem has been studied on RMESH. On an RMESH of
size n n, an O(log n) time algorithm for the list ranking problem using a
technique called pointer jumping [16] is implicit in [11,14]. Using a complicated
algorithm, Olariu,
Schwing, and Jhang [14] showed that the problem can be


log n
time on an RMESH of size mn n where m n. Hayashi,
solved in O log
m
Nakano, and Olariu proposed a deterministic list ranking algorithm [5] running in
O(log n) time and a randomized one running in O(1) time, both on an RMESH
of size n n.
?

This work was supported by the Brain Korea 21 Project.

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 262271, 2000.
c Springer-Verlag Berlin Heidelberg 2000

Efficient List Ranking Algorithms on Reconfigurable Mesh

263

In this paper we generalize the result in [5] to d-dimensional RMESH for


d 3. As a result, we show that the same deterministic and randomized time
complexities as in [5] can be achieved using only O(n1+ ) processors, where
0 <  < 1. In [5], a technique called bus embedding is used. Bus embedding
is easy on a 2-dimensional RMESH but it does not seem to be easy on a ddimensional RMESH for d 3. We develop a new technique, which we call path
embedding, that can be used to implement the bus embedding on an RMESH of
high dimensions.

RMESH

An RMESH of size n n consists of an n n array of processors arranged


as a 2-D grid and connected by a reconfigurable bus system. See Fig. 1 for an
example. Processors of the n n array are denoted by Pi,j , 1 i, j n. Each
processor has four ports, denoted by N, S, E, and W. Ports E and W are built
along dimension x and ports N and S are built along dimension y. Through these
ports processors are connected to the reconfigurable bus.
x

y 1
Processor
2
Switch
3

Reconfigurable
Bus

Fig. 1. The RMESH architecture


Different configurations of the reconfigurable bus system can be established
by setting different local connections among ports within each processor. For
example, if each processor connects E and W (N and S) ports together, row
buses (column buses) are established. In a bus configuration, maximal connected
components of the configuration are called subbuses of the configuration.
In one time step a processor may perform a single operation on words of size
O(log n), set any of its switches, or write data to or read data from the subbus.
We assume that in each subbus at most one processor is allowed to write to the
subbus at one time. As in [9,10,11], we assume that data placed on a subbus
reaches all processors connected to the subbus in unit time.
We assume that each processor knows its row and column indices. In addition,
we also want processors to know their ranks in some total ordering on the mesh.
Of the widely used orderings we describe the row-major ordering and the snakelike ordering. In the row-major ordering, we number processors left to right in

264

Sung-Ryul Kim and Kunsoo Park


x
z

2
6

3
5

7
18

4
8

17

9
16
N

13

14
12

19

15
11

20
24

W
10

E
D

21
23

25

22
26

27

Fig. 2. A 3 3 3 RMESH indexed in the snake-like ordering


each row, beginning with the top row and ending with the bottom row. In the
snake-like ordering, we simply reverse every other row, so that processors with
consecutive indices are adjacent. We can assume that a processor initially knows
its positions in the row-major ordering and the snake-like ordering because they
can be computed from its indices in constant time.
Reconfigurable meshes of high dimensions can be constructed in a similar
way. For example, in a 3-D RMESH, processors are denoted by Pi,j,k and each
processor has six ports, denoted by U, D, N, S, E, and W, where the new ports
U and D are built along dimension z. Also, the row-major and the snake-like
orderings can be generalized to high dimensions. An example 3 3 3 RMESH
indexed in the snake-like ordering is shown in Fig. 2.
In our algorithms we will make use of the algorithm in [1] that sorts n elements in constant time on an RMESH of size n1+ where  is an arbitrary positive
constant less than or equal to 1. Also in our algorithms we will solve the following version of the packing problem: Given an n-element set X = {x1 , x2 , . . . , xn }
and a collection of predicates P1 , P2 , . . . , Pm , where each xi satisfies exactly one
of the predicates and the predicate that each xi satisfies is already known, permute the elements of X in such way that for every 1 j m the elements of
X satisfying Pj occur consecutively. It is clear that this version of the packing
problem is easier than sorting and can be solved using the sorting algorithm.

Previous Algorithms

In this section we describe the deterministic and randomized algorithms by


Hayashi, Nakano, and Olariu [5]. Later, we will use these algorithms as subroutines, so we describe only the parts of the algorithms relevant to this paper.
In [5], the input list L is given by the pairs (i, l(i)) at P1,i , 1 i n, where
l(i) is the node following node i in L. The pair (t, t) is given for the last node
t in L. In the weighted list ranking problem the weight wi associated with each

Efficient List Ranking Algorithms on Reconfigurable Mesh


2

265

Fig. 3. An example bus embedding


node i is also given to P1,i . For a given linked list L = {(i, l(i)) : 1 i n},
the corresponding bus configuration can be obtained by assigning node i to the
diagonal processor Pi,i . See Fig. 3. The fact that l(i) follows i in the list is
captured by a subbus connecting Pi,i and Pl(i),l(i) . The subbus is formed by
connecting Pi,i and Pi,l(i) by a row bus and then connecting Pi,l(i) and Pl(i),l(i)
by a column bus. The bus configuration formed in this way is called the bus
embedding of L. A bus embedding for L can be easily formed with two parallel
broadcast steps.
Consider a subset S of L. The S-shortcut of L is the linked list obtained from
L by retaining the nodes in S only. Specifically, an ordered pair (p, q) belongs to
the S-shortcut if both p and q belong to S and no nodes of L between p and q
belong to S. If (p, q) belongs to the S-shortcut, the q-sublist is the sublist of L
starting at l(p) and ending at q. A subset S of L is called a good ruling set if it
satisfies the following conditions:
1. S includes the last node of L,
2. S contains at most n2/3 nodes, and
3. No p-sublist for p S contains more than n1/2 nodes.
It is shown in [5] that if a good ruling set of L is available, then the list ranking
problem can be solved in constant time. Next, we describe how a good ruling
set can be obtained.
3.1

The Deterministic Good Ruling Set Algorithm

In [5], an algorithm for ranking an n-node list on an RMESH of size 2n 2n is


given and the constant factor in the number of processors can be removed by
reducing the input size using pointer jumping. For convenience, we will describe
the algorithm on an RMESH of size 2n 2n. The algorithm consists of O(log n)

266

Sung-Ryul Kim and Kunsoo Park

stages and each stage obtains a smaller shortcut using the shortcut of the previous stage. If we allocate k k processors for each node in the list, we can have
k parallel buses between two nodes (which are called a bundle of k buses). The
idea is that as the shortcuts get smaller, larger bundles of buses are available.
And when a larger bundle is available, a much smaller shortcut can be obtained
in the next stage. Initially, a bundle consisting of 2 buses are available.
We need a few definitions here. A k-sample of a linked list L is a set of nodes
obtained by retaining every
k-th
node in L, that is, nodes whose unweighted


k.
Let
L/k denote the shortcut consisting of a
ranks are 0, k, 2k, . . ., n1
k
k-sample.
linked list

bus configuration

Fig. 4. Illustrating the concept of bundle of buses with cyclic shift


We describe how L/k can be obtained from L using a bundle of k buses.
Assume that a bundle of k buses are available. See Fig. 4 for a conceptual
description. The k buses are shifted cyclically as the buses pass each node, as
illustrated in Fig. 4. If a signal is sent from the topmost bus in the last node
of L, the signal passes through the topmost bus of every k-th subsequent node.
The desired k-sample consists of such nodes.
Assume that a bundle of k buses is available for each node in a sublist. We
use the following parallel prefix remainder technique. Let p1 (= 2), p2 (= 3), p3 (=
5), . . . , pq be the first q prime numbers such that p1 + p2 + + pq k <
p1 +p2 + +pq +pq+1 . Since k buses are available, we can form q separate bundles
of p1 , p2 , . . . , and pq buses. Hence, for a list L, q linked lists L/p1 , L/p2 , . . . , L/pq
can be computed in constant time. Having done that, we retain in the sample
only the nodes common to all the q linked lists L/p1 , L/p2, . . . , L/pq . In other
words, we select node p only if its rank r(p) in L satisfies:
r(p) mod p1 = r(p) mod p2 = = r(p) mod pq = 0.
For such node p, r(p) mod p1 p2 pq = 0. Hence, using the bundle of k buses,
we can obtain L/(p1 p2 pq ) from L in constant time, where p1 + p2 + + pq
k < p1 + p2 + + pq + pq+1 .

Now, [5] estimates that p1 p2 pq = 2(

k log k)

. Let K(t) be
an integer such

that L/K(t) is computed in the t-th iteration. Then K(t+2) = 2(

K(t+1) log(k+1))

Efficient List Ranking Algorithms on Reconfigurable Mesh

> 2(K(t)) and K(1) = 2 holds. Since K(t)


iterations is bounded by O(log n).
3.2

267

n is sufficient, the number of

The Randomized Good Ruling Set Algorithm

The randomized good ruling set algorithm in [5] is the following.


Step 1. Each Pi,i randomly selects node i as a sample in S with probability
n5/12 .
Step 2. Check whether S is a good ruling set. If S is a good ruling set, the
algorithm terminates; otherwise repeat Step 1.
It is easy to see that Step 2 of the algorithm can be implemented to work in
constant time using the bus embedding and packing. It is proven in [5] that the
expected number of selections before the algorithm terminates is O(1).

Reducing the Number of Processors

In this section we show how we can reduce the number of processors to O(n1+ )
by adopting an RMESH of high dimensions. First, fix a constant d, which is a
natural number larger than 1. We will implement the deterministic and randomized algorithms on a (d+1)-dimensional RMESH of size cn1/d cn1/d cn1/d
for some constant c, which consists of cd+1 n1+1/d processors.
We first enhance each processor in RMESH so that there are C ports in
each direction where C is a constant. We will call a processor enhanced in such
a way a superprocessor. For example, in 2-D, a processor has C ports in each
direction named E(1), E(2), . . . , E(C), W (1), . . . , S(C). It should be noted that
this is not a drastic diversion from the definition of RMESH since a constant
number of regular processors can simulate a superprocessor if C is a constant. We
will call an RMESH consisting of superprocessors a super-RMESH. We denote
by SPi,j,...,k the superprocessor at location (i, j, . . . , k) in a super-RMESH. Also,
we denote by SP (i) the superprocessor whose index is i in the snake-like ordering
in a super-RMESH.
We assume that the input is given in the first n superprocessors, indexed in
the snake-like ordering, of a super-RMESH of size n1/d n1/d n1/d , which
can be simulated by an RMESH of size cn1/d cn1/d cn1/d for some
constant c.
Given a list L, a subset S of L is a d-good ruling set of L if
1. S includes the last node of L,
2. S contains at most n3/2d nodes, and
3. no p-sublist for p S contains more than 2(d1)/d nodes.
Each of our two algorithms consists of two parts. In the first part, we obtain
the d-good ruling set of L using the bus embedding. In the second part, we rank
L recursively, using the d-good ruling set obtained in the first part. We will
describe the second part first.

268

Sung-Ryul Kim and Kunsoo Park

To use recursion in the second part, we extend the list ranking problem
slightly so that a number of lists L1 , L2 , . . . , Lm are to be individually ranked,
where the total number of nodes do not exceed n. On RMESH, the nodes are
given one node per processor in processors P (1) through P (n) so that the nodes
in each list appear consecutively in the snake-like ordering with the boundaries
between the lists marked.
We assume, for simplicity, that exactly n nodes are given in the extended
list ranking problem. Let sj and tj be the first and the last node in each Lj ,
respectively. To reduce the problem to normal list ranking, we connect tj with
sj+1 for each 1 j < m. Then we rank the resulting list by a normal list ranking
algorithm. To obtain ranks in each list, we subtract the rank of tj from the rank
of each node in Lj . The details are omitted.
4.1

The Second Part

Since the second parts of the deterministic and the randomized algorithms are
analogous, we describe the second part of the deterministic algorithm only.
Assume we have a shortcut S of L. We first show that if we can rank all
p-sublists for p S in time T and rank the shortcut S in time T 0 , then we can
rank L in time T + T 0 + D, where D is a constant independent of L. First, rank
the p-sublists for p S in time T . Let sp be the first node in a p-sublist. Let
rp (sp ) be the weighted rank of sp in the p-sublist and let Wp be rp (sp ) + w,
where w is the weight of sp . Rank S using Wp as the weight of p in S. Let Rp
be the computed rank of p. Now, use packing to move the nodes in a sublist to
adjacent superprocessors and broadcast Rp among the superprocessors holding
the nodes in the p-sublist. Now, the rank of node i in the p-sublist is rp (i) + Rp ,
where rp (i) is the rank of node i in the p-sublist.
Assume that d = 2. We have n nodes on a super-RMESH of size n1/2
n1/2 n1/2 . Assume that we have obtained a 2-good ruling set S in the first
part. Now, S contains at most n3/4 nodes and each p-sublist for p S contains
at most n1/2 nodes. All the p-sublists can be ranked simultaneously in O(log n)
time by distributing the sublists to n1/2 submeshes of size n1/2 n1/2 using the
deterministic algorithm in [5].
All we have to do now is to rank S. We apply the d-good ruling set algorithm
to S and obtain a 2-good ruling set S 0 of S. Now, the p0 -sublists for p0 S 0
can be ranked as before using the deterministic algorithm in [5]. S 0 contains at
most n9/16 nodes. To rank S 0 , we apply the d-good ruling set algorithm once
again to S 0 and obtain a 2-good ruling set S 00 of S 0 . Now, S 00 contains at most
n27/64 < n1/2 nodes and S 00 and the sublists of S 0 and S 00 can be ranked using
the deterministic algorithm in [5]. The time for the second part is O(log n).
Assume that d > 2. Assume that we have obtained the d-good ruling set
S in the first part. Each p-sublist for p S contains at most n(d1)/d nodes
and hence all the sublists can be recursively ranked simultaneously in O(log n)
time by distributing the sublists to a d-dimensional super-RMESH of size n1/d
n1/d n1/d . Also, S has at most n3/2d < n(d1)/d nodes and can be ranked
recursively. The time for the second part is O(log n).

Efficient List Ranking Algorithms on Reconfigurable Mesh

4.2

269

Bus Embedding

The main difficulty in generalizing the list ranking algorithms is that the bus
embedding itself is not easy in high dimensions. To construct a bus embedding,
we develop a new technique called path embedding, which can be used along
with any data movement algorithm. By a data movement algorithm we mean
an algorithm where a data item is treated as one object and nothing is assumed
about its internal representation. The number of processors increases slightly
with path embedding but the technique introduces only constant factor in the
number of processors if the data movement algorithm works in constant time.
Algorithm Path-Embed
Stage 1. Let C be the number of steps of the data movement algorithm.
Run the data movement algorithm while using the j-th ports in each direction of a superprocessor in the j-th step of the data movement algorithm.
Each superprocessor retains the bus configuration and remembers every bus
operation it performs.
Stage 2. If a superprocessor read an item in the j-th step and wrote the
item in the k-th step, j < k, the superprocessor connects its X(j) and Y (k)
ports together, where X(j) is the direction it read the node in the j-th step
and Y (k) is the direction it wrote the node in the k-th step. Repeat for all
possible values of j and k.
Now we can implement the bus embedding in constant time as follows. We
assume that there are C ports in each direction of a superprocessor, where C is
the number of steps of the sorting algorithm.
Algorithm Embed
Step 1. Identify the first node in the list by sorting the nodes (i, l(i)) by
l(i) and checking for the unique integer between 1 and n that is not present
among the l(i)s. Let (s, l(s)) be the first node.
Step 2. Temporarily replace the last node (t, t) by (t, s), that is l(t) = s.
Run algorithm Path-Embed with the sorting algorithm that sorts the nodes
(i, l(i)) by l(i) (into the snake-like ordering).
Step 3. For each i that is not the first or the last node in the list, SP (i)
connects its X(1) port and Y (C) port, where X(1) is the direction where it
wrote its node, (i, l(i)), in the first step of the sort and Y (C) is the direction
it read i in the final step of the sort.

4.3

The Deterministic d-Good Ruling Set Algorithm

In this subsection, we assume that n nodes are given on a (d + 1)-dimensional


super-RMESH of size (2n)1/d (2n)1/d (2n)1/d . We first show that we

270

Sung-Ryul Kim and Kunsoo Park


SPE( ki-k +1)

SPE( ki-k +2)


F

X(1)

SPE( ki)

F B

Y(C)

X(1)

Y(C)

X(1)

Y(C)

Fig. 5. Implementing the cyclic shift modulo k with superprocessors


can obtain a d-good ruling set in O(log n) time on a (d + 1)-dimensional superRMESH of size (2n)1/d (2n)1/d (2n)1/d . First we use sorting to allocate
two superprocessors SP (2i 1) and SP (2i) for each node i.
Assume that we have k superprocessors SP (ki k + 1) through SP (ki)
allocated for each node (initially k = 2). SP (ki) will be called the topmost
superprocessor for node i. Now, a bundle of k buses and a cyclic shift modulo
k can be constructed by modifying Algorithm Embed. To implement the cyclic
shift modulo k we add four more ports F, F 0 , B, and B 0 to each superprocessor
such that for SP (i), F and F 0 connects SP (i) with SP (i + 1) and B and B 0
connects SP (i) with SP (i 1). See Fig. 5 for an illustration of the cyclic shift.
Now we can implement the parallel prefix remainder technique described in
section 3 using the cyclic shift. We can obtain a d-good ruling set in O(log n)
time on a (d + 1)-dimensional super-RMESH of size (2n)1/d (2n)1/d
(2n)1/d .
Theorem 1. A d-good ruling set can be computed in O(log n) time on a (d+1)dimensional super-RMESH of size (2n)1/d (2n)1/d (2n)1/d , where d is
a constant.
Theorem 2. The list ranking can be performed in O(log n) time on a (d + 1)dimensional RMESH of size cn1/d cn1/d cn1/d , where c and d are
constants.
4.4

The Randomized d-Good Ruling Set Algorithm

Our randomized d-good ruling set algorithm on a (d + 1)-dimensional superRMESH is the following. Note that Step 2 can be performed in constant time
using the bus embedding and packing.
Step 1. Each SP (i) randomly selects node i as a sample in S with probability
n(54d)/4d .
Step 2. Check whether S is a d-good ruling set. If S is a d-good ruling set,
the algorithm terminates; otherwise repeat Step 1.
The proofs of the following theorems are omitted.

Efficient List Ranking Algorithms on Reconfigurable Mesh

271

Theorem 3. A d-good ruling set can be computed in constant expected time on


a (d + 1)-dimensional super-RMESH of size n1/d n1/d n1/d , where d is
a constant.
Theorem 4. The list ranking can be performed in constant expected time on a
(d + 1)-dimensional RMESH of size cn1/d cn1/d cn1/d , where c and d
are constants.

References
1. Chen, Y. C. and Chen, W. T.: Constant Time Sorting on Reconfigurable Meshes.
IEEE Transactions on Computers. Vol. 43, No. 6 (1994) 749751
2. Chen, G. H. and Wang, B. F.: Sorting and Computing Convex Hull on Processor
Arrays with Reconfigurable Bus System. Information Science. 72 (1993) 191206
3. Chen, G. H., Wang, B. F., and Lu, C. J.: On Parallel Computation of the Algebraic
Path Problem. IEEE Transactions on Parallel and Distributed Systems. Vol. 3, No.
2, Mar. (1992) 251256
4. Hao, E., MacKenzie, P. D., and Stout, Q. F.: Selection on the Reconfigurable Mesh.
Proc. of fourth Symposium on the Frontiers of Massively Parallel Computation.
(1992) 3845
5. Hayashi, T., Nakano, K., and Olariu, S.: Efficient List Ranking on the Reconfigurable Mesh, with Applications. Proc. of 7th International Simposium on Algorithms and Computation, ISAAC96. (1996) 326-335
6. Jang, J. and Prasanna, V. K.: Efficient Parallel Algorithms for Geometric Problems
on Reconfigurable Mesh. Proc. of International Conference on Parallel Processing.
3 (1992) 127130
7. Jang, J. and Prasanna, V. K.: An Optimal Sorting Algorithm on Reconfigurable
Mesh. International Parallel Processing Symposium. (1992) 130137
8. Jenq, J. F. and Sahni, S.: Reconfigurable Mesh Algorithms for the Hough Transform. Proc. of International Conference on Parallel Processing. 3 (1991) 3441
9. Li, H. and Maresca, M.: Polymorphic-torus Network. IEEE Transactions on Computers. 38 (1989) 13451351
10. Maresca, M.: Polymorphic Processor Arrays. IEEE Transactions on Parallel and
Distributed Systems. 4 (1993) 490506
11. Miller, R., Prasanna Kumar, V. K., Reisis, D. I., and Stout, Q. F.: Parallel Computations on Reconfigurable Mesh. Technical Report # 229. USC, Mar. (1922)
12. Miller, R. and Stout, Q. F.: Efficient Parallel Convex Hull Algorithms. IEEE Transactions on Computer. Vol 37, No. 12, Dec. (1988) 16051618
13. Niven, I., Zuckerman, H. S., and Montgomery, H. L.: An Introduction to the Theory
of Numbers, Fifth Edition. (1991) John Wiley & Sons
14. Olariu, S., Schwing, J. L., and Jhang, J.: Fundamental Algorithms on Reconfigurable Meshes. Proc. of 29th Annual Allerton Conference on Communication, Control, and Computing. (1991) 811820
15. Wang, B. F. and Chen, G. H.: Constant Time Algorithms for the Transitive Closure
and Some Related Graph Problems on Processor Arrays with Reconfigurable Bus
System. IEEE Transactions on Parallel and Distributed Systems. Vol. 1, No. 4,
Oct. (1990) 500507
16. Wylie, J. C.: The Complexity of Parallel Computation. Doctoral Thesis, Cornell
University. (1979)

Tripods Do Not Pack Densely


Alexandre Tiskin
Department of Computer Science, University of Warwick,
Coventry CV4 7AL, United Kingdom
[email protected]

Abstract. In 1994, S. K. Stein and S. Szab


o posed a problem concerning
simple three-dimensional shapes, known as semicrosses, or tripods. By
definition, a tripod is formed by a corner and the three adjacent edges of
an integer cube. How densely can one fill the space with non-overlapping
tripods of a given size? In particular, is it possible to fill a constant
fraction of the space as the tripod size tends to infinity? In this paper,
we settle the second question in the negative: the fraction of the space
that can be filled with tripods of a growing size must be infinitely small.

Introduction

In [SS94, Ste95], S. K. Stein and S. Szab


o posed a problem concerning simple
three-dimensional polyominoes, called semicrosses in [SS94], and tripods in
[Ste95].
A tripod of size n is formed by a corner and the three adjacent edges of an
integer n n n cube (see Figure 1). How densely can one fill the space with
non-overlapping tripods of size n? In particular, is it possible to keep a constant
fraction of the space filled as n ? Despite their simple formulation, these
two questions appear to be yet unsolved.
In this paper, we settle the second question in the negative: the density of
tripod packing has to approach zero as tripod size tends to infinity. It is easy
to prove (see [SS94]) that this result implies similar results in dimensions higher
than three.
Instead of dealing with the problem of packing tripods in space directly, we
address an equivalent problem, also introduced in [SS94, Ste95]. In this alternative setting, tripods of size n are to be packed without overlap, so that their
corner cubes coincide with one of the unit cells of an n n n cube. We may
also assume that all tripods have the same orientation. If we denote by f (n)
the maximum number of non-overlapping tripods in such a packing, then the
maximum fraction of space that can be filled with arbitrary non-overlapping
tripods is proportional to f (n)/n2 (see [SS94] for a proof). The only known
values of function f are f (1) up to f (5): 1, 2, 5, 8, 11. It is easy to see that
os questions are concerned with the
for all n, n f (n) n2 . Stein and Szab
upper bound of this inequality. They can now be restated as follows: what is the
asymptotic behaviour of f (n)/n2 as n ? In particular, is f (n) = o(n2 ), or
is f (n) bounded away from 0?
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 272280, 2000.
c Springer-Verlag Berlin Heidelberg 2000

Tripods Do Not Pack Densely

273

Fig. 1. A tripod of size n = 4


In this paper we show that, in fact, f (n) = o(n2 ), so the fraction of the space
that can be filled with tripods of a growing size is infinitely small. Our proof
methods are taken from the domain of extremal graph theory. Our main tools are
two powerful, widely applicable graph-theoretic results: Szemeredis Regularity
Lemma, and the Blow-up Lemma.

Preliminaries

Throughout this paper we use the standard language of graph theory, slightly
adapted for our convenience. A graph G is defined by its set of nodes V (G),
and its set of edges E(G). All considered graphs are simple and undirected.
The size of a graph G is the number of its nodes |V (G)|; the edge count is the
number of its edges |E(G)|. A graph H is a subgraph of G, denoted H G, iff
V (H) V (G), E(H) E(G). Subgraph H G is a spanning subgraph of G,
denoted H v G, iff V (H) = V (G).
A complete graph on r nodes is denoted Kr . The term k-partite graph is
synonymous with k-coloured. We write bipartite for 2-partite, and tripartite
for 3-partite. Complete bipartite and tripartite graphs are denoted Krs and
Krst , where r, s, t are sizes of the colour classes. Graph K2 = K11 (short for K1,1 )
2 (an empty graph on two nodes) a
is a single edge; we call its complement K
nonedge. Graph K3 = K111 is called a triangle; graph K121 is called a diamond
(see Figure 2). We call a k-partite graph equi-k-partite, if all its colour classes
are of equal size.
The density of a graph is the ratio of its edge count to the edge count of a
complete graph of the same size: if G v Kn , then
 
n
.
dens(G) = |E(G)|/|E(Kn )| = |E(G)|/
2

274

Alexandre Tiskin
b

Fig. 2. The diamond graph K121


The bipartite density of a bipartite graph G v Kmn is
dens2 (G) = |E(G)|/|E(Kmn )| = |E(G)|/(mn).
Similarly, the tripartite density of a tripartite graph G v Kmnp is
dens3 (G) = |E(G)|/|E(Kmnp )| = |E(G)|/(mn + np + pm).
Let H be an arbitrary graph. Graph G is called H-covered, if every edge of
G belongs to a subgraph isomorphic to H. Graph G is called H-free, if G does
not contain any subgraph isomorphic to H. In particular, we will be interested
in triangle-covered diamond-free graphs.
Let us now establish an upper bound on the density of an equitripartite
diamond-free graph.
Lemma 1. The tripartite density of an equitripartite diamond-free graph G is
at most 3/4.
Proof. Denote |V (G)| = 3n. By Diracs generalisation of Turans theorem (see
e.g. [Gou88, p. 300]), we have |E(G)| (3n)2 /4. Since |E(Knnn )| = 3n2 , the
theorem follows trivially.
t
u
The upper bound of 3/4 given by Lemma 1 is not the best possible. However,
that bound will be sufficient to obtain the results of this paper. In fact, any
constant upper bound strictly less than 1 would be enough.

The Regularity Lemma and the Blow-Up Lemma

In most definitions and theorem statements below, we follow [KS96, Kom99,


Die00].
For a graph G, and node sets X, Y V (G), X Y = , we denote by
G(X, Y ) G the bipartite subgraph obtained by removing from G all nodes
except those in X Y , and all edges adjacent to removed nodes. Let F be a
bipartite graph with colour classes A, B. Given some  > 0, graph F is called regular, if for any X A of size |X|  |A|, and any Y B of size |Y |  |B|,
we have
|dens2 (F (X, Y )) dens2 (F )| .

Tripods Do Not Pack Densely

275

Let G denote an arbitrary graph. We say that G admits an -partitioning of


order m, if V (G) can be partitioned into m disjoint subsets of equal size, called
supernodes, such that for all pairs of supernodes A, B, the bipartite subgraph
G(A, B) is -regular. The -regular subgraphs G(A, B) will be called superpairs.
For different choices of supernodes A, B, the density of the superpair G(A, B)
may differ. We will distinguish between superpairs of low and high density,
determined by a carefully chosen threshold. For a fixed d, 0 d 1, we call a
superpair G(A, B) a superedge, if dens2 (G(A, B)) d, and a super-nonedge, if
dens2 (G(A, B)) < d. Now, given a graph G, and its -partitioning of order m,
we can build a high-level representation of G by a graph of size m, which we
will call a d-map of G. The d-map M contains a node for every supernode of
G. Two nodes of M are connected by an edge, if and only if the corresponding
supernodes of G are connected by a superedge. Thus, edges and nonedges in
M represent, respectively, superedges and super-nonedges of G. For a node pair
(edge or nonedge) e in G, we denote by (e) the corresponding pair in the d-map
M . We call : E(G) E(M ) the mapping function. The union of all superedges
1 (E(M )) E(G) will be called the superedge subgraph of G. Similarly, the
union of all super-nonedges in G will be called the super-nonedge subgraph of G.
We rely on the following fact, which is a restricted version of the Blow-up
Lemma (see [Kom99]).
Theorem 1 (Blow-up Lemma).
Let d >  > 0. Let G be a graph with an -partitioning, and let M be its d-map.
Let H be a subgraph of M with maximum degree > 0. If  (d ) /(2 + ),
then G contains a subgraph isomorphic to H.
Proof. See [Kom99].

t
u

Since we are interested in diamond-free graphs, we take H to be a diamond.


We simplify the condition on d and , and apply the Blow-up Lemma in the
following form: if  (d )3 /5, and G is diamond-free, then its d-map M is
also diamond-free.
Our main tool is Szemeredis Regularity Lemma. Informally, it states that
any graph can be transformed into a graph with an -partitioning by removing
a small number of nodes and edges. Its precise statement, slightly adapted from
[KS96], is as follows.
Theorem 2 (Regularity Lemma).
Let G be an arbitrary graph. For every  > 0 there is an m = m() such
that for some G0 G with |E(G) \ E(G0 )|  |V (G)|2 , graph G0 admits an
-partitioning of order at most m.
Proof. See e.g. [KS96, Die00].

t
u

The given form of the Regularity Lemma is slightly weaker than the standard
one. In particular, we allow to remove a small number of nodes and edges
from the graph G, whereas the standard version only allows to remove a small

276

Alexandre Tiskin

Fig. 3. An axial collision


number of nodes (with adjacent edges), and then a small number of superpairs.
In our context, the difference between two versions is insignificant.
Note that if |E(G)| = o(|V (G)|2 ), the statement of the Regularity Lemma
becomes trivial. In other words, the Regularity Lemma is only useful for dense
graphs.

Packing Tripods

Consider a packing of tripods of size n in an nnn cube, of the type described in


the Introduction (no overlaps, similar orientation, corner cubes coinciding with
n n n cube cells). A tripod in such a packing is uniquely defined by the
coordinates of its corner cube (i, j, k), 0 i, j, k < n. Moreover, if two of the
three coordinates (i, j, k) are fixed, then the packing may contain at most one
tripod with such coordinates otherwise, the two tripods with an equal pair
of coordinates would form an axial collision, depicted in Figure 3.
We represent a tripod packing by an equitripartite triangle-covered graph
G v Knnn as follows. Three color classes U = {ui }, V = {vj }, W = {wk },
0 i, j, k < n, correspond to the three dimensions of the cube. A tripod (i, j, k) is
represented by a triangle {(ui , vj ), (vj , wk ), (wk , ui )}. To prevent axial collisions,
triangles representing different tripods must be edge-disjoint. Hence, if m is the
number of tripods in the packing, then the representing graph G contains 3m
edges.
We now prove that the graph G is diamond-free. In general, G might contain
a triangle with three edges coming from three different tripods; such a triangle
would give rise to three diamonds. To prove that such a situation is impossible,
we must consider, apart from axial collisions, also simple collisions, depicted in
Figure 4.
Lemma 2. A tripod packing graph is diamond-free.
Proof. It is sufficient to show that the tripod packing graph does not contain any
triangles apart from those representing tripods. Suppose the contrary: there is a
triangle {(ui , vj ), (vj , wk ), (wk , ui )}, which does not represent any tripod. Then

Tripods Do Not Pack Densely

277

Fig. 4. A simple collision

its three edges must come from triangles representing three different tripods;
denote these tripods (i, j, k 0 ), (i, j 0 , k), (i0 , j, k), where i 6= i0 , j 6= j 0 , k 6= k 0 .
Consider the differences i0 i, j 0 j, k 0 k, all of which are non-zero. At least
two of these three differences must have the same sign; without loss of generality
assume that i0 i, j 0 j are of the same sign. Thus, we have either i0 < i, j 0 < j,
or i0 > i, j 0 > j. In both cases, the tripods (i, j 0 , k), (i0 , j, k) collide. Hence,
our assumption must be false, and the triangle {(ui , vj ), (vj , wk ), (wk , ui )} not
representing any tripod cannot exist. Therefore, no triangles in G can share an
edge in other words, G is diamond-free.
t
u
Thus, tripod packing graphs are equitripartite, triangle-covered and diamondfree. Note that these graph properties are invariant under any permutation of
graph nodes within colour classes, whereas the property of a tripod packing
being overlap-free is not invariant under permutation of indices within each dimension. Hence, the converse of Lemma 2 does not hold. However, even the loose
characterisation of tripod packing graphs by Lemma 2 is sufficient to obtain our
results.
The following theorem is a special case of an observation attributed to Szemeredi by Erd
os (see [Erd87], [CG98, p. 48]). Since Szemeredis proof is apparently unpublished, we give an independent proof of our special case.
Theorem 3. Consider an equitripartite, triangle-covered, diamond-free graph of
size n. The maximum density of such a graph tends to 0 as n .
Proof. Suppose the contrary: for some constant d > 0, and for an arbitrarily
large n (i.e. for some n n0 for any n0 ), there is a tripartite, triangle-covered,
diamond-free graph G of size n, such that dens3 (G) d > 0. The main idea
of the proof is to apply the Regularity Lemma and the Blow-up Lemma to the
graph G. This will allow us to distil from G a new graph, also triangle-covered
and diamond-free, with tripartite density higher than dens3 (G) by a constant
factor . Repeating this process, we can raise the density to 2 d, 3 d, etc., until
the density becomes higher than 1, which is an obvious contradiction.

278

Alexandre Tiskin

Let us now fill in the details of the distilling process. We start with a
constant , 0 < < 1; its precise numerical value will be determined later.
Select a constant  > 0, such that  (d )3 /5, as required by the Blow-up
Lemma. By the Regularity Lemma, graph G admits an -regular partitioning,
the order of which is constant and independent of the size of G. Denote by M
the d-map of this partitioning, and let : G M be the mapping function.
Consider the superedge subgraph 1 (E(M )). Let G4 v 1 (E(M )) v G
be a spanning subgraph of G, consisting of all triangles completely contained in
1 (M ); in other words, each triangle in G4 is completely contained in some supertriangle of G. We claim that G4 contains a significant fraction of all triangles
(and, hence, of all edges) in G. Indeed, the bipartite density of a super-nonedge is
by definition at most d, hence the super-nonedge subgraph has at most 3d n2
edges. Every triangle not completely contained in 1 (E(M )) must have at least
one edge in the super-nonedge subgraph; since triangles in G are edge-disjoint,
the total number of such triangles cannot exceed 3d n2 . By initial assumption,
the total number of triangles in G is at least d n2 , therefore the number of
triangles in G4 must be at least (1 3)d n2 . By selecting a sufficiently small
, we can make the number of triangles in G4 arbitrarily close to d n2 . For
the rest the proof, let us fix the constant within the range 0 < < 1/12, e.g.
= 1/24. As a corresponding  we can take e.g.  = (d/2)3 /5 = d3 /(5 483 ).
It only remains to observe that, since graph G is diamond-free, its d-map
M is diamond-free by the Blow-up Lemma. By Lemma 1, dens(M ) 3/4. This
means that among all superpairs of G, the fraction of superedges is at most 3/4.
All edges of G4 are contained in superedges of G, therefore the average density
of a superedge in G4 is at least 4/3dens(G4 ). In particular, there must be some
superpair in G4 with at least such density. Since G4 consists of edge-disjoint
supertriangles, this superpair is contained in a unique supertriple F G4 , with
dens3 (F ) 4/3 dens3 (G4 ) 4/3 (1 3)d =
4/3 (1 3 1/24)d = 7/6 d.
In our previous notation, we have = 7/6 > 1.
We define the supertriple F to be our new distilled equitripartite trianglecovered diamond-free graph. Graph size has only been reduced by a constant
factor, equal to the size of the -partitioning. By taking the original graph G
large enough, the distilled graph F can be made arbitrarily large. Its density
dens3 (F ) d = 7/6 d > d. By repeating the whole process, we can increase
the graph density to (7/6)2 d, (7/6)3 d, . . . , and eventually to values higher
than 1, which contradicts the definition of density (in fact, values higher than
3/4 will already contradict Lemma 1). Hence, the initial assumption of existence
of arbitrarily large equitripartite triangle-covered diamond-free graphs with constant positive density must be false. Negating this assumption, we obtain our
theorem.
t
u
The solution of Stein and Szab
os problem is now an easy corollary of Lemma 2
and Theorem 3.

Tripods Do Not Pack Densely

279

Corollary 1. Consider a tripod packing of size n. The maximum density of such


a packing tends to 0 as n .

Conclusion

We have proved that the density of a tripod packing must be infinitely small
as its size tends to infinity. Since the Regularity Lemma only works for dense
graphs, the question of determining the precise asymptotic growth of a maximum
tripod packing size remains open.
Nevertheless, we can obtain an upper bound on this growth. Let d be the
maximum density of tripod packing of size n. In our proof of Theorem 3, it is
established that the maximum density of tripod packing of size m(d3 /(5483 ))n
is at most 6/7 d, where m() is the function defined by the Regularity Lemma.
5
In [ADL+ 94, DLR95] it is shown that for tripartite graphs, m(t) 4t . These
two bounds together yield a desired upper bound on d as a function of n, which
turns out to be a rather slow-growing function. By applying the descending
technique from [SS94], we can also obtain an upper bound on the size of a
maximal r-pod, which can tile (without any gaps) an r-dimensional space. The
resulting bound is a fast-growing function of r. In [SS94] it is conjectured that
this bound can be reduced to r 2 for any r 4. The conjecture remains open.

Acknowledgement

The author thanks Sherman Stein, Chris Morgan and Mike Paterson for fruitful
discussion.

References
[ADL+ 94] N. Alon, R. A. Duke, H. Lefmann, V. R
odl, and R. Yuster. The algorithmic aspects of the regularity lemma. Journal of Algorithms, 16(1):80109,
January 1994.
[CG98]
F. Chung and R. Graham. Erd
os on Graphs: His Legacy of Unsolved Problems. A K Peters, 1998.
[Die00]
R. Diestel. Graph Theory. Number 173 in Graduate Texts in Mathematics.
Springer, second edition, 2000.
[DLR95]
R. A. Duke, H. Lefmann, and V. R
odl. A fast approximation algorithm for
computing the frequencies of subgraphs in a given graph. SIAM Journal
on Computing, 24(3):598620, 1995.
[Erd87]
P. Erd
os. Some problems on finite and infinite graphs. In Logic and Combinatorics. Proceedings of the AMS-IMS-SIAM Joint Summer Research Conference, 1985, volume 65 of Contemporary Mathematics, pages 223228,
1987.
[Gal98]
D. Gale. Tracking the Automatic Ant, and Other Mathematical Explorations. Springer, 1998.
[Gou88]
R. Gould. Graph Theory. The Benjamin/Cummings Publishing Company,
1988.

280

Alexandre Tiskin

[Kom99]
[KS96]

[SS94]

[Ste95]

J. Koml
os. The Blow-up Lemma. Combinatorics, Probability and Computing, 8:161176, 1999.
J. Koml
os and M. Simonovits. Szemeredis Regularity Lemma and its
applications in graph theory. In D. Mikl
os, V. T. S
os, and T. Sz
onyi,
editors, Combinatorics: Paul Erd
os is Eighty (Part II), volume 2 of Bolyai
Society Mathematical Studies. 1996.
S. K. Stein and S. Szab
o. Algebra and Tiling: Homomorphisms in the
Service of Geometry. Number 25 in The Carus Mathematical Monographs.
The Mathematical Association of America, 1994.
S. K. Stein. Packing tripods. The Mathematical Intelligencer, 17(2):3739,
1995. Also appears in [Gal98].

An Efficient k Nearest Neighbor Searching


Algorithm for a Query Line
Subhas C. Nandy?
Indian Statistical Institute, Calcutta - 700 035, India

Abstract. In this paper, we present an algorithm for finding k nearest


neighbors of a given query line among a set of points distributed arbitrarily on a two dimensional plane. Our algorithm requires O(n2 ) time and
space to preprocess the given set of points, and it answers the query for a
given line in O(k +logn) time, where k may also be an input at the query
time. Almost a similar technique is applicable for finding the k farthest
neighbors of a query line, keeping the time and space complexities invariant. We also discuss some constrained version of the problems where
the preprocessing time and space complexities can be reduced keeping
the query times unchanged.

Key words : nearest- and farthest-neighbor, query line, arrangement, duality.

Introduction

Given a set P = {p1 , p2 , . . . , pn } of n points arbitrarily distributed on a plane,


we study the problem of finding the k nearest neighbors of a query line ` (in the
sense of perpendicular distance). The problem of finding the nearest neighbor
of a query line was initially addressed in [3]. An algorithm of preprocessing
time and space O(n2 ) was proposed in that paper which can answer the query
in O(logn) time. Later, the same problem was solved using geometric duality
in [8], with the same time and space complexities. The space complexity of the
problem has recently been improved to O(n) [11]. The preprocessing time of that
algorithm is O(nlogn), but the query time is O(n.695 ). In the same paper, it is
shown that if the query line passes through a specified point, that information
can be used to construct a data structure in O(nlogn) time and space, so that
the nearest neighbor query can be answered in O(log2 n) time. Apart from a
variation of the proximity problems in computational geometry, this problem is
observed to be important in the area of pattern classification and data clustering
[11], Astrophysical database maintenance and query [2], linear facility location,
to name a few.
?

The work was done when the author was visiting School of Information Science,
Japan Advanced Institute of Science and Technology, Ishikawa 923-1292, Japan

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 281290, 2000.
c Springer-Verlag Berlin Heidelberg 2000

282

Subhas C. Nandy

In this paper, we address a natural generalization of the above problem where


the objective is to report the k nearest neighbors of a query line in the same
environment. We shall use geometric duality for solving this problem. The preprocessing time and space required for creating the necessary data structure is
O(n2 ), which maintains the levels of the arrangement of lines corresponding to
the duals of the points in P [1,4,6]. The query time complexity is O(k + logn),
where k is an input at the query time. Almost a similar technique works for
finding the k farthest neighbors of a query line keeping the time and space complexities invariant. The farthest neighbor query is also useful in Statistics, where
the objective is to remove the outliers from a data set.
We also show that in the following two constrained cases, the preprocessing time
can be reduced keeping the query times invariant.
(i) If k is a fixed constant, the k farthest neighbors of a query line can be
reported in O(k + logn) time on a preprocessed data structure of size O(kn),
which can be constructed in O(kn + nlogn) time.
(ii) When the query line is known to pass through a fixed point q and k is known
prior to the preprocessing, we use a randomized technique to construct a data
structure of size O(kn) in O(kn + min(nlog2 n, knlogn)) time, which reports
k nearest neighbors of such a query line in O(k + logn) time. Thus, for the
nearest neighbor problem (i.e., k = 1), our algorithm is superior in terms of
both space required and query time, compared to the algorithm proposed in
[11] for this constrained case, keeping the preprocessing time invariant.

Geometric Preliminaries

First we mention that if the query line is vertical, we maintain an array with
the points in P , sorted with respect to their x coordinates. This requires O(n)
space and can be constructed in O(nlogn) time. Now, given a vertical query line
we position it on the x-axis by performing a binary search. To find the k-nearest
neighbors, a pair of scans (towards left and right) are required in addition. So,
the query time complexity is O(k + logn). It is easy to understand that the kfarthest neighbors can be obtained in O(k) time by scanning the array from its
left and right ends.
In this paper, we shall consider the non-vertical query line. We use geometric
duality for solving these problems. It maps (i) a point p = (a, b) of the primal
plane to the line p : y = ax b in the dual plane, and (ii) a non-vertical line
` : y = mx c of the primal plane to the point ` = (m, c) in the dual plane.
Needless to say, a point p is below (resp., on, above) a line ` in the primal plane
if and only if p is above (resp., on, below) ` in the dual plane.
Let H be the set of dual lines corresponding to the points in P . Let A(H) denote
the arrangement of the set of lines H. The number of vertices, edges and faces in
A(H) are all O(n2 ) [4]. Given a query line `, the problem of finding its nearest
or farthest point can be solved as follows:

An Efficient k Nearest Neighbor Searching Algorithm for a Query Line

283

Nearest neighbor algorithm : [8] Consider the point ` which is the dual of
the line `. Next use the point location algorithm of [5] to locate the cell of A(H)
containing ` in O(logn) time. As the cells of the arrangement A(H) are split
into trapezoids, the line pi and pj lying vertically above and below ` , can be
found in constant time. The distance of a point p and the line ` in the primal
plane can be obtained from the dual plane as follows :
Let x(` ) be the x-coordinate of the point ` in the dual plane which corresponds
to the slope of the line ` in the primal plane. We draw a vertical line from
the point ` which meets the line p at a point (` , p ) in the dual plane.
Now, the perpendicular distance of the point p and the line ` in the primal


,p ))
, where d(., .) denotes the distance between two
plane is equal to d(` ,(`
x(` )
points.
Thus, the point nearest to ` in the primal plane will be any one of pi or pj
depending on whether d(` , (` , pi )) < or > d(` , (` , pj )), and it can be
computed in constant time. In order to report the nearest neighbor from any
arbitrary query line, one needs to maintain the arrangement A(H), which can
be created in O(n2 ) time and space [5].
Farthest neighbor algorithm : Here we construct the lower and upper envelope of the lines in H corresponding to the duals of the points in P , and store
them in two different arrays, say LL and LU . This requires O(nlogn) time [7].
Now, given the line `, or equivalently the dual point ` , we draw a vertical line
at x(` ) which hits the line segments 1 LL and 2 LU , and they can be
located in O(logn) time. If 1 and 2 are respectively portions of pi and pj ,
then the farthest neighbor of ` is either of pi and pj which can be identified
easily. Thus for the farthest neighbor problem, the preprocessing time and space
required are O(nlogn) and O(n) respectively, and the query can be answered in
O(logn) time.
In this paper, we consider the problem of locating the k nearest neighbors of a
query line. As a preprocessing, we construct the following data structure which
stores the arrangement of the dual lines in H. It is defined using the concept
of levels as stated below. The same data structure can answer the k farthest
neighbors query also with the same efficiency.
Definition 1. [4] A point in the dual plane is at level (0 n) if there
are exactly lines in H that lie strictly below . The -level of A(H) is the
closure of a set of points on the lines of H whose levels are exactly in A(H),
and is denoted as L (H). See Figure 1 for an illustration.
Clearly, L (H) is a poly-chain from x = to x = , and is monotone
increasing with respect to the x-axis. In Figure 1, a demonstration of levels in
the arrangement A(H) is shown. Here the thick chain represents L1 (H). Among
the vertices of L1 (H), those marked with empty (black) circles are appearing in
level 0 (2) also. Each vertex of the arrangement A(H) appears in two consecutive
levels, and each edge of A(H) appears in exactly one level. We shall store L (H),
0 n in a data structure as described in the next section.

284

Subhas C. Nandy

level-2
level-1
level-0
Fig. 1. Demonstration of levels in an arrangement of lines

Algorithm

Below we describe the data structure, called level-structure, and briefly explain
our algorithm.
3.1

Level-Structure

It is a balanced binary search tree T , called the primary structure, whose nodes
correspond to the level-id of the arrangement A(H). To avoid confusion, we shall
use the term layer to represent (different depth) levels of the tree T . The root
of T corresponds to the layer-0 and the layer-id increases as we proceed towards
the leaf level.
Initially, for each node of T (representing a level, say , of A(H)) we create a
secondary structure T () which is an array containing edges of L (H) in left
to right order. Next, to facilitate our search process, we augment the secondary
structures for all the non-leaf nodes as follows :
Consider an edge e A(H) at a certain level, say . Let 0 be the level which
appears as the left child of level in T , and Ve0 ( A(H)) be the set of vertices
whose projections on the x-axis are completely covered by the projection of e on
x-axis. If |Ve0 | > 1 then we leave the leftmost vertex of Ve0 and vertically project
the next vertex on e, and do the same for every alternate vertex of Ve0 as shown
in Figure 2. The same action is taken for all the edges of level and the edges in
its left successor level 0 . All the projections create new vertices at level , and
as a result, the number of edges in level is also increased. This augmentation
yields the following lemma :
Lemma 1. After the augmentation step, the projection of an edge of the parent
level can overlap on the projections of at most two edges at its left child level.
Proof : The following three situations may arise.
|Ve0 | = 0. Here edge e is completely covered by an edge at level 0 (Figure 2a).
|Ve0 | = 1. Here edge e overlaps with exactly two edges at level 0 (Figure 2b).
|Ve0 | > 1. In this case the truth of the lemma follows as we have projected every
t
u
alternate vertex of Ve0 on e (Figure 2c).

An Ecient k Nearest Neighbor Searching Algorithm for a Query Line

285

level -
level -

(a) : |Ve | = 0

(b) : |Ve | = 1

(c) : |Ve | > 1

Fig. 2. Augmentation of secondary structure


A similar action is taken for all the edges of level with respect to the vertices
of level  appearing as the right child of in T . Now, we clearly mention the
following points :
(1) A result similar to Lemma 1 holds for the projection of each edge at level
on the edges at its right child level  .
(2) Lemma 1 and the result stated in item (1) remains valid for all edges from
layer ((logn) 2) up to the root layer with the enhanced set of vertices.
(3) The proposed augmentation step causes an increase in the number of edges
at the level to at most |E | + (|E | + |E |)/2, where E is the set of edges
at level in A(H).
From the original secondary structure at each level of the level-structure, we
create a new secondary structure as follows :
The secondary structures appearing in the leaf level of T will remain as it is.
We propagate the vertices appearing in a leaf of T to its parent as stated above,
and construct a linear array with the edges formed by the original vertices
on that level and the vertices contributed by its both left child and right
child. This array is also ordered with respect to the x-coordinates of the end
points of the enhanced set of edges, and this new array will now serve the
role of the secondary structure.
For a node in the non-leaf layer of T , the original vertices in that level as well
as the vertices inherited from its successors are propagated to its parent
layer in a similar procedure. For each non-leaf node, the original secondary
structure is replaced by a new secondary structure with the edges formed by
the enhanced set of vertices.
This method of propagation of vertices is continued in a bottom-up manner till
the root layer of T is reached.
The original secondary structures in the non-leaf layers of the level-structures
are no more required.
The augmented structure obtained in this manner is called A (H).
Lemma 2. The number of vertices generated in the secondary structure of all
the levels of A (H) is O(n) in the worst case.

286

Subhas C. Nandy

Proof : Consider only the set of vertices of A (H) which appear in those levels
which belong to the leaf layer of T . Only half of these vertices (in total) are
propagated to the nodes in different levels at the predecessor layer of the leaves
of T . Among the set of vertices, which has been propagated from the leaves of T
to the current layer, at most half of them may further be propagated to their predecessor layer in T . This process may continue until the root (layer) is reached.
But if k be the total number of vertices at all the leaves, their contribution to
all the layers of the tree is at most k + k2 + k4 + . . ., which may be at most 2k
in the worst case. The same is true for the original vertices of A(H) appearing
in the different levels at the non-leaf layers of T also. Thus it is clear that, this
type of propagation does not cause the number of vertices of A (H) more than
twice the original number of vertices of A(H).
t
u
Next, for each edge of a level, say , appearing in a non-leaf layer of T in the
enhanced structure A (H), we keep four pointers. A pair of pointers L1 and L2
point to two edges in the level 0 which appear as left child of in T and the other
pair R1 and R2 point to a pair of edges in the level 00 appearing in the right child
of . By Lemma 1 and subsequent discussions, an edge appearing in a level, which
corresponds to a non-leaf node in T , can not overlap on more than two edges of
its left (resp. right) child level (in T ) with respect to the vertical projections. If
the x-range of an edge e (appearing at level ) is completely covered by that of
an edge e0 of its left (resp. right) child level 0 (00 ) of A (H), both the pointers
L1 and L2 (resp. R1 and R2 ) attached to e point to e0 . Otherwise, L1 and L2
(resp. R1 and R2 ) of the edge e point to two adjacent edges e1 and e2 in the
level 0 (00 ), such that the common vertex of e1 and e2 lies in the x-interval of
the edge e.

3.2

Sketch of the Algorithms

Given a query line `, we compute its dual point ` . In order to find the cell of
A (H) containing ` , we proceed as follows :
We choose the level root of A (H) attached to the root of T , and do a binary
search on the secondary structure T (root ) attached to it to locate the edge
e which spans horizontally on ` . Now, compare ` and e to decide whether to
proceed towards the left or the right child of root in the next layer. Without loss
of generality, let us assume that search proceeds towards the left child and lef t
be the level attached to it. Note that, L1 and L2 pointers uniquely determine the
edge e0 T (lef t ) by doing at most 2 comparisons. If search proceeds towards
the right of the root, we may need to use the pointers R1 and R2 attached to e.
Similarly proceeding, the cell of A (H) containing ` may be easily reached in
O(logn) steps.
Reporting of k nearest neighbors
After locating ` in the appropriate cell of A (H), let ea T () and eb T (1)
be the two edges of A (H) which are vertically above and below ` respectively.

An Efficient k Nearest Neighbor Searching Algorithm for a Query Line

287

We compute the vertical distances of ea and eb from ` , and report the nearest
one. Without loss of generality, let ea be the nearest neighbor of ` . Next, we
need to reach an edge at level + 1 (the inorder successor of level in T ) whose
horizontal interval spans ` . If eb is closer to ` then we need to locate the edge
in level 2 (the inorder predecessor of level 1 in T ) which horizontally
spans ` .
In order to reach an appropriate edge in the inorder predecessor or successor
of the current level during reporting, we maintain two stacks, namely DN and
UP. They contain the edges (along with the level-id) of A (H) in different layers
from the root to the relevant level ( 1 and ) whose x-interval span ` . The
initial configuration of the stacks is as follows :
Both the stacks will have same set of elements from the root layer up to
certain layer corresponding to the level, say (= or 1) depending on
which one appear in a non-leaf layer. Then one of these stacks will contain
few more elements from level to either of and 1 which appear in the
leaf layer.
These will help while moving from one level to the next level (above or below)
in A (H), as described in the following lemma.
Lemma 3. After locating a pair of edges in two consecutive levels, say 1 and
, of A (H), whose x-interval contains ` , the edges in the k levels vertically
below (above) 1 () can be reported in O(k + logn) time.
Proof : Without loss of generality, we shall consider the visiting of the edges in
k consecutive levels above the level whose x-interval contains ` .
If the level + 1, which is the inorder successor of level in T , is
in its right subtree, then we traverse all the levels that appear along the path
from to + 1 in T . In each move to the next level, we can reach an
appropriate edge whose x-interval is spanning ` , using either of (L1 and
L2 ) and (R1 and R2 ) in constant time. We need to store all these edges in
the stack UP, for backtracking, if necessary.
in some predecessor layer, then we may need to backtrack along the path
through which we reached from + 1 to during forward traversal. If
be the difference in the layer-id of the levels and + 1 in T , then the
number of elements popped from the UP stack is .
Note that, if it needs to proceed to the level + 2, we may again move layers
towards leaf. Needless to say, the edges on that path will be pushed in the UP
stack. But such a forward movement may again be required after visiting all the
levels in the right subtree rooted at level + 1. Thus apart from reporting, this
extra traversal in T may be required at most twice, and the length of the path
may at most be O(logn). Hence the proof of the lemma.

288

Subhas C. Nandy

In order to visit the edges in k consecutive levels below 1, whose x-interval


t
u
contains ` , we need to use the DN stack.
Thus Lemmas 2 and 3 lead to the following result stating the time and space
complexities of our algorithm.
Theorem 1. Given a set of points on a plane, they can be preprocessed in O(n2 )
time and space such that the problem of locating k nearest neighbors for a given
query line can be solved in O(k + logn) time.
t
u
Reporting of k farthest neighbors
For the farthest neighbor problem, one needs to traverse from the root to the topmost and the bottom-most layers along the tree T . This also requires maintaining
the two stacks UP and DN, whose role is same as that of the earlier problem.
Here also, for the root layer only, a binary search is required in the secondary
structure to locate an edge e which spans horizontally ` . From the next layer
onwards, the pointers maintained with each edge will locate the appropriate edge
in the corresponding level. Finally, either (i) an edge from the top-most layer or
(ii) an edge from the bottom-most layer will be reported as the farthest edge
from ` . In order to get the next farthest neighbor, one may consult its inorder
successor or predecessor depending on the case (i) or (ii). This traversal can be
made in amortized constant time using our proposed level-structure A (H). The
process continues until the k farthest neighbors are reported. Thus we have the
following theorem.
Theorem 2. Given a set of points on a plane, they can be preprocessed in O(n2 )
time and space such that the problem of locating k farthest neighbors for a given
query line can be solved in O(k + logn) time.

Constrained Query

In this section, we shall discuss the complexity of the k nearest neighbors and
the k farthest neighbors problems, if k is known in advance (i.e., k is not an
input at the query time).
4.1

Farthest k Neighbors Problem

In this case, we need to maintain only (i) k levels from bottom starting from
level-1 up to the level-k, denoted by Lk (H), and (ii) k levels at the top starting
from level-(nk+1) up to level-n, denoted by L(nk+1) (H), of the arrangement
A(H). Here level-1 and level-n correspond to the lower and upper envelope of
the lines in H respectively.
Lemma 4. The number of edges in the Lk (H) of an arrangement A(H) of n
lines in the plane is O(nk), and it can be computed in O(nk + nlogn) time.

An Efficient k Nearest Neighbor Searching Algorithm for a Query Line

289

Proof : The counting part of the lemma follows from Corrolary 5.17 of [12]. The
time complexity of the construction follows from [6].
t
u
Next, we project the edges of level-k on the edges of level-(k 1) as described
in Subsection 3.1. As the horizontal interval of an edge in level (k 1) may be
spanned by at most two edges of level-k (see Lemma 1), with each edge of level
(k 1), we attach two pointers Q1 and Q2 to point to a pair of appropriate edges
of level-k as described in Subsection 3.1. The enhanced set of edges in level-(k1)
is then projected on the edges of level-(k 2). This process is repeated till we
reach level-1.
The same technique is adopted for constructing L(nk+1) (H). The projection
of edges from one level on the edges of its next higher level is continued from
level-(n k + 1) upwards till we reach the upper envelope (i.e., the level-n) of
the arrangement A(H).
As stated in Lemma 2, the number of edges in the enhanced arrangement will
remain O(nk). Next, during the k farthest neighbors query for a given line `, the
edges of level-1 and level-n of the augmented A(H) spanning the x-coordinate
of ` can be found using binary search. But, one can reach an edge from level-i
to the edge at level-(i + 1) (level-(i 1)) in Lk (H) (L(nk+1) (H)) spanning
the x-coordinate of ` using the two pointers Q1 , Q2 attached with the edge at
level-i, in constant time. Thus by Lemma 4, and the above discussions, we have
the following theorem :
Theorem 3. If k is known in advance, a data structure with a given set P of n
points can be made in O(nk + nlogn) time and O(nk) space, such that for any
query line, its k farthest neighbors can be answered in O(k + logn) time.
t
u

4.2

Nearest k Neighbors Problem when Query Line Passes through


a Specified Point

If the query line ` passes through a specified point q, then the dual point ` of
the line ` will always lie on the line h = q , dual of the point q.
Now consider the set H = {h1 , h2 , . . . , hn } of lines in the dual plane, where
hi = pi . Let H 0 = {h01 , h02 , . . . , h0n } denote the set of half lines, where h0i is the
portion of hi above h. Similarly, H 00 = {h001 , h002 , . . . , h00n } is defined below the
line h. We denote the ( k)level above (resp. below) h by Lk (H 0 , h+ ) (resp.
Lk (H 00 , h )).
In [10], the zone theorem for line arrangement [9] is used to show that for
the set of half lines H 0 (H 00 ) the complexity of Lk (H 0 , h+ ) (Lk (H 00 , h ) is
O(nk). A randomized algorithm is proposed in [10] which computes Lk (H 0 , h+ )
(Lk (H 00 , h ) in O(kn + min(nlog2 n, knlogn)) time.
Note that, here also, we need to enhance Lk (H 0 , h+ ) (Lk (H 00 , h )) by projecting the accumulated set of edges of its one level to the next lower level, and

290

Subhas C. Nandy

maintaining two pointers for each edge of the enhanced arrangement as stated
in the earlier subsection.
In order to answer the k nearest neighbor query for a line ` where ` h, we
first report the nearest neighbor of ` by locating the edges e1 and e2 , spanning
the x-coordinate of ` , by using binary search on the level-1 of Lk (H 0 , h+ ) and
Lk (H 00 , h ) respectively. To report the next nearest neighbor, we move to the
next level of either Lk (H 0 , h+ ) or Lk (H 00 , h ) using the pointers attached
with e1 or e2 . This process is repeated to report k nearest neighbors.
Theorem 4. If the query line is known to pass through a specified point q, and
k is known in advance, then for a given set of n points we can construct a data
structure of size O(nk) in O(nk + min(nlog2 n, knlogn)) time, which can report
the k nearest neighbors of an arbitrary query line in O(k + logn) time.
Acknowledgment : The author wishes to acknowledge Prof. T. Asano and T.
Harayama for helpful discussions.

References
1. P. K. Agarwal, M. de Berg, J. Matousek and O. Schwarzkopf, Constructing levels
in arrangements and higher order Voronoi diagram, SIAM J. on Computing, vol.
27, pp. 654-667, 1998.
2. B. Chazelle, Computational Geometry : Challenges from the Applications, CG Impact Task Force Report, 1994.
3. R. Cole and C. K. Yap, Geometric retrieval problems, Proc. 24th. IEEE Symp. on
Foundation of Comp. Sc., pp. 112-121, 1983.
4. H. Edelsbrunner, Algorithms in Combinatorial Geometry, Springer, Berlin, 1987.
5. H. Edelsbrunner, L. J. Guibas and J. Stolfi, Optimal point location in monotone
subdivision, SIAM J. on Computing, vol. 15, pp. 317-340, 1986.
6. H. Everett, J. -M. Robert and M. van Kreveld, An optimal algorithm for the ( k)levels, with applications to separation and transversal problems, Int. J. Comput.
Geom. with Appl., vol. 6, pp. 247-261, 1996.
7. J. Hershberger, Finding the upper envelope of n line segments in O(nlogn) time,
Information Processing Letters, vol. 33, pp. 169-174, 1989.
8. D. T. Lee and Y. T. Ching, The power of geometric duality revisited, Information
Processing Letters, vol. 21, pp. 117-122, 1985.
9. K. Mulmuley, Computational Geometry : An Introduction Through Randomized
Algorithms, Prentice Hall, Englewood Cliffs, NJ.
10. C. -S. Shin, S. Y. Shin and K. -Y. Chwa, The widest k-dense corridor problems,
Information Processing Letters, vol. 68, pp. 25-31, 1998.
11. P. Mitra and B. B. Chaudhuri, Efficiently computing the closest point to a query
line, Pattern Recognition Letters, vol. 19, pp. 1027-1035, 1998.
12. M. Sharir and P. K. Agarwal, Davenport-Schinzel Sequence and Their Geometric
Applications, Cambridge University Press, 1995.

Tetrahedralization of Two Nested


Convex Polyhedra
Cao An Wang and Boting Yang
Department of Computer Science,
Memorial University of Newfoundland,
St.Johns, NF, Canada A1B 3X5
[email protected]

Abstract. In this paper, we present an algorithm to tetrahedralize the


region between two nested convex polyhedra without introducing Steiner
points. The resulting tetrahedralization consists of linear number of tetrahedra. Thus, we answer the open problem raised by Chazelle and Shouraboura [6]: whether or not one can tetrahedralize the region between
two nested convex polyhedra into linear number of tetrahedra, avoiding
Steiner points?. Our algorithm runs in O((n + m)3 log(n + m)) time and
produces 2(m + n 3) tetrahedra, where n and m are the numbers of
the vertices in the two given polyhedra, respectively.

Introduction

The tetrahedralization in 3D is a fundamental problem in computational geometry [1], [3], [7], [9], [10]. Unlike its 2D counterpart, where a simple polygon with
n vertices is always triangulatable and each triangulation contains exactly n 2
triangles, a simple polyhedron with n vertices may not be tetrahedralizable [11]
and the number of tetrahedra in its tetrahedralizations may vary from O(n)
to O(n2 ) [4] even if it is tetrahedralizable. Naturally, one will investigate the
following two problems: to identify some classes of polyhedra which are tetrahedralizable and to find tetrahedralization methods for these polyhedra which will
produce a linear number of tetrahedra or even optimal number of tetrahedra.
So far, very few non-trivial classes of simple polyhedra are known to be tetrahedralizable (without introducing Steiner points). One is so-called two side-byside convex polyhedra and the other is so-called two nested convex polyhedra
[8], [2], [6].
For the second class, Bern showed that the number of tetrahedra in the area
between two nested convex polyhedra is bounded by O(n log n), where n is the
number of vertices in the polyhedra. Chazelle and Shouraboura [6] presented an
algorithm which produces O(n) tetrahedra by introducing Steiner points. They
raised an open question that whether or not one can tetrahedralize the region
between two nested convex polyhedra into linear number of tetrahedra, avoiding
Steiner points?.
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 291298, 2000.
c Springer-Verlag Berlin Heidelberg 2000

292

Cao An Wang and Boting Yang

In this paper, we present an algorithm to tetrahedralize the region between


two nested convex polyhedra into linear number of tetrahedra, without introducing any Steiner points. The basic idea comes from the following analysis.
The dome removal method invented by Chazelle [5] and Bern [2] has been
pushed into its limit in the two nested convex polyhedra case. In more detail, a dome with tip v of P is the difference space between P and the convex
0
will lie on
hull of (P {v}) Q. After a dome is removed, some vertices SQ
CH((P {v}) Q), thus the subsequent dome removal process shall avoid to
0
. For simplicity, Bern uses P Q to denote
choose a tip vertex belonging to SQ
the remainder of P and Q as well as the remainder after the subsequent removals
of these domes. The method is to remove one dome at a time with the tip vertices in the portion of P of P Q until P Q contains only the vertices of Q.
Note that a dome can be decomposed into k tetrahedra if it contains k triangle
facets in its bottom. Thus, the number of tetrahedra produced by the method
depends on the number of vertices in the domes. While this method takes only
n remove steps for n =| P | + | Q |, it may result in O(n log n) tetrahedra even
by removing these domes whose tips have the smallest degree in the surface of
P Q. The reason that the above bound is difficult to improve is as follows. In
the worst case, the vertices with smaller degrees in the surface of P Q may lie
on the Q of P Q and which forces the method to choose the vertices of P of
P Q with larger degrees. Bern showed that if the number of P Q vertices is
i, then the degree of the minimum-degree vertex can be 6n
i . Overall the bound
will be n(2 + 6Hn ), where Hn is the n-th Harmonic number (less than ln n).
Our observation is that Berns method totally depends on the degree of the tip
vertices of the domes. We shall avoid this. Note that the well-known one-vertex
emission tetrahedralization of a convex polyhedron always yields a linear number of tetrahedra, more precisely 2n degree(v) 4, where n is the number of
vertices of the polyhedron and v is the emission vertex. In the nested polyhedra
case, the one-vertex emission tetrahedralization must cope with the visibility of
the vertex due the presence of obstacle polyhedron. We shall combine the dome
removal method with the one-vertex emission method, i.e., each time we obtain
a maximum dome which contains all visible vertices of P from the tip v and
some vertices of Q visible from v. The tetrahedra formed by this method will
consist of two types: one is determined by v and a triangle facet of P Q visible
to v and the other is determined by v and a bridge triangle (which is a inner
triangle facet spans on P and Q of P Q). We shall prove that the total number of bridge triangle faces is bounded by the size of P and Q. Thus, while the
maximum dome removal method remains O(n) steps the number of tetrahedra
produced by this method is linearly proportional to the sizes of P and Q.

Preliminary

Let P and Q be two convex polyhedra. Q is nested in P if Q is entirely contained


inside P , where they may share some common triangle facets, edges, or vertices.

Tetrahedralization of Two Nested Convex Polyhedra

293

Let fP and fQ be the number of facets in P and Q, respectively, where fP = n


and | fQ |= m. Let GP and GQ denote the corresponding surface graphs.
A vertex vP is visible to a vertex wP Q if and only if the interior of the
line segment vw does not intersect Q (as point set). Let P v denote the vertex
set of P visible to v in the presence of Q, and let Pbv denote the subset of P v
such that each element in Pbv has at least one incident facet in GP not being
entirely visible to v. Let Qv denote the vertex set of Q visible from v, and Q0v be
the subset of Qv which lies on the CH(Pbv Qv ) (=CH((P P v ) Pbv Qv )).
Let Qvb denote the subset of Q0v such that each element in Qvb has at least one
adjacent vertex in GQ which does not belong to CH(Pbv Qv ).
v

MD v
P

v
Q

Qv
b

Pv
b
P-Q

Fig. 1. For the definitions.


Definition: A maximum dome with tip vertex v (denoted by M Dv ) is the closed
area between convex hulls CH(P v ) and CH(Pbv Qv ) such that CH(Pbv Qv )
contain at least one vertex of Qv as inner vertex or at least one facet of Qv . Let
P Q represent the remainder of P and Q as well as the remainder after the
subsequent removal of a maximum dome.

294

Cao An Wang and Boting Yang

Definition: A tetrahedralization Tv of P is vertex v emission if Tv is obtained


by connecting v to every vertex in P {v} by an edge. In the nested polyhedra
P and Q, the tetrahedra obtained by connecting v to every vertex in P v Q0v
form a maximum dome.
The lemma below follows from the definition of MD and one-vertex emission
tetrahedralization.
Lemma 1. Let M Dv be a maximum dome in nested P and Q. Then, the number
of tetrahedra produced by v-emission method in M Dv is
v
degree(v)+ | Pbv Qvb |,
fPv + fQ

where fPv is the number of facets in P of P Q, each of them is entirely visible


v
is the number of facets in Q of P Q, each of them is entirely
to v, and fQ
visible to v and belongs to CH(Pbv Qv ).
v
p

c
a

Q
C
d

Fig. 2. For the proof of the lemma.


Lemma 2. Let P Q be the remainder after the removal of all these domes
which have the tip-vertex of degree less than six. There exists at least one maximum dome in P Q with tip-vertex belonging to Q, where the bottom surface
of the dome either consists of some facets of Q in P Q or the interior of the
bottom surface contains some vertices of Q in P Q.
Proof. (Sketched) It is easy to see that there always exists a vertex of P with
degree of five or less when P and Q do not share any vertices and faces. (This
can be proved using Eulers formula for P with more than 30 vertices.) By the
assumption of the lemma, there must exist at least one shared vertex in P Q
because otherwise we can continue to remove these domes with the tip-vertices
of degree less than six in P until either P Q becomes the desired case or P has

Tetrahedralization of Two Nested Convex Polyhedra

295

at most 30 vertices and P and Q still do not share any vertex. The later case will
easily result in a linear-number of tetrahedra in P Q. For the former case, we
shall only discuss the case that P and Q share exactly one vertex, say p. For the
other cases, the following analysis can be applied with a more detail analysis.
Due to the blockage of Q, the visible area and the non-visible area in P from
vertex p must form a closed chain, say C 0 . C 0 crosses a sequence of edges in P
so that the vertices of these edges visible from p form a chain C and the vertices
of these edges not visible from p form a chain C 00 . (Refer to the right-hand side
of Figure 2.) All vertices of C are connected to p by edges in P Q due to our
removal process. In such a P Q, there must either exist three vertices in C,
say a, b, and c, such that b is visible to both a and c, and ac crosses Q or no such
three vertices so that ac crosses Q. In the latter case, the convex hull of P in
P Q would not cross Q. Then, by choosing a vertex in C, say b, as tip-vertex,
the corresponding maximum dome will be the desired dome. In the former case,
let C 000 denote the chain consisting of all these vertices in P of P Q such that
every vertex in C 000 is visible to b and one of its neighboring vertices is not visible
to b. Then, the convex hull of the vertices in C 000 must cross Q since at least one
edge of the convex hull, say ac crosses Q. Then, b as the tip-vertex determines
the desired maximum dome.
The lemma below follows the fact that Pbv and Qvb are subsets of P v and Qv ,
respectively.
Lemma 3. | Pbv Qvb | is bounded by | P v Qv |.

Invariant of Nest Convexity

Let P and Q be two nested convex polyhedra with triangle faces. After a M Dv
process, the remainder P Q is still two nested convex polyhedra. They share
the faces (or edges or vertices) formed by Q0v . The outer surface of P Q is
the convex hull of Q and (P P v ) Pbv which includes the bridge faces, and
the inner surface is still Q. However, the visible part of the inner surface must
exclude the faces of Q on the convex hull CH(Q ((P P v ) Pbv ).
The following figures show how a maximum dome with tip vertex v is removed
from convex polyhedron P . It is easy to see that after the removal, the remainder
P Q is still a nested convex polyhedra case.
The property of nest convexity invariant with respect to the maximum domeremoval operation ensures the correctness of our decomposition. Lemma 1,
Lemma 2, and Lemma 3 ensure the number of tetrahedra produced by our
maximum dome-removal decomposition is linear.

The Algorithm

MaxD-REMOVE(P, Q)
Input: Two nested convex polyhedra P and Q (a straight-line planar
graph in DCEL and vertex-edge incident list).

296

Cao An Wang and Boting Yang


v

P
Q

Q
P-Q

bridge

bridge

Fig. 3. The maximum dome with tip v.


Output: T = (t1 , t2 , ..., tk ) (a sequence of tetrahedra), ik ti = P Q.
1. While P Q 6= Do
(a) v select(P Q); (* the bottom of M Dv contains at least one vertex
of Q or a facet of Q. This can be done due to Lemma 2 *)
(b) Find MaxDome(v, P Q)
(c) Update P Q;
2. EndDo.
MaxDome(v, P Q)
1. Find P v and Qv in P Q;
2. Find the maximum-dome M Dv (i.e., find CH(Pbv Q): the bottom and
CH(P v ): the top);
3. T v-emission tetrahedralization of the maximum-dome;
End-MaxD-REMOVE.
Lemma 4. The number of bridge-faces created in the process of maximum dome
removal is bounded by O(m + n).
Proof. The number of bridge-faces created in an MD removal is bounded by the
number of edges in the chains formed by Pbv and Qvb . Thus, we only need show
that each edge in (chains of) Pbv and Qvb created by an M Dv cannot appear
in (chains of) Pbu and Qub created by a later M Du . That is, such an edge is
removed in only one MD. We shall consider the following two cases as well as

Tetrahedralization of Two Nested Convex Polyhedra


eQ

eP
p

bridge

bridge

297

eQ

(1)

(2)

Fig. 4. For the proof of the lemma.


some subcases. (1) If and edge eQ of Qvb is visible to u of P , then by the nestconvexity invariant of P Q triangle facet 4eQ q 0 for q 0 of Q and triangle facet
4eQ p0 for p0 of P in P Q are visible to u. Then, tetrahedra up0 eQ and uq 0 eQ
will belong to the maximum dome M Du . Then, eQ is not on the new Qub and
eQ will not appear in the later MD-removal. (2) If eP of Pbv is visible to u, then
by the nest-convexity invariant of P Q vertex p0 of portion P is visible to u.
Furthermore (i) if u is also visible to q 0 , then both tetrahedra up0 eP and uq 0 eP
are belong to the M Du and eP will not belong to the new Pbu ; (ii) if u is not
visible to q 0 , then eP must form a new bridge face with other vertex of portion
Q in P Q, say q 00 . But, both triangle facets 4eP p0 and 4eP q 00 are visible to u
and they will be removed. The chain formed by the new Pbu will not contain eP .
In any case, the edges in Pbv and Qvb cannot appear in Pbu and Qub . This implies
that the number of bridge-facets created and removed in the process corresponds
the number of surface facets in P Q.
Theorem 1. Algorithm M axD REM OV E produces 2(m + n 3) tetrahedra
for the region between two nested convex polyhedra with m and n vertices and
the algorithm runs O((m + n)3 log(m + n)) time.

Remarks

We have shown a method, called maximum-dome removal, to tetrahedralize


the region between two nested convex polyhedra into a linear number of tetrahedra. The method is simple and we are implementing the algorithm. The time
complexity of our algorithm can be further improved into O((m + n)2 ) by more
detail analysis, which is too long to included in this conference version.

298

Cao An Wang and Boting Yang

Acknowledgments
This work is partially supported by NSERC grant OPG0041629 and ERA grant
in Memorial University of NFLD.

References
1. D.Avis and H.ElGindy, Triangulating point sets in space, Discrete and Computational Geometry , 2(1987)99111.
2. M.Bern, Compatible tetrahedralizations, In Proc. 9th ACM Symp. Computational
Geometry 281288, 1993.
3. M.Bern and D.Eppstein, Mesh generation and optimal triangulation, In Computing
in Euclidean Geometry , (D. Du and F. Hwang eds.), World Scientific Publishing
Co. 1992.
4. B.Chazelle, Convex partitions of polyhedra: a lower bound and worst-case optimal
algorithm, SIAM J. Computing , 13(1984)488507.
5. B.Chazelle and L.Palios, Triangulating a nonconvex polytope, Discrete and computational geometry , 5(1990)505526.
6. B.Chazelle and N.Shouraboura, Bounds on the size of tetrahedralizations, In Proc.
10th ACM Symp. Computational Geometry , 231239, 1994.
7. H.Edelsbrunner, F.Preparata, and D.West, Tetrahedralizing point sets in three dimensions, Journal of Symbolic Computation , 10(1990)335347.
8. J.Goodman and J.Pach, Cell Decomposition of Polytopes by Bending, Israel J. of
Math, 64(1988)129138.
9. J.Goodman and J.ORourke, Handbook of Discrete and Computational Geometry,
CRC Press, New York, 1997.
10. J.Rupert and R.Seidel, On the difficulty of tetrahedralizing 3-dimensional nonconvex polyhedra, Discrete and Computational Geometry, 7(1992)227253.
11. E.Schonhardt, Uber die Zerlegung von Dreieckspolyedern in Tetraeder, Math. Annalen 98(1928)309312.

Efficient Algorithms for Two-Center Problems


for a Convex Polygon
(Extended Abstract)
Sung Kwon Kim1 and Chan-Su Shin2
1

Dept. of Computer Engineering, Chung-Ang University, Seoul 156756, Korea.


[email protected]
2
Dept. of Computer Science, HKUST, Clear Water Bay, Hong Kong.
[email protected]

Abstract. Let P be a convex polygon with n vertices. We want to find


two congruent disks whose union covers P and whose radius is minimized.
We also consider its discrete version with centers restricted to be at
vertices of P . Standard and discrete two-center problems are respectively
solved in O(n log3 n log log n) and O(n log2 n) time. Furthermore, we can
solve both of the standard and discrete two-center problems for a set of
points in convex positions in O(n log2 n) time.

Introduction

Let A be a set of n points in the plane. The standard two-center problem for
A is to cover A by a union of two congruent closed disks whose radius is as
small as possible. The standard two-center problem has been studied extensively.
Sharir [14] firstly presented a near-linear algorithm running in O(n log9 n) time,
and Eppstein [8] subsequently proposed a randomized algorithm with expected
O(n log2 n) running time. Chan [3] recently gave a randomized algorithm that
runs in O(n log2 n) time with high probability, as well as a deterministic algorithm that runs in O(n log2 n(log log n)2 ) time. As a variant, we consider the
discrete two-center problem for A that finds two congruent closed disks whose
union covers A and whose centers are at points of A. Recently, this problem was
solved in O(n4/3 log5 n) time by Agarwal et al. [1].
In this paper, we consider some variants of the two-center problems. Let P
be a convex polygon with n vertices in the plane. We wan to find two congruent
closed disks whose union covers P (its boundary and interior) and whose radius
is minimized. We also consider its discrete version with centers restricted to be
at some vertices of P . See Figure 1. Compared with the two-center problems for
points, differences are that (1) points to be covered by two disks are the vertices
of P in convex positions (not in arbitrary positions) and (2) two disks should
cover the edges of P as well as its vertices. By points in convex positions, we
mean that the points form the vertices of a convex polygon. (1) suggests our
problems are most likely easier than the point-set two-center problems, but (2)
tells us that they could be more difficult.
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 299309, 2000.
c Springer-Verlag Berlin Heidelberg 2000

300

Sung Kwon Kim and Chan-Su Shin

(a)

(b)

Fig. 1. Two center problems for a convex polygon. (a) Standard problem. (b)
Discrete problem.
We assume in this paper that the vertices of P are in general circular position,
meaning that no four or more vertices are co-circular. Our results are summarized
in Table 1. (Some improve the authors previous work of [15].)

Standard 2-center
Discrete 2-center
Convex polygon
O(n log 3 n log log n)
Thm. 3 O(n log2 n)
Thm. 5
Points in convex positions
O(n log 2 n)
Thm. 7 O(n log2 n)
Thm. 6
Points in arbitrary positions O(n log 2 n (log log n)2 ) [3] O(n4/3 log 5 n) [1]

Table 1. The summary of the results.


Most of our algorithms presented in this paper are based on parametric search
technique proposed by Megiddo [13]. To apply the technique, we need to design
efficient sequential and parallel algorithms, As and Ap , for the corresponding
decision problem: for a minimum parameter r , decide whether a given parameter
r r or r < r . If As takes O(Ts ) time, and Ap takes O(Tp ) time using
O(P ) processors, parametric search results in a sequential algorithm for the
optimization problem with running time O(P Tp + Ts Tp log P ). Cole [7] described
an improvement technique that achieves O(P Tp +Ts (Tp +log P )) time, assuming
that the parallel algorithm satisfies a bounded fan-in/out requirement.

Algorithm for Standard Two-Center Problem for a


Convex Polygon

Let P be a convex polygon with n vertices. The vertices are numbered


0, 1, . . . , n 11 counterclockwise and an edge is denoted by specifying its two
end points, e.g., (i, i + 1). Let ha, bi be the counterclockwise sequence of vertices
a, a + 1, . . . , b, if a b, and a, a + 1, . . . , n 1, 0, . . . , b, otherwise.
Let r be the minimum value such that two disks of radius r cover P . Since
parametric search technique will be employed, we will give a sequential algorithm
1

All vertex indices are taken modulo n.

Efficient Algorithms for Two-Center Problems for a Convex Polygon

301

and a parallel algorithm that decides, given a value r > 0, whether r r , i.e.,
whether two disks of radius r can be drawn so that their union covers P .
2.1

Sequential Decision Algorithm

Our decision algorithm starts with drawing for each i a disk Di of radius r with
center at vertex i. Define
b
\
Di .
I(ha, bi) =
i=a

Define mi to be the index such that I(hi, mi i) 6= and I(hi, mi + 1i) = . The
index mi is the counterclockwise farthest vertex from i so that a disk of radius
r can include the vertices in hi, mi i. Note that the mi s are monotone increasing,
i.e., there is no pair of hi, mi i and hj, mj i such that hi, mi i hj, mj i.
Let Ji = I(hi, mi i). Then any point in Ji can be the center of a disk of radius
r that covers hi, mi i. We check each of the following cases.
(i) If there are two vertices i and j such that i, mi hj, mj i and j, mj
hi, mi i, then any two disks of radius r, one with center in Ji and the other with
center in Jj , can cover P , and the decision algorithm returns yes. To check for
a fixed i whether there is an index j such that i, mi hj, mj i and j, mj hi, mi i,
it is sufficient to consider the case of j = mi only, due to the monotonicity of
m-values.
(ii) If there are i and j such that mj + 1 = i and j hi, mi i, then hi, mj i
is guaranteed to be covered by two disks of radius r with centers in Ji and in
Jj and the edge (mj , i) of P is missing. So, we need check whether it can be
covered by two disks of radius r with centers in Ji and in Jj . To do this, find
a disk C of radius r with center on the edge (mj , i) and touching Ji at a point
p and checks whether C intersects Jj . One disk of radius r with center p and
the other with center at any point in C Jj together cover the edge (mj , i) as
well as the other boundary of P . If such point p can be found and C Jj 6= ,
then the decision algorithm returns yes. Again, for a fixed i, it does not need
to consider all js such that mj = i 1 and j hi, mi i. It is easy to see that
considering the case of j = mi is sufficient.
(iii) Finally, if there are i and j such that mi +1 = j and mj +1 = i, then two
edges (mi , j) and (mj , i) are missing. To decide whether these two edges can
simultaneously be covered by two disks of radius r with centers in Ji and in Jj ,
find as above a disk C1 of radius r with center on (mj , i) and touching Jj , and
a disk C2 of radius r with center on (mj , i) and touching Ji . Similarly, find two
disk C10 , C20 of radius r with centers on (mi , j) touching Jj and Ji , respectively.
Now, check whether both C1 C10 Jj and C2 C20 Ji are nonempty. If both are
nonempty, two disks of radius r, one with center in C1 C10 Jj and the other
with center in C2 C20 Ji , can cover both edges as well as the other boundary
of P , and thus the decision algorithm returns yes.
The decision returns no if none of the three cases above returns yes.
Implementation. Compute m0 and J0 , and then Jm0 and Jm0 +1 . For i > 0, Ji ,
Jmi , and Jmi +1 can be obtained from Ji1 , Jmi1 and Jmi1 +1 , by adapting the

302

Sung Kwon Kim and Chan-Su Shin

algorithm in [9] for maintaining convex hulls of a simple chain while points are
dynamically inserted into and deleted from the ends of the chain. An intermixed
sequence of O(`) insertions and deletions on chains with a total of O(`) vertices
can be processed in time O(` log `) [9].
Whenever Ji , Jmi , and Jmi +1 are obtained, we check whether any of three
cases (i), (ii) and (iii) returns yes. Each of these checks can be done in O(log n)
time, provided that Ji , Jmi , and Jmi +1 are given. For this we need a constant
number of the following operations.
(O1) Find a touching point between the intersection of O(n) congruent disks
and another congruent disk with center on a specific edge of P .
(O2) Decide whether a congruent disk with center on a specific edge of P intersects an intersection of O(n) congruent disks. If yes, find the intersection
points on the boundary.
Both (O1) and (O2) can be done in O(log n) time by simply performing binary
searches on the boundary of the intersection of O(n) congruent disks. We assume
here that the boundaries of the intersections are stored in arrays or balanced trees
for binary searches to be applicable.
As a whole, we have the following theorem.
Theorem 1. Given a convex polygon P with n vertices and a value r > 0, we
can decide in O(n log n) time whether two disks of radius r can cover P .
2.2

Parallel Decision Algorithm

Our parallel algorithm builds a segment tree on the sequence, D0 , . . . , Dn1 , of


radius r disks centered at vertices. Each internal node2 of the tree corresponds
to a canonical subsequence of the vertices that are assigned to the leaves of the
subtree rooted at the node. For each canonical subsequence S, compute the
intersection of the disks, I(S) = iS Di . The boundary of I(S) is divided into
two (upper and lower) chains by its leftmost and rightmost points, and these two
chains are stored into two arrays of arcs3 sorted according to their x-coordinates.
Constructing the segment tree, computing I(S) for each canonical subsequence S, and storing their chains into arrays can be carried out in O(log n)
time using O(n log n) processors, as explained in [3].
Computing mi for each i can be done in divide-and-conquer manner. Compute mbn/2c by noting mbn/2c = ` such that I(hbn/2c, `i) 6= and I(hbn/2c, ` +
1i) = . Then due to the monotonicity of the m-values, mi h0, mbn/2c i for
i h0, bn/2c 1i, and mi hmbn/2c , n 1i for i hbn/2c + 1, n 1i. Thus,
they can be recursively obtained. Our parallel algorithm for this step performs
O(log n) recursions each consisting of O(n) decisions on the emptiness of I(ha, bi)
for different a and b. Since, given a and b, whether I(ha, bi) = can be decided
2
3

To avoid confusion, nodes instead of vertices will be used in trees.


Instead of edges, we use arcs to denote sides of an intersection of disks.

Efficient Algorithms for Two-Center Problems for a Convex Polygon

303

in O(log n log log n) time using O(log n) processors [3], the whole of this step
takes O(log2 n log log n) time using O(n log n) processors.
Checking the first case (i) in parallel is easy. For each i, decide whether
mmi hi, mi i. The algorithm returns yes if any one of these n decisions is
true.
For case (ii), collect all is such that mmi = i 1, and for each such i decide
whether edge (i 1, i) can be covered by two disks of radius r with centers in
Ji and in Jmi .
For case (iii), collect all is such that mmi +1 = i1, and for each such i decide
whether both edges (mi , mi + 1) and (i 1, i) can be simultaneously covered by
two disks of radius r with centers in Ji and in Jmi +1 .
For any of cases (ii) and (iii), as in the sequential algorithm, our parallel
algorithm also needs to compute Ji for each i. Computing all Ji s and storing
them explicitly requires (n2 ) work and space, which is far from the bounds of
our parallel algorithm. Instead, whenever a Ji is needed, we compute it from
the canonical subsequences of hi, mi i with the help of the segment tree.
Assume that hi, mi i is a union of k = O(log n) canonical subsequences
S1 , . . . , Sk , and also assume that S1 , . . . , Sk are indexed counterclockwise so that
i S1 , mi Sk , and S` and S`+1 for 1 ` k 1 appear consecutively on the
boundary of P . Then, Ji = I(S1 ) . . . I(Sk ). If i > mi , then hi, mi i is divided
into hi, n 1i and h0, mi i. hi, mi i is a union of the canonical subsequences for
hi, n 1i and the canonical subsequences for h0, mi i.
Let (Ji ) be the upper chain of Ji and Uj be the upper chain of I(Sj ) for
1 j k. We show how (Ji ) is constructed from the Uj . The computation of
its lower chain is completely symmetric.
Build a minimum-height binary tree whose leaves correspond to U1 , . . . , Uk
in a left-to-right order. Let v be a node of the tree and its canonical subsequence
be ha, bi. Let Iv = I(Sa ) . . . I(Sb ) and (Iv ) be its upper chain. Then, (Iv )
consists of some subchains of Ua , Ua+1 , . . . , Ub 4 and thus can be represented by
a set of tuples, where each tuple says which subchain of which Uj contributes to
(Iv ).
In a bottom-up fashion, compute (Iv ) for each node v of the minimumheight binary tree. For each leaf v corresponding to Uj ,
(Iv ) = {(j, 1, x , x+ , 1, |Uj |)}, where x (resp., x+ ) is the x-coordinate of
the leftmost (resp., rightmost) point of Uj . For each internal node v, (Iv ) =
+ +

+ +
{(j1 , p1 , x
1 , x1 , r1 , r1 ), . . . , (jt , pt , xt , xt , rt , rt )}, where t is the number of
subchains of Uj s that consist of (Iv ). Each tuple represents a subchain which
Uj it originally comes from, the rank of its leftmost arc in its original Uj , its
x-range, and the ranks of its leftmost and rightmost arcs in (Iv ). For example,
the first tuple (Iv ) means the following three things:
+
1. the subchain of Uj1 in the x-range [x
1 , x1 ] appears in (Iv );
2. its leftmost (resp., rightmost) arc is bounded by a vertical line x = x
1 (resp.,
)
and
its
leftmost
arc
is
a
part
of
the
p
-th
arc
in
U
;
and
x = x+
1
j
1
1
4

A subchain of Uj is a part of Uj between any two points on it.

304

Sung Kwon Kim and Chan-Su Shin

3. its leftmost (resp., rightmost) arc becomes the r1 -th (resp., r1+ -th) arc in
(Iv ).
Lemma 1. Assume that v has two children w and z. Given (Iw ) and (Iz ),
(Iv ) can be obtained in O(log n (|(Iw )| + |(Iz )| + log n)) sequential time.
Proof. Let f = (Iw ) and g = (Iz ). Let S w and S z be the canonical
subsequences of w and z, respectively. In other words, Iw = iS w Di and
Iz = iS z Di . Let |S w | and |S z | be the number of vertices in S w and S z .
Let [x , x+ ] be the common x-range of f and g. The intersection points, if any,
of f and g must be in the vertical strip bounded by two lines x = x and x = x+ .
So, we may assume that f and g are functions over [x , x+ ]. Note that f and g
consist of several arcs of radius r. Lemma 1 will be proved through a series of
lemmas whose proofs are given in the full paper [11].
Lemma 2. f and g intersect at most twice.
Since both f and g are upper chains of the intersection of congruent disks,
they are upward convex with one highest point. Define h(x) = f (x) g(x) over
[x , x+ ].
Lemma 3. If both f and g are either increasing or decreasing over [x , x+ ],
f (x ) > g(x ), and |S w | 3 and |S z | 3, then h over [x , x+ ] is a downward
convex function with one lowest point.
Using Lemma 3, we can prove the following lemma.
Lemma 4. If each of f and g is either increasing or decreasing over [x , x+ ],
then their intersections, if any, can be found in O(log n(|(Iw )|+|(Iz )|+log n))
sequential time.
To compute the intersection points between f and g, find xf and xg , the
x-coordinates of the highest points of f and g, respectively. Such points, xf and
xg , can be computed in time O(|(Iw )|log n) and O(|(Iz )|log n), respectively.
Wlog, assume that xf < xg . Then, [x , x+ ] is divided into three subranges

[x , xf ], [xf , xg ], and [xg , x+ ]. In each subrange, f is either increasing or decreasing and the same is true for g. Then Lemma 4 applies to compute intersections
of f and g over each subrange. For details, see [11].
After locating the intersection points between f and g, it is easy to determine
which tuples from (Iw ) and (Iz ) are eligible to be in (Iv ). Thus, the tuples
of (Iv ) can be computed in additional O(|(Iw )| + |(Iz )|) time.
This completes the proof of Lemma 1.
Given all (Iw ) for the nodes w of some level of the minimum-height tree, if
k processors are available, then all (Iv ) for the nodes v of the next level (toward
the root) can be obtained in O(log n (|(Iw )| + log n)) = O((k + log n) log n)
time by Lemma 1. Note that |(Iw )| = O(k) for any node w. |(Iw )| is the
number of tuples, not the number of arcs in it. The minimum-height tree with
k leaves has O(log k) levels.

Efficient Algorithms for Two-Center Problems for a Convex Polygon

305

Lemma 5. For any i, (Ji ), in the form of a set of tuples, can be constructed
in O((k + log n) log k log n) time using O(k) processors.
Back to checking case (ii) or case (iii), assign k = O(log n) processors to
each i satisfying the condition of (ii) or (iii), and construct Ji , in the form of
two sets of tuples, one for its upper chain and the other for its lower chain, in
O(log2 n log log n) time by Lemma 5. Since there are at most n such is, we need
a total of O(n log n) processors.
The remaining part of (ii) or (iii) can be done using a constant number of
operations (O1) and (O2) on Ji . Each of (O1) and (O2), using the two sets of
tuples, can now be executed in O(log2 n) sequential time. As a result, we have
the theorem.
Theorem 2. Given a convex polygon P with n vertices and a value r > 0, we
can decide in O(log2 n log log n) time using O(n log n) processors whether two
disks of radius r cover P .
Combining Theorems 1 and 2, we have proved the theorem.
Theorem 3. Given a convex polygon P with n vertices, we can compute the
minimum radius r in O(n log3 n log log n) time such that two disks of radius r
cover P .
Proof. By parametric search technique, we immediately have an
O(n log4 n log log n) time algorithm. Our parallel algorithm can easily be
made to satisfy the Coles requirement [7]. The time complexity is now reduced
to O(n log3 n log log n).

Algorithm for Discrete Two-Center Problem for a


Convex Polygon

Let P be a convex polygon with n vertices. We want to find the minimum value
r and two vertices i, j such that two disks of radius r with centers i and j
cover P . Since again parametric search technique will be employed, we will give
a sequential algorithm and a parallel algorithm that decides, given a value r > 0,
whether r r .
3.1

Sequential Decision Algorithm

Let P denote the boundary of P . For two points a, b on P , hha, bii denotes the
subchain of P that walks counterclockwise starting at a and ending at b.
Given r > 0, draw a disk Di of radius r with center at vertex i for each i.
Then, Di P may be disconnected and thus may consist of several subchains
of P . One of them contains i, which will be denoted by i = hhai , bi ii.
Lemma 6. r r iff there exist two vertices i and j such that P = i j .

306

Sung Kwon Kim and Chan-Su Shin

Computing the end points ai , bi of i for each i can be done by simulating


sequentially our parallel algorithm in Section 3.2. The simulation takes O(n log n)
time for preprocessing and for a query i answers ai and bi in O(log n) time.
Alternatively, the algorithm in [6] can be used. It, given r > 0, preprocesses P
in O(n log n) time, and, for a query point c, one can find in O(log n) the first
(clockwise and counterclockwise) hit point on P when a circle of radius r with
center at c is drawn.
After having i for all i, by Lemma 6 we need to decide whether there exist
two vertices i and j such that P = i j . This is an application of minimum
circle cover algorithm in [2,10,12] that runs in O(n log n) time. In the minimum
circle cover problem, we are given a set arcs of a circle and want to find the
minimum number of arcs that covers the circles (i.e., whose union is the circle).
Theorem 4. Given a convex polygon P with n vertices and a value r > 0,
we can decide in O(n log n) time whether two disks of radius r with centers at
vertices of P can cover P .
3.2

Parallel Decision Algorithm

Our parallel algorithm first computes i for each i by locating ai and bi . Build a
segment tree on the sequence of radius r disks centered at vertices, D0 , . . . , Dn1 ,
D0 , . . . , Dn2 . For each node v with canonical subsequence S, compute the intersection of the disks, Iv = iS Di . The boundary of Iv is divided into two
(upper and lower) chains by its leftmost and rightmost points, and the upper
and lower chains are stored into two arrays, + (Iv ) and (Iv ), respectively, of
arcs sorted according to their x-coordinates. Given a point q, whether q Iv
can be decided by doing binary searches on + (Iv ) and on (Iv ).
To compute hhai , bi ii, it is sufficient to find the minimal hhci , di ii hhai , bi ii,
where ci and di are vertices of P .
For a given vertex i, di can be searched using the segment tree as follows:
Choose the left one from the two Di s at the leaves of the tree. We go upward
along the leaf-to-root path starting at the chosen Di , and locate the first node
/ Iz0 . Starting at z 0 , we now
on the path with a right child z 0 satisfying i
search downward. At a node with left child w and right child z, search under
the following rule: Go to z if i Iw , and go to w, otherwise. It is easy to verify
that when search is over at a leaf v, we have di = v.
Searching ci is completely symmetric.
Implementation. Constructing the segment tree and computing + (Iv ) and
(Iv ) for each v can be carried out in O(log n) time using O(n log n) processors
[3] as in Section 2.2.
For a fixed i, ci and di can be found in O(log2 n) sequential time as we
visit O(log n) nodes and at each node v we spend O(log n) time doing binary
search to decide whether i Iv . This type of search (i.e., searching the same
value in several sorted lists along a path of a binary tree) can be improved by
an application of fractional cascading [4,5], saving a logarithmic time to achieve
O(log n) search time.

Efficient Algorithms for Two-Center Problems for a Convex Polygon

307

From ci and di , we compute i = hhai , bi ii by computing the intersection


points between a circle of radius r with center i and two edges (ci , ci + 1), (di
1, di ). With i for all i, an application of parallel minimum circle cover algorithms
in [2,10] runs in O(log n) time using O(n) processors.
Theorem 5. Given a convex polygon P with n vertices, we can compute the
minimum radius r in O(n log2 n) time such that two disks of radius r with
centers at vertices of P cover P .
Proof. By Theorem 4, our sequential decision algorithm takes O(n log n) time.
After constructing the segment tree and computing + (Iv ) and (Iv ) for
each v in our parallel algorithm, sort the vertices of P and the vertices of + (Iv )
(Iv ) for all nodes v by their x-coordinates. This makes the application of
fractional cascading and computation of ci and di no longer depend on r, by
using ranks rather than x-coordinates. So, these steps can be done sequentially.
Since the Coles improvement [7] again can be applied to the parallel steps
(i.e., constructing the segment tree, sorting, and applying parallel circle cover
algorithm, that take O(log n) time using O(n log n) processors), the time bound
can be achieved.
Our idea for Theorem 5 can be easily extended to the discrete two-center
problem for points when the points are the vertices of a convex polygon.
Theorem 6. Given a set A of n points that are vertices of a convex polygon,
we can compute the minimum radius r in O(n log2 n) time such that two disks
of radius r with centers at points of A cover A.

Algorithm for Standard Two-Center Problem for a Set


of Points in Convex Position

Suppose that a set A of n points in convex positions are given. We assume that
as input a convex polygon with vertices at the points of A is given, so the points
are sorted counterclockwise. We want to find two disks of radius r whose union
covers A. As usual, the points are numbered 0, . . . , n 1 counterclockwise.
1
be the radius of the smallest disk
For any i, j A = h0, n 1i, let rij
2
containing hi, j 1i and let rij be the radius of the smallest disk containing
1
2
, rij
}.
hj, i 1i. Then, r = mini,jA max{rij
1
2
, r0,j
}. Let k be the index such that r0 =
Let r0 = minjA max{r0,j
1
2
, r0,k
}. Then, A is separated into h0, k 1i and hk, n 1i.
max{r0,k
Lemma 7. For any i, j such that i, j h0, k 1i or i, j hk, n 1i,
1
2
, rij
} > r0 .
max{rij
By Lemma 7 we need to consider pairs of i, j such that i h0, k 1i and
j hk, n 1i. We now apply divide-and-conquer with A1 = h0, k 1i and A2 =
hk, n1i. (i) Pick the medium-index vertex bk/2c from A1 and (ii) find the vertex

308

Sung Kwon Kim and Chan-Su Shin

1
2
1
2
k 0 such that max{rbk/2c,k
0 , rbk/2c,k0 } = minjhk,n1i max{rbk/2c,j , rbk/2c,j }. A1
is separated into A11 = h0, bk/2c 1i and A12 = hbk/2c, k 1i, and A2 is
separated into A21 = hk, k 0 1i and A22 = hk 0 , n 1i. By Lemma 7, we consider
pairs of points between A11 and A21 , and between A12 and A22 . (iii) Repeat
recursively (i)(ii) with A1 = A11 and A2 = A21 , and with A1 = A12 and
A2 = A22 . Recursion stops when A1 consists of a single point `, and at that time
1
2
, r`,j
} can be found as in (ii).
minjA2 max{r`,j
Since a smallest disk containing a convex chain can be found
1
2
, rij
} for any i, j can be computed in linear
in linear time, max{rij
1
1
2
2
, . . . , r0,n1
is decreasing,
time. Since r0,1 , . . . , r0,n1 is increasing and r0,1
1
2
1
2
max{r0,1 , r0,1 }, . . . , max{r0,n1 , r0,n1 } is decreasing and then increasing. So,
r and k can be found in O(n log n) time by binary search, in which each decision takes O(n) time. Similarly, (ii) takes O(n log n) time. Since our algorithm
invokes at most O(log n) recursions, and after recursion stops a single point
` A1 requires additional O(|A2 | log |A2 |) time, we can conclude the following
theorem.

Theorem 7. Given a set A of n points that are vertices of a convex polygon,


we can compute the minimum radius r in O(n log2 n) time such that two disks
of radius r cover A.

References
1. P. K. Agarwal and M. Sharir and E. Welzl, The discrete 2-center problem, Proc.
13th Ann. ACM Symp. Comput. Geom., pp. 147155, 1997.
2. L. Boxer and R. Miller, A parallel circle-cover minimization algorithm, Inform.
Process. Lett., 32, pp. 5760, 1989.
3. T. M. Chan, More planar two-center algorithms, Computational Geometry: Theory
and Applications, 13, pp. 189-198, 1999
4. B. Chazelle, and L. J. Guibas, Fractional cascading: I. A data structuring technique, Algorithmica, 1, pp. 133162, 1986.
5. B. Chazelle, and L. J. Guibas, Fractional cascading: II. Applications, Algorithmica,
1, pp. 163191, 1986.
6. S.-W. Cheng, O. Cheong, H. Everett, and R. van Oostrum, Hierarchical vertical
decompositions, ray shooting, and circular arc queries in simple polygons, Proc.
15th Ann. ACM Symp. Comput. Geom., pp. 227236, 1999.
7. R. Cole, Slowing down sorting networks to obtain faster sorting algorithms, J.
ACM, 34, pp. 200208, 1987.
8. D. Eppstein, Faster construction of planar two-centers, Proc. 8th ACM-SIAM
Symp. Discrete Algorithms, pp. 131138, 1997.
9. J. Friedman, J. Hershberger, and J. Snoeyink, Compliant motion in a simple polygon, Proc. 5th Ann. ACM Symp. Comput. Geom., pp. 175186, 1989.
10. S. K. Kim, Parallel algorithms for geometric intersection graphs, Ph.D. Thesis,
Dept. of Comput. Sci. Eng., U. of Washington, 1990.
11. S. K. Kim, and C.-S. Shin, Efficient algorithms for two-center problems for a convex
polygon, HKUST-TCSC-1999-16, Dept. of Comp. Sci., HKUST, 1999.
12. C. C. Lee and D. T. Lee, On a circle-cover minimization problem, Inform. Process.
Lett., 18, pp. 109115, 1984.

Efficient Algorithms for Two-Center Problems for a Convex Polygon

309

13. N. Megiddo, Applying parallel computation algorithms in the design of serial algorithms, J. ACM, 30, pp. 852865, 1983.
14. M. Sharir, A Near-Linear Algorithm for the Planar 2-Center Problem, Proc. 12th
Ann. ACM Symp. Comput. Geom., pp. 106112, 1996.
15. C.-S. Shin, J.-H. Kim, S. K. Kim, and K.-Y. Chwa, Two-center problems for a
convex polygon, Proc. 6th Euro. Symp. on Algo., Vol. 1461, pp. 199210, 1998.

On Computation of Arbitrage for Markets with


Friction
Xiaotie Deng1,? , Zhongfei Li2,?? , and Shouyang Wang3,? ? ?
1

Department of Computer Science


City University of Hong Kong
Hong Kong, P. R. China
[email protected]
2
Institute of Systems Science
Chinese Academy of Sciences, Beijing, P.R. China
[email protected]
3
Academy of Mathematical and Systems Science
Chinese Academy of Sciences, Beijing, P.R. China
[email protected]

Abstract. We are interested in computation of locating arbitrage in financial markets with frictions. We consider a model with a finite number
of financial assets and a finite number of possible states of nature. We
derive a negative result on computational complexity of arbitrage in the
case when securities are traded in integer numbers of shares and with
a maximum amount of shares that can be bought for a fixed price (as
in reality). When these conditions are relaxed, we show that polynomial
time algorithms can be obtained by applying linear programming techniques. We also establish the equivalence for no-arbitrage condition &
optimal consumption portfolio.

Introduction

The function of arbitrage in an economy is most vividly described as an invisible


hand that led economic states move to equilibrium (Adam Smith in 1776 [30]).
Arbitrage is commonly defined as a profit-making opportunity at no risk. In other
words, it is an opportunity for an investor to construct a portfolio modification
at non-positive costs that is guaranteed to generate a non-negative return later.
Economic states with arbitrage are believed not to exist (at least not for any
significant duration of time) in a normal situation. Accordingly, arbitrage-free
assumption has been a fundamental principle in the studies of mathematical
economics and finance [3,4,19,24,32]. Natually, characterizing arbitrage (or noarbitrage) states for a set of economic parameter would be important here. The
exact form would depend on the specific economic models we would consider. But
?
??
???

Research partially supported by a CERG grant of Hong Kong UGC and an SRG
grant of City University of Hong Kong
Research partially supported by Natural Science Foundation of China
Research partially supported by Natural Science Foundation of China

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 310319, 2000.
c Springer-Verlag Berlin Heidelberg 2000

On Computation of Arbitrage for Markets with Friction

311

luckily, in most cases, it has been quite straight forward to do so, especially under
usual assumptions of frictionless and complete market conditions [24,13,23,31].
Going into a different direction, the purpose of our study is to understand
the computational complexity involving in characterization of arbitrage states
(see [11,17,25] for the importance of computation in finance or economics). To
deal with this issue, we follow a model of the market in [31] with a finite number
of financial assets, 1, 2, , n, with a finite number of possible states of nature,
s1 , s2 , . . . , sm . Assets are traded at date 0 and returns are realized at date 1.
Let R = (rij ) be an n m matrix where rij is the payoff to financial asset i if
state sj occurs. Let P = (p1 , p2 , . . . , pm )T be the price vector, where pi be the
price of asset i (i = 1, 2, . . . , m) and T denotes the transposition. A portfolio is a
vector x = (x1 , x2 , . . . , xm )T , where xi is the number of shares invested in asset i,
i = 1, 2, . . . , m. Under perfect market conditions, an arbitrage opportunity is a
solution x such that xT P 0, xT R 0, and xT P + xT Re > 0, where e is
the vector of all ones. In a frictionless market, the problem is solvable by linear
programming (see, e.g., [8]).
Since linear programming is known to be solvable in polynomial time, copmutationally this justifies the general belief that any arbitrage possibility will be
shortlived since it will be identified very quickly, and be taken advantage of, and
subsequently bring economic states to a no-arbitrage one. In real life, however,
there are various forms of friction conditions imposed on trading rules. Some
assumptions in the previous analysis may not always hold. For example, ask-bid
prices of the same stock are often different (ask-bid spread). At stock exchange
listings, one offers or bids for a stock at a certain price at a certain volume;
and one can only buy or sell a stock at an integer amount. We want to know
whether these rules, institutionalized by human, create difficulties for arbitrage,
and thus create difficulties for general equilibrium to hold. If this is the case, understanding the rationals behind the motives of making arbitrage difficult may
provide us with new insights in understanding the role of the financial market in
the economy. Indeed, we show that under the above requirements (integrality of
shares traded and the capacity constraints in the number of shares asked/bid),
the problem to find out an arbitrage portfolio (under a given price vector) is
computationally hard. We present this result in Section 2. One may notice that
removing any one of the two constraints will result in a polynomial time solution via linear programming techniques. Obviously, the ask/bid amount and the
corresponding price by investors cannot be changed. However, the integrality
condition may be removed in principle, or at least be weakened by redividing
shares so that the gain of arbitrage will be insignificant. We should consider the
case without integrality conditions in the subsequent sections.
In Section 3, we consider transaction costs, another important factor in deviation from frictionless market. Friction complicates any theory one is to develop.
Partially because of this, friction is generally ignored in asset pricing models although it is often brought up in informal discussion and debates. Recently, a
few authors have started to incorporate transaction costs into financial market
models [2,7,12,21]. In [21], Pham and Touzi established the equivalence between

312

Xiaotie Deng, Zhongfei Li, and Shouyang Wang

the no local arbitrage condition and the existence of an equivalent probability


measure satisfying a generation of the martingale property as well as the equivalence of the no local free lunch and the no local arbitrage conditions. However,
Their work is a complicated mathematical condition that may not always lead to
an efficient algorithm to solve it. In Section 3, we establish a necessary and sufficient condition for arbitrage-free asset prices, in presence of transaction costs,
for a financial market with finite assets and finite states of nature. In comparison, our result is of the classic type: the existence of positive implicit state-claim
prices that satisfy a linear inequality system, which can be easily solved by linear
program techniques.
In Section 4, we study a optimal consumption-portfolio selection problem
in financial markets with friction under uncertainty. The absence of arbitrage
is employed to characterize the existence or a necessary and sufficient condition of optimal consumption-portfolio policies when the financial assets and
the state of nature are finite and when the friction is subject to proportional
transaction costs. Historically optimal consumption and portfolio selection problems have been investigated by a number of authors [14,18,6,15,16,29,8,28,27,26].
Typically, continuous time problem is studied using the approach of stochastic
dynamic programming, and under the assumption of frictionless market. The
non-differentiability of transaction cost functions makes analysis of our problem
complicated. We are able to establish a necessary and sufficient condition for a
positive consumption bundle to be consumer optimal for some investor is that a
transformed market exhibits no arbitrage.
Section 5 contains a few concluding remarks and suggestions for possible
future extensions.

NP-Completeness of Arbitrage under Integral


Conditions

Theorem 1 In general, it is strongly NP-hard to find an arbitrage portfolio.


The reduction is from 3SAT, a well known NP-hard problem [11]. Consider
an instance of 3SAT: the variables are X = {x1 , x2 , , xn }, and the clauses
are Cj = {lj1 , lj2 , lj3 } X, j = 1, 2, . . . , m. We create two assets ai (ask) and
bi (bid) for each variable, i = 1, 2, , n, and another asset a0 . The events are
related to the variables and the clauses.
1. At event e0 , the payoff of a0 is n + 1 and the payoffs to all other assets are
1 (so that a0 must be bought);
2. at event fi (i = 1, 2, , n), the payoff of a0 is 1, the payoff of ai is 1 the
payoff of bi is 1 and the payoffs to all other assets are zero (either ai is
bought or bi is sold);
3. at event gi (i = 1, 2, , n), the payoff of a0 is 1 the payoff of ai is 1, the
payoff of bi is 1, and the payoffs to all other assets are zero (not both ai is
bought and bi is sold);

On Computation of Arbitrage for Markets with Friction

313

4. at event hj (j = 1, 2, , m), the payoff of a0 is 1 if xi Cj , the payoff to


i Cj , the payoff to bi is 1 (at least one asset corresponding to
ai is 1, if x
Cj is traded).
With more careful analysis we can show that, for event e0 , we may choose
the payoff to be one for a0 , and zero for all other assets.

A Necessary and Sufficient Condition for No-Arbitrage


Pricing of Assets with Transaction Costs

In addition to the notations we introduced above, we use i and i respectively


for the transaction cost rates for purchasing and selling one share of asset i
(i = 1, 2, . . . , n), where 0 i , i < 1.
The asset market is now completely described by the quadraple {P, R, , },
where P is the price vector, R the payoff matrix, = (1 , 2 , . . . , n )T the
vector of transaction costs for purchasing, and = (1 , 2 , . . . , n )T the vector
of transaction costs for selling.
Without loss of generality, we ignore any redundant assets, omit any states
with zero probability, and assume that R has rank n m. Markets are said to
be complete if n = m.
A portfolio modification is a vector x = (x1 , x2 , . . . , xn )T Rn , where xi is
the number of shares of security i modified by a investor. If xi > 0, additional
asset i is bought for the amount of xi ; and if xi < 0, additional asset i is sold
for the amount of xi .
We introduce the functions defined on R by

(1 + i )z, if z > 0
, i = 1, 2, . . . , n.
i (z) =
(1 i )z, otherwise.
and the function mapping Rn into R by
(x) =

n
X

pi i (xi ), x Rn

(1)

i=1

The total cost including the proportional transaction cost of the portfolio modification x = (x1 , x2 , . . . , xn )T is then (x) and the vector of state-dependent
payoffs on the modification is RT x. If (x) = 0, then the modification is costless, while if (x) < 0, then the modification generates a positive date-0 cash
flow.
For simplicity, we also define, for any y = (y1 , y2 , . . . , yk )T , z =
(z1 , z2 , . . . , zk )T Rk (where k 2),
y z if and only if yi zi (i = 1, 2, . . . , k),
y > z if and only if y z and y 6= z,
y  z if and only if yi > zi (i = 1, 2, . . . , k),

314

Xiaotie Deng, Zhongfei Li, and Shouyang Wang

and denote
k
k
= {y Rk : y > 0}, R++
= {y Rk : y  0}.
R+

Definition 1 The market {P, R, , } has an arbitrage opportunity if there exists a portfolio modification x = (x1 , x2 , . . . , xn )T such that the following three
conditions hold
RT x 0,
(x) 0,

(2)
(3)

RT x 6= 0 or (x) 6= 0.

(4)

In other words, the market exhibits no-arbitrage if there exists no portfolio modification x = (x1 , x2 , . . . , xn )T such that
(x), xT R

T

> 0.

(5)

To characterize the no-arbitrage condition, we need some lemmas.


A function : Rk R is sublinear if, for any x, y Rk and R+ ,
(x + y) (x) + (y) and (x) = (x).
It can be easily verify that
Lemma 1 The cost functions , i , i = 1, 2, . . . , n are sublinear and hence convex.
For any topological vector space Y , denote by Y the topological dual space
of Y . A set C Y is said to be a cone if c C for any c C and 0
and a convex cone if in addition C + C C. A cone C is said to be pointed if
C (C) = {0}. For a set C Y , its topological closure is denoted by cl C, its
generated cone is the set
cone C := {c : 0, c C},
its dual cone is defined as
C + := {f Y : f (c) 0, c C},
and the quasi-interior of C + is the set
C +i := {f Y : f (c)  0, c C \ {0}}.
Recall that a base of a cone C is a convex subset B of C such that
0 6 cl B and C = cone B.
We will make reference to the following cone separation theorem [5].

On Computation of Arbitrage for Markets with Friction

315

Lemma 2 Let Q and C be two closed convex cones in a locally convex vector
space and let C be pointed and have a compact base. If Q (C) = {0}, then
there exists h C +i such that h Q+ .
Define the subset of Rm+1


K = y = (y0 , y1 , . . . , ym )T : y0 (x), (y1 , . . . , ym ) = xT R, x Rn .
Then, we have a property of K and a elementary equivalent definition of the no
arbitrage as follows.
Lemma 3 K is a closed convex cone.
Proof. By the sublinearity of functional , it is clear that K is a convex cone.
By the continuity of and the full row rank of R, it can be verified that K is
closed.
Lemma 4 The market {P, R, , } exhibits no-arbitrage if and only if
m+1
= {0}.
K R+

Proof.
m+1
6= {0}
K R+

0 6= y K

m+1
R+

y Rm+1 , x Rn s.t. 0 < y (x), xT R

there exists arbitrage.

(6)
T

(7)
(8)
(9)

Now we state and prove our main result.


Theorem 2 The market {P, R, , } exhibits no-arbitrage if and only if there
m
such that
exists q = (q1 , q2 , . . . , qm )T R++
i pi

m
X

rij qj pi i pi , i = 1, 2, . . . , n.

(10)

j=1
m
such
Proof. Sufficiency: Assume that there exists q = (q1 , q2 , . . . , qm )T R++
that (10) holds. If the market {P, R, , } had a arbitrage opportunity, then
there would exist a portfolio x such that expressions (2)(4) hold. Hence,

(x) + xT Rq > 0.

(11)

On the other hand, multiplying the first inequality of (10) by xi > 0 and the
second by xi 0 yields

m
X
i xi pi , if xi > 0,
rij qj xi pj
xi
i xi pi , otherwise.
j=1

316

Xiaotie Deng, Zhongfei Li, and Shouyang Wang

That is,
xi

m
X


rij qj

j=1

(1 + i )xi pi , if xi > 0
= pi i (xi ).
(1 i )xi pi , otherwise

Hence,
(x) =

n
X

pi i (xi )

i=1

n
X
i=1

i.e,

xi

m
X

rij qj =

j=1

m
X
j=1

qj

n
X

xi rij = (xT R)q,

i=1

(x) + xT Rq 0

which contradicts expression (11). Therefore, the market {P, R, , } exhibits


no-arbitrage.
Necessity: Assume that the market {P, R, , } exhibits no-arbitrage. Then,
by Lemma 4,
m+1
) = {0},
(K) (R+
m+1
is a closed convex
where K is a closed convex cone by Lemma 3. Since R+
pointed cone and has a compact base, by Lemma 2, there exists q = (q0 , q) =
m+1 +i
m+1
) = R++
such that qT y 0 for all y K. Hence,
(q0 , q1 , . . . , qm )T (R+

q0 (x) + xT Rq 0, x Rn
because ( (x), xT R)T K for all x Rn . Without loss of generality, we
assume that q0 = 1. Then,

n
X
i=1

pi i (xi ) +

m
X
j=1

qj

n
X

rij xi 0, x Rn .

(12)

i=1

Taking xi = 1, xj = 0, j 6= i in (12) yields the desired result (10).


Definition 2 A vector q Rm is said to be a state-price vector if it satisfies
the expression (10).
With this terminology we can re-state Theorem 2 as: there is no-arbitrage if
and only if there is a strictly positive state-price vector.
In addition, from the proof of theorem 2 we have
Corollary 1 If q Rm is a state-price vector, then, for any portfolio modification x,
xT Rq (x).
That is, a discount value of the expected payoff of any modification under a
specially chosen risk-neutral probability world is not more than its total cost.

On Computation of Arbitrage for Markets with Friction

317

Definition 3 A portfolio modification x is said to be riskless if it has the same


return in each state, i.e.
xT R = r(1, 1, . . . , 1) for some r R.
Corollary 2 If there exists a riskless asset or portfolio, then the sum of components of any state-price vector is not more than the discount on riskless borrowing.
x)
Proof. Let x
be a riskless portfolio with x
T R = (1, 1, . . . , 1). Then the cost (
of the portfolio is the discount on riskless borrowing. Let q be a state-price
vector. Then, by Corollary 1, one has
(
x) (
xT R)q = (1, 1, . . . , 1)q =

n
X

qi .

i=1

Optimal Consumption Portfolio

Consider now the following optimal consumption-portfolio selection problem

maxx
U (c1 , c2 , . . . , cm )

n
pi i (xi ) W
subject to: i=1P
(CP )
n
=
c

j
i=1 rij xi + ej , j = 1, 2, . . . , m

cj 0, j = 1, 2, . . . , m
m
is the
where W > 0 is the investors initial wealth, e = (e1 , e2 , . . . , em )T R+
T
vector of his or her endowment in every state at date 1, c = (c1 , c2 , . . . , cm ) is
m
a vector of his or her consumption in every state at date 1, and U : R+ R is
his or her utility function which is assumed throughout the paper to be concave
and strictly increasing.
The investors budget-feasible set (i.e., the set of feasible solutions to (CP ))
is
m
, x Rn , c = e + RT x, (x) W }.
B = {(c, x) : c R+

We establish that (the proof is omitted here and will be given in the full
paper):
Theorem 3 If problem (CP ) has an optimal solution, then the market
{R, P, , } exhibits no-arbitrage. Conversely, if U is continuous and the market {R, P, , } has no-arbitrage, then there exists an optimal solution to problem (CP ).
We comment that the restrictions we imposed in the beginning of the section
can be removed to by making a transformation procedure to change the states
and thus the payoff matrix R. We can obtain a similar necessary and sufficient
condition as stated below and details will be given in the full paper.

318

Xiaotie Deng, Zhongfei Li, and Shouyang Wang

Theorem 4 An allocation c = (c1 , c2 , . . . , cm )T > 0 will be an optimal consumption for some investor with differentiable, strictly concave, stateindependent, vNM utility function in the market {R, P, , } if and only if the
P, , } exhibits no-arbitrage.
market {R,

Conclusion

In this paper, we first establish a negative computational complexity result for arbitrage under realistic financial market situations. Then, we move on by dropping
the integrality constraints (justifiable up to a certain extent with the bounded
rationality principle) to derive a necessary and sufficient condition for the noarbitrage market with transaction costs. The condition can be computed in polynomial time using linear programming.
Another dimension in the analysis of economic theory is the utility preferences of the participants. This determines, among all the no-arbitrage conditions,
one that is a general equilibrium state under which no participant has the incentive to shift to a different allocation of its investment, under the frictionless
assumption. Assuming risk aversion of participants, Green and Srivastava [13]
showed that the equilibrium state of the market is equivalent to no-arbitrage.
We studied an optimal consumption and portfolio selection problem in a finitestate financial market with transaction costs. We characterized the existence or
a necessary and sufficient condition of an optimal consumption-portfolio policy
by no-arbitrage of the original market as well as a transformed market.

References
1. Allingham, M., 1991. Arbitrage, St. Martins Press, New York.
2. Ardalan, K., The no-arbitrage condition and financial markets with transaction
costs and heterogeneous information: the bid-ask spread, Global Finance Journal,
1999, 10(1): 83.
3. Arrow, K. J., Debreu, G., Existence of an equilibrium for a competitive economy,
Econometrica, 1954, 22: 265.
4. Black, F., Sholes, M., The pricing of options and corporate liabilities, Journal of
Political Economy, 1973, 81: 637.
5. Borwein, J.M., 1977. Proper Efficient Points for Maximizations with Respect to
Cones. SIAM Journal on Control and Optimization 15, 1977, pp.5763.
6. J. C. Cox and C. F. Huang, Optimal consumption and portfolio policies when asset
prices follow a diffusion process, Journal of Economic Theory 49 (1989), 3383.
7. Dermody, J. C., Prisman, E. Z., No arbitrage and valuation in market with realistic
transaction costs, Journal of Financial and Quantitative Analysis 1993, 28(1): 65.
8. J. B. Detemple and F. Zapatero, Optimal consumption-portfolio policies with habit
formation, Mathematical Finance 2 (1992), no. 4, 251274.
9. Duffie, D., Dynamic asset pricing theory, 2nd ed., Princeton University Press, New
Jersey, 1996.
10. P. Dybvig and S. Ross, Arbitrage, in The New Palgrave: A Dictionary of Economics,
1, J. Eatwell, M. Milgate and P. Newman, eds., London: McMillan, 1987,, pp. 100
106.

On Computation of Arbitrage for Markets with Friction

319

11. Garey, M. R., Johnson, D. S., Computers and Intractability: a Guide to the Theory
of NP-completeness, New York : W.H. Freeman, 1979.
12. Garman, M. B., Ohlson, J. A., Valuation of risky assets in arbitrage-free economies
with transactions costs, Journal of Financial Economics, 1981, 9: 271.
13. R. C. Green, and S. Srivastava, Risk Aversion and Arbitrage, The Journal of
Finance, Vol. 40, pp. 257268, 1985.
14. N. H. Hakansson, Optimal investment and consumption strategies under risk for a
class of utility functions, Econometrica 38 (1970), no. 5, 587607.
15. H. He and N. D. Pearson, Consumption and portfolio policies with incomplete markets and short-sale constrains: the infinite dimensional case, Journal of Economic
Theory 54 (1991), 259304.
16. H. He and N. D. Pearson, Consumption and portfolio policies with incomplete markets and short-sale constrains: the finite dimensional case, Mathematical Finance
1 (1991), no. 3, 110.
17. Hirsch, M. D. , Papadimitriou, C. H., Vavasis, S. A., Exponential lower bounds for
finding brouwer fixed points, Journal of Complexity, 1979, 5: 379.
18. I. Karatzas, J. P. Lehoczky, and S. E. Shreve, Optimal portfolio and consumption
decisions for a small investor on a finite horizon, SIAM Journal on Control and
Optimization 25 (1987), no. 6, 15571586.
19. Merton, R. C., 1973. Theory of Rational Option Pricing. Bell Journal of Economics
and Management Science 4, 141183.
20. R. C. Merton, Optimum consumption and portfolio rules in a continuous-time
model, Journal of Economic Theory 3 (1971), 373413.
21. H. Pham and N. Touzi, The fundamental theorem of asset pricing with cone constraints, Journal of Mathematical Economics, 31, 265279, 1999.
22. R. T. Rockafellar, Convex Analysis, Princeton, New Jersey, Princeton University
Press, 1970.
23. Ross, S. A., The arbitrage theory of capital asset pricing, Journal of Economic
Theory, 1976, 13: 341.
24. S. A. Ross, Return, Risk and Arbitrage, Risk and Return in Finance, Friend and
Bicksler (eds.), Cambridge, Mass., Ballinger, pp. 189218, 1977.
25. Scarf, H., The Computation of Economic Equilibria, New Haven: Yale University
Press, 1973.
26. S. P. Sethi, Optimal consumption and investment with bankruptcy, Kluwer, Boston,
1997.
27. H. Shirakawa, Optimal consumption and portfolio selection with incomplete markets
and upper and lower bound constaints, Mathematical Finance 4 (1994), no. 1, 124.
28. H. Shirakawa and H. Kassai, Optimal consumption and arbitrage in incomplete,
finite state security markets, Journal of Operations Research 45 (1993), 349372.
29. S. E. Shreve, H. M. Soner, and G.-L. Xu, Optimal investment and consumption with
two bounds and transaction costs, Mathematical Finance 1 (1991), no. 3, 5384.
30. Smith, A., An Inquiry into the Nature and Causes of the Wealth of Nations, Modern
Library, 1937.
31. Spremann, K., The simple analytics of arbitrage, Capital Market Equilibria (ed.
Bamberg, G., Spremann, K.), New York: Springer-Verlag, 1986, pp.189207.
32. Wilhelm, J., Arbitrage Theory, Berlin: Springer-Verlag, 1985.

On Some Optimization Problems in Obnoxious


Facility Location?
Zhongping Qin1 , Yinfeng Xu2 , and Binhai Zhu3
1
3

Dept. of Mathematics, Huazhong University of Science and Technology, China


2
School of Management, Xian Jiaotong University, Xian, China
Dept. of Computer Science, City University of Hong Kong, Kowloon, Hong Kong.
[email protected]

Abstract. In this paper we study the following general MaxMinoptimization problem concerning undesirable (obnoxious) facility location: Given a set of n sites S inside a convex region P , construct m
garbage deposit sites Vm such that the minimum distance between these
sites Vm and the union of S and Vm , Vm S, is maximized. We present a
general method using Voronoi diagrams to approximately solve two such
problems when the sites Ss are points and weighted convex polygons
(correspondingly, Vm s are points and weighted points and the distances
are L2 and weighted respectively). In the latter case we generalize the
Voronoi diagrams for disjoint weighted convex polygons in the plane.
Our algorithms run in polynomial time and approximate the optimal
solutions of the above two problems by a factor of 2.

Introduction

In the area of environmental operations management we usually face the problem


of locating sites to deposit (nuclear and/or conventional) wastes. Because of the
radiation and pollution effect we do not want to locate such a site too close to
a city. Moreover, we cannot even locate two sites too close to each other (even
if they are far from cities where human beings reside) this is especially the
case when the sites are used to deposit nuclear wastes as the collective radiation
becomes stronger.
Another related application is something to do with satellite placement. In
the sky we already have quite a lot of satellites and certainly the number is
increasing year by year. When we launch a new satellite, we certainly need to
place it at such a location which is far from the existing ones as long as there is
no other constraints putting them too close would affect the communication
quality.
This problem arises in many other applications in practice. However, how to
find efficient solutions for these kinds of problems is not an easy task and this
?

The authors would like to acknowledge the support of research grants from NSF
of China, Research Grants Council of Hong Kong SAR, China (CERG Project No.
CityU1103/99E) and City University of Hong Kong

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 320329, 2000.
c Springer-Verlag Berlin Heidelberg 2000

On Some Optimization Problems in Obnoxious Facility Location

321

presents a new challenge for computational geometers. In this paper we study


several versions of this problem. We call this general problem the Undesirable
Facility Location Problem (UFL, for short) and formulate two versions of the
problem as follows.
I. Undesirable Point Placement Problem (UPP). Given a convex
polygonal domain P and a set of point sites S in P , find the location of m
undesirable or obnoxious facilities in P , which consist of a point set Vm , so as to
m , Vm S)}
Maximize {d(V
where the maximum is over all the possible positions of the points in Vm and
m , Vm S) defined as
d(V
m , Vm S) =
d(V

min

{d(x, q)}

{x6=q}{xVm }{qVm S}

with d(x, q) being the Euclidean distance between x and q.


Note that the Undesirable Point Placement problem (UPP) is evidently a
MaxMin-optimization problem. We can see that the solution maximizes the distances between the undesirable facilities and the distances between the ordered
pairs of points from the undesirable facilities and the sites. Therefore, the damage
or pollution to the sites is low.
In reality, we know that the importance, areas, or the capacity of enduring
damages of various cities are different. We take this into consideration and make
the problem more general and practical, we introduce the weighted function
w(q) for point q, extend the point sites to disjoint weighted convex polygons
and permit the metric to be either L2 or L1 . Our objective is to distinguish the
difference of importance of various sites, capture the real geographic conditions
and to satisfy various needs in practice. We therefore formulate the following
more general problem.
II. Undesirable Weighted Point Placement Problem (UWPP). Given
a convex polygonal domain P and a set of disjoint convex polygonal sites S in
P where each point q in a polygon s S has weight w(q) = w(s) (w(s) 1 is
associated with the polygon s), find the location of m undesirable facilities in P ,
which consist of a point set Vm and have the same weight 1 w0 w(s), s S,
so as to
Maximize {dw (Vm , Vm S)}
where the maximum is over all the possible positions of the points in Vm and
dw (Vm , Vm S) is defined as
dw (Vm , Vm S) =

min

{dw (x, q)}

{x6=q}{xVm }{qVm S}

1
d(x, q), d(x, q) being the Euclidean distance in between x
with dw (x, q) = w(q)
and q.
We remark that the Undesirable Weighted Point Placement Problem (UWPP)
is a much more complex MaxMin-optimization problem. If set Vm is chosen such

322

Zhongping Qin, Yinfeng Xu, and Binhai Zhu

that the objective function of UWPP reaches its optimal value (which is called
the m-optimal value of UWPP, denoted as dm ) then we call the thus chosen set
Vm a m-extreme set of UWPP, denoted as Vm .
It is obvious that in a solution to UWPP the undesirable facilities are farther
away from those sites with larger weights. Hence the sites with larger weights
can get more protect against the undesirable facilities. Although we formulate
the problem as the Undesirable Weighted Point Placement Problem in the plane,
it can be formulated as problem in other fields like packing satellites in the sky
or packing transmitters on the earth.
It should be noted that finding the optimal solutions, Vm , for either UPP
or UWPP is not an easy task. The exhaustive search method is not possible as
the spaces of the solutions to the problems are continuous regions in R2m and
the minimizing step of the objective function concerns some continuous regions
in R2 . So far we have not been able to obtain an algorithm to find an optimal
solution for either of the two problems even if it is of exponential time complexity.
The difficulty of the problem can also be seen from the following. It is not yet
known how to pack as many as possible unit circles in a given special polygon P ,
like a square. In this setting, S is empty and we want to determine the maximum
m , Vm ) is at least two [13].
set Vm such that the distance d(V
Although the problem is hard to solve, in practice, usually an approximate
solution is acceptable as long as the solution is efficient. In this paper we present
a general incremental Voronoi diagram algorithm which approximate the optimal
solution of the two problems by a factor of 2.

The Incremental Voronoi Diagram Algorithm for UPP

In this section we present an incremental Voronoi diagram algorithm for approximating the Undesirable Point Placement Problem (UPP). The basic ideas of the
algorithm are as follows: (1). We successively choose the points of Vm from a
discrete set. At i-th step we choose the point which is the farthest away from the
points in Vi1 chosen previously and all sites in S. (2). The point in Vi Vi1
which is the farthest from Vi1 S is always among the Voronoi vertices of
Vor(Vi1 S), vertices of polygon P and the intersection points of the Voronoi
edges of Vor(Vi1 S) and P .
Basically, the algorithm uses a strategy of computing points in Vm from a
finite discrete field rather than from a continuous field. The algorithm and analysis is as follows.
Algorithm UPP
Input: A convex polygon P , a set of points S in P .
Output: The set of points Vm in P .
Procedure:
1. Initialize V := .
2. Compute the Voronoi diagram of (V S), Vor(V S).

On Some Optimization Problems in Obnoxious Facility Location

323

3. Find the set B consisting of the Voronoi vertices of (V S), the vertices of
P and the intersection points between Voronoi edges and the edges of P .
Among the points in B, choose the point v which maximizes d(v, qv ), v B,
where qv V S and Vor region(qv ) contains point v.
4. Update V := V {v} and return to Step 2 when |V | m.
We have the following theorem regarding the above algorithm.
Theorem 1. The output Vm generated by Algorithm UPP presents a 2-approximation to the optimal solution for the Undesirable Point Placement Problem
(UPP).
The proof of Theorem 1 is based on the following lemma, which is similar to
the methods used in [6,8].
Lemma 2. Given any convex polygon P and any set S of point sites in P , for
d
any set Vt of t points in P there exists a point p P such that d(p, Vt S) t+1
2 ,
where dt+1 is the (t + 1)-optimal value of the UPP, where d(p, Vt S) denotes
the Euclidean distance between point p and set Vt S.
Proof. Suppose that the lemma is not true. Then there exists a point set Vt
in P such that for any p P ,
max d(p, Vt S) <

dt+1
.
2
d

Let r be the value of the left-hand side and we have r < t+1
2 . For each point
q Vt S, draw a circle centered at q with radius r. By the optimality of r,
every pair of points in P and Vt S must be at most r distance away. Therefore,
it is obvious that the union of these circles must cover the whole area of P .

S. ConseThis implies that one of these circles must cover two points of Vt+1
d

= d(V
, V S) 2r. This contradicts the fact that r < t+1 . t
u
quently, d
t+1

t+1

t+1

Proof for Theorem 1. For any k m let point p P maximizes d(x, Vk


S), x P . We assert that p must be in the set of points consisting of the
Voronoi vertices of Vor(Vk S), the vertices of P and the intersection points
between Voronoi edges of Vor(Vk S) and the edges of P . In other words p
must be a boundary point of some Voronoi region of Vor(Vk S) P . If it
is not the case then p would fall in the interior of Vor region(q) P for some
q Vk S. Hence there is one point p 0 on the boundary of Vor region(q) P
such that d(p 0 , q) > d(p, q) which contradicts the definition of p. Hence for point
vk , the k-th (k m) chosen point for set Vm by step 3 of Algorithm UPP,
d(vk , Vk1 S) = max{xP } {d(x, Vk1 S)} (recall that d(vk , Vk1 S) denotes
the distance between point vi and set Vi1 S).

324

Zhongping Qin, Yinfeng Xu, and Binhai Zhu

Also, we have the relation


d(vk , Vk1 S) d(vk1 , Vk2 S), k = 2, 3, , m.
The reason is that all Vor region(q), q 6= vk , which belong to Vor(Vk S) P will
not grow relative to Vor region(q) Vor(Vk1 S) P after point vk is inserted.
In addition, the point on the boundary of Vor region(vk ) Vor(Vk S)P which
is the farthest to vk is always on the boundary of Vor region(q) Vor(Vk S)
P, q Vk1 S, which is adjacent to Vor region(vk ) Vor(Vk S)P . So from this
relation by induction we can obtain the result that d(vk , Vk1 S) = d(Vk , Vk S).
m , Vm S) = d(vm , Vm1 S) =
Hence by the above assertion and Lemma 2 d(V
d
max{xP } {d(x, Vm1 S)} 2m . This shows that Vm , the output of Algorithm
u
UPP, is a 2-approximation of Vm (the m-extreme set of UPP). t
Time complexity. The algorithm runs in O(mN log N ) time, where N = |S| +
|P | + m. At each of the m iterations, Step 2 takes O(N log N ) time, Step 3
involves finding the nearest neighbor of each vertex v hence takes O(N log N )
time we need to perform O(N ) point locations each taking logarithmic time.
It is possible to improve Step 2 by using the dynamic Voronoi diagram (Delaunay
triangulation) algorithm of [3,4] so that over all of the m iterations 1 , Step 2
takes O(N log N + m log N ) time instead of O(mN log N ) time. But this will not
change the overall time complexity of the algorithm as Step 3 takes O(N log N )
time at each of the m iterations.

A Generalization to the Weighted Plane

In this section, we consider yet another generalization of the problem to the


weighted (L2 or L1 ) plane. We make some necessary adjustment to Algorithm
UPP so as to approximately solve the Undesirable Weighted Point Placement
Problem (UWPP). The basic idea is the same as Algorithm UPP. But the set
B in step 3 should be change to the set B 0 consisting of the Voronoi vertices
and dividing points of Vor(Vt S), vertices of P , the intersection points between
Voronoi segments of Vor(V S) and the edges of P .
3.1

The Weighted Voronoi Diagram of Convex Polygons in the


Plane

We generalize the concept of Voronoi diagram of points in the plane in three


aspects: (1) change point sites to disjoint convex polygons, (2) each site has a
positive weight which is at least one, (3) under both metric L2 and L1 (we will
focus on L2 ). To the best knowledge of the authors, in metric L2 the Voronoi
diagram of weighted points in the plane is well studied [1], but the Voronoi
diagram of weighted convex polygon objects is seldomly studied. In metric L1
1

In practice, we advocate the use of [7] to update the Voronoi diagram when a new
point is added and the point location algorithm of [5,12].

On Some Optimization Problems in Obnoxious Facility Location

325

there are only results on the Voronoi diagram of points in the plane [10,11] before
this work.
Let S be a set of disjoint convex polygons in the plane which are associated
with weights w(s) 1, s S. The weighted Voronoi diagram of S (for short
WVD(S)) is a subdivision of the plane consisting of Voronoi regions, Voronoi
faces, Voronoi edges, Voronoi segments, Voronoi vertices and Voronoi dividing
points. Vor region(s) is defined as
Vor region(s) = {x|

1
1
d(x, s)
d(x, t), t S}.
w(s)
w(t)

A Voronoi face of the WVD(S) is a connected component of a thus defined


Voronoi region. A Voronoi edge is the intersection of two Voronoi faces. A Voronoi
segment is the maximal portion of a Voronoi edge which can be described by a
curve equation. A Voronoi dividing point is an endpoint of a Voronoi segment
and a Voronoi vertex is the intersection of three Voronoi edges. We now focus on
L2 and present the necessary details. In Figure 1, we show an example of three
convex polygons with weights 1, 2 and 3 (for convenience, we use 1, 2 and 3 to
represent them as well). Note that the Voronoi edge between 2 and 3 which is
inside P is composed a set of Voronoi segments.

P
Fig. 1. A weighted Voronoi diagram of three convex polygons.

Lemma 3. Suppose S = {s1 , s2 } consist of two weighted disjoint convex polygons


in the plane and 1 w(s1 ) < w(s2 ), then Vor region(s1 ) is a limitary connected
region. The boundary of Vor region(s1 ) (which is a Voronoi edge) consists of
some Voronoi segments which are parts of conic curves, respectively, i.e.

326

Zhongping Qin, Yinfeng Xu, and Binhai Zhu

1. A Voronoi segment is a part of a circle determined by equation


1
1
d(x, p) =
d(x, q)
w(p)
w(q)
where x is a point of the Voronoi segment and p, q are a pair of vertices of two
convex polygons s1 and s2 .
2. A Voronoi segment is a part of a hyperbola, parabola or ellipse determined
by equation
1
1
d(x, p) =
d(x, e)
w(p)
w(e)
where x is a point of the Voronoi segment and p (e) is vertex (edge) convex
polygon s1 (s2 ). The segment is a part of a hyperbola, parabola or ellipse when
the weight of the vertex p is bigger than, equal to or less than the weight of the
edge e.
3. A Voronoi segment is a straight line segment determined by equation
1
1
d(x, e1 ) =
d(x, e2 )
w(e1 )
w(e2 )
where x is a point of the Voronoi segment and e1 , e2 are a pair of edges of two
convex polygons s1 and s2 .
There are some difference between the WVD(S) and the classic Voronoi diagram of points (for short VD(P )) or the weighted Voronoi diagram of points (for
short WVD(P )): an Voronoi edge in VD(P ) or WVD(P ) has just one Voronoi
segment which is a part of a straight line (in VD(P )) or a part of circle (in
WVD(P )), but a Voronoi edge in WVD(S) contains some Voronoi segments
which are of different conic curves. Therefore, in WVD(S) Voronoi dividing
points are different from Voronoi vertices. Similar to [2], we make the following
definition.
Definition 1. Given two weighted disjoint convex polygons s1 , s2 in the plane
and 1 w(s1 ) < w(s2 ), V or region(s1 ) is defined as the dominance of s1 over
s2 , for short dom(s1 , s2 ), and the closure of the complement of Vor region(s1 )
is called the dominance of s2 over s1 , for short dom(s2 , s1 ).
The following lemma follows from the definition of Voronoi diagrams and is
the basis for constructing WVD(S).
Lemma 4. Let S be a finite set of weighted convex polygons in the plane and
s S.
\
dom(s, t).
Vor region(s) =
tS{s}

In general, Vor region(s) in WVD(S) may have O(|S|) Voronoi faces, i.e.,
the region does not need to be connected and its connected parts do not need
to be simply connected. Overall, the WVD(S) can be computed in O(|S|3 ) time
and O(|S|2 ) space, using standard techniques in computational geometry [14].

On Some Optimization Problems in Obnoxious Facility Location

3.2

327

Algorithm

We now present the approximation algorithm for UWPP.


Algorithm UWPP
Input: A convex polygon P , a set S of disjoint weighted convex polygons in
P and each polygon s S has a weight w(s) 1.
Output: The set of points Vm , all with weight 1 w0 w(s), s S.
Procedure:
1. Initialize V := .
2. Compute the weighted Voronoi diagram of (V S), WVD(V S).
3. Find the set B 0 consisting of the Voronoi vertices and dividing points of
W V D(V S), the vertices of P and the intersection points between Voronoi
segments of W V D(V S) and the edges of P . Among the points in B 0 ,
choose the point v which maximizes w(q1 v ) d(v, qv ), where v B 0 , qv V S
and v Vor region(qv ).
4. Update V := V {v} and return to Step 2 when |V | m.
In Figure 1, if we only add one obnoxious facility then it would be placed at
the low-left corner of P . We have the following theorem.
Theorem 5. The output Vm of Algorithm UWPP is a 2-approximation to the
Undesirable Weighted Point Placement Problem.
First we need to generalize Lemma 2, which is important to the proof of
Theorem 1, to the following Lemma 6.
Lemma 6. Let P and S be as in the definition of UWPP. For any set Vt of t
points in P with weight 1 w0 w(s), s S there exists a point x P such
that
d
1
d(x, qx ) t+1 , x P,
max
w(qx )
2
where qx Vt S, x Vor region(qx ) and dt+1 is the (t + 1)-optimal value of
UWPP.
Proof. Suppose the lemma is not true, then there exists a point set Vt in P
(note that points in Vt have the same weight 1 w0 w(s), s S) such that
max

d
1
d(x, qx ) < t+1 , x P
w(qx )
2

where qx Vt S and x is contained in Vor region(qx ). Let r be the value of


d
the left-hand side, so we have r < t+1
2 . For q Vt S (Vt S is either a point
all the
in Vt or a convex polygon in S), we expand q to q such that q contains
S
q}
points within w(q)r distance (in L2 ) to q. By the optimality of r, qVt S {

328

Zhongping Qin, Yinfeng Xu, and Binhai Zhu

contains all the points in P . So there are two points of Vt+1


S (Vt+1
is the
(t + 1)-extreme set of UWPP) contained in some q (q Vt ). This implies that
d
the (t + 1)-optimal value of the UWPP dt+1 2r, a contradiction with r < t+1
2 .
t
u

Proof for Theorem 5. Let vk be the k-th chosen point for set Vm by step 3 of
Algorithm UWPP. Similar to the proof of Theorem 1 we also have the result that
vk maximizes w(q1 x ) L(x, qx ), x P where qx Vk1 S and x Vor region(qx ).
We assert that 1 d(vk , qv ) = dw (Vk , Vk S). In fact, we have
w(qvk )

dw (vk1 , qvk1 ) dw (vk , qvk ), k = 1, 2, , m.


The reason is that as w0 w(s), s S, all Vor region(q), q 6= vk , which belong
to Vor(Vk S) will not grow relative to Vor region(q) Vor (Vk1 S) after point
vk is inserted. Also, the point on the boundary of Vor region(vk ) Vor (Vk S)
which is the farthest to vk is always on the boundary of Vor region(q) Vor (Vk
S), q Vk1 S, which is adjacent to Vor region(vk ) Vor(Vk S). Based on this
fact we can easily prove the above assertion by induction. Therefore, following
Lemma 6
dw (Vm , Vm S) = w(q1v ) d(vm , qvm )
m
= max{xP } { w(q1 x ) d(x, qx )},
where qx Vm1 S and x Vor region(qx )
d
2m .
t
u
Time complexity. The algorithm runs in O(mN 3 ) time, where N = |S|+ |P |+
m. At each of the m iterations, Steps 2 and 3 take O(N 3 ) time and O(N 2 ) space.
We comment that the WVD(S) can be generalized to L1 metric. Moreover,
the facilities can have different weights (but we then should first place the facility
with the largest weight, among those unplaced ones). The details are omitted.
Finally, we comment that it might be possible for us to trade the running
time of this algorithm with the approximation factor. We can use the geometric Voronoi diagram of S in L2 , which is planar and can be constructed in
O(N log N ) time and O(N ) space [9,15,16].

Concluding Remarks

In this paper we present a method to solve a MaxMin-optimization problem in


obnoxious facility location. The method is general and can be generalized to
many interesting cases when the sites are not necessary points. It is an open
question whether we can obtain an optimal solution for the problem (even it is
of exponential time complexity). Another question is whether the O(N 3 ) time

On Some Optimization Problems in Obnoxious Facility Location

329

for computing WVD(S) in Section 3 can be further improved. Finally, all the
facilities we consider are points (or weighted points); however, in practice sometimes the facilities might be of some size as well. It is not know whether our
method can be generalized to these situations. For example, what if the facilities
are unit circles?
References
[1] F. Aurenhammer, Voronoi diagrams: a survey of a fundamental geometric data
structures, ACM Comput. Surveys, 23(3), pp. 343-405, 1991.
[2] F. Aurenhammer and H. Edelsbrunner, An optimal algorithm for constructing
the weighted Voronoi diagram in the plane, Pattern Recognition, 17, pp. 251-257, 1984.
[3] J. Boissonnat, O. Devillers, R. Schott, M. Teillaud and M. Yvinec, Applications
of random sampling to on-line algorithms in computational geometry, Disc. Comp.
Geom. 8, pp. 51-71, 1992.
[4] O. Devillers, S. Meiser and M. Teillaud, Fully dynamic Delaunay triangulation
in logarithmic expected time per operation, Comp. Geom. Theory and Appl. 2, pp.
55-80, 1992.
[5] L. Devroye, E. M
ucke and B. Zhu, A note on point location in Delaunay triangulations of random points, Algorithmica, special issue on Average Case Analysis of
Algorithms, 22(4), pp. 477-482, Dec, 1998.
[6] T. Feder and D. Greene, Optimal algorithms for approximate clustering, Proc.
20th STOC, pp. 434-444, 1988.
[7] L. Guibas, D. Knuth and M. Sharir, Randomized incremental construction of
Delaunay and Voronoi diagrams, Algorithmica, 7, pp. 381-413, 1992.
[8] T. Gonzalez, Clustering to minimize the maximum intercluster distance, Theo.
Comput. Sci., 38, pp. 293-306, 1985.
[9] R. Klein, K. Mehlhorn and S. Meiser, Randomized incremental construction of
abstract Voronoi diagrams, Comp. Geom. Theory and Appl. 3, pp. 157-184, 1993.
[10] D.T. Lee and C.K. Wong, Voronoi diagrams in the L1 (L ) metric with twodimensional storage applications, SIAM. J Comput., 9, pp. 200-211, 1980.
[11] D.T. Lee, Two-dimensional Voronoi diagrams in the Lp metric, J. ACM, 27,
pp. 604-618, 1980.
[12] E. M
ucke, I. Saias and B. Zhu, Fast Randomized Point Location Without
Preprocessing in Two and Three-dimensional Delaunay Triangulations, Comp. Geom.
Theory and Appl, special issue for SoCG96, 12(1/2), pp. 63-83, Feb, 1999.
[13] K. Nurmela and P. Ostergard, Packing up to 50 equal circles in a square, Disc.
Comp. Geom. 18, pp. 111-120, 1997.
[14] F. Preparata and M. Shamos, Computational Geometry, Springer-Verlag, 1985.
[15] P. Widmayer, Y.F. Wu, and C.K. Wong, On some distance problems in fixed
orientations. SIAM J. Comput., 16, pp. 728746, 1987.
[16] C.K. Yap, An O(n log n) algorithm for the Voronoi diagram of a set of curve
segment, Disc. Comp. Geom. 2, pp. 365-393, 1987.

Generating Necklaces and Strings with


Forbidden Substrings
Frank Ruskey and Joe Sawada
University of Victoria, Victoria, B.C. V8W 3P6, Canada,
{fruskey,jsawada}@csr.csc.uvic.ca

Abstract. Given a length m string f over a k-ary alphabet and a positive integer n, we develop efficient algorithms to generate
(a) all k-ary strings of length n that have no substring equal to f ,
(b) all k-ary circular strings of length n that have no substring equal to
f , and
(c) all k-ary necklaces of length n that have no substring equal to f ,
where f is an aperiodic necklace.
Each of the algorithms runs in amortized time O(1) per string generated,
independent of k, m, and n.

Introduction

The problem of generating discrete structures with forbidden sub-structures is


an area that has been studied for many objects including graphs (e.g., with forbidden minors), permutations (e.g., which avoid the subsequence 312 of relative
values), and trees (e.g., of bounded degree). In this paper we are concerned with
generating strings that avoid some particular substring. For example, the set of
binary strings that avoid the pattern 11 are known as Fibonacci strings, since
they are counted by the Fibonacci numbers. The set of circular binary strings
that avoid 11 are counted by the Lucas numbers. Within combinatorics, the
counting of strings which avoiding particular substrings can be handled with the
transfer matrix method as explained, for example, in Stanley [5]. The ordinary
generating function of the number of such strings is always rational, even in the
case of circular strings. In spite of the importance of these objects within combinatorics, we know of no papers that explicitly address the problem of efficiently
generating all strings or necklaces avoiding a given substring.
The problem of generating strings with forbidden substrings is naturally related to the classic pattern matching problem, which takes as input a pattern P
of length m and a text T of length n, and finds all occurrences of the pattern in
the text. Several algorithms perform this task in linear time, O(n+m), including
the Boyer-Moore algorithm, the Knuth-Morris-Pratt (KMP) algorithm and an
automata-based algorithm (which requires non-linear initialization) [2].
The Boyer-Moore algorithm is not suitable for our purposes since it does not
operate in real-time. On the other hand, the automata-based algorithm operates
in real-time and the KMP algorithm can be adapted to do so [2].
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 330339, 2000.
c Springer-Verlag Berlin Heidelberg 2000

Generating Necklaces and Strings with Forbidden Substrings

331

Our algorithms are recursive, generating the string from left-to-right and applying the pattern matching as each character is generated. It is straight forward
to generate unrestricted strings in such a recursive manner and adding the pattern matching is easy as well. However, when the pattern is taken circularly, the
algorithm and its analysis become considerably more complicated.
The algorithm for generating the necklaces uses the recursive scheme introduced in [4]. This scheme has been used to generate other restricted classes
of necklaces, such as unlabelled necklaces [4], fixed-density necklaces [3], and
bracelets (necklaces that can be turned over), and is ideally suited for the present
problem.
Within the context of generating combinatorial objects, usually the primary
goal is to generate each object so that the amount of computation is O(1) per
object in an amortized sense. Such algorithms are said to be CAT (for Constant
Amortized Time). Clearly, no algorithm can be asymptotically faster. Note that
we do not take into account the time to print or process each object; rather we
are counting the total amount of data structure change that occurs.
The main result of this paper is the development of CAT algorithms to generate:
all k-ary strings of length n that have no substring equal to f ,
all k-ary circular strings of length n that have no substring equal to f , and
all k-ary necklaces of length n that have no substring equal to f , given that
f is Lyndon word.
Each algorithm has an embedded automata-based pattern matching algorithm.
In principle we could use the same approach to generate unlabelled necklaces,
fixed density necklaces, bracelets, or other types of necklaces, all avoiding a
forbidden necklace pattern. We expect that such algorithms will also be CAT,
but the analysis will be more difficult.
In the following section we provide background and definitions for these objects along with a brief description of the automata-based pattern matching
algorithm. In Section 3, we outline the details of each algorithm. We analyze the
algorithms, proving that they run in constant amortized time, in Section 4.

Background

We denote the set of all k-ary strings of length n with no substring equal to f by
Ik (n, f ). The cardinality of this set is Ik (n, f ). For the remainder of this paper
we will assume that the forbidden string f has length m. Clearly if m > n, then
Ik (n, f ) = k n , and if m = n then Ik (n, f ) = k n 1. If m < n, then an exact
formula will depend on the forbidden substring f , but can be computed using
the transfer matrix method. In Section 4 we derive several bounds on the value
of Ik (n, f ).
We denote the set of all k-ary circular strings of length n with no substring
equal to f by Ck (n, f ). The cardinality of this set is Ck (n, f ). In this case, we
allow the forbidden string to make multiple passes around the circular string.

332

Frank Ruskey and Joe Sawada

Thus, if a string is in Ik (n, f ) and m > n, then it is still possible for the string
to contain the forbidden string f . For example, if = 0110 and f = 11001100,
then is not in the set Ck (4, f ). We prove that Ck (n, f ) is proportional to
Ik (n, f ) in Section 4.1.
Under rotational equivalence, the set of strings of length n breaks down
into equivalence classes of sizes that divide n. We define a necklace to be the
lexicographically smallest string in such an equivalence class of strings under
rotation. An aperiodic necklace is called a Lyndon word. A word is called a prenecklace if it is the prefix of some necklace. Background information, including
enumeration formulas, for these objects can be found in [4].
The set of all k-ary necklaces of length n with no substring equal to f is
denoted Nk (n, f ) and has cardinality Nk (n, f ). The set of all k-ary Lyndon words
of length n with no substring equal to f is denoted Lk (n, f ) and has cardinality
Lk (n, f ). Of course for Nk and Lk we consider the string to be circular when
avoiding f . The set of all k-ary pre-necklaces of length n with no substring equal
to f is denoted Pk (n, f ) and has cardinality Pk (n, f ). A standard application of
Burnsides Lemma will yield the following formula for Nk (n, f ):
1X
(d)Ck (n/d, f ).
(1)
Nk (n, f ) =
n
d|n

2.1

The Automata-Based String Matching Algorithm

One of the best tools for pattern recognition problems is the finite automaton.
If f = f1 f2 fm is the pattern we are trying to find in a string , then a deterministic finite automaton can be created to process the string one character at
a time, in constant time per character. In other words, we can process the string
in real-time. The preprocessing steps required to set up such an automaton
can be done in time O(km), where k denotes the size of the alphabet (see [1],
pg. 334).
The automaton has m+1 states, which we take to be the integers 0, 1, . . . , m.
The state represents the length of the current match. Suppose we have processed
t characters in the string = a1 a2 an and the current state is s. The transition
function (s, j) is defined so that if j = at+1 matches fs+1 , then (s, j) = s + 1.
Otherwise, (s, j) is the largest state q such that f1 fq = atq+2 at+1 . If
the automaton reaches state m, the only accepting state, then the string f has
been found in . The transition function is efficiently created using an auxiliary
function fail. The failure function is defined for 1 i m such that fail(i) is the
length of the longest proper suffix of f1 fi equal to a prefix of f . If there is
no such suffix, then fail(i) = 0. This fail function is the same as the fail function
in the classic KMP algorithm.

Algorithms

In this section we describe an efficient algorithm to generate necklaces with


forbidden necklace substrings. We start by looking at the simpler problem of

Generating Necklaces and Strings with Forbidden Substrings

333

generating k-ary strings with forbidden substrings and then consider circular
strings, focusing on how to handle the wraparound.
If n is the length of the strings being generated and m is the length of the
forbidden substring f , then the following algorithms apply for 2 < m n.
We prove that each algorithm runs in constant amortized time in the following
section. In the cases where m = 1 or 2, trivial algorithms can be developed. For
circular strings and necklaces, if m > n, then the forbidden substring can be
truncated to a length n string, as long as it repeats in a circular manner after
the nth character.
3.1

Generating k-ary Strings

A nave algorithm to generate all strings in Ik (n, f ) will generate all k-ary strings
of length n, and then upon generation of each string, perform a linear time test
to determine whether or not it contains the forbidden substring. A simple and
efficient approach for generating strings is to construct a length n string by taking
a string of length n1 and appending each of the k characters in the alphabet to
the end of the string. This strategy suggests a simple recursive scheme, requiring
one parameter for the length of the current string. Since this recursive algorithm
runs in constant amortized time, the nave algorithm will take linear time per
string generated.
A more advanced algorithm will embed a real-time automata-based string
matching algorithm into the string generation algorithm. Since an automatabased string matching algorithm takes constant time to process each character,
we can generate each new character in constant time. We store the string being
generated in = a1 a2 an and at each step, we maintain two parameters: t
and s. The parameter t represents the next position in the string to be filled,
and the parameter s represents the state in the finite automata produced for the
string f . Recall that each state s is an integer value that represents the length
of the current match. Thus if we begin a recursive call with parameters t and
s, then f1 fs = ats at1 . We continue generating the current string as
long as s 6= m. When t > n, we print out the string using the function PrintIt().
Pseudocode for this algorithm is shown in Figure 1. The transition function
(s, j) is used to update the state s as described in Section 2.1. The initial call
is GenStr(1,0).
Following this approach, each node in the computation tree will correspond
to a unique string in Ik (j, f ) where j ranges from 1 to n. Since the amount of
computation at each node is constant, the total computation is proportional to
CompT reek (n, f ) =

n
X

Ik (j, f ).

j=1

We can show that this sum is proportional to Ik (n, f ), which proves the following
theorem. (Recall that the preprocessing required to set up the automata for
f takes time O(km). This amount is negligible compared to the size of the
computation tree.)

334

Frank Ruskey and Joe Sawada


procedure GenStr ( t, s : integer );
local j, q : integer;
begin
if t > n then PrintIt()
else begin
for j {0, 1, . . . , k 1} do begin
at := j;
q := (s, j);
if q 6= m then GenStr(t + 1, q);
end; end; end;

Fig. 1. An algorithm for generating k-ary strings with no substring equal to f .

Theorem 1. The algorithm GenStr(t, s) for generating k-ary strings of length


n with no substring equal to f is CAT.
3.2

Generating k-ary Circular Strings

We now focus on the more complicated problem of generating circular strings


with forbidden substring f . To solve this problem we use the previous algorithm,
but now we must also check that the wraparound of the string does not yield
the forbidden substring. More precisely, if = a1 a2 an is in Ik (n, f ) then the
additional substrings we must implicitly test against the forbidden string f are
anm+1+i an a1 ai for i = 1, 2, . . . , m1. To perform these additional tests,
we could continue the pattern matching algorithm by appending the first m 1
characters to the end of the string. This will result in m 1 additional checks
for each generated string, yielding an algorithm that runs in time O(mIk (n, f )).
This approach can be tweaked to yield a CAT algorithm for circular strings, but
leads to difficulties in the analysis when applied in the necklace context.
If we wish to use the algorithm GenStr(t, s), we need another way to test the
substrings starting in the last m 1 positions of . We accomplish this feat by
maintaining a new boolean data structure match(i, t) and dividing the work into
two separate steps. In the first step we compare the substring a1 ai against
the last i characters in f . If they match, then the boolean value match(i, i) is
set to TRUE; otherwise it is set to FALSE. In the second step, we check to
see if anm+1+i an matches the first m i characters in f . If they match
and match(i, i) is TRUE, then we reject the string. If there is no match for all
1 i m 1, then is in Ck (n, f ).
To execute the first step, we start by initializing match(i, 0) to TRUE for all
i from 1 to m 1. We define match(i, t) for 1 i m 1 and i t m 1 to
be TRUE if match(i, j 1) is TRUE and at = fmj+t . Otherwise match(i, t) is
FALSE. This definition implies that match(i, i) will be TRUE if a1 ai matches
the last i characters of f . Pseudocode for a routine that sets these values for
each t is shown in Figure 2. The procedure SetMatch(t) is called after the t-th
character in the string has been assigned for t < m. Thus, if t < m, we must

Generating Necklaces and Strings with Forbidden Substrings

335

procedure SetMatch ( t : integer );


local i : integer;
begin
for i {t, t + 1, . . . , m 1} do begin
if match(i, t 1) and fmi+t = at then match(i, t) := TRUE;
else match(i, t) := FALSE;
end; end;

Fig. 2. Procedure used to set the values of match(i, t).

function CheckSuffix ( s : integer ) returns boolean;


begin
while s > 0 do begin
if match(m s, m s) then return(FALSE);
else s := fail(s);
end;
return(TRUE);
end;

Fig. 3. Function used to test the wraparound of circular strings.

perform additional work proportional to m t for all strings in Ik (t, f ). We will


prove later that this extra work will not affect the asymptotic running time of
the algorithm.
To execute the second step, we observe that after the nth character has been
generated (t = n + 1), the string ans+1 an is the longest suffix of to match
a prefix of f . Using the array fail, as described in Section 2.1, we can find all
other suffixes that match a prefix of f in constant time per suffix. Then, for each
suffix with length j found equal to a prefix of f , we check match(m j, m j). If
match(m j, m j) is TRUE, then is not in Ck (n, f ). Note that Ik (n j, f ) is
an upper bound on the number of strings where anj+1 an matches a prefix
of f . Thus, for each 1 j m 1 the extra work done is proportional to
Ik (n j, f ). Pseudocode for the tests required by this second step is shown
in Figure 3. The function CheckSuffix(s) takes as input the parameter s which
represents the length of the longest suffix of to match a prefix of f . It returns
TRUE if is in Ck (n, f ) and FALSE otherwise.
Following this approach, we can generate all circular strings with forbidden
substrings by adding the routines SetMatch(t) and CheckSuffix(s) to GenStr(t, s).
Pseudocode for the resulting algorithm is shown in Figure 4. The initial call is
GenCirc(1,0).
Observe that the size of the computation tree will be the same as before;
however, in this case, the computation at each node is not always constant. The
extra work performed at these nodes is bounded by

336

Frank Ruskey and Joe Sawada


procedure GenCirc ( t, s : integer );
local j, q : integer;
begin
if t > n then begin
if CheckSuffix(s) then PrintIt();
end else begin
for j {0, 1, . . . , k 1} do begin
at := j;
q := (s, j);
if t < m then SetMatch(t);
if q 6= m then GenCirc(t + 1, q);
end; end; end;

Fig. 4. An algorithm for generating k-ary circular strings with no substring equal
to f .

ExtraW orkk (n, f )

m1
X

m1
X

j=1

j=1

(m j)Ik (j, f ) +

Ik (n j, f )

The first sum represents the work done by SetMatch and the second the work
done by CheckSuffix. In Section 4.1 we show that this extra work is proportional
to Ik (n, f ). In addition, we also prove that Ck (n, f ) is proportional to Ik (n, f ).
These results prove the following theorem.
Theorem 2. The algorithm GenCirc(t, s) for generating k-ary circular strings
of length n with no substring equal to f is CAT.
3.3

Generating k-ary Necklaces

Using the ideas from the previous two algorithms, we now outline an algorithm to
generate necklaces with forbidden necklace substrings. First, we embed the realtime automata based string matching algorithm into the necklace generation
algorithm described in [4]. Then, since we must also test the wraparound for
necklaces, we add the same tests as outlined in the circular string algorithm.
Applying these two simple steps will yield an algorithm for necklace generation
with no substring equal to the forbidden necklace f . Pseudocode for such an
algorithm is shown in Figure 5. The additional parameter p in GenNeck(t, p, s),
represents the length of the longest Lyndon prefix of the string being generated.
Lyndon words can be generated by replacing the test n mod p = 0 with the
test n = p. The initial call is GenNeck(1,1,0).
To analyze the running time of this algorithm, we again must show that
the number of necklaces generated, Nk (n, f ), is proportional to the amount of
computation done. In this case the size of the computation tree is
N eckCompT reek (n, f ) =

n
X
j=1

Pk (j, f )

Generating Necklaces and Strings with Forbidden Substrings

337

procedure GenNeck ( t, p, s : integer );


local j, q : integer;
begin
if t > n then begin
if n mod p = 0 and CheckSuffix(s) then PrintIt();
end else begin
at := atp ;
q := (s, at );
if t < m then SetMatch(t);
if q 6= m then GenNeck(t + 1, p, q);
for j {atp + 1, . . . , k 1} do begin
at := j;
q := (s, j);
if t < m then SetMatch(t);
if q 6= m then GenNeck(t + 1, t, q);
end; end; end;

Fig. 5. An algorithm for generating k-ary necklaces with no substring equal to f .

However, as with the circular string case, not all nodes perform a constant
amount of work. The extra work performed by these nodes is bounded by
N eckExtraW orkk (n, f )

m1
X

m1
X

j=1

j=1

(m j)Pk (j, f ) +

Pk (n j, f )

Note that this expression is the same as the extra work in the circular string
case, except we have replaced Ik (n, f ) with Pk (n, f ).
In Section 4.2 we show that N eckCompT reek (n, f ) and NeckExtraWorkk (n, f ) are both proportional to n1 Ik (n, f ). In addition, we also prove that
Nk (n, f ) is proportional to n1 Ik (n, f ). These results prove the following theorem.
Theorem 3. The algorithm GenNeck(t, p, s) for generating k-ary necklaces of
length n with no substring equal to f is CAT, so long as f is a Lyndon word.
We remark that the algorithm works correctly even if f is not a Lyndon word
and appears to be CAT for most strings f .

Analysis of the Algorithms

In this section we will state the results necessary to prove that the work done
by each of the forbidden substring algorithms is proportional to the number of
strings generated. The constants in the bounds derived in this section can be
reduced with a more complicated analysis. The algorithms are very efficient in
practice. Space limitations prevent us from giving proofs or analyzing the first
algorithm, which has the simplest analysis. We do however, need one lemma
from that analysis.
Pn
Lemma 1. If |f | > 2, then j=1 Ik (j, f ) 3Ik (n, f ).

338

4.1

Frank Ruskey and Joe Sawada

Circular Strings

In the circular string algorithm, the size of the computation tree is the same as
the previous algorithm, where it was shown to be proportional to Ik (n, f ). In
this case, however, there is some extra work required to test the wrap-around
of the string. Recall that this extra work is proportional to ExtraW orkk (n, f )
which is bounded as follows.
m1
m1
X
X
(m j)Ik (j, f ) +
Ik (n j, f )
ExtraW orkk (n, f )
j=1

j=1

j
n X
X

Ik (t, f ) +

j=1 t=1

n
X

Ik (j, f ).

j=1

We now use Lemma 1 to simplify the above bound.


ExtraW orkk (n, f ) 3

n
X

Ik (j, f ) +

j=1

n
X

Ik (j, f ) 12Ik (n, f ).

j=1

We have now shown that the total work done by the circular string algorithm is proportional to Ik (n, f ). Since the total number of strings generated is
Ck (n, f ), we must show that Ck (n, f ) is proportional to Ik (n, f ).
Theorem 4. If |f | > 2, then 3Ck (n, f ) Ik (n, f ).
These lemmas and Theorem 4 prove Theorem 2.
4.2

Necklaces

To prove Theorem 3, we must show that the computation tree along with the
extra work done by the necklace generation algorithm is proportional to Nk (n, f ).
To get a good bound on N eckCompT reek (n, f ) we need three additional lemmas;
the bound of the first lemma does not necessarily hold if f is not a Lyndon word.
P
Lemma 2. If f is Lyndon word where |f | > 2, then Pk (n, f ) nj=1 Lk (j, f ).
Lemma 3. If |f | > 2, then Lk (n, f ) n1 Ck (n, f ).
Pn
Lemma 4. If |f | > 2, then j=1 1j Ik (j, f ) n8 Ik (n, f ).
Applying the previous three lemmas, we show that the computation tree is
proportional to n1 Ik (n, f ).
N eckCompT reek (n, f ) =

n
X

Pk (j, f )

j
n X
X
1
j=1 t=1
n
X
j=1

Lk (t, f )

j=1 t=1

j=1

j
n X
X

Ck (t, f )

j
n X
X
1
j=1 t=1

Ik (t, f )

144
12
Ik (j, f )
Ik (n, f ).
j
n

Generating Necklaces and Strings with Forbidden Substrings

339

This inequality is now used to show that the extra work done by the necklace
algorithm is also proportional to n1 Ik (n, f ). Recall that the extra work is given
by:
N eckExtraW orkk (n, f )

m1
X

m1
X

j=1

j=1

(m j)Pk (j, f ) +

j
n X
X

Pk (t, f ) +

j=1 t=1

n
X

Pk (n j, f )

Pk (j, f ).

j=1

Further simplification of this bound follows from the bound on NeckCompTreek (n, f ) along with Lemma 4.
N eckExtraW orkk (n, f ) 144

n
X
1
j=1

Ik (j, f ) +

144
Ik (n, f )
n

12 + 122
Ik (n, f ).
n

We have now shown that the total computation performed by the necklace
generation algorithm is proportional to n1 Ik (n, f ). From equation (1), Nk (n, f )
1
1
n Ck (n, f ), and since Ck (n, f ) 3 Ik (n, f ), Theorem 3 is proved.

References
1. A. Aho, J. Hopcroft, and J. Ullman, The Design and Analysis of Computer Algorithms, Addisom-Wesley , 1974.
2. D. Gusfield, Algorithms on Strings, Trees, and Sequences, Cambridge University
Press, 1997.
3. F. Ruskey, J. Sawada, An efficient algorithm for generating necklaces of fixed density, SIAM Journal on Computing, 29 (1999) 671-684.
4. F. Ruskey, J. Sawada, A fast algorithm to generate unlabeled necklaces, 11th Annual ACM-SIGACT Symposium on Discrete Algorithms (SODA), 2000, 256-262.
5. R.P. Stanley, Enumerative Combinatorics, Volume I, Wadsworth & Brooks/Cole,
1986.

Optimal Labelling of Point Features


in the Slider Model?
(Extended Abstract)
Gunnar W. Klau1 and Petra Mutzel2
1

MPI f
ur Informatik, Saarbr
ucken, Germany.
Currently TU Wien, Austria.
[email protected]
2
TU Wien, Austria.
[email protected]

Abstract.
We investigate the label number maximisation problem
(lnm): Given a set of labels , each of which belongs to a point feature
in the plane, the task is to find a largest subset P of so that each
P labels the corresponding point feature and no two labels from
P overlap.
Our approach is based on two so-called constraint graphs, which code
horizontal and vertical positioning relations. The key idea is to link the
two graphs by a set of additional constraints, thus characterising all
feasible solutions of lnm. This enables us to formulate a zero-one integer
linear program whose solution leads to an optimal labelling.
We can express lnm in both the discrete and the slider labelling model.
The slider model allows a continuous movement of a label around its
point feature, leading to a significantly higher number of labels that can
be placed. To our knowledge, we present the first algorithm that computes provably optimal solutions in the slider model. First experimental
results on instances created by a widely used benchmark generator indicate that the new approach is applicable in practice.

Introduction

Recently, map labelling has attracted a lot of researchers in computer science


due to its numerous applications, e.g., in cartography, geographic information
systems and graphical interfaces. A major problem in map labelling is the pointfeature label placement, in which the task is to place labels adjacent to point
features so that no two labels overlap. In general, the labels are assumed to be
axis-parallel rectangles.
Many papers have been published on the label number maximisation problem
(for an overview, see the bibliography [9]). We state the problem as follows:
?

This work is partially supported by the Bundesministerium f


ur Bildung, Wissenschaft, Forschung und Technologie (No. 03MU7MP14).

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 340350, 2000.
c Springer-Verlag Berlin Heidelberg 2000

Optimal Labelling of Point Features in the Slider Model

341

Problem 1 (Label Number Maximisation, lnm). Given a set P = {p1 , . . . , pk }


of k points in the plane, a set = {1 , . . . , l } of l labels, two functions w, h :
Q and a function a : P , find a subset P of largest cardinality
and an assignment r : P R, where R is the set of axis-parallel rectangles in
the plane, so that the following conditions hold:
(L1) Rectangle r() has width w() and height h() for every P .
(L2) Point a() lies on the boundary of r() for all P .
(L3) The open intersection r() r() is empty for all distinct , P .
Properties (L1) and (L2) make sure that each label is attached correctly to
its point feature and drawn with the given size. Property (L3) forbids overlaps
between the labels. We allow, however, that two labels touch each other.
So far, most previous work on map labelling has concentrated on the discrete model, which allows only a finite number of positions per label. The most
popular discrete model is the four-position model (see Fig. 1); the two- and
one-position models have been introduced rather for theoretical purposes. Christensen, Marks and Shieber [2] have presented a comprehensive treatment of lnm
in the four-position model including complexity analysis, heuristic methods and
a computational study. They have introduced a procedure for randomly creating
labelling instances which has become a widely used benchmark generator in the
map labelling literature.
The only practically efficient algorithm for computing provably optimal solutions in the discrete model has been suggested by Verweij and Aardal [8]. They
treat the problem as an independent set problem and solve it using a branch-andcut algorithm. The algorithm is able to optimally label up to 800 point features
(using the benchmark generator from [2]) within moderate computation time
(about 20 minutes).
More natural than the discrete model is the slider model, which allows a continuous movement of a label around its point feature. Although Hirsch considered
this model already in 1982, it was not further investigated until very recently.
In [7], van Kreveld, Strijk and Wolff introduce several variations of the slider
model (see Fig. 1). They prove NP-hardness of lnm in the four-slider model and
suggest a polynomial time algorithm which is able to find a solution that is at
least half as good as an optimal solution. Moreover, their computational results
show that the slider model is significantly better than the discrete model. The
four-slider model allows to place up to 15% more labels in real-world instances
and up to 92% more labels in pseudo-random instances.
We will present an algorithm for the label number maximisation problem
that works in any of the above mentioned labelling models. We allow several
labels per point feature and labels of different sizes. Figure 2 shows a provably
optimal labelling for 700 point features computed with a first implementation of
our new approach; 699 labels could be placed.
In Sect. 2 we transform lnm into the combinatorial optimisation problem cgf
and show that both problems are equivalent. Section 3 contains an integer linear
programming formulation for cgf. We show that we can use a feasible solution
of the integer linear program to construct a feasible labelling. In particular, this

342

Gunnar W. Klau and Petra Mutzel

Four-slider

Two-slider

One-slider

Four-position

Two-position

One-position

Fig. 1. Axis-parallel rectangular labelling models. A label can be placed in any


of the positions indicated by the rectangles and slid in the directions of the arcs

enables us to find an optimal labelling. We describe a first implementation in


Sect. 4 and discuss our observations of test-runs on instances created by the
benchmark generator presented in [2].
Note that our formulation of lnm allows labels to overlap unlabelled point
features (which is desirable in some applications). We describe in Sect. 5 how we
can exclude these overlaps and investigate in how far our algorithm can satisfy
additional criteria like preferable positions and labels of different importance.
Due to space limitations, we will omit some proofs and which can be found in
the full version of the paper.

LNM as a Combinatorial Optimisation Problem

In this section we reformulate the label number maximisation problem as a


problem of combinatorial nature. Our approach uses a pair of constraint graphs.
These graphs originated in the area of vlsi design and we have studied them
in previous work for two problems from graph drawing: The two-dimensional
compaction problem [5] and a combined compaction and labelling problem [4].
An important common feature of these problemsand also of lnmis the
decomposition into a horizontal and a vertical problem component; this observation motivates us to treat both directions separately. Nodes in the horizontal
constraint graph Dx = (Vx , Ax ) correspond to x-coordinates of objects in the
problem, weighted directed edges to horizontal distance relations between the
objects corresponding to their endpoints. Similarly, the directed graph Dy codes
the vertical relationships.
Definition 1. A coordinate assignment for a pair of constraint graphs (Dx , Dy )
with Dx = (Vx , Ax ), Dy = (Vy , Ay ) and arc weights Q|Ax Ay | is a function
c : Vx Vy Q. We say c respects an arc set A Ax Ay if c(vj ) c(vi ) ij
for all (vi , vj ) A.
We will show later that we can use a pair of constraint graphs together with a
coordinate assignment which respects this pair to construct a feasible labelling

Optimal Labelling of Point Features in the Slider Model

343

Fig. 2. Optimal labelling of 700 point features in the four-slider model. Instance
randomly generated with a standardised procedure described in [2]

as long as the graphs satisfy certain conditions. The following theorem expresses
an important connection between constraint graphs and coordinate assignments.
Theorem 1. Let D = (V, A) be a constraint graph with arc weights Q|A| .
There exists a coordinate assignment c that respects A if and only if A does not
contain a directed cycle of positive weight.
Proof. For the forward direction assume
otherwise. Without loss of generality, let

C = (v1 , v2 ), (v2 , v3 ), . . . , (v|C| , v1 ) be a directed cycle of positive weight in A.
Since c respects A, it must respect in particular the arcs in C. It follows c(v2 )
c(v1 ) (1,2) , c(v3 ) c(v2 ) (2,3) , . . . , c(v1 ) c(v|C| ) (|C|,1)
P . Summing up
the left
sides
yields
zero,
summing
up
the
right
sides
yields
aC a . We get
P
0 aC a > 0, a contradiction.
For the backward direction of the proof, let A c be the set of inequalities
describing the requirements for a coordinate assignment. By Farkas Lemma,
there is a feasible solution if and only if there does not exist a vector y 0
with y T A = 0 and y T > 0. Assume otherwise, i.e., there is such a vector y.
Then y corresponds to a flow in A with positive weight. Since all supplies in the
corresponding network are zero, this flow must be circular and thus corresponds
to a directed cycle of positive weight.
t
u
In the following, we describe the construction of the pair (Dx , Dy ) for a given
instance of the label number maximisation problem.

344

Gunnar W. Klau and Petra Mutzel

Modelling point features. The positions of the k point features are specified in the
input set P . For each pi P with coordinates x(pi ) and y(pi ) we introduce a node
xi in Vx and a node yi in Vy ; one for its x-, one for its y-coordinate. We fix the
positions of the point features by inserting four directed paths Px = (x1 , . . . , xk ),
Px = (xk , . . . , x1 ), Py = (y1 , . . . , yk ) and Py = (yk , . . . , y1 ) with weights
xi xi+1 = x(pi+1 ) x(pi ), xi+1 xi = x(pi ) x(pi+1 ), yi yi+1 = y(pi+1 ) y(pi )
and yi+1 yi = y(pi ) y(pi+1 ) for i {1, . . . , k 1}.
We call the directed edges on these paths fixed distance arcs and refer to
them as AF . Figure 3 shows a set of point features and its representation in the
constraint graphs.
Lemma 1 (Proof omitted). A coordinate assignment c that respects AF results in a correct placement of point features (up to translation).
Modelling labels. Each label has to be represented by a rectangle r()
of width w() and height h(). Additionally, we have to ensure that will be
placed correctly with respect to its point feature a(), i.e., a() must lie on the
boundary of r().
Straightforwardly, we model a label by two nodes in Vx and two nodes
in Vy , representing the coordinates of r(). We call these nodes the left, right,
bottom and top limit of and refer to them as l , r , b and t , respectively.
We introduce four label size arcs AL () = {(l , r ), (r , l ), (b , t ), (t , b )} in
order to model the size of r(). The weights of these arcs are l r = w(),
r l = w(), b t = h() and t b = h(), see Fig. 4(a).
A label must be placed close to its point feature a(). Let x and y be the
nodes representing point a() in the constraint graphs. We add four proximity
arcs AP () = {(x, r ), (l , x), (y, t ), (b , y)}, as illustrated in Fig. 4(b). These
arcs have zero weight and exclude that the point feature a() lies outside the
rectangle r().
The point feature may still lie inside r(). We disallow this by adding at least
one of the four boundary arcs {(r , x), (x, l ), (t , y), (y, b )}, each of weight zero.
Note that these arcs are inverse to the proximity arcs for label . If, e.g., (r , x)
is present in Dx , it forcestogether with its inverse proximity arc (x, r )the
p4

p4
p2

14

p2

9
-9

8
-8

-14

p3

p1

p6

10

-11
-23
23

Px and Px

-7

13

11
7
-10

p5

-20

p3
-3

p1

p6

20

-13

p5

Py and Py

Fig. 3. Modelling the placement of point features with fixed distance arcs

Optimal Labelling of Point Features in the Slider Model

t
h()

h()

w()

w()

b
x

345

r
0

b
x

Fig. 4. Modelling labels. (a) Label size arcs. (b) Proximity arcs. (c) Boundary
arcs

coordinate of the right side of r() to be equal to the coordinate of x; the label
has to be placed at its leftmost position. See also Fig. 4(c).
At this point we can influence the labelling model. We define a set AB ()
containing the boundary arcs for the different models:

Labelling model
Boundary arcs AB ()
Four-slider {(r , x), (x, l ), (t , y), (y, b )}
Slider
Two-slider {(t , y), (y, b )}
model
One-slider
{(y, b )}
Four-position {(r , x), (x, l ), (t , y), (y, b )}
Discrete
Two-position {(y, b ), (r , x), (x, l )}
model
One-position {(y, b ), (x, l )}
For a slider model, at least one arc a AB () must be contained in the constraint graph, for a discrete model at least two. E.g., for the four-slider model,
the set AB () consists of all four boundary arcs, one of which must be present in
the appropriate constraint graph. Note that we can express all six axis-parallel
rectangular labelling models we have introduced in Sect. 1 as additional requirements on the constraint graphs.
Lemma 2 (Proof omitted). Let be a label, c be a coordinate assignment
respecting AL (), AP () and at least d boundary arcs from AB (). Then c results
in a placement in which is represented by a rectangle r() of width w() and
height h(). The label is placed so that point feature a() lies on the boundary
of r() if d = 1 and on a corner of r() if d = 2.
Avoiding label overlaps. Until now we have assured that each label is placed
correctly with respect to its point feature. It remains to guarantee that the
intersection of rectangles is empty. A crucial observation is that it suffices to
consider only the pairs of labels that can possibly interact. If there is any overlap,
such a pair must be involved.

346

Gunnar W. Klau and Petra Mutzel

Consider two different labels and and their corresponding rectangles


r() and r(). We call the pair vertically separated if r() is placed either above
or below r(). Similarly, and are horizontally separated if one rectangle is
placed left to the other. Two labels overlap if they are neither vertically nor
horizontally separated, we can exclude this by introducing one of the following
four label separation arcs AS (, ) = {(t , b ), (t , b ), (r , l ), (r , l )}. Label
separation arcs have weight zero.
Let R be the boundary of the region in which label can be placed. Note
that R is defined by lower left corner (x(a())w(), y(a())h()) and upper
right corner (x(a())+w(), y(a())+h()). Likewise, we determine R for label
. If the intersection of R and R is empty, and can never overlap, and we
do not have to add any label separation arcs for this pair. In this case we set
AS (, ) = .
Consider now the case that the intersection of R and R is not empty, as
depicted in Fig. 5. Depending on the position of the corresponding point features
a() and a(), AS (, ) contains the following label separation arcs:
1.
2.
3.
4.

If
If
If
If

x(a()) x(a()) we have (r , l ) AS (, ).


x(a()) x(a()) we have (r , l ) AS (, ).
y(a()) y(a()) we have (t , b ) AS (, ).
y(a()) y(a()) we have (t , b ) AS (, ).

Note that the only case in which AS (, ) contains all four label separation
arcs occurs if and label the same point feature, i.e., a() = a().
Lemma 3 (Proof omitted). Let and be two labels that can possibly overlap
and let c be a coordinate assignment respecting AL (), AL () and A AS (, )
with |A| 1. Then c results in a placement in which the two rectangles r() and
r() do not overlap.
the boundary and label separation arcs as potential arcs Apot =
S We refer to S
A
()

,,6= AS (, ) and state the label number maximisation


problem in a combinatorial way. The task is to choose additional arcs from Apot
for a maximum number of labels without creating positive directed cycles.

b
R

a()
l
R

a()

Fig. 5. Label separation arcs between two labels and

Optimal Labelling of Point Features in the Slider Model

347

Problem 2 (Constraint Graph Fulfilment problem, cgf). Given an instance of


lnm, let (Dx , Dy ) be the pair of constraint graphs including only fixed distance
arcs, label size arcs and proximity arcs. Let d = 1 if in the slider model and
d = 2 if in the discrete model and let Ax and Ay be the arc sets of Dx and Dy ,
respectively. Find a set P of greatest cardinality and an arc set A Apot
with the properties:
(F1) |A AB ()| d for all P .
(F2) |A AS (, )| 1 for all , P , 6= , R R 6= .
(F3) A Ax and A Ay do not contain a positive cycle.

Theorem 2. Problems lnm and cgf are polynomially equivalent.


Proof. Let A be a solution of cgf. We extend (Dx , Dy ) by adding A to the
arc sets. Because of (F3) and Theorem 1, there is a coordinate assignment that
respects both the horizontal and vertical arc set. Lemmas 1, 2 and 3 ensure that
properties (L1), (L2) and (L3) are fulfilled, thus we have a solution for lnm.
For the other direction, we start with the given coordinate assignment c
resulting from the placement of labels. We create the set A of additional arcs as
follows: For each label we add one or two boundary arcs, depending on how
r() is placed with respect to point feature a(). Similarly, we add appropriate
arcs from A(, ) for pairs of labels and , depending on the relative position
of and in the labelling. Note that we have chosen the additional arcs so
that they are respected by c. Properties (F1) and (F2) follow by construction,
property (F3) follows by Theorem 1.
t
u

Integer Linear Programming Formulation

In the previous section we have shown how to transform the label number maximisation problem into the combinatorial optimisation problem cgf. We propose
a zero-one integer linear programming formulation and a branch-and-cut algorithm for solving cgf. The goal is to find the set of additional boundary and
label separation arcs A and to determine which labels are to be placed.
We introduce two types of binary variables for this task: For each label there
is a variable y {0, 1}, indicating whether will be placed or not. Additionally,
there are variables xa {0, 1} for potential additional arcs a Apot . We get
(
y =

1
0

P
\ P

(
and xa =

1 aA
0 a Apot \ A .

We present the zero-one integer linear program (ILP) and show that it corresponds to cgf. We define Cp = Apot C.

348

Gunnar W. Klau and Petra Mutzel

max

(ILP)

subject to

xa 2y d 2

(ILP.1)

, , 6=

(ILP.2)

positive cycles C

(ILP.3)


a Apot

(ILP.4)
(ILP.5)

aAB ()

xa y y 1

aAS (,)

xa |Cp | 1

aCp

y {0, 1}
xa {0, 1}

We refer to (ILP.1) as boundary inequalities, to (ILP.2) as label separation


inequalities and to (ILP.3) as positive cycle inequalities.
Theorem 3 (Proof omitted). Each feasible solution (y, x) to (ILP) corresponds to a feasible solution of cgf and vice versa. The value of the objective
function equals the cardinality of P .
Corollary 1. An optimal solution of (ILP) corresponds to an optimal labelling.
Corollary 1 and Theorem 1 suggest an algorithm for attacking practical instances of the label number maximisation problem: In a first step, we solve (ILP)
using integer programming techniques. The solution tells us which boundary and
label separation arcs should be added to the arc sets of the constraint graphs
(Dx , Dy ). We use this information in a second step for computing the corresponding coordinate assignment via minimum cost flow (see proof of Theorem 1).

First Experiments

We have implemented a simple strategy to solve the integer linear program based
on LEDA [6] and the ILP-solver in CPLEX [3]. Due to the fact that the ILP
may have an exponential number of positive cycle inequalities, we solve it iteratively, using a cutting plane approach: We start with an integer linear program
containing inequalities (ILP.1), (ILP.2), (ILP.4), (ILP.5) and a set of local cycle inequalities of type (ILP.3). We determine these inequalities by looking at
possible positive cycles involving up to two labels.
Let x
be a solution of an ILP in the iteration. If the corresponding constraint
graphs do not contain any positive cycles, x is an optimal solution for cgf.
Otherwise, we find a positive cycle and add the corresponding inequality to the
new integer linear program. Our separation procedure uses the Bellman-Ford
algorithm for detecting negative cycles applied to the constraint graphs after
multiplying the arc weights Q|Ax Ay | by 1. Our implementation is based
on the one given in [1].

Optimal Labelling of Point Features in the Slider Model

349

We have tested the implementation on a widely used benchmark generator


for randomly creating instances of lnm, following the rules described in [2]: First,
we construct a set of n points with random coordinates in the range {0, . . . , 792}
for the x- and {0, . . . , 612} for the y-coordinates. To each point feature belongs
a label of width 30 and height 7. We have run the algorithm with both the slider
and the discrete labelling models for rectilinear map labelling. Figure 2 in Sect. 1
shows an optimal solution for an instance with n = 700. In the optimal solution
for the four-slider model, 699 labels can be placed, whereas at most 691 can be
placed in the four-position model.
Evidently, more freedom in the labelling model results in a higher number
of labels that can be placed. Two main factors influence the running time of
our implementation for instances of the same size: On the one hand, this is the
number of labels that cannot be placed in an optimal solution, i.e., the difference
|| |P |: To our surprise, we had the longest running times in the one-position
model. On the other hand, the tightness of the inequalities seems to have an
impact on the running time; the more restrictions on the variables, the faster
the algorithms. Both factors, however, interrelate: In the more restricted models
we can also place fewer labels.

Extensions

As mentioned in Sect. 1, our formulation of lnm allows labels to overlap other,


unlabelled point features. In several applications, this may not be allowed. In
this case, we take the point features into consideration when introducing the
label separation arcs (which then should be called general separation arcs). We
then have to check the overlap conditions also for point feature/label pairs; it is
worth noting that the boundary arcs arise as a special case of general separation
arcs when considering a pair (, a()), i.e., a label and the point feature it should
be attached to.
In many applications, there are labels of different importance. It is easy to
integrate this into our
P approach: The objective function of the integer linear
program changes to z , where z denotes the importance of label . The
algorithm will then prefer more important labels and remove less important
ones more easily. Another practically motivated extension is to model preferable
positions of labels: Often, a label should be placed rather at its rightmost and
upmost position than at other possible positions. We suggest to define a weight
vector for the boundary arcs and incorporate it into the objective function.
Acknowledgements. The authors thank Alexander Wolff for the real-world data
and the help with the conversion in our data format, Michael J
unger for spontaneously supporting the development of the negative cycle separator and Andrew
V. Goldberg for his negative cycle detection code.

350

Gunnar W. Klau and Petra Mutzel

References
[1] B. V. Cherkassky and A. V. Goldberg, Negative-cycle detection algorithms, Mathematical Programming 85 (1999), no. 2, 277311.
[2] J. Christensen, J. Marks, and S. Shieber, An empirical study of algorithms for
point-feature label placement, ACM Transactions on Graphics 14 (1995), no. 3,
203232.
[3] ILOG, CPLEX 6.5 Reference Manual, 1999.
[4] G. W. Klau and P. Mutzel, Combining graph labeling and compaction, Proc. 8th In rn Castle, Czech Republic) (J. Kraternat. Symp. on Graph Drawing (GD 99) (Sti
tochvl, ed.), LNCS, no. 1731, SpringerVerlag, 1999, pp. 2737.
[5] G. W. Klau and P. Mutzel, Optimal compaction of orthogonal grid drawings, Integer
Programming and Combinatorial Optimization (IPCO 99) (Graz, Austria) (G. P.
Cornuejols, R. E. Burkard, and G. J. Woeginger, eds.), LNCS, no. 1610, Springer
Verlag, 1999, pp. 304319.
[6] K. Mehlhorn and S. N
aher, LEDA. A platform for combinatorial and geometric
computing, Cambridge University Press, 1999.
[7] M. van Kreveld, T. Strijk, and A. Wolff, Point labeling with sliding labels, Computational Geometry: Theory and Applications 13 (1999), 2147.
[8] B. Verweij and K. Aardal, An optimisation algorithm for maximum independent set
with applications in map labelling, Proc. 7th Europ. Symp. on Algorithms (ESA 99)
(Prague, Czech Republic), LNCS, vol. 1643, SpringerVerlag, 1999, pp. 426437.
[9] A. Wolff and T. Strijk, The map labeling bibliography,
http://www.math-inf.uni-greifswald.de/map-labeling/bibliography.

Mappings for Conflict-Free Access of Paths in


Elementary Data Structures?
Alan A. Bertossi1 and M. Cristina Pinotti2
1
2

Department of Mathematics, University of Trento, Trento, Italy


[email protected]
Istituto di Elaborazione dell Informazione, CNR, Pisa, ITALY
[email protected]

Abstract. Since the divergence between the processor speed and the
memory access rate is progressively increasing, an efficient partition of
the main memory into multibanks is useful to improve the overall system performance. The effectiveness of the multibank partition can be degraded by memory conflicts, that occur when there are many references
to the same memory bank while accessing the same memory pattern.
Therefore, mapping schemes are needed to distribute data in such a way
that data can be retrieved via regular patterns without conflicts. In this
paper, the problem of conflict-free access of arbitrary paths in bidimensional arrays, circular lists and complete trees is considered for the first
time and reduced to variants of graph-coloring problems. Balanced and
fast mappings are proposed which require an optimal number of colors
(i.e., memory banks). The solution for bidimensional arrays is based on a
combinatorial object similar to a Latin Square. The functions that map
an array node or a circular list node to a memory bank can be calculated
in constant time. As for complete trees, the mapping of a tree node to a
memory bank takes time that grows logarithmically with the number of
nodes of the tree.

Introduction

In recent years, the traditional divergence between the processor speed and the
memory access rate is progressively increasing. Thus, an efficient organization
of the main memory is important to achieve high-speed computations. For this
purpose, the main memory can be equipped with cache memories which have
about the same cycle time as the processors or can be partitioned into multibanks. Since the cost of the cache memory is high and its size is limited, the
multibank partition has mostly been adopted, especially in shared-memory multiprocessors [3]. However, the effectiveness of such a memory partition can be
limited by memory conflicts, that occur when there are many references to the
same memory bank while accessing the same memory pattern. To exploit to
the fullest extent the performance of the multibank partition, mapping schemes
?

This work has been supported by the Provincia Autonoma di Trento under a
research grant.

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 351361, 2000.
c Springer-Verlag Berlin Heidelberg 2000

352

Alan A. Bertossi and M. Cristina Pinotti

can be employed that avoid or minimize the memory conflicts [10]. Since it is
hard to find universal mappings mappings that minimize conflicts for arbitrary
memory access patterns several specialized mappings, designed for accessing
regular patterns in specific data structures, have been proposed in the literature (see [7,2] for a complete list of references). In particular, mappings that
provide conflict-free access to complete subtrees, root-to-leaves paths, sublevels,
and composite patterns obtained by their combination, have been investigated
in [4,5,1,6,9].
In the present paper, optimal, balanced and fast mappings are designed for
conflict-free access of paths in bidimensional arrays, circular lists, and complete
trees. With respect to the above mentioned papers, paths in bidimensional arrays
and circular lists are dealt with for the first time. Moreover, access to any (not
only to root-to-leaves) paths in complete trees is provided.

Conflict-Free Access

When storing a data structure D, represented in general by a graph, on a memory


system consisting of N memory banks, a desirable issue is to map any subset
of N arbitrary nodes of D to all the N different banks. This problem can be
viewed as a coloring problem where the distribution of nodes of D among the
banks is done by coloring the nodes with a color from the set {0, 1, 2, . . . , N 1}.
Since it is hard to solve the problem in general, access of regular patterns, called
templates, in special data structures like bidimensional arrays, circular lists,
and complete trees are considered hereafter.
A template T is a subgraph of D. The occurrences {T1 , T2 , . . . , Tm } of T in
D are the template instances. For example, if D is a complete binary tree, then
a path of length k can be a template, and all the paths of length k in D are the
template instances.
After coloring D, a conflict occurs if two nodes of a template instance are
assigned to the same memory bank, i.e., they get the same color. An access to a
template instance Ti results in c conflicts if c + 1 nodes of Ti belong to the same
memory bank.
Given a memory system with N banks and a template T , the goal is to find
a memory mapping U : D N that colors the nodes of D in such a way that
the number of conflicts for accessing any instance of T is minimal. In fact, the
cost for Ti colored according to U , CostU (D, Ti , N ), is defined as the number
of conflicts for accessing Ti . The template instance of T with the highest cost
determines the overall cost of the mapping U . That is,
def

CostU (D, T, N ) = max CostU (D, Ti , N ).


Ti T

A mapping U is conflict-free for T if CostU (D, T, N ) = 0.


Among desirable properties for a conflict-free mapping, a mapping should
be balanced, fast, and optimal. A mapping U is termed balanced if it evenly
distributes the nodes of the data structure among the N memory banks. For
a balanced mapping, the memory load is almost the same in all the banks. A

Mappings for Conflict-Free Access of Paths in Elementary Data Structures

353

mapping U will be called fast if the color of each node can be computed quickly
(possibly in constant time) without knowledge of the coloring of the entire data
structure. Among all possible conflict-free mappings for a given template of a
data structure, the more interesting ones are those that use the minimum possible number of memory banks. These mappings are called optimal. It is worth
to note that not only the template size but also the overlapping of template
instances in the data structure determine a lower bound on the number of memory banks necessary to guarantee a conflict-free access scheme. This fact will be
more convincing by the argument below for accessing paths in D.
Let GD = (V, E) be the graph representing the data structure D. The
template Pk is a path of length k in D. The template instance Pk [x, y] is the
path of length k between two vertices x and y in V , that is, the sequence
x = v1 , v2 , . . . , vk+1 = y of vertices such that (vh , vh+1 ) E for h = 1, 2, . . . k.
The conflicts can be eliminated on Pk [x, y] if v1 , v2 , . . . , vk+1 are assigned to
all different memory banks. The conflict-free access to Pk can be reduced to a
classical coloring problem on the associated graph GDPk obtained as follows.
The vertex set of GDPk is the same as the vertex set of GD , while the edge
(r, s) belongs to the edge set of GDPk iff the distance drs between the vertices r
and s in GD satisfies drs k, where the distance is the length of the shortest
path between r and s. Now, colors must be assigned to the vertices of GDPk so
that every pair of vertices connected by an edge is assigned a couple of different
colors and the minimum number of colors is used. Hence, the role of maximum
clique in GDPk is apparent for deriving lower bounds on the conflict-free access
on paths. A clique K for GDPk is a subset of the vertices of GDPk such that
for each pair of vertices in K there is an edge. By well-known graph theoretical
results, a clique of size n in the associated graph GDPk implies that at least n
different colors are needed to color GDPk . In other words, the size of the largest
clique in GDPk is a lower bound for the number of memory banks required to
access paths of length k in D without conflicts.
On the other hand, the conflict-free access to Pk on GD is equivalent to color
the nodes of GD in such a way that any two nodes which are at distance k or less
apart have assigned different colors. Unfortunately, this latter coloring problem is
NP-complete [8] for general graphs. In the next three sections, optimal mappings
for bidimensional arrays, circular lists and complete binary trees will be derived
for conflict-free accessing Pk .

Accessing Paths in Bidimensional Arrays

Let a bidimensional array A be the data structure D to be mapped into the


multibank memory system. An array r c has r rows and c columns, indexed
respectively from 0 to r 1 (from top to bottom) and from 0 to c 1 (from left
to right), with r and c both greater than 1.
The graph GA = (V, E) representing A is a mesh, whose vertices correspond
to the elements of A and whose arcs correspond to any pair of adjacent elements
of A on the same row or on the same column. For the sake of simplicity, A will

354

Alan A. Bertossi and M. Cristina Pinotti

be used instead of GA since there is no ambiguity. Thus, a generic node x of A


will be denoted by x = (i, j), where i is its row index and j is its column index.
y

x
(a)

x
(b)

Fig. 1. A subset KA (x, k) of nodes of A that forms a clique in GAPk : (a) k = 3,


(b) k = 4.

Consider a generic node x = (i, j) of A, and its opposite node at distance k


on the same column, i.e., y = (i k, j). All the nodes of A at distance k or less
from both x and y are mutually at distance k or less, as shown in Figure 1. In
the associated graph GAPk , they form a clique, and they must be assigned to
different colors. Therefore,
m
l
2
memory banks are required for conflict-free
Lemma 1. At least M = (k+1)
2
accessing Pk in A.
Below, a conflict-free mapping is given to color all the nodes of an array A
using as few colors as in Lemma 1. Therefore, the mapping is optimal. From now
on, the color assigned to node x is denoted by (x).
Algorithm Array-Coloring (A, k);

m
l
k + 1 if k is even
(k+1)2
and =
Set M =
2
k
if k is odd
Assign to each node x = (i, j) A the color (x) = (i + j) mod M.

Mappings for Conflict-Free Access of Paths in Elementary Data Structures

355

Theorem 1. The Array-Coloring mapping is optimal, fast, and balanced.


Proof: Intuitively, the above algorithm first covers A with a tessellation of
basic sub-arrays of size M M . Each basic sub-array S is colored conflict-free
in a Latin Square fashion as follows:
the colors in the first row of S appear from left-to-right in the sequence
0, 1, 2, . . . , M 1;
the color sequence for a generic row is obtained from the sequence at the
previous row by a left-cyclic shift.
For k = 3, the coloring of A, decomposed into 6 basic sub-arrays of size
M M , is illustrated in Figure 2.

0
3
6
1
4
7
2
5
0
3
6
1
4
7
2
5

1
4
7
2
5
0
3
6
1
4
7
2
5
0
3
6

2
5
0
3
6
1
4
7
2
5
0
3
6
1
4
7

3
6
1
4
7
2
5
0
3
6
1
4
7
2
5
0

4
7
2
5
0
3
6
1
4
7
2
5
0
3
6
1

5
0
3
6
1
4
7
2
5
0
3
6
1
4
7
2

6
1
4
7
2
5
0
3
6
1
4
7
2
5
0
3

7
2
5
0
3
6
1
4
7
2
5
0
3
6
1
4

0
3
6
1
4
7
2
5
0
3
6
1
4
7
2
5

1
4
7
2
5
0
3
6
1
4
7
2
5
0
3
6

2
5
0
3
6
1
4
7
2
5
0
3
6
1
4
7

3
6
1
4
7
2
5
0
3
6
1
4
7
2
5
0

4
7
2
5
0
3
6
1
4
7
2
5
0
3
6
1

5
0
3
6
1
4
7
2
5
0
3
6
1
4
7
2

6
1
4
7
2
5
0
3
6
1
4
7
2
5
0
3

7
2
5
0
3
6
1
4
7
2
5
0
3
6
1
4

0
3
6
1
4
7
2
5
0
3
6
1
4
7
2
5

1
4
7
2
5
0
3
6
1
4
7
2
5
0
3
6

2
5
0
3
6
1
4
7
2
5
0
3
6
1
4
7

3
6
1
4
7
2
5
0
3
6
1
4
7
2
5
0

4
7
2
5
0
3
6
1
4
7
2
5
0
3
6
1

5
0
3
6
1
4
7
2
5
0
3
6
1
4
7
2

6
1
4
7
2
5
0
3
6
1
4
7
2
5
0
3

7
2
5
0
3
6
1
4
7
2
5
0
3
6
1
4

Fig. 2. An array A of size 16 24 with a tessellation of 6 sub-arrays of size


8 8 colored by the Array-Coloring algorithm to conflict-free access P3 .

No conflict arises on the borders of the sub-arrays. In fact, it can be proved


that any two nodes colored the same are k + 1 apart and their relative positions
are depicted in Figure 3.
So, the Array-Coloring Algorithm is conflict-free. Moreover, since it uses the
minimum number of colors, the proposed mapping is optimal.
It is easy to see that the time required to color all the n = rc nodes of an
array is O(n). Moreover, to color only a single node x = (i, j) of the tree requires
only O(1) time, since (x) = (i + j) mod M , and hence the mapping is fast.
In order to prove that the mapping is balanced, observe that each color
appears once in each sub-row of size M . Hence, the number m of nodes with the
c
c
c m rd M
e.
same color verifies rb M

356

Alan A. Bertossi and M. Cristina Pinotti

k/2

(k+1)/2

k/2 + 1

(k+1)/2+1
(k+1)/2

k/2 + 1

(k+1)/2-1

k/2

(a)

(b)

Fig. 3. Relative positions in A of two nodes which are assigned to the same
color: (a) k even, (b) k odd.

Accessing Paths in Circular Lists

Let a circular list C be the data structure D to be mapped into the multibank
memory system. A circular list of n nodes, indexed consecutively from 0 to n 1,
is a sequence of n nodes such that node i is connected to both nodes (i1) mod n
and (i + 1) mod n.
The graph GC = (V, E) representing C is a ring, whose vertices correspond
to the elements of C and whose arcs correspond to any pair of adjacent elements
of C. For the sake of simplicity, C will be used instead of GC since there is no
ambiguity.

Lemma 2. Let M =

n
(k + 1) +

n mod
 (k+1)

n
(k+1)

 if n < k + 1,
if n k + 1.

At least M memory banks are required for conflict-free accessing Pk in C.


Proof
For conflict-free accessing Pk in C two nodes with the same color
must be at distance at least k + 1. When n < k + 1, all the nodes are mutually at
distance less than k and must all be j
coloredkwith different colors. When n k+1,
 
n
times. Therefore, at least nt colors
each color may appear at most t = (k+1)
k
j
n
(k + 1) + (n mod (k + 1)), it follows that
are needed. Observed that n = (k+1)


n
n mod
(k+1)


memory banks are required.
at least M = t = (k + 1) +
n
(k+1)

Below, an optimal conflict-free mapping is provided to color all the nodes of


a circular list C using as few colors as in Lemma 2. As before, the color assigned
to node x is denoted by (x).

Mappings for Conflict-Free Access of Paths in Elementary Data Structures

357

0
1

5
4

2
5

1
0

Fig. 4. Conflict-free access to P4 in a circular list C of 13 nodes colored by the


Circular-List-Coloring algorithm with M = 7.

Algorithm Circular-List-Coloring (C, k);

Set M =

(k + 1) +

n mod
 (k+1)


n
(k+1)

 if n < k + 1
if n k + 1

n mod (M 1), if n mod M =


6 0
n
,
if
n
mod
M
=0
M
Assign to
node
x

C,
the
color

x mod M
if x <
(x) =
(x ) mod (M 1) if x

Set = sM where s =

Note that a linear (that is, non circular) list L can be optimally colored to
conflict-free access Pk with M 0 = k + 1 colors, which matches the trivial lower
bound given by the number of nodes in Pk . In fact, L can be optimally colored
by a naive algorithm which assigns to node x the color (x) = x mod M 0 . Such
a naive algorithm does not work for circular lists.
Theorem 2. The Circular-List-Coloring mapping is optimal, fast, and balanced.

Accessing Paths in Complete Trees

Let a rooted complete binary tree B be the data structure to be mapped into
the multibank memory system. The level of node x B is defined as the number
of edges on the path from x to the root, which is at level 0. The maximum level
of the nodes of B is the height of B. Let LevB (i) be the set of all nodes of B at
level i 0. A complete binary tree of height H is a rooted tree B in which all
the leaves are at the same level and each internal node has exactly 2 children.

358

Alan A. Bertossi and M. Cristina Pinotti

Thus, LevB (i) contains 2i nodes. The h-th ancestor of the node (i, j) is the node
(i h, b 2jh c), while its children are the nodes (i + 1, 2j) and (i + 1, 2j + 1), in the
left-to-right order.
From now on, the generic node x, which is the j-th node of LevB (i), with
j 0 counting from left to right, will be denoted by x = (i, j). Therefore, the
generic path instance Pk [x, y] will be denoted by Pk [(i, j), (r, s)], where x = (i, j)
and y = (r, s).
k
k
Lemma 3. At least M = 2b 2 c+1 + 2d 2 e 2 memory banks are required to
conflict-free access Pk in B.
k

Proof
Consider a generic node x = (i, j). All the 2b 2 c+1 1 nodes in the
subtree S of height b k2 c rooted at the b k2 c-th ancestor of x are mutually at
distance not greater than k.
In addition, consider the d k2 e nodes, 1 , 2 , . . . d k e , ancestors of x, on the
2
path I of length d k2 e from the b k2 c-th ancestor of x up to the k-th ancestor of
x. All these nodes are at distance not greater than k from node x, and together
with the nodes of S they are at mutual distance not greater than k.
Moreover, for 1 j d k2 e 1, consider the 2j +1 1 nodes in the complete
subtree of height j = k b k2 c j 1, rooted at the j s child which does not
belong to I. Such nodes are at distance not greater than k from x. Furthermore,
these nodes, along with the nodes of S and I, are all together at mutual distance
not greater than k.
Hence, in the associated graph GDPk there is at least a clique of size
2

bk
2 c+1

k
k
  dX
  dX
2 e1
2 e2


k
k
j +1
bk
c+1
1+
1 =2 2
1+
2
2h+1 1 .
+
+
2
2
j=1

h=0

From that, the claim easily follows. Figure 5 shows a subset KB (k) of nodes of
B which are at pairwise distance not greater than k, for k = 3 and 4, and hence
forms a clique in the associated graph GBPk .
An optimal conflict-free mapping to color a complete binary tree B acts as
follows.
A basic subtree KB (k) defined as in the proof of Lemma 3 is identified and
colored. Such a tree is then overlaid to B in such a way that the uppermost k2
 
levels of B coincide with the lowermost k2 levels of KB (k). Then, the complete
coloring of B is produced level by level by assigning to each node the same color
as an already colored node.
Formally, for a given k, define the binary tree KB (k) as follows:
KB (k) has a leftmost path of k + 1 nodes.
the root of KB (k) has only the left child;
a complete subtree of height i 1 is rooted at the right child of the node at
level i on the leftmost path of KB (k).
k

be colored with 2b 2 c+1 + 2d 2 e 2


The 2b 2 c+1 + 2d 2 e 2 nodes of KB (k) must

k
different colors. Thus, the uppermost 2 levels of B are already colored.

Mappings for Conict-Free Access of Paths in Elementary Data Structures

359

2
1

(a)
2
1

S
x

(b)

Fig. 5. A subset KB (k) of nodes of B that forms a clique in GBPk : (a) k = 3,


(b) k = 4.

For the sake of simplicity, to color the remaining part of B, the levels are
counted starting from the
 root of KB (k). That is, the level of the root of B will
be renumbered as level k2 + 1. Now, xed x = (0, k), the algorithm to color B
acts as follows.
Algorithm Binary-Tree-Coloring (B, k);
k

Set M = 2 2 +1 + 2 2  2;
Color KB (k) with M colors;
Visit the tree B in breadth rst search, and for each node x = (i, j)
of B, with j k + 1, do:
k
Set 
= jmod2 2  , = log( + 1), = k + 1 and
j
1 mod 2;
= 21
Assign to x the same color as that of the node y = (r, s), where
r =i+
and
 j 
if = 0
2
s=  


j
2 + 21 + mod 21 if = 0
2
Examples of colorings to conict-free access P3 and P4 are illustrated in
Figure 6.

360

Alan A. Bertossi and M. Cristina Pinotti


0

4
(a)

6
1

(b)

Fig. 6. Coloring of B for conflict-free accessing: (a) P3 , (b) P4 . (Both KB (3)


and KB (4) are depicted by dash splines.)

Theorem 3. The Binary-Tree-Coloring mapping is optimal, fast and balanced.


The results shown for binary trees can be extended to a q-ary tree Q, with
q 2.

Conclusions

In this paper, the problem of conflict-free accessing arbitrary paths Pk in particular data structures, such as bidimensional arrays, circular lists and complete
trees, has been considered for the first time and reduced to variants of graphcoloring problems. Optimal, fast and balanced mappings have been proposed.
Indeed, the memory bank to which a node is assigned is computed in constant
time for arrays and circular lists, while it is computed in logarithmic time for
complete trees. However, it remains as an open question whether a tree node
can be assigned to a memory bank in constant time.

References
1. V. Auletta, S. K. Das, M. C. Pinotti, and V. Scarano, Toward a Universal
Mapping Algorithm for Accessing Trees in Parallel Memory Systems, Proceedings
of IEEE Intl Parallel Processing Symposium, Orlando, pp. 447-454, Apr. 1998.
2. V. Auletta, A. De Vivo, V. Scarano, Multiple Template Access of Trees in Parallel Memory Systems. Journal of Parallel and Distributed Computing, Vol. 49,
1998, pp. 22-39.
3. G.E. Blelloch, P.B. Gibbons, Y. Mattias and M. Zagha, Accounting for Memory
Bank Contention and Delay in High-Bandwidth Multiprocessors, IEEE Trans.
on Parallel and Distrib. Systems, Vol. 8, 1997, pp. 943-958.

Mappings for Conflict-Free Access of Paths in Elementary Data Structures

361

4. S. K. Das and F. Sarkar, Conflict-Free Data Access of Arrays and Trees in


Parallel Memory Systems, Proc. of the Sixth IEEE Symposium on Parallel and
Distributed Processing, Dallas, TX, Oct. 1994, pp. 377-384.
5. S. K. Das, F. Sarkar and M. C. Pinotti, Parallel Priority Queues in Distributed
Memory Hypercubes, IEEE Transactions on Parallel and Distributed Systems,
Vol. 7, 1996, pp. 555-564.
6. S.K. Das and M.C. Pinotti, Load Balanced Mapping of Data Structures in Parallel Memory Modules for Fast and Conflict-Free Templates Access Proc. 5th
Int. Workshop on Algorithms and Data Structures (WADS97) Halifax NS, Aug.
1997, LNCS 1272, (Eds. Dehne, Rau-Chaplin, Sack, Tamassia), pp. 272-281.
7. K. Kim, V.K. Prasanna, Latin Squares for Parallel Array Access, IEEE Transactions on Parallel and Distributed Systems, Vol. 4, 1993, pp. 361-370.
8. S.T. McCormick, Optimal Approximation of Sparse Hessians and its Equivalence
to a Graph Coloring Problem, Mathematical Programming, Vol. 26, 1983, pp.
153171.
9. M. C. Pinotti, S. K. Das, and F. Sarkar, Conflict-Free Template Access in k-ary
and Binomial Trees, Proceedings of ACM-Intl Conference on Supercomputing,
Wein, Austria, pp. 237-244, July 7-11, 1997.
10. H.D. Shapiro, Theoretical Limitations on the Efficient Use of Parallel Memories,
IEEE Trans. on Computers, Vol. 27, 1978, pp. 421-428.

Theory of Trinomial Heaps


Tadao Takaoka
Department of Computer Science, University of Canterbury
Christchurch, New Zealand
[email protected]

Abstract. We design a new data structure, called a trinomial heap,


which supports a decrease-key in O(1) time, and an insert operation and
delete-min operation in O(log n) time, both in the worst case, where n
is the size of the heap. The merit of the trinomial heap is that it is conceptually simpler and easier to implement than the previously invented
relaxed heap. The relaxed heap is based on binary linking, while the
trinomial heap is based on ternary linking.

Introduction

The Fibonacci heap was invented by Fredman and Tarjan [3] in 1987. Since
then, there have been two alternatives that can support n insert and delete-min
operations, and m decrease-key operations in O(m + n log n) time. The relaxed
heaps by Driscoll, et. al [2] have the same overall complexity with decrease-key
with O(1) worst case time, but are difficult to implement. The other alternative is
the 2-3 heap invented by the author [5], which supports the same set of operations
with the same time complexity. Although the 2-3 heap is simpler and slightly
more efficient than the Fibonacci heap, the O(1) time for decrease-key is in
the amortized sense, meaning that the time from one decrease key to the next
can not be smooth. Two representative application areas for these operations
will be the single source shortest path problem and the minimum cost spanning
tree problem. Direct use of these operations in Dijkstras [1] and Prims [4]
algorithms with those data structures will solve these two problems in O(m +
n log n) time, where n and m are the numbers of vertices and edges of the given
graph. Logarithm here is with base 2, unless otherwise specified.
A Fibonacci heap is a generalization of a binomial queue invented by Vuillemin
[6]. When the key value of a node v is decreased, the subtree rooted at v is removed and linked to another tree at the root level in the Fibonacci and 2-3 heap.
This removal of a subtree may cause a chain effect to keep structural properties of those heaps, resulting in worst case time greater than O(1), although it
is O(1) amortized time. As an alternative to the Fibonacci heap, Driscoll, et.
al. proposed a data structure called a relaxed heap, whose shape is the same
as that of a binomial queue. The requirement of heap order is relaxed in the
relaxed heap; a certain number of nodes are allowed to have smaller key values
than those of their parents. Those nodes are called bad children in [2] and inconsistent nodes in this paper. On the other hand, the 2-3 heaps is proposed as
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 362372, 2000.
c Springer-Verlag Berlin Heidelberg 2000

Theory of Trinomial Heaps

363

another alternative to the Fibonacci heap. While the Fibonacci heap is based
on binary linking, 2-3 heaps are based on ternary linking; we link three roots of
three trees in increasing order according to the key values. We call this path of
three nodes a trunk. We allow a trunk to shrink by one. If there is requirement
of further shrink, we make adjustment by moving a few subtrees from nearby
positions. This adjustment may propagate, taking time more than O(1).
In this paper, we combine the ideas of the relaxed heap and 2-3 heap; we
use ternary linking and allow a certain number of inconsistent nodes. Ternary
linking gives us more flexibility to keep the number of inconsistent nodes under
control. The new data structure is called a trinomial heap, and is simpler and
easier to implement than the relaxed heap. In the relaxed heap which is based
on binary linking, we must keep each bad child at the rightmost branch of its
parent, causing difficult book-keeping. The trinomial heap is constructed by
ternary linking of trees repeatedly, that is, repeating the process of making the
product of a linear tree and a tree of lower dimension. This general description
of r-ary trees is given in Section 2. The definition of trinomial heaps and their
operations are given in Section 3. In Section 4, we implement decrease-key in
O(1) amortized time. In Section 5, we implement it with O(1) worst case time.
In Section 6, we give several practical considerations for implementation. Section
7 concludes the paper.
In this paper we analyze the number of key comarisons for computing time
as the times for other operations are proportional to it. We mainly deal with
decrease-key and delete-min in this paper since the main application areas are
the single source shortest path problem and the minimum cost spanning tree
problem and we can build up the heap of size n at the beginning. The nodes
not adjacent with the source can be inserted with infinite key values at the
beginning. As shown in Section 2, the time for building the heap can be O(n).
Thus we can concentrate our discussion on decrease-key and delete-min after the
heap is built.

Polynomial Queues and Their Analysis

We borrow some materials from [5] in this section, as the trinomal heap and the
2-3 heap share the same basic structure. We define algebraic operations on rooted
trees as the basis for priority queues. A tree consists of nodes and branches, each
branch connecting two nodes. The root of tree T is denoted by root(T ). A linear
tree of size r is a liner list of r nodes such that its first element is regarded as
the root and a branch exists from a node to the next. The linear tree of size r is
expressed by bold face r. Thus a single node is denoted by 1, which is an identity
in our tree algebra. The empty tree is denoted by 0, which serves as the zero
element. A product of two trees S and T , P = ST , is defined in such a way that
every node of S is replaced by T and every branch in S connecting two nodes
u and v now connects the roots of the trees substituted for u and v in S. Note
that 2 2 6= 4, for example, and also that ST 6= T S in general. The symbol

364

Tadao Takaoka

is used to avoid ambiguity. Since the operation of product is associative, we use


the notation of ri for the products of i rs.
Let the operation be defined by the tree L = S T for trees S and T .
The tree L is made by linking S and T in such a way that root(T ) is connected
as a child of root(S). Then the product ri = rri1 is expressed by
ri = ri1 ... ri1 (r 1s are evaluated right to left) (1)
The whole operation in (1) is to link r trees, called an i-th r-ary linking. The
path of length r 1 created by the r-ary linking is called the i-th trunk of the
tree ri , which defines the i-th dimension of the tree in a geometrical sense. The
j-th ri1 in (1) is called the j-th subtree on the trunk counting from j = 0. The
root of such a j-th subtree is said to be of dimension i. The root of the 0-th
subtree is called the head node of the trunk. The dimension of the head node
is i or higher, depending on further linking. If v is of dimension i, we write as
dim(v) = i.
The dimension of tree T , dim(T ), is defined by dim(root(T )). A sum of two
trees S and T , denoted by S + T , is just the collection of two trees S and T . Let
ai ri be defined similarly to (1) by linking ai trees of ri . An r-ary polynomial of
trees of degree k 1, P , is defined by
P = ak1 rk1 + ... + a1 r + a0 (2)
where ai is a linear tree of size ai and called a coefficient in the polynomial. Let
|P | be the number of nodes in P and |ai | = ai . Then we have |P | = ak1 rk1 +
...+ a1 r + a0 . We choose ai to be 0 ai r 1, so that n nodes can be expressed
by the above polynomial of trees uniquely, as the k digit radix-r expression of n
is unique with k = dlogr (n + 1)e. The term ai ri is called the i-th term. We call
ri the complete tree of dimension i. The path created by linking ai trees of ri is
called the main trunk of the tree corresponding to this term. Each term ai ri in
form (2) is a tree of dimension i + 1 if ai > 1, and i if ai = 1. A polynomial of
trees is regarded as a collection of trees of dimensions up to k.
We next define a polynomial queue. An r-nomial queue is an r-ary polynomial
of trees with a label label(v) attached to each node v such that if u is a parent
of v, label(u) label(v). A binomial queue is a 2-nomial queue. We use label
and key interchangeably.
Example 1. A polynomial queue with an underlying polynomial of trees P =
2 32 + 2 3 + 2 is given in Fig. 1.
The merging of two linear trees r and s is to merge the two lists by their
labels. The result is denoted by the sum r + s. The merging of two terms ai ri
and a0 i ri is to merge the main trunks of the two trees by their labels. When the
roots are merged, the trees underneath are moved accordingly. If ai + a0i < r,
we have the merged tree with coefficient ai + a0i . Otherwise we have a carry tree
ri+1 and the remaining tree with the main trunk of length ai + a0i r. The sum
of two polynomial queues P and Q is made by merging two polynomial queues
in a very similar way to the addition of two radix-r numbers. We start from

Theory of Trinomial Heaps

365

4 e
2 e
3 e
,
@
@
,@`@`````````5
6 ,
e
7 e
e
16 ,
e
15@e
19@e
,
,
@
@
,
,
,
e
@e 13 ,e 11@e 20 ,e 17,,e
8 ,
10 ,
e
9
, 22 e , 21 ,e ,@18@e 26 ,e
,
14 ,
e
23 ,
e
, ,
,
,
25 ,
e
30 ,
e
29 ,
e
,
31 ,
e

Fig. 1. Polynomial of trees with r = 3


the 0-th term. Two i-th terms from both queues are merged, causing a possible
carry to the (i + 1)-th terms. Then we proceed to the (i + 1)-th terms with the
possible carry.
An insertion of a key into a polynomial queue is to merge a single node
with the label of the key into the 0-th term, taking O(r logr n) time for possible
propagation of carries to higher terms. The time for n insertions to form a
polynomial queue P looks like taking O(nr logr n) time. Actually the time is
O(rn), as shown below. After the heap is made, we can take n successive minima
from the queue by deleting the minimum in some tree T , adding the resulting
polynomial queue Q to P T , and repeating this process. This will sort the n
numbers in O(nr logr n) time after the queue is made. Thus the total time for
sorting is O(nr logr n). In the sorting process, we do not change key values. If
the labels are updated frequently, however, this structure of polynomial queue
is not flexible.
Amortized analysis for insert: Let the deficit function i after the i-th insert
be defined by r 1 times the number of trees in the heap. We use the word deficit
rather than potential because the number of roots gives a negative aspect of the
heap. Let ti and ai be the actual time and the amortized time for the i-th insert
operation. Then we have ai = ti + i i1 . When we insert a single node into
the heap, we spend r-1 comparisons by scanning the main trunk, whenever we
make a carry to the next position. We decrease the number of trees by one as
a result. We terminate the carry propagation either by making a new complete
tree or inserting a carry into a main trunk. Thus we have ai r 1. Note that
ai = ti + n 0 , 0 = 0, and n = O(log n).

Trinomial Heaps

We linked r trees in heap order in form (1). We relax this condition in the
following way. A node is said to be inconsistent if its key value is smaller than
that of its head node. Otherwise the node is said to be consistent. An active
node is either an inconsistent node or a node which was once inconsistent. The
latter case occurs when a node becomes inconsistent and then the key value of

366

Tadao Takaoka

its head node is decreased, and the node becomes consistent again. Since it is
expensive to check whether the descendants of a node become consistent when
the key value of the node is decreased, we keep the children intact. Note that we
need to look at the roots and active nodes to find the minimum key in the heap.
If the number of active nodes in the given r-nomial queue is bounded by t, the
queue is said to be an r-nomial heap with tolerance t. We further require that
the nodes except for the head node on each trunk are sorted in non-decreasing
order of their key values, and that there are no active nodes in each main trunk,
that is, main trunks are sorted. Note that an r-nomial queue in the previous
section is an r-nomial heap with tolerance 0.
When r = 3, we call it a trinomial heap. In a trinomial heap we refer to the
three nodes on a trunk of dimension i as the head node, the first child and the
second child. Note that each node of dimension i(> 0) is connected downwards
with first children of dimension 1, ..., i 1. It is further connected downward
and/or upward with trees of dimension i or higher. We refer to the trees in (2)
and their roots as those at the top level, as we often deal with subtrees at lower
levels and need to distinguish them from the top level trees. The sum P + Q
of the two trinomial heaps P and Q is defined similarly to that for polynomial
queues. Note that those sum operations involve computational process based on
merging. We set t = dlog3 (n + 1)e 1 as the default tolerance.
Example 2. A trinomial heap with tolerance 3 with an underlying polynomial
of trees P = 2 32 + 2 3 + 2 is given below. Active nodes are shown by black
circles. We use t = 3 just for explanation purposes, although the default is 2.
6 `
e ``
4 e
3 e
``````9
@
,
@
@19@e
,
7 ,
e
16 ,
e
17@e
@2 u
`e
, 10 ,e ,@5@u 13 ,e ,@11@e 20 ,e , 15 ,u ,
e
8 ,
,
, , , ,@
14 ,
e
23 ,
e
22 ,
e
21 ,
e
18@e
26 ,
e
, 29 ,e ,
,
25 ,
e
30 ,
e
,
31 ,
e

Fig. 2. Trinomial heap with t = 3


We describe delete-min, insertion, and decrease-key operations for a trinomial
heap. If we make active nodes non-active by spending key comparisons, we say
we clean them up.
Let the dimension of node v be i, that is, the trunk of the highest dimension
on which node v stands is the i-th. Let treei (v) be the complete tree 3i rooted
at v. To prepare for delete-min, we first define the break-up operation. A similar
break-up operation for a binomial queue is given in [6]

Theory of Trinomial Heaps

367

Break-up: The break-up operation caused by deleting node v is defined in the


following way. Let vp , vp1 , ..., v1 be the head nodes on the path from the root
(= vp ) to the head node (= v1 ) of v = (v0 ) in the tree ai 3i in which v exists.
We cut off all subtrees treejl (vl ) where jl = dim(vl1 ) and the corresponding
links to their first children of dim(vl1 ) + 1, ..., dim(vl ) for l = p, p 1, ..., 1
in this order. Then we delete v, and cut the links to all the first children of v.
The trunks from which subtrees are removed are shortened. This operation will
create i trees of the form 2 3j for j = 0, ..., i 1, and 3i if ai = 2. See Example
3.
Delete-min: Perform break-up after deleting the node with the minimum key.
Swap the two subtrees on the main trunk of each resulting tree to have sorted
order if necessary. Then merge the trees with the remaining trees at the top
level. The time taken is obviously O(log n). The nodes on the main trunks of the
new trees are all cleaned up, and thus the number of active nodes is decreased
accordingly.
Reordering: When we move a node v on a trunk of dimension i in the following, we mean we move treei1 (v). Let v and w be the first and second children
and active nodes on the same trunk of dimension i. Then reordering is to reorder the positions of u, v and w after comparing label(u) with label(w). If
label(u) label(w), we make w non-active, and do no more. Otherwise we move
u to the bottom. When we move u, we move treei1 (u), although dim(u) may
be higher. See Fig. 3. We can decrease the number of active nodes. Note that
this operation may cause an effect equivalent to decrease-key at dimension i + 1.
Rearrangement: Let v and w be active first children of dimension i on different
trunks. Suppose v 0 and w0 are the non-active second children on the same trunks.
Now we compare keys of v 0 and w0 , and v and w, spending two comparisons.
Without loss of generality assume label(v 0 ) label(w0 ) and label(v) label(w).
Then arrange v 0 and w0 , and w and v respectively to be the first and second
children on each trunk. We call this operation rearrangement. Note that this
operation is done within the same dimension of v. See Fig. 4. Since w and v are
active on the same trunk, we call reordering described above.
Decrease-key: Suppose we decreased the key value of node v such that dim(v) =
i. Let its head node and the other child on the same trunk be u and w. If v is
the second child and label(w) label(v), do nothing. Otherwise swap w and v
and go to the next step. If v is a first child and label(u) label(v), clean v if v
was active. We have spent one or two comparisons. If we did not increase active
nodes, we can finish decrease-key. Otherwise go to the next step. Assume at
this stage v is the first child, label(u) > label(v), and v has been turned active.
We perform rearrangement and/or reordering a certain number of times to keep
the number of active nodes under control. There are two control mechanisms as
shown later.
Insert: To insert one node, merge a tree of a single node with the right most
tree of the heap. A possible carry may propagate to the left. Thus the worst case
time is O(log n). Note that main trunks are sorted and there are no active nodes
on them, meaning that there is no substantial difference between polynomial

368

Tadao Takaoka

queues with r=3 and trinomial heaps. As shown in Section 2, the amortized
time for insert is O(1) with r = 3.

@ e
@
u
,,@@
v u
,
wu
,

@ or e
@u
v
,,@@
we
,
u e
,

(Before)

(After)

Fig. 3. reordering

(Before)

,,
v u
v e
,,

(After)

,,
wu
w e
,,

,
e
v ,
,
w ,
e

,,
w

,
u,

Fig. 4. Rearrangement

Example 3. Let us perform delete-min on the trinomial heap in Fig. 2. Then the
biggest tree is broken up as in Fig. 5. After the subtrees rooted at nodes with
key 6 and 5 are swapped, the resulting trees and the trees at the top level will
be merged.
6 e
4 e
3 e
,
@
@
,@
9 e
7 ,
e
16 ,
e
17@e
@
@
@
, , 19@e
,
,
8 e
, 10,e 5@,u 13,,e 11,@@e 20 ,e 15,,u
14 ,
e
23 ,
,e 22 ,e 21,,e 18,@e 26 ,e
25 ,
e
30 ,
e
29 ,
e
,
31 ,
e

Fig. 5. Trinomial heap with k = 3

Theory of Trinomial Heaps

369

Example 4. We name a node with key x by node(x). Suppose key 21 is decreased


to 1 in Fig. 2. We connect node(30) to node(26), and node(15) to node(1). The
result is shown in Fig. 6.
6 `
e`
4 e
3 e
`````
,
@
,
@
@19@e
```9 e
7 ,
e
2 u
16 ,
e
17@e
@
, ,@
,@
, ,
8 ,
e
10 ,
e
5
@u 13 ,e 11@e 20 ,e 26 ,e
, 23 e , 22 e , 1 u ,@18 e 30 e ,
14 ,
e
, , ,, ,@
,
,
25 ,
e
15 ,
e
29 ,
e
,
31 ,
e

Fig. 6. Trinomial heap with k = 3


There are two ways to keep the number of active nodes within tolerance. The
first is to allow at most one active node for each dimension. If v becomes active
after we perform decrease-key on v, and there is another active w of the same
dimension, we can perform rearrangement and/or reordering. The reordering
may cause two active nodes at the next higher dimension, causing a possible
chain effect of adjustments.
The second is to keep a counter for the number of active nodes. If the counter
exceeds the tolerance bound t, we can perform rearrangement and/or reordering
on two active nodes of the same dimension, and decrease the counter by one.
Note that if the number of active nodes exceeds the tolerance, there must be
two active nodes of the same dimension by the pigeon hole principle. There is no
chain effect in this case thanks to the global information given by the counter.
We allow more than one active nodes of the same dimension, even on the same
trunk.

O(1) Amortized Time for Decrease-Key

We prepare an array, called active, of size t(= k 1), whose elements are active nodes of dimension i (i = 1, ..., k 1). That is, we have at most one active
node for each dimension greater than 0. If there is no active node of dimension
i, we denote active[i] = . Suppose we perform decrease-key on node v of dimension i, which is now active. If active[i] = , we set active[i] = v and finish.
If active[i] = u, we perform rearrangement and/or reordering on u and v, and
adjust active accordingly. If we perform reordering, rearrangement and/or reordering will proceed to higher dimensions. This is like carry propagation over
array active, so the worst case time is O(log n). Similarly to the insert operation, we can easily show that the amortized time for decrease-key is O(1). As

370

Tadao Takaoka

mentioned in Introduction, we can perform m decrease-key operations, and n


insert and delete-min operations in O(m + n log n) time. This implementation
is more efficient for applications to shortest paths, etc. than the implementation
in the next section, and can be on a par with Fibonacci and 2-3 heaps.
Amortized analysis:. After the key value of a node is decreased, several operations are performed, including checking inconsistencies. The total maximum
number of key comparisons leading to a reordering is five. Thus if we define a
deficit function i after the i-th decrease-key by five times the number of active
nodes, we can show that the amortized time for one decrease-key is O(1). If we
have inserts in a series of operations, we need to define the deficit function after
the i-th operation by i +i .

O(1) Worst Case Time for Decrease-Key

In this section, we implement trinomial heaps with O(1) worst case time for
decrease-key. We prepare a one-dimensional array point of pointers to the list
of active nodes for each dimension, an array count, and counter. The variable
counter is to count the total number of active nodes. The size of the arrays is
bounded by the number of dimensions in the heap. The list of nodes for dimension
i contains the current active nodes of dimension i. The element count[i] shows the
size of the i-th list. To avoid scanning arrays point and count, we prepare another
linked list called candidates, which maintains a first-in-first-out structure for
candidate dimensions for the clean-up operation. With these additional data
structures, we can perform decrease-key with a constant number of operations.
Note that we need to modify these data structures on delete-min as well, details
of which are omitted.
Example 5. In this example, we have t = 7. If we create an active node of
dimension 1, we go beyond the tolerance bound, and we perform clean-up using
nodes a and b. Suppose this is a rearrangement not followed by reordering. Then
a or b is removed from the 3rd list and the first item in candidates is removed.
Next let us perform reordering using e and f . First we remove e and f from
the 6-th list. Suppose label(e) label(f ), and e becomes active in the 7-th
dimension. Then we append e to the 7-th list, and remove 6 from and append
7 to the list of candidates. See Fig. 7. This is a simplified picture. To remove
an active node from a list of active nodes in O(1) time, those lists need to be
doubly linked.

Practical Considerations

For the data structure of a trinomial heap, we need to implement it by pointers.


For the top level trees, we prepare an array of pointers of size d = dlog3 (n + 1)e,
each of which points to the tree of the corresponding term. Let the dimension
of node v be i. The data structure for node v consists of integer variables key

Theory of Trinomial Heaps

count
point

? e?
h
?

? a?
c
? b?

371

candidates
3

Fig. 7. Auxiliary data structure for O(1) worst case time

and dim = i, a pointer to the head node of the i-th trunk, and an array of size
d, whose elements are pairs (f irst, second). The f irst of the j-th element of the
array points to the first node on the j-th trunk of v. The second is to the second
node. If we prepare the fixed size d for all the nodes, we would need O(n log n)
space. By implementing arrays by pointers, we can implement our algorithm
with O(n) space, although this version will be less time-efficient.

Concluding Remarks

Measuring the complexity of n delete-mins, n inserts, and m decrease-keys by


the number of comparisons, we showed it to be O(m + n log n) in a trinomial
heap by two implementations. The first implementation performs decrease-key
in O(1) amortized time, whereas the second achieves O(1) worst case time for
decrease-key. Although due to less overhead time the first is more efficient for
applications such as shortest paths where the total time is concerned, the second
has an advantage when the data structure is used on-line to respond to updates
and queries from outside, as it can give smoother responses.
The clean-up mechanism is not unique. For example, we could make a node
active without key comparison after decrease-key. We will need experiments to
see if this is better.

References
1. Dijkstra, E.W., A note on two problems in connexion with graphs, Numer. Math.
1 (1959) 269-271.

372

Tadao Takaoka

2. Driscoll, J.R., H.N. Gabow, R. Shrairman, and R.E. Tarjan, An alternative to


Fibonacci heaps with application to parallel computation, Comm. ACM, 31(11)
(1988) 1343-1345.
3. Fredman, M.L. and R,E, Tarjan, Fibonacci heaps and their uses in inproved network optimization algorithms, Jour. ACM 34 (1987) 596-615
4. Prim, R.C., Shortest connection networks and some generalizations, Bell Sys. Tech.
Jour. 36 (1957) 1389-1401.
5. Takaoka, T., Theory of 2-3 Heaps, COCOON 99, Lecture Notes of Computer Science (1999) 41-50
6. Vuillemin, J., A data structure for manipulating priority queues, Comm. ACM 21
(1978) 309-314.



  
   


  
   

  
      
    
      
    !"#    
 $  %

 #&! '   

  


 
 

  

 () (   *   (     % )  )  ** 


() ( %+ ,     % )  (   
   '  
 () ( )  *)* %   ( ) - )
  #&! '
() ( )   '
.   )  * (- /+

      

 () %  *)

  * *  %     *) 

) *)%   *) )   (  


 *)
 

) )   (       )  (  ( 


)

  *  ) 
)+
 ( (


  () ( )  *)%)* 

 


         


 
 

  

  
       
 
    
  
 


       !"
!
  
    

  

 #
          
   
$   
   #
  
%      #
       

& '
 
   ( & ('        


   #



#
   
 $  )
   
  
    *  )
 
   !"


+   ,   -     *

  ."  &/0123'
-  #
  
          + 
  
  

 #    
$    ) 

 

     $  /!453
.  $   !"$ 
 
 
   
 
   
   
   
    
 

 & , '
    
 
 &/0%163'
7
       8!"     
    9 
:
   ) 7" 
 
   +
 !"  
 - *  -  
  
 
;  
    
 
  
   -  
     


 
   
  
    
 
<
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 373-382, 2000.
Springer-Verlag Berlin Heidelberg 2000

374

Marcus Oswald and Gerhard Reinelt

2.

Tucker's Characterization and an IP Formulation

Tucker ([T72]) has characterized the C1P matrices by exhibiting ve types of


matrices M1 , M2 , M3 , M4 and M5 which must not occur as submatrices.
M1 , M2 and M3 are (k + 2; k + 2)-, (k + 3; k + 3)- and (k + 2; k + 3)matrices with k  1, respectively. M4 and M5 are (4; 6)- and (4; 5)-matrices.
The ve Tucker matrices are displayed in Figure 1.
k

01
B
B
B
B
@

101
B
C
B
C
B
C
B
C
B
A
1 B
@0

1
1

1
.. ..
.
.
1
1 0 ::: 0 1

01
B
@0

1
0
0 0
0 1

1
0 0
1 1
0
1
0C
B
1 1
0C
.. C
.. ..
B
.. C
.
.
.. ..
.C
C
B
.
.
.C
C
B
C
1 1 0C@
A
1
1
0
1 ::: 1 1 1A
0 1 ::: 1 0 1
1 1 ::: 1 0 1

0
1
0
0

0
1
0
1

1
1

0
0
1
0

01
0C
1A
1

01
B
@1

1
1
0 0
1 0

0
1
1
0

M1k , M2k , M3k , M4

Figure 1: Tucker matrices

0
1
1
1

01
0C
0A
1

and

M5

Tucker has shown that a 0/1-matrix A is C1P if and only if it is not possible to
permute the rows and columns of A such that any of the ve forbidden matrices
occurs as a submatrix.
Based on tis result we can obtain an integer programming formulation of
WC1P. We will rst introduce appropriate notations.
For a given WC1P we are looking for an (m; n)-matrix with 0/1 entries which
has the consecutive ones property for rows and minimizes a certain objective
function. This matrix will be represented by variables xij , i = 1; : : : ; m, j =
1; : : : ; n, where xij represents the matrix entry of row i and column j . We will
interpret x = (x11 ; : : : ; x1n ; : : : ; xm1 ; : : : ; xmn ) as vector or as matrix whatever
is more appropriate. In the following we deal with inequalities that have to be
satis ed by x. In most cases, the coecients of these inequalities are speci ed
by a matrix. Let A be an (l; k )-matrix of coecients. For an ordered l-tuple
I = (r1 ; : : : ; rl ) with pairwise distinct entries ri 2 f1; : : : ; mg and an ordered
k -tuple J = (c1 ; : : : ; ck ) with pairwise distinct entries cj 2 f1; : : : ; ng we de ne
A xI J =

XX
l

=1 =1

aij xri cj :

For simplicity we will just say, for example, \A xI J  a0 for all (l; k )-tuples
(I; J )", meaning that all l-tuples I = (r1 ; : : : ; rl ) and all k -tuples J = (c1 ; : : : ; ck )
are allowed for mapping A to x. Whenever we use A x we assume that I =
(1; : : : ; m) and J = (1; : : : ; n).

Polyhedral Aspects of the Consecutive Ones Problem

375

Now let a 0/1-matrix B be given as input. We are looking for a C1P matrix x
that resembles B as closely as possible. If x contains a 1 where B contains a 0, we
add a penalty co , if x contains a 0, where 1 would be preferred, we add a penalty
cz . Therefore the following objective function value (penalty) is associated with
x:
X
X
co
xij + cz
(1 xij )
i;j
bij

i;j
bij

=0

= co

=1

xij

cz

i;j

bij

xij +

i;j

=0

bij

cz

i;j

=1

bij

=1

For M1 , M2 , M3 , M4 and M5 let M1 , M2 , M3 , M4 and M5 denote


the corresponding matrices where all zero entries are replaced by 1.
If we set

c if b = 1,
cij = c z if bij = 0,
k

ij

then an integer programming formulation of WC1P can be given as


min

M1 x
M2 x
M3 x
M4 x
M5 x
k

IJ

IJ

IJ

IJ

IJ

xij

i;j

 2k + 3
 4k + 5
 3k + 2
8
 10
2 f0; 1g

cij xij

for all (k + 2; k + 2)-tuples (I; J ) and k  1,

for all (k + 3; k + 3)-tuples (I; J ) and k  1,

for all (k + 2; k + 3)-tuples (I; J ) and k  1,


for all (4; 6)-tuples (I; J ),
for all (4; 5)-tuples (I; J ),
for all i = 1; : : : ; m, j = 1; : : : ; n.

The validity of this formulation is clear, since for a 0/1-matrix x all Tucker
matrices are forbidden as submatrices by this set of inequalities.
3.

An IP Formulation with Facets

We will now show that the IP formulation given above is not a suitable one in
the sense that stronger inequalities can be derived. To this end we will associate
a polytope with the consecutive ones problem. For background in polyhedral
combinatorics we refer to [P95].
We de ne the consecutive ones polytope as
m;n
PC1
= convfM j M is an (m; n)-matrix with C1Pg:

m;n
It is easy to see that PC1
has full dimension m  n. Namely, the zero matrix
is C1P and, for every 1  i  m and 1  j  n, the matrix consisting of zeroes
only except for a one in position ij is C1P. This gives a set of n  m + 1 anely
independent C1P matrices.

376

Marcus Oswald and Gerhard Reinelt

m;n
Let aT x  a0 be a valid inequality for PC1
and let m0  m and n0  n. We
m ;n
is obtained from aT x  a0 by trivial
say that the inequality aT x  a0 for PC1
lifting if
n
aij = aij if i  m and j  n,
0 otherwise.
0

Theorem 1
Let a x  a0 be a facet-de ning inequality for PC1 and let m0  m and
0
n  n. If a x  a0 is trivially lifted then the resulting inequality de nes a facet
of PC1 .
m;n

m ;n

Denote the lifted inequality by aT x  a0 , and let x be a matrix satisfying


a x = a0 .
First consider the case m0 > m and n0 = n, where without loss of generality
0
m = m + 1.
We add one row to x and form the matrix x0 by adding a zero row and
matrices xj by adding a row of all zeroes except for a 1 in column j , j =
1; : : : ; n. Obviously all generated matrices are C1P, and we have aT xj = a0 , for
all j = 0; 1; : : : ; n.
Therefore, if we have m  n anely independent matrices satisfying aT x = a0
we can obtain by the above construction (m +1)  n anely independent matrices
satisfying aT x = a0 , thus proving that the trivially lifted inequality is also facetde ning.
The case m0 = m and n0 > n, where without loss of generality n0 = n + 1
follows along a similar line. We add one column to x and form the matrix x0 by
adding a zero column and matrices xi by adding a column of all zeroes except
for a 1 in row i, i = 1; : : : ; m. Again all generated matrices are C1P since column
n + 1 can be moved to an appropriate position, and we have aT xi = a0 , for all
i = 0; 1; : : : ; m. From m  n anely independent matrices satisfying aT x = a0 we
can obtain this way m  (n +1) anely independent matrices satisfying aT x = a0 .
The general result follows from these two constructions.
ut
If trivial lifting is possible, this means, that larger polytopes inherit all facets
of smaller polytopes.
m;n
Inequalities that are obviously valid for PC1
are the trivial inequalities xij 
0 and xij  1, for all 1  i  m, 1  j  n. It is easily seen that they also de ne
facets.
Proof.
T

Theorem 2
xij

For all m  1, n  1, 1  i
m;n
 1 de ne facets of PC1
.

 m, 1  j  n, the inequalities x  0 and


ij

1;1 = convf0; 1g and therefore x  0 and x  1 are facetWe have PC1


11
11
1
;1
de ning for PC1 . The general result holds due to the trivial lifting property. u
t
Proof.

Polyhedral Aspects of the Consecutive Ones Problem

377

m;n
We are interested in getting more insight into the facet structure of PC1
.
In this section we will desribe four types of facet-de ning inequalities that can
then be used to replace the IP formulation above with a stronger formulation.
The rst two inequalities are based on two classes of matrices F1 and F2 ,
for k  1. These matrices are (k +2; k +2)-, respectively (k +2; k +3)-matrices and
have entries 1, 0 and +1, where for convenience we write \ " (\+") instead
of \ 1" (\+1"). The matrices are shown in Figure 2.
k

0+
B
B
B
B
B
B
@

1
C
.. C
.C
C
C
C
+A

+
+

+
.. ..
.
.
+ +
0 ::: 0 +
+ 0 ::: 0
+

0+
B
B
B
B
B
B
@

Figure 2: Matrices

F1

1
C
.. C
.C
C
C
C
A

+
+

+
..
.. ..
.
.
.
+ +
0 ::: 0 + +
0 ::: 0 +
+

and

F2

We show that these matrices lead to facet-de ning inqualities.


Theorem 3
The inequalities F1 xI J  2k + 3, k  1, for all (k + 2; k + 2)-index sets,
m;n
are facet-de ning for PC1
for all m  k + 2 and n  k + 2.
k

Proof. Due to Theorem 1, we only need to show that this class of inequalities is
m;n
facet-de ning for PC1
with m = n = k + 2. Moreover, we only need to consider
the canonical ordered index sets I = f1; 2; : : : ; mg and J = f1; 2; : : : ; ng. Let
m;n
aT x  a0 denote this inequality and let F = fx j aT x = a0 g \ PC1
denote the
induced face.
We rst show that the inequality is valid. Let x be a 0/1-matrix such that
F1 x > 2k + 3. Then x must have 0 entries at the \ "-positions of F1 and 1
entries at the \+"-positions. We now show that we cannot obtain a C1P matrix
no matter how the remaining entries of x are assigned and how the columns of
x are permuted. We call a row bad if and only if there is a forced 0 between
two forced 1 entries. Note that x has exactly one bad row. Now consider any
sequence of permutations of adjacent columns of x. The status of a row changes
if and only if the entries of this row in the two columns are a forced 0 and a
forced 1. For each pair of columns of x there is an even number (0 or 2) of rows
with this property. Thus for any column permutation of x the number of bad
rows remains odd and therefore at least one. But a matrix with a bad row cannot
be C1P and validity of the inequality follows.
m;n
Since PC1
is full-dimensional, facet-de ning inequalities de ning the same
facet only di er by multiplication with a positive scalar. Now let bT x  b0 be
m;n
m;n
a facet-de ning inequality for PC1
such that F  fx j bT x = b0 g \ PC1
. If
we can show that b = a, for some  > 0, then is is proven that aT x  a0
k

378

Marcus Oswald and Gerhard Reinelt

is facet-de ning. We will show this in three steps. Let = b11 . We call C1P
matrices x that satisfy aT x = a0 solutions.
Every 0/1-matrix with 2k + 3 1's in the \+" positions and 0's otherwise is a
solution. We call such matrices standard solutions in the following. Let x1 and
x2 be two standard solutions where x111 = 0 and x212 = 0. Then we have
0 = bT x1

bT x2 = b12

b11

and therefore b12 = b11 = . By using appropriate matrices we can thus show
that bij = for all \+"-positions ij .
Consider the standard solution x1 with xk+2;k+2 = 0. Let x2 be a matrix
which is identical to x1 except for an additional 1 in a \0"-position next to an
\+"-position in any row i. Let this position be il. Then x2 is a solution and we
obtain
0 = bT x1 bT x2 = bil ;
i.e., bil = 0. Extending the chain of 1's to the next \0"-positions eventually shows
that bis = 0 for all \0"-positions is of row i. Since this holds for every row i we
can show that bij = 0 for all \0"-positions ij .
Finally let x1 be a standard solution with x11 = 0. Construct x2 from x1 as
follows. Set x211 = 1 and x21;k+2 = 1 and insert column k + 2 after column 1.
This matrix is not C1P, but if all 0-entries of row k + 1 are changed to 1, then
we obtain a C1P matrix. Now
0 = bT x1

bT x2 = b11

b1;k+2 ;

and therefore b1;k+2 = . Using similar arguments we eventually obtain bij =


for all \ "-positions ij .
Thus we have shown that b = a. It is clear that > 0 since if we change
a 1-entry in a standard solution to 0 then we obtain another C1P matrix which
would violate the inequality if < 0.
ut
Theorem 4
The inequalities F2 xI J  2k + 3, k  1, for all (k + 2; k + 3)-index sets,
m;n
are facet-de ning for PC1
for all m  k + 2 and n  k + 3.
k

Proof. The proof is similar to the previous one. Here rows of x are called bad if
and only if there is forced 0 between two forced 1 entries and a forced 1 between
two forced 0 entries. Then the veri cation of validity and the proof that the
inequalities are facet-de ning follows along the same lines as for F1 .
ut
Corresponding to the two single Tucker matrices M4 and M5 we have the
(4; 6)-matrix F3 and the (4; 5)-matrix F4 shown in Figure 3.
k

Theorem 5
(a) The inequalities F3 xI J
for all m  4 and n  6.

 8, for all (4; 6)-index sets, de ne facets of PC1

m;n

Polyhedral Aspects of the Consecutive Ones Problem

0+
B
@

+
0
01
0 + +
0C
0
0 + +A
+
+
+

0+
B
@+

1
+ 0 +
0 0 +
C
A
0 + +
+
+ +

Figure 3: Matrices

(b) The inequalities F4 xI J


for all m  4 and n  5.

379

F3 and F4

 8, for all (4; 5)-index sets, de ne facets of PC1

m;n

Proof. Using the software PORTA ([CL98]) we could verify that F3 x  8 is


4;6 and F x  8 is facet-de ning for P 4;5 . The result then
facet-de ning for PC1
4
C1
follows from trivial lifting.
ut
If m  2 or n  2, all (m; n)-matrices are C1P and therefore the trivial inm;n
equalities completely describe PC1
. The facets discussed above give a complete
description if n = 3 and m = 3; 4; 5, or 6 or if m = 3 and n = 4 or 5. For m = 3
and n > 5 or for m > 3 and n > 3 further facet-de ning inequalities are needed.

xij

0
@
0
B
@
0
B
@
0
B
@
0
B
@

0

xij

1

1
1
1

1
1
1

1
1
1

1
1A x  5
1

1
1
1
1

1
1
1
1

0
1
1
1

11
0C
x7
1A
1

1
1
1
1

1
1
1
1

1
1
1
1

1
1
1
1

1
1
1
1

1
1
1
1

2
1
1
2

2
1
2
1

2
2
1
1

11
1C
x7
1A
1

11
1C
x  10
1A
1

21
2C
x  15
2A
2

0
@

0
B
@
0
B
@
0
B
@
0
B
@
0
B
@

1
1
1

1
1
1

1
1A x  5
1

1
1
0
0

1
0
1
1

0
1
1
1

1
1
1
1

1
0
1
1

0
1
1
0

1
1
0
1

1
0
1
1

1
1
1
0

2
2
2
2

2
1
2
1

1
2
2
1

2
2
1
1

2
1
2
1

2
1
1
2

Figure 4: Complete description of

4;4
PC1

11
1C
x7
1A
1

11
1C
x7
1A
1

11
1C
x8
1A
1

21
2C
x  13
2A
2

21
2C
x  15
2A
2

380

Marcus Oswald and Gerhard Reinelt

4;4 obtained using PORTA.


In Figure 4 we give the complete description of PC1
4
;4
The complete description of PC1 thus requires already 9 additional classes
4;4 is 1880.
of facet-de ning inequalities. The total number of facets of PC1
Theorem 6
The facet-de ning inequalities from Theorems 3, 4 and 5 cut o all Tucker
matrices.
Proof.

i)
ii)
iii)
iv)
v)

It is easily veri ed that

F1 M1 = 2k + 4,
F1 +1 M2 = 2k + 6,
F2 M3 = 2k + 4,
F3 M4 = 9,
F4 M5 = 9.
k

Therefore every Tucker matrix violates one of these inequalities.


ut
Based on the above results we obtain the following integer programming
formulation of WC1P. It consists only of inequalities which are facet-de ning for
m;n
PC1
.
min

F1 x
F2 x
F3 x
F4 x
k

IJ

IJ

IJ

IJ

xij

4.

i;j

cij xij

 2k + 3
 2k + 3
8
8
2 f0; 1g

for all (k + 2; k + 2)-tuples (I; J ) and k  1,


for all (k + 2; k + 3)-tuples (I; J ) and k  1,

for all (4; 6)-tuples (I; J ),


for all (4; 5)-tuples (I; J ),
for all i = 1; : : : ; m, j = 1; : : : ; n.

Separation

In this section we address how to solve the LP relaxation obtained from the
IP formulation by dropping the integrality requirement. To this end we have
to give separation algorithms for the given classes of inequalities. We will only
discuss exact separation of the F1 -inequalities in detail. Separation for the F2 inequalities works along similar lines, F3 - and F4 -inequalites can be separated
using quadratic assignment heuristics.
Actually, in the case of F1 -inequalities we will separate a more general class
of inequalities. These inequalities can be obtained by observing that the \ 1"
entry in the last row can be moved to any position changing the rst and last
column in an appropriate way. The corresponding F 1 -inequalities can also be
k

Polyhedral Aspects of the Consecutive Ones Problem

381

m;n
shown to be facet-de ning for PC1
and can be visualized as follows where the
left hand side matrix F 1 is a (k + 2; k + 2)-matrix:
k

0+
B
0
B
..
B
.
B
B
0
B
r1 B
B
B
..
..
B
.
.
B
r 1B
B
@

+
+

+
.. ..
.
.
+ +
+

rd
l

+ 0 :::

Figure 5:

c2

: : : cd

1
C
.. C
.C
C
C
C
0C
C x  2k + 3
.. C
.C
C
0C
C
A

+
.. ..
.
.
+ +
+ +
0 ::: 0 +
F 1k -inequality

We obtain the original F1 -inequalities when there are no columns c2 ; : : : ; cd ,


i.e., when d = 1.
The main task of the separation algorithm is to identify the row l and the
columns i, j , and h and to sum appropriate coecients for rows and columns in
between.
We proceed as follows. For every column i = 1; : : : ; n we create the complete
undirected bipartite graph Gi with the n columns and m rows as the two node
i
sets. With every edge cr we associate the weight wcr
= 1 xrc + 12  xri where
x is the given LP solution to be cut o .
In every weighted graph Gi we now compute for every pair j; j 6= i and
h; h 6= i; h 6= j of columns a shortest path between j and h with respect to the
assigned edge weights. This way we obtain shortest lengths pijh .
k

#"! 1
#"!
j

c2

xr1j

#"!
#"!

+ 21  x

r1 i

 r1









r

#"!1
#"!

...

#"!

...

xrd cd

...

+ 21  x

rd i

 rd










h 

cd

Figure 6: Path between columns

and

For every quadrupel i, j , h, l of columns i, j , h and rows l we evaluate


pijh + phji

xli + xlj

xlh = 2k + 2

F 1 x:
k

382

Marcus Oswald and Gerhard Reinelt

For every expression that has value less than 1 we can construct a violated F 1 inequality using the shortest paths computed above to include columns c2 ; : : : ; cd
and rows r1 ; : : : ; rd . If none of these values is less than 1, then no violated F 1 inequality and thus no violated F1 -inequality exists.
The running time is dominated by the all-pairs shortest path computation
for every column, and we obtain time complexity O(n3 (n + m)). Therefore the
F1 -inequalities can be separated in polynomial time.
We do not elaborate on the similar separation procedure for F2 -inequalities.
The time complexity for the respective procedure turns out to be O(n4 m2 ).
In total we have shown that all inequalities constituting the canonical LP
relaxation of our IP formulation can be separated in polynomial time. Note that
for this result we can just enumerate all possible F3 - and F4 -inequalities. Thus
the LP relaxation can be solved in polynomial time.
It is an interesting future research project to employ these separation algorithms in a branch-and-cut algorithm for solving the weighted consecutive ones
problem.
k

References

[Boo75] K.S. Booth 1975 PQ-Tree Algorithms PhD Thesis, University of California,
Berkeley
[BL76] K.S. Booth and G. Lueker 1976x Testing for the Consecutive Ones Property,
Interval Graphs, and Graph Planarity Using PQ-Tree Algorithms Journal of Computer and System Sciences, 13, 335{379
[CL98] T. Christof, A. Loebel 1998 PORTA - A Polyhedron Representation Algorithm
www.iwr.uni-heidelberg.de/iwr/comopt/software/PORTA/

[COR98] T. Christof, M. Oswald and G. Reinelt 1998 Consecutive Ones and A Betweenness Problem in Computational Biology Proceedings of the 6th IPCO Conference,
Houston, 1998, 213{228
[P95] M. Padberg 1995 Linear Optimization and Extensions Springer, Berlin
[T72] A. Tucker 1972 A Structure Theorem for the Consecutive 1's Property Journal
of Combinatorial Theory B, 12, 153{162

The Complexity of Physical Mapping


with Strict Chimerism
Stephan Weis and R
udiger Reischuk
Institut f
ur Theoretische Informatik, MU L
ubeck
Wallstrae 40, 23560 L
ubeck, Germany
[email protected]
http://www.tcs.mu-luebeck.de/

Abstract. We analyze the algorithmic complexity of physical mapping


by hybridization in situations of restricted forms of chimeric errors, which
is motivated by typical experimental conditions. The constituents of a
chimeric probe always occur in pure form in the data base, too. This
problem can be modelled by a variant of the k-consecutive ones problem. We show that even under this restriction the corresponding decision
problem is N P -complete. Considering the most important situation of
strict 2 -chimerism, for the related optimization problem a complete separation between efficiently solvable and N P -hard cases is given based
on the sparseness parameters of the clone library. For the favourable
case we present a fast algorithm and a data structure that provides an
effective description of all optimal solutions to the problem.

Introduction

Physical mapping by hybridization plays a major role in exploring the genomic


landscape (for biological background, see e.g. [11]). When drawing a physical
map for a strand of DNA, the problem arises to locate a number of landmarks,
called probes, on the sequence. Since the DNA is often too big to handle, a clone
library is compiled whose elements, called fragments, are overlapping stretches
of the strand. Associated to each such fragment is a fingerprint, which is defined
as the set of probes that are located on the fragment. This information is gathered by a series of hybridization-experiments. The outcomes of the hybridization
experiments are stored in a binary matrix, such that each row represents the
fingerprint of the fragment associated to that row.
In order to locate the landmarks we have to find the relative order of the
probes. If every fragment of the clone library represents an interval on the strand,
this task has been called the consecutive ones problem for the hybridization
matrix; it can be solved in linear time ([5],[4],[15],[12]). However, during the
cutting procedure of the DNA two or more stretches that stem from distant
regions may stick together, forming a chimeric fragment. In practice, a large
fraction of elements of a clone library is chimeric. A permutation of the columns
of the hybridization matrix, which has to represent the correct probe order for
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 383395, 2000.
c Springer-Verlag Berlin Heidelberg 2000

384

Stephan Weis and R


udiger Reischuk

such a library, will reveal chimeric rows as noncontiguous blocks of consecutive


ones.
Furthermore, the hybridization experiment itself can be faulty. This may
result in a noisy hybridization matrix, i.e. some entries provide wrong values
(false positives or false negatives). The presence of any of the three types of
errors leads to intractable problems in the search for the correct probe order.
In [6] several variants of the physical mapping problem are formulated as N P complete interval graph problems. Even when there are no false entries in the
matrix, to test the k-consecutive ones property, that is the question whether no
chimeric fragment falls apart into more than k pieces, is N P -complete [3].
Previous attempts to solve these problems approximatively have mainly led
to heuristic methods (see [2],[7],[8],[13],[14]). In [1] sophisticated methods have
been developed that lead to good solutions even for relatively high error rates.
We consider a restriction of chimeric errors that takes into account properties
of real data. One can assume that the pieces of a chimeric fragment appear as
single fragments of the clone library, too, since not all copies of such a piece
glue to other stretches of the DNA strand. That means, some will be visible in
pure form. We show that even in this favourable situation the physical mapping
problem remains intractable in general. This already holds when no other errors
occur.
Secondly, we consider the optimization problem to determine the minimum
number of chimeric rows such that a given matrix obtains the consecutive ones
property. With the help of two characteristic parameters of the clone library,
namely the maximal length of a fragment and the maximal degree of overlap,
we can exactly separate the efficiently solvable from the intractable cases of the
optimization problem. For the tractable cases we present an algorithm, which has
the important feature that it reveals the complete set of optimal solutions. This
is necessary, because usually a great number of combinatorial equally legitimate
solutions exist, but only very few of them are biologically meaningful.
The paper is organized as follows. After giving a formal definition of the
algorithmic problem in the next section, section 3 analyses the problem in the
special situation of overlap degree 2. In section 4 we prove the N P -completeness
of the decision problem. The optimization problem will be investigated in the
two final sections: we first show N P -hardness for the cases overlap degree 3
with fragment length 3, resp. overlap degree 4 with fragment length 2. For the
only remaing case overlap degree 3 with fragment length 2 we then present an
efficient solution.

Basic Definitions and Notation

Let M be a binary matrix with r rows and c columns. The i-th row (resp.
j-th column) in M is denoted by mi, (resp. m,j ). The number of 1s in mi,
(resp. m,j ) is given by ||mi, || (resp. ||m,j ||). [a, b] denotes the interval of
natural numbers i with a i b . The set of columns given by a set S [1, c]
is denoted by m,S ; it defines a submatrix of M containing exactly the columns

The Complexity of Physical Mapping with Strict Chimerism

385

of the set m,S with retention of the previous order. A row will also be identified
by the set of column indices containing a 1, i.e. mi, {j | mi,j = 1} .
Definition 1 A clone library is a set F of elements f1 , . . . , fr called fragments. Each fragment f is characterized by a set called its fingerprint, a
subset of the set P = {p1 , . . . , pc } of probes.
A clone library can be represented by a binary matrix M such that the fragments
are associated to its rows and the probes to its columns. An entry of M equals 1
iff the corresponding fragment and probe hybridize. We call ||mi, ||, the number
of probes that stick to fragment fi , the length of fi , and ||m,j ||, the number
of fragments to which pj sticks, the degree of overlap of the j-th probe.
Definition 2 Let M be a binary r c-matrix and k a natural number. Row
mi, is k-chimeric iff mi, = [s1 , t1 ] [s2 , t2 ] [sk , tk ] for some
s1 , t1 , s2 , t2 , . . . , sk , tk [1, c] with s1 t1 < s2 1 , s2 t2 < s3 1, . . . ,
sk tk . This means that mi, consists of k blocks of 1s, which are separated
by one ore more 0s.
mi, is strict k-chimeric iff it is k-chimeric and for each of its k blocks [sa , ta ]
there exists another row mia , = [sa , ta ]. These mi1 , , . . . , mik , are called the
isolated fragments of the chimeric row mi, .
M obeys the (strict) k-consecutive ones order iff each of its rows mi, is
(strict) k 0 -chimeric for some k 0 k .
The strictness property requires that each of the pieces that stick together to
form a chimeric fragment must itself be a non-chimeric fragment of the clone library. Figure 1 illustrates the difference between chimerism and strict chimerism.
This scenario can be extended to require strict k-chimeric fragments, for arbitrary k > 3 . The special cases k-chimeric for k = 0 and k = 1 , that means the
row is either identical 0 or has only a single block of 1s, we will call also nonchimeric. In the following we will assume that the binary matrices considered
do not have rows or columns that are identical 0 since such fragments or probes
do not provide any information about the relative order of the others.
Definition 3 For k 2 , row mi, of a matrix M is called potentially kchimeric iff there exists nonempty rows p1 , . . . , pk [1, `1 ]\{i} such that mi, =
mp1 , . . . mpk , . It is potentially chimeric iff there exists a k > 1 such
that mi, is potentially k-chimeric.
The problem exact cover by 3-sets, which is known to be N P -complete
[9], can be reduced to the question whether a row is potentially k-chimeric. We
therefore get for the case that k is part of the input:
Lemma 1 It is N P -complete to decide whether a specific row of a matrix is
potentially k -chimeric.
For constant k , however, this question can easily be solved in time polynomial
in the size of the matrix.

386

Stephan Weis and R


udiger Reischuk

Definition 4 M has the (strict) k-consecutive ones property iff by permuting its columns it can be reordered to a matrix M 0 that is in (strict) kconsecutive ones order.
1 -consecutive equals the consecutive ones property as defined in [5, 4]. Figure 1
also shows that it is necessary to know the largest k , for which a row is potentially
k-chimeric, in order to estimate the degree of chimerism for a strict ordering: In
the example it does not suffice to know that the two highlighted fragments are
potentially 2-chimeric.

Fig. 1. A 2-chimeric order for a matrix that requires a 3-chimeric fragment to


obtain a strict ordering.

When conducting hybridization experiments one first has no information


about the relative order of probes, that means the columns of the result matrix
M are in an arbitrary order. The 1s of a fragment may be spread all over. The
algorithmic task now is to find a permutation such that the 1s in each row
generate as few blocks as possible.
Definition 5 The problem (u|l)Physical-Mapping with strict k-chimeric
errors is the following: Given a hybridization matrix M with maximal fragment
length l and maximal degree of overlap u as input, decide whether M has the
strict k-consecutive ones property. If there is no bound on l we write (u|),
and for unbounded u the notation (|l) will be used. The optimization version
of (u|l)Physical-Mapping with strict k-chimeric errors requires to compute a permutation M 0 of M that obeys the strict k -consecutive ones order and
that minimizes the number of rows remaining in M 0 that are not non-chimeric.
In the following we will analyse the complexity of PHYSICAL-MAPPING for the
basic and in practice most important case of strict 2-chimeric errors. Consider
a clone library where some fragments are missing and which therefore does not
overlap the complete strand of DNA. This means that the strand falls apart
into regions, which are completely overlapped by the library, separated by gaps.
Such contiguous regions are called islands or contigs. A formal definition of
this concept focuses on the two most important structural properties of islands
in our context, namely the impossibility to determine a relative order of the
islands, and a certain guarantee to obtain a precise ordering inside each island.

The Complexity of Physical Mapping with Strict Chimerism

387

This can be achieved to some extent when we ignore those fragments that might
destroy the consecutive ones property, i.e. the potentially chimeric fragments.
Definition 6 The overlap graph of a hybridization matrix M is given by
G = (P, E) with E := { {pj , pj 0 } | fi , fi0 with pj mfi , , pj 0 mfi0 , and
mfi , mfi0 , 6= } . Let M be a matrix and M 0 the submatrix that contains
exactly those rows of M that are not potentially chimeric. Let G = (P, E) be
the overlap graph of M 0 and G1 = (P1 , E1 ), . . . , Gz = (Pz , Ez ) its connected
components. The vertex sets Px are called islands of M .

Two Simple Cases

The (|1)PHYSICAL-MAPPING problem is trivial because any such clone library


is in consecutive ones order by definition.
Theorem 1 Let M be an instance for (2|)PHYSICAL-MAPPING with strict
2-chimeric errors. If M has the 2-consecutive ones property then it has the 1consecutive ones property, too.
Proof: Assume that M does not have the 1 -consecutive ones property. Let M 0
be a permutation of M with minimum number of strict 2-chimeric rows. A strict
2 -chimeric row m0i, consisting of 1-blocks A and B has to be accompanied by
rows m0j1 , = A and m0j2 , = B . Since the overlap is at most 2 there cannot be
any other row mx with mx, mi, 6= . Thus, rearranging the columns of M 0
such that the ones in A are followed directly by the ones in B row i becomes
non-chimeric without breaking the 1-block of any other row.
Corollary 1 (2|)PHYSICAL-MAPPING with strict chimeric errors can be decided in linear time. The corresponding optimization problem is trivial.

The Complexity of the Decision Problem

We will show that the decision problem already becomes intractable for sparse
clone libraries. Compared to the results about potential chimerism the following
result goes a step further and shows that in general the strictness property does
not help to reduce the complexity of PHYSICAL-MAPPING (cf. [3]).
Theorem 2 (11|5)PHYSICAL-MAPPING with strict 2-chimeric errors is N P complete.
Proof: By reduction of the following version of the Hamiltonian path problem
[10],[16]: Given an undirected graph G = ({v1 , . . . , vn }, E) with two marked
nodes v1 and vn of degree 2 and all other nodes of degree 3, does there exist a
Hamiltonian path between v1 and vn ?
Note that n has to be even because of the degree properties. Let m := |E| =
3n/2 1 . We construct a matrix M with n islands I1 , . . . , In . I1 consists of

388

Stephan Weis and R


udiger Reischuk

6 probes, In of 4, and all others of 5 probes. M has the strict 2-consecutive


ones property iff G has a Hamiltonian path with endpoints v1 and vn . If so
any 2-consecutive ones order for M places the islands such that the sequence of
their indices is the sequence of node indices of a Hamiltonian path. Let


100011
, Mi = (11111) , and Mn = (1111) .
M1 =
111110
These are the building blocks of an (n + 1) (5n)-matrix MI that forms a
diagonal structure to define the n islands. As an example, figure 2 displays
the complete matrix M for a graph with 6 nodes. For every island I , the first
column of submatrix m,I of M that corresponds to I will be called the islands
pole, the second column its null-column. Outside the above mentioned diagonal
structure the null-columns do not contain any 1. The construction of M will
be such that the following holds.
Property 1. Every row of M that is not in MI is either potentially chimeric
or contains only a single 1.
Therefore the set I1 , . . . , In will indeed be the set of islands of M . The three
columns (resp. two columns) of m,I for I I1 , . . . , In1 (resp. I = In ) that
follow the null-column are called the islands -columns. We proceed with the
row-wise construction of M by adding m rows with four 1s each as follows.
Let G be an instance for the Hamiltonian path problem described above with
E = {e1 , . . . , em } . Let ei = {va , vb } , i [1, m]. The i-th row gets a 1 each in
the pole of Ia and the pole of Ib . The row gets another 1 each in Ia and Ib
which is placed in one of each islands -columns with the following goal. After
adding all m rows every -column has got no more than one new 1. Because
of the degree constraints for G this goal can indeed be achieved. We call this
submatrix ME .
Property 2. A Hamiltonian path between v1 and vn defines a sequence of the
islands that can be refined to a strict 2-consecutive ones order for M by local
permutations of the columns of each island such that the following holds.
1.) The pole becomes the third column of the first island and the second column
in all other islands of the sequence.
2.) A row in ME that corresponds to an edge used in the path falls apart into
two fragments after permutation: One is a single pole-1 of one island and the
other has a -1 in its center surrounded by a pole-1 of the next island and a
-1 of the previous island. After permutation all other rows of ME fall apart
into two fragments, each of length 2.
To conclude the construction of M , we add another 23n/2 7 rows with the
following properties:
3.) These rows generate the isolated fragments for the rows in ME and for the
chimeric rows that will occur within themselves.
4.) They prevent M from having the strict 2-consecutive ones property without
revealing a Hamiltonian path.
These fragments are defined as follows by the matrices M11st , MV 1st ,
ME1st , M12nd and ME2nd :

The Complexity of Physical Mapping with Strict Chimerism


I1

I2

I3

I4

I5

I6

I1

I2

I3

I5

389

I4 I6

MI

{v1 , v2 }
{v1 , v3 }
{v2 , v3 }
{v2 , v4 }
{v3 , v5 }
{v4 , v5 }
{v4 , v6 }
{v5 , v6 }

MV 1st

ME1st

{v1 , v2 }
{v1 , v3 }
{v2 , v3 }
{v2 , v4 }
{v3 , v5 }
{v4 , v5 }
{v4 , v6 }
{v5 , v6 }

Fig. 2. On the left: the matrix M obtained for a graph G (with 6 nodes and edges
as listed in the middle) according to the reduction in the proof of Theorem 2. Rows
containing only a single 1 that is, the rows of M11st and M12nd are projected
to a single row at the bottom of the diagram, i.e. every 1 there means that M has a
row which consists of exactly this 1.
On the right: an optimal permutation of M .

390

Stephan Weis and R


udiger Reischuk

M11st and M12nd have rows of single 1s, one row for every pole- and
-column, except for the third -column column of I1 , for which no such
row exists.
MV 1st has with the same exception one row for every -column with
one 1 in that -column and one 1 in the pole of the island of that -column.
It remains to define ME1st and ME2nd . Consider an arbitrary row mi,
in ME and let mi, = {p1 , 1 , p2 , 2 } such that p1 and p2 are the poles
where mi, has a 1 each. Add the two rows {p1 , 1 , 2 } and {1 , p2 , 2 }
to ME1st and the row {1 , 2 } to ME2nd .
This concludes the construction of M . It remains to show the existence of a
permutation that fulfills the strictness property in case that a Hamiltonian path
exists in G. This can be done using similar ideas as in [3]. This finishes the proof
sketch. A complete elaboration is given in [16].

The Complexity of the (4|2)- and (3|3)-Optimization


Problems

The two cases (4|2) and (3|3) turn out to be the frontiers of intractability. Their
reductions are related.
Theorem 3 The optimization problem (4|2)PHYSICAL-MAPPING with strict 2chimeric errors is N P -hard.
Proof: By reduction from the following version of the directed Hamiltonian path
problem, which has been established as N P -complete [17]:
Given a directed graph G = ({v1 , . . . , vn }, E) with two marked nodes v1
and vn of indegree, resp. outdegree in (v1 ) = out (vn ) = 0 , out (v1 ) =
in (vn ) = 2 and each other node either of indegree 2 and outdegree 1 or
vice versa, does there exist a Hamiltonian path from v1 to vn ?
The matrix M to be constructed consists of n islands. Let E = {e1 , . . . , em } ,
with m := |E| = 3n/2 1 . G has a Hamiltonian path from v1 to vn iff M
can be permuted to a strict 2-consecutive ones order that has no more than
m n + 1 = n/2 strict chimeric rows. Let
 
 
110
100
and Miso :=
.
Md :=
011
001
M is divided vertically into three parts. The first part is a (2n 3n)-matrix
with n occurrences of Md on its diagonal, all other entries are 0. This structure
defines the islands of M . The second part is constructed similarly, with the
diagonal submatrices Miso . The third part consists of m = 3n/2 1 rows, such
that the i-th row has a 1 in the first column of the a-th island and one in the
third column of the b-th island iff ei = (va , vb ). M has the strict 2-consecutive

The Complexity of Physical Mapping with Strict Chimerism

391

ones property and is a valid instance for the (4|2)-problem. The left of Fig. 3
shows M for a graph of 6 vertices and edge set as listed in the middle.
Any permutation of M has n 1 transitions between islands. Each such
transition allows to remove chimerism in no more than one row, and only when
the two islands are in proper orientation to form an edge in G. To obtain a
solution with n/2 chimeric rows, the islands associated to v1 and vn have to
be placed at the borders of the matrix. Using this observation, one can easily
deduce the correctness of the reduction.

(v1 , v2 )
(v1 , v3 )
(v2 , v3 )
(v2 , v4 )
(v3 , v5 )
(v5 , v4 )
(v4 , v6 )
(v5 , v6 )

Fig. 3. The (4|2)-matrix and the (3|3)-matrix for a 6-node graph with edge set
as listed. The submatrix that is spread out by the diagonal structure Miso of
isolated fragments is projected to a single row in the middle.

Theorem 4 The optimization problem (3|3)PHYSICAL-MAPPING with strict 2chimeric errors is N P -hard.
Proof: We modify the construction with the goal that the third part of the
matrix has no two 1s in the same column. This decreases the degree of overlap
in the clone library, but we need fragments of length 3. Let



1000
1100
and Miso := 0010 .
Md :=
0111
0001
In the third part, the two 1s of a row corresponding to edge e = (va , vb ) are
placed as follows. If va (resp. vb ) is incident with another edge that has the
same direction as e relative to it, place a 1 in one of the two right columns of

392

Stephan Weis and R


udiger Reischuk

the a-th (resp. b-th) island, thereby select a column that does not yet have a
1 in the third part of the matrix. Otherwise put a 1 into the left column of
the a-th (resp. b-th) island. See the right part of figure 3 for an example. The
correctness follows similarly as in the proof of Theorem 3.

An Efficient Algorithm for (3|2)-Optimization

In this section we consider the only efficiently solvable case where a skillful ordering of the probes leads to a substantial reduction of chimerism. Usually there
exists a large set of solutions to the optimization problem. However, these are
equally valid merely from a combinatorial point of view, whereas in the underlying biological context only very few of them might be meaningful. Therefore,
it is desirable to generate all solutions out of which the biologicaly meaningful
ones have to be selected with the aid of other criteria. Below we will develop a
method to describe the complete set of optimal solutions in a compact form.
E) be the corresponding
Given a hybridization matrix M, let GM := (F P,
bipartite graph with F = {f1 , . . . , fr } , P = {p1 , . . . , pc } , and {fi , pj } E iff
mi,j = 1 . Let n denote the length of a compact coding of this sparse graph, and
(f ) P the neighbors of f , and similarly (p) F .
Theorem 5 The optimization problem (3|2)PHYSICAL-MAPPING with strict 2chimeric errors can be solved in time O(n log n).
Proof: For short, we call a permutation of M allowed if it turns M into strict
2-consecutive ones order. Let M 0 be the submatrix of M without the potentially
chimeric rows. These rows can easily be identified with the help of GM , since
they exactly correspond to all nodes f F in GM with the property
(1)
(f ) = 2 p (f ) f 0 (p) : (f 0 ) = 1 .
Of course, M 0 has the consecutive ones property. For M 0 we construct GM 0 ,
which can be derived from GM by deleting all edges incident to a fragment
f having property (1). Let IM 0 be the set of islands of M 0 . Such an island
corresponds to a set of probes that form a connected component in the graph
GM 0 .
Consider an island which consists of more than two probes. Because the
length of a fragment is bounded by 2 (and by the definition of an island) no two
probes overlap with exactly the same set of fragments. This forces a unique order
of the start and end points of all fragments that belong to the island. Therefore,
a consecutive ones order of the columns of an island in M 0 is unique except for
inversion. It remains to add the potentially chimeric rows. While doing so, we
construct an ordering of the islands together with the orientation of each island
that leaves as few as possible rows 2 -chimeric.
Let us now examine how an potentially chimeric row mi, added can distribute its two 1s to the islands. Since the inner columns of a consecutive ones
ordering of an island in IM 0 have at least two 1s, there can be no additional
1 forming a potentially chimeric row. Thus, every potentially chimeric row has

The Complexity of Physical Mapping with Strict Chimerism

393

its 1s at the coasts of the islands in the final permutation. Let mi, = {1 , 2 }
and distinguish four cases. For an illustration see figure 4.
Case 1. m,1 and m,2 belong to the same island I . Observe that I consists
of at least three columns. Neither m,1 nor m,2 overlap with a potentially
chimeric row different from mi, . Any allowed permutation of M leaves mi,
chimeric.
Case 2. m,1 I1 , m,2 I2 with I1 6= I2 , and both Ij are more than one
column wide. Again, no other potentially chimeric row can overlap with m,1
or m,2 .
Case 3. m,1 = I1 and m,2 = I2 . Similar to case 2, except that there might
exist an mi0 , = mi, , i0 6= i .
Case 4. Either I1 or I2 is one column wide, say I1 = m,1 . Only m,1 might
overlap with another potentially chimeric row mi0 , , i0 6= i .

11
11
11
11
11
1
1
1
1

Case 1

11
11

11
11
11
11

1
1

1
1

1
11

1
11
11

11
11

Case 2

Case 3

Case 4a

11
11
1
11
1

Case 4b

Fig. 4. Characteristic situations for the four cases.


The last three cases allow M 0 plus mi, to be turned into consecutive ones
order. We will now define a graph Gpc that can be regarded as an implicit
representation of all optimal solutions. Let IM 0 = {I1 , . . . , Iz } , z := |IM 0 |.
Definition 7 Let Gpc := (Vpc , Epc ) be an undirected weighted multi-graph
with w({vi , vj }) = g for {vi , vj } Epc iff M contains g identical potentially
chimeric rows whose associated two isolated fragments distribute to the coasts of
Ii and Ij . If i = j both fragments are on opposite coasts of one island.
Figure 5 shows how a potentially chimeric row defines the local structure of
Gpc at the edge corresponding to that row. A dotted line means that there can
be one edge, depending on the distribution of potentially chimeric rows. Other
edges are not allowed.
Obviously Gpc is degree-2 bounded. Each potentially chimeric row appears
as one unit in the weight of one edge of Gpc . One such row can be non-chimeric if
its isolated fragments belong to different islands Ia and Ib with {va , vb } Epc .
Two different rows can both be non-chimeric if the two corresponding edges

394

Stephan Weis and R


udiger Reischuk
(1)
1

(1)
2

(1)

Case 1

Cases 2 and 3

Case 3

(1)

Cases 3 and 4a

Case 4b

Fig. 5. Local structure of Gpc .


do not form a circle. By induction, t different rows can be non-chimeric if the
t corresponding edges do not form a circle. Therefore, in order to achieve a
consecutive ones order for the probes one has to delete at least as much rows
as Gpc has circles and self-loops. In other words, the minimum number of rows
that remain chimeric in an optimal solution is equal to the number of circles and
self-loops, because edges with weight 1 exist only there.
Hence, an optimal solution can be obtained by the following procedure.
1. Delete one edge each from every self-loop and circle.
2. Put every island of M 0 into consecutive ones order.
3. For each remaining edge e in Gpc make the corresponding row (resp. the two
rows, if w(e) = 2 ) non-chimeric, but retain the partial order that has been
obtained up to now; possibly one of the ordered areas has to be inverted.
4. Arrange the ordered areas in arbitrary sequence and orientation. (i.e. forward
or reverse).
Each of the four steps contains a nondeterministic choice. The algorithm terminates with all optimal solutions revealed. Using an efficient representation it can
be shown that the whole procedure requires only O(n log n) steps.

Conclusions

We have shown that the strictness property for chimeric errors does not reduce
the complexity of PHYSICAL-MAPPING this problem remains N P -hard in general. This even holds for sparse clone libraries, for which potential chimerism can
be detected fast. A tight complexity estimate for computing an optimal ordering has been obtained based on the sparseness parameters maximum fragment
length and maximum degree of probe overlap.
For very sparse cases, the problem can be solved in linear or almost linear time, where the algorithmically interesting case turns out to be overlap 3
and fragment length 2 . Any relaxation of sparsity beyound this point makes
PHYSICAL-MAPPING intractable.

The Complexity of Physical Mapping with Strict Chimerism

395

References
[1]

[2]

[3]

[4]

[5]
[6]
[7]

[8]

[9]
[10]
[11]
[12]
[13]

[14]

[15]
[16]

[17]

F. Alizadeh, R. Karp, L. Newberg, D. Weisser, Physical mapping of chromosomes: a combinatorial problem in molecular biology, Algorithmica 13, 5276,
1995.
F. Alizadeh, R. Karp, D. Weisser, G. Zweig, Physical mapping of chromosomes
using unique probes, Proc. 5th Annual ACM-SIAM Symposium on Discrete Algorithms SODA94, 489500, 1994.
J. Atkins, M. Middendorf, On physical mapping and the consecutive ones property for sparse matrices, DAMATH: Discrete Applied Mathematics and Combinatorial Operations Research and Computer Science 71, 1996.
K. Booth, G. Lueker, Testing for the consecutive ones property, interval graphs,
and graph planarity using PQ-tree algorithms, J. Computer and System Sciences
13, 335379, 1976.
D. Fulkerson, O. Gross, Incidence matrices and interval graphs, Pacific Journal
of Mathematics 15, 835856, 1965.
P. Goldberg, M. Golumbic, H. Kaplan, R. Shamir, Four strikes against physical
mapping of DNA, J. Computational Biology 2, 139152, 1995.
D. Greenberg, S. Istrail, The chimeric mapping problem: Algorithmic strategies
and performance evaluation on synthetic genomic data, Computers and Chemistry 18, 207220, 1994.
D. Greenberg, S. Istrail, Physical Mapping by STS Hybridization: Algorithmic
Strategies and the challenge of Software Evaluation, J. Comp. Biology 2, 219-273,
1995.
M. Garey, D. Johnson, Computers and Intractability: A Guide to NPCompleteness, Freeman, 1979.
M. Garey, D. Johnson, R. Tarjan, The planar Hamiltonian circuit problem is
NP-complete, SIAM J. Computing 5, 704714, 1976.
To Know Ourselves. Human Genome Program, U.S. Department of Energy, 1996.
W. Hsu. A simple test for the consecutive ones property, Proc. 3rd Int. Symposium on Algorithms and Computation ISAAC92, LNCS 650, 459468, 1992.
W. Hsu, On physical mapping algorithms: an error tolerant test for the consecutive ones property, Proc. 3rd Int. Conf. Computing and Combinatorics, COCOON97, LNCS 1267, 242250, 1997.
H. Kaplan, R. Shamir, R. Tarjan. Tractability of parameterized completion problems on chordal and interval graphs: Minimum fill-in and physical mapping,
Proc. 35th Symp. on Foundations of Computer Science FOCS94, 780793, 1994.
N. Korte, R. M
ohring. An incremental linear-time algorithm for recognizing interval graphs, SIAM J. Computing 18, 6881, 1989.
S. Weis, Das Entscheidungsproblem Physikalische Kartierung mit starkchimerischen Fehlern, Technical Report A-99-05, Med. Uni. L
ubeck, Institut f
ur Theoretische Informatik, 1999.
S. Weis, Zur algorithmischen Komplexit
at des Optimierungsproblems Physikalische Kartierung mit starkchimerischen Fehlern, Technical Report A-99-06, Med.
Uni. L
ubeck, Institut f
ur Theoretische Informatik, 1999.

Logical Analysis of Data with Decomposable


Structures
Hirotaka Ono1 , Kazuhisa Makino2 , and Toshihide Ibaraki1
1

Department of Applied Mathematics and Physics, Graduate School of Informatics,


Kyoto University, Kyoto 606-8501, Japan.
({htono,ibaraki}@amp.i.kyoto-u.ac.jp)
2
Department of Systems and Human Science, Graduate School of Engineering
Science, Osaka University, Toyonaka, Osaka, 560-8531, Japan.
([email protected])

Abstract. In such areas as knowledge discovery, data mining and logical analysis of data, methodologies to find relations among attributes
are considered important. In this paper, given a data set (T, F ) of a
phenomenon, where T {0, 1}n denotes a set of positive examples and
F {0, 1}n denotes a set of negative examples, we propose a method to
identify decomposable structures among the attributes of the data. Such
information will reveal hierarchical structure of the phenomenon under
consideration. We first study computational complexity of the problem
of finding decomposable Boolean extensions. Since the problem turns out
to be intractable (i.e., NP-complete), we propose a heuristic algorithm
in the second half of the paper. Our method searches a decomposable
partition of the set of all attributes, by using the error sizes of almost-fit
decomposable extensions as a guiding measure, and then finds structural
relations among the attributes in the obtained partition. The results of
numerical experiment on synthetically generated data sets are also reported.

Introduction

Extracting knowledge from given data sets has been intensively studied in such
fields as knowledge discovery, knowledge engineering, data mining, logical analysis of data, artificial intelligence and database theory (e.g., [4,3,5]). We assume in
this paper that the data set is given by a pair of a set T of true vectors (positive
examples) and a set F of false vectors (negative examples), where T, F {0, 1}n
and T F = are assumed. We denote by S = {1, 2, . . . , n} the set of attributes.
We are interested in finding a decomposable structure; i.e., given a family S =
{S0 , S1 , . . . , Sk } of subsets of S , we want to establish the existence of Boolean
functions g, h1 , h2 , , hk , if any, so that f (S) = g(S0 , h1 (S1 ), . . . , hk (Sk )) is true
(resp., false) in every given true (resp., false) vector in T (resp., F ).
In the above scheme, the sets Si may represent intermediate groups of attributes, and we ask whether these groups define new meta-attributes, which
can completely specify the positive or negative character of the examples. This
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 396406, 2000.
c Springer-Verlag Berlin Heidelberg 2000

Logical Analysis of Data with Decomposable Structures

397

problem of structure identification is in fact one form of knowledge discovery. As


an example, assume that f (x) describes whether the species are primates or not;
e.g., f (x) = 1 for x = (1100 ), denotes that the chimpanzee (= x), which has
characteristics of viviparous (x1 = 1), vertebrate (x2 = 1), do not fly (x3 = 0),
do not have claw (x4 = 0), and so on, is a primate. In the case of the hawk, on
the other hand, we shall have f (0111 ) = 0. In this example, we can group
properties viviparity and vertebrate as the property of the mammals, and
the chimpanzee is a mammal. That is, f (x) can be represented as g(S0 , h(S1 )),
where S1 = {x1 , x2 }, S0 = S \ S1 , and h describes whether species are the mammal or not. This mammal is a meta-attribute, and we can recognize primates
by regarding S1 = {x1 , x2 } as one attribute h(S1 ). In this sense, finding a family
of attribute sets S = {S0 , S1 , . . . , Sk }, which satisfy the above decomposition
property, can be understood as computing essential relations among the original
attributes [2,7].
In this paper, we concentrate on finding a basic decomposition structure for
a partition into two sets (S0 , S1 (= S \ S0 )). We first show that determining the
existence of such a partition (S0 , S1 ) is intractable (i.e., NP-complete). Since
finding decomposable structures is a very important problem, we then propose
a heuristic algorithm. Our method searches a decomposable partition (S0 , S1 ) of
the attribute set S, by using the error sizes of almost-fit decomposable extensions as a guiding measure. In order to compute the error size of an almost-fit
decomposable extension, in the above algorithm, we also propose a fast heuristic
algorithm.
We then apply our method to synthetically generated data sets. Experimental
results show that our method has good performance to identify such decomposable structures.

2
2.1

Preliminaries
Extensions and Best-Fit Extensions

A Boolean function, or a function in short, is a mapping f : {0, 1}n {0, 1},


where x {0, 1}n is called a Boolean vector (a vector in short). If f (x) = 1
(resp., 0), then x is called a true (resp., false) vector of f . The set of all true
vectors (false vectors) is denoted by T (f ) (F (f )). Let, for a vector v {0, 1}n,
ON (v) = {j | vj = 1, j = 1, 2, . . . , n} and OF F (v) = {j | vj = 0, j = 1, 2, . . . , n}.
For two sets A and B, we write A B if A is a subset of B, and A B if A is a
proper subset of B. For two functions f and g on the same set of attributes, we
write f g if f (x) = 1 implies g(x) = 1 for all x {0, 1}n, and we write f < g
if f g and f 6= g.
A function f is positive if x y (i.e., xi yi for all i {1, 2, . . . , n})
always implies f (x) f (y). The attributes x1 , x2 , . . . , xn and their complements
2 , . . . , x
n are called literals. A term is a conjunction of literals such that at
x
1 , x
i appears in it for each i. A disjunctive normal form (DNF)
most one of xi and x
is a disjunction of terms. Clearly, a DNF defines a function, and it is well-known

398

Hirotaka Ono, Kazuhisa Makino, and Toshihide Ibaraki

that every function can be represented by a DNF (however, such a representation


may not be unique).
A partially defined Boolean function (pdBf) is defined by a pair of sets (T, F )
of Boolean vectors of n attributes, where T denotes a set of true vectors (or
positive examples) and F denotes a set of false vectors (or negative examples).
A function f is called an extension of the pdBf (T, F ) if T (f ) T and F (f ) F .
Evidently, the disjointness of the sets T and F is a necessary and sufficient
condition for the existence of an extension, if it is considered in the class of all
Boolean functions. It may not be evident, however, to find out whether a given
pdBf has a extension in C, where C is a subclass of Boolean functions, such as
the class of positive functions. Therefore, we define the following problem [3]:
Problem Extension(C)
Input:
A pdBf (T, F ), where T, F {0, 1}n.
Question: Is there an extension f C of (T, F ) ?
Let us note that this problem is also called consistency problem in computational
learning theory [1].
For a set A, |A| denotes the cardinarity of A, and we define the error size of a
function f with respect to (T, F ) by e(f ; (T, F )) = |{a T | f (a) = 0}| + |{b
F | f (b) = 1}|. As EXTENSION(C) may not always have answer yes, we
introduce the following problem [3]:
Problem Best-Fit(C)
Input: A pdBf (T, F ), where T, F {0, 1}n.
Output: f C that realizes minf C e(f ; (T, F )).
Clearly, problem EXTENSION is a special case of problem BEST-FIT, since
EXTENSION has a solution f if and only if BEST-FIT has a solution f with
e(f ; (T, F )) = 0.
For a pdBf (T, F ), an extension f is called almost-fit if it has a small error size e(f ; (T, F )), while a best-fit extension f gives the smallest error size
e(f ; (T, F )). Thus the definition of almost-fit extension is not exact in the mathematical sense, since small is only vaguely defined. In the cases where best-fit
extensions are difficult to compute, we use almost-fit extensions instead.
2.2

Decomposable Functions

For a vector a {0, 1}n and a subset S S, let a[S ] denote the projection of

a on S , and let {0, 1}S denote the vector space defined by an attribute set S .
For example, if a = (1011100), b = (0010011) and S = {2, 3, 5}, then a[S ] =

(011), b[S ] = (010), and a[S ], b[S ] {0, 1}S . Furthermore, for a subset of
n

vectors U {0, 1} , we use notation U [S ] = {a[S ] | a U }. For a Boolean


function h that depends only on S S, we write h(S ) to denote h(v[S ]) for

Logical Analysis of Data with Decomposable Structures

399

v {0, 1}n. Given subsets S0 , S1 S, a function f is called F0 (S0 , F1 (S1 ))decomposable [2,11] if there exist Boolean functions h1 , and g satisfying the
following conditions, where Fi stands for the class of all Boolean functions:
(i) f (v) = g(v[S0 ], h1 (v[S1 ])), for all v {0, 1}n,
(ii) h1 : {0, 1}S1 {0, 1},
0
(iii) g: {0, 1}S {0, 1}, where S 0 = S0 {h1 }.
We denote by CF0 (S0 , F1 (S1 )) the class of F0 (S0 , F1 (S1 )-decomposable functions.
In some cases, we further assume that a pair (S0 , S1 ) is a partition, i.e., S0 S1 =
and S = S0 S1 .
It is known that, given a pair of subsets (S0 , S1 ), problem EXTENSION(C
F0 (S0 ,F1 (S1 )) ) can be solved in polynomial time if one exists [2] (see Proposition
1), while problem BEST-FIT(CF0 (S0 ,F1 (S1 )) ) is NP-hard [3].
Given a pdBf (T, F ) and a pair of sets of attributes S0 and S1 , we define its
conflict graph G(T,F ) = (V, E) by V = {v[S1 ] | v T F }, E = {(a[S1 ], b[S1 ]) |
a T, b F, a[S0 ] = b[S0 ]}. For example, (T, F ) in Fig. 1, and Consider the
pdBf given in the truth table of Fig.1, S0 = {x1 , x2 , x3 } and S1 = {x4 , x5 , x6 }
have the conflict graph G of Fig. 1. This is not F0 (S0 , F1 (S1 ))-decomposable
by the next proposition [2].
S0
110
T 011
110
011
F
110

S1
101
101
010
010
110

101

110

010

Fig. 1. A pdBf (T, F ) and its conflict graph.


Proposition 1. A pdBf (T, F ) has an extension f = g(S0 , h1 (S1 )) for a given
pair of subsets (S0 , S1 ) (not necessarily a partition) if and only if its conflict
u
graph G(T,F ) is bipartite (this condition can be tested in polynomial time). t

3
3.1

Computational Complexity of Decomposability


NP-Hardness of Finding a (Positive) Decomposable Structure

By Proposition 1, it can be decided in polynomial time whether a pdBf (T, F )


has an F0 (S0 , F1 (S1 ))-decomposable extension for a given (S0 , S1 ). However,
we sometimes want to know the existence of subsets S0 and S1 such that a
pdBf (T, F ) is F0 (S0 , F1 (S1 ))-decomposable, where (S0 , S1 ) is restricted to be a
partition.

400

Hirotaka Ono, Kazuhisa Makino, and Toshihide Ibaraki

Problem F0 (S0 , F1 (S1 ))-Decomposability


Input:
A pdBf (T, F ), where T, F {0, 1}n.
Question: Is there a partition (S0 , S1 ) of S with |S0 | 3 and |S1 | 2,
such that pdBf (T, F ) is F0 (S0 , F1 (S1 ))-decomposable?
Theorem 1. Problem F0 (S0 , F1 (S1 ))-DECOMPOSABILITY is NP-complete.
t
u
Moreover, even if F0 and F1 are positive functions, this problem remains NPcomplete. Since these theorems can be proved similarly, we only outline the proof
of Theorem 1.
Outline of the proof of Theorem 1. We reduce the following NP-complete
problem [8] to F0 (S0 , F1 (S1 ))-DECOMPOSABILITY.
Problem One-In-Three 3SAT
Set U of attributes, collection C of clauses over U such that
each clause C C consists of 3 positive literals.
Question: Is there a truth assignment for U such that each clause in C
has exactly one literal assigned to 1?

Input:

Given an instance of ONE-IN-THREE 3SAT, let Ep denote the set of attributes corresponding to a clause Cp C (e.g., if Cp = x1 x2 x3 , then
Ep = {x1 , x2 , x3 }), and let E denote the family of all Ep . The instance has answer yes if there exists a partition (U0 , U1 ) of U such that |U0 Ep | = 2 and
|U1 Ep | = 1 hold for all Ep E. We assume without the loss of generality that
|U0 | 3 and |U1 | 2.
Corresponding to the above instance of ONE-IN-THREE 3SAT, we now construct the instance (i.e., pdBf (T, F )) of F0 (S0 , F1 (S1 ))-DECOMPOSABILITY
as follows: S = U, T = T1 T3 , F = F2 F4 F5 , where
T1 = {v {0, 1}S | |ON (v)| = 1},
T3 = {v {0, 1}S | ON (v) = Ep and Ep E},
F2 = {v {0, 1}S | |ON (v)| = 2 and ON (v) Ep , for some Ep E},
F4 = {v {0, 1}S | |ON (v)| = 4 and ON (v) Ep for some Ep E},
F5 = {v {0, 1}S | |ON (v)| = 5 and ON (v) Ep for some Ep E},
For example, if there is a clause C = x1 x2 x3 , we construct the true vectors {(100000 ), (010000 ), (001000 ), (111000 )} and the false vectors
{(110000 ), (101000 ), (011000 ), (111100 ), (111010 ), (111001 ),
. . . , (111110 ), (111101 ), (111011 ), . . .}.
Then, using Proposition 1, we can show that there is a partition (S0 , S1 ) with
|S0 | 3 and |S1 | 2 such that pdBf (T, F ) is F0 (S0 , F1 (S1 ))-decomposable if
and only if a given collection of clauses C has a partition (U0 , U1 ) with |U0 | 3
and |U1 | 2 such that |U0 Ep | = 2 and |U1 Ep | = 1 hold for all Ep E. We
however omit the details for the sake of space.
t
u

Logical Analysis of Data with Decomposable Structures

401

Heuristic Algorithm to Find a Decomposable Structure

By Theorem 1, it is in general difficult to find a decomposable structure of a given


pdBf (T, F ). As the problem of finding a decomposable structure is very important in applications, however, we propose a heuristic algorithm DECOMP, which
finds a partition (S0 , S1 ) for which the given pdBf (T, F ) has an F0 (S0 , F1 (S1 ))decomposable extension f with a small error size e(f ; (T, F )). Allowing errors
is essential in practice because the real-world data often contain errors, such
as measurement and classification errors. Due to these errors, the given pdBf
(T, F ) may not be F0 (S1 , F1 (S1 ))-decomposable for any partition (S0 , S1 ), although the underlying phenomenon has a decomposable structure. By allowing
errors of small size, it is expected that this kind of misjudgement is prevented.
Our algorithm uses the error size of each partition (S0 , S1 ) as a measure to
evaluate the distance from (S0 , S1 ) to (S0 , S1 ), where pdBf (T, F ) is assumed to
be F0 (S0 , F1 (S1 ))-decomposable. For this purpose, we consider how to evaluate
the error size efficiently in the next subsection.
4.1

Finding Almost-Fit Decomposable Extensions

Since the problem of computing a best-fit decomposable extension for a given


(S0 , S1 ) is NP-hard [3], we propose two heuristic algorithms in this subsection.
The first one is theoretically interesting as it has a guaranteed approximation
ratio, while the latter is more practical. In our experiment in Section 5, the latter
algorithm is employed.
Given a pdBf (T, F ) and a partition (S0 , S1 ), we construct an almost-fit
F0 (S0 , F1 (S1 ))-decomposable extension f with error size e(f ; (T, F )). To make
the error size small, we introduce an extended conflict graph G0 such that the
error vectors in the extension f correspond one-to-one to the vertices in G0 ,
whose deletion makes the resulting G0 bipartite.
Given a pdBf (T, F ) and a pair of sets of attributes (S0 , S1 ) (not necessarily
a partition), we define its extended conflict graph G0(T,F ) = (V, E), where V =
V1 V2 is given by V1 = {a | a T } {b | b F },V2 = {a[S1 ] | a T F } and
E = E1 E2 is given by E1 = {(a, a[S1 ]) | a T F }, E2 = {(a, b) | a
T, b F, a[S0 ] = b[S0 ]}. The vertices in G0 have positive weights defined by
(a) = 1 if z = a V1 , + otherwise.
Now let M V1 be a set of vertices whose removal makes G0(T,F ) bipartite.
It can be proved that deleting the corresponding sets T 0 T and F 0 F from
(T, F ) gives the pdBf (T \ T 0 , F \ F 0 ) which has an F (S0 , F1 (S1 ))-decomposable
extension. The converse direction also holds. Therefore, we have the next lemma.
Lemma 1. Let a pdBf (T, F ) and a pair of attribute sets (S0 , S1 ) be given, and
let V V be a minimum weighted set of vertices whose removal makes G0(T,F )
bipartite. Then we have minf CF (S0 ,F1 (S1 )) e(f ; (T, F )) = |V |.
t
u
The problem of minimizing the number of vertices in a given graph G = (V, E),
whose deletion make G bipartite is called VERTEX-DELETION-BIPARTIZA-

402

Hirotaka Ono, Kazuhisa Makino, and Toshihide Ibaraki

TION, or VDB for short. VDB is known to be MAX SNP-hard, but has an
approximation algorithm with approximation ratio O(log |V |) [9,10,6].
Theorem 2. Given a pdBf (T, F ) and a pair of attribute sets (S0 , S1 ), there
is an approximate algorithm for BEST-FIT(CF (S0 ,F1 (S1 )) ), which attains the approximation ratio of
e(f ; (T, F ))
= O(log(|T | + |F |)),
e(f ; (T, F ))

(1)

where f is a best-fit F (S0 , F1 (S1 ))-decomposable extension of (T, F ).


However, the approximation algorithm in [10] for VDB may require too much
computational time for practical purposes. Since our heuristic algorithm in Section 4.2 uses the error size as a guiding measure, it has to be computed many
times. Therefore, we propose a faster algorithm ALMOST-FIT even though its
approximation ratio is not guaranteed theoretically.
ALMOST-FIT first constructs the conflict graph G = G(T,F ) . Next, it traverses G in the depth-first manner, and, whenever a cycle of odd length is
found, deletes a vector in pdBf (T, F ) so that the most recently visited edge in
the cycle is eliminated. Then, after reconstructing the resulting conflict graph
G , it resumes the depth-first search in the new G .
In order to eliminate an edge in the detected cycle of odd length, we only
have to delete one of the two vectors in T F that correspond to the two end
vertices of the edge. We now explain which vector to delete. By the property
of depth-first search (in short, DFS), we find a cycle only when we traverse a
so-called back edge [13]. Denote the back edge by (v1 , v2 ) , where DFS traverses
this edge from v1 to v2 , and let a1 , a2 T F satisfy v1 = a[S1 ] and v2 = a[S1 ],
where one of the a1 and a2 belongs to T and the other belongs to F . In this
case, we say that a1 (resp., a2 ) corresponds to v1 (resp., v2 ), and delete a1 . This
deletion does not change the set of ancestor vertices of v1 on the current DFS
tree and hence DFS can be resumed from v1 . (If we delete a2 , on the other hand,
the structure of DFS tree changes substantially).
Algorithm Almost-Fit
A pdBf (T, F ) and a pair of attribute sets (S0 , S1 ), where T, F
{0, 1}S and S0 , S1 S.
Output: The error size e(f ; (T, F )), where f is an almost-fitF0 (S0 , F1 (S1 ))
-decomposable extension for (T, F ).
Input:

Step 1. Construct the conflict graph G = G(T,F ) for pdBf (T, F ) and (S0 , S1 ).
Set e := 0
Step 2. Apply the DFS to the conflict graph G . If a cycle of odd length is found,
then delete one vector from (T, F ) in the above manner, reconstruct the conflict
graph G , set e := e + 1 and return to Step 2. If there is no odd cycle, output e as
e(f ; (T, F )) and halt. (f is an extension of the resulting pdBf (T, F ).)
t
u

Logical Analysis of Data with Decomposable Structures

4.2

403

Finding Decomposable Structures

In this section, we propose a local search algorithm to find decomposable partitions (S0 , S1 ), by making use of the error size obtained by the heuristic algorithm ALMOST-FIT of section 4.1. A local search algorithm is defined by
specifying the neighbourhood of the current solution (S0 , S1 ). In our algorithm,
N (S0 , S1 ) = {(S0 {j} \ {i}, S1 {i} \ {j}) | i S0 , j S1 }. However, as
all partitions (S00 , S10 ) N (S0 , S1 ) satisfy |S00 | = |S0 | and |S10 | = |S1 |, we
apply local search to initial solutions (S0 , S1 ) with |S0 | = k, separately, for
k = 2, 3, . . . , |S| 1.
Algorithm Decomp
Input: A pdBf (T, F ), where T, F {0, 1}S and S is the attribute set.
Output: Partitions (S0 , S1 ) with |S1 | = k, for k = 2, 3, . . . , |S| 1, having
almost-fit F0 (S0 , F1 (S1 ))-decomposable extensions of small error sizes.
Step 0: k := 2.
Step 1: Choose a partition (S0 , S1 ) with |S1 | = k randomly, and compute the
error size e(S0 , S1 )) of an almost-fit F0 (S0 , F1 (S1 ))-decomposable extension
f by algorithm ALMOST-FIT. Set  := e(S0 , S1 ).
Step 2: For each (S00 , S10 ) N (S0 , S1 ), apply ALMOST-FIT. If there is a
partition (S00 , S10 ) with a smaller error size than , then set S0 := S00 , S1 := S10 ,
 := e(S00 , S10 ), and return to Step 2. Otherwise, output partition (S0 , S1 ) and
its error size  for the current k.
Step 3: If k := |S| 1, then halt. Otherwise, let k := k + 1 and return to Step
1.
t
u

Numerical Experiments

We apply algorithm DECOMP described in Section 4 to synthetically generated


pdBfs (T, F ), in order to evaluate their power of finding decomposable structures.
5.1

Generation of (T, F )

For our experiment, we generate random data sets (T, F ), T, F {0, 1}n, which
are F0 (S0 , F1 (S1 ))-decomposable. To ensure a decomposable structure, we first
specify a partition (S0 , S1 ) and then construct a function f : {0, 1}n {0, 1}

S1 )),
h : {0, 1}S1 {0, 1}, g : {0, 1}S0{h} {0, 1}
such that f = g(S0 , h(
{0, 1}. Then for a given rate r, where 0 r 1, we randomly draw a set Qr of
r 2n vectors from {0, 1}n as samples, and classify all u Qr into T (resp., F ) according to whether f(u) = 1 (resp., f(u) = 0) holds. Obviously T F = hold. In
our experiment, we use n = 18, and test r = 0.01, 0.02, . . . , 0.09, 0.1, 0.2, . . . , 0.5.
The original partitions (S0 , S1 ) satisfy |S0 | = |S1 | = 9. For the hidden function
f, we used the following three types.

404

Hirotaka Ono, Kazuhisa Makino, and Toshihide Ibaraki

(i) Randomly assigned functions: f is constructed by assigning the value f(a) = 0


or 1 randomly with equal probability for each a {0, 1}n. Any Boolean function
can be generated in this way. However, most of the randomly assigned functions
may not appear as functions in real-world.
(ii) DNF functions: DNF of f is defined by a set of terms, as follows: A term
is randomly generated by specifying each variable to be a positive literal, a
negative literal or not used with equal probability, and taking the conjunction of
Any
the generated literals. We generate |S0 | + 1 terms for g and |S1 | terms as h.
Boolean function can be represented by a DNF, and those functions representing
real-world phenomena are considered to have short DNFs.

(iii) Threshold functions: A threshold function


P f is defined by weights wi , i =
1, 2, . . . , n and a threshold , as f (x) = 1 if i wi xi , 0 otherwise [12]. We
generate a threshold
Pfunction by choosing all weights wi from (0, 1] randomly
and by setting = i wi /n.
5.2

Computational Results

We generate 5 pdBfs for each type, and execute DECOMP 10 times for each
pdBf (i.e., 50 times in total). Let the success rate denote the ratio with which
DECOMP could find decomposable partitions and the cpu time denote the average of total cpu time of 10 time executions of DECOMP for one function. We
show the results of success rate and cpu time for the randomly assigned functions
in Fig. 2. The success rates for DNF functions and threshold functions are given
in Fig. 3. We omit the results of cpu time for other two types, since they have
similar tendency with random assigned functions.
6000

cpu time (sec)

success rate

0.8
0.6
0.4

original
delusive

0.2
0

sampling rate (%)

5000
4000
3000
2000
1000
0

sampling rate r (%)

Fig. 2. (i) Success rate (left) and (ii) average cpu time (right) for randomly
assigned functions
1

original
delusive

0.8

success rate

success rate

0.8
0.6
0.4

0.4

original
delusive

0.2

0.2
0

0.6

sampling rate r(%)

Sampling rate r(%)

Fig. 3. (i) Success rate for DNF functions (left) and (ii) for threshold functions
(right)

Logical Analysis of Data with Decomposable Structures

405

Fig. 2 (i) and Fig. 3 show the success rate of finding the original partition
(S0 , S1 ) (solid curves) as well as that of finding delusive partitions (broken
curves), when sampling rate r (%) is changed from 0.01 to 0.5.
The results for randomly assigned functions (Fig. 2) say that DECOMP can
almost always find the original (S0 , S1 ) if sampling rate satisfies r 0.5%.
For DNF functions and threshold functions (Fig. 3), similar tendency is also
observed. If sampling rate r is lower than 0.5%, each pdBf (T, F ) has only a small
number of edges in its conflict graph, and many partitions (S0 , S1 ) 6= (S0 , S1 )
also turn out to be decomposable. These partitions are called delusive, and also
depicted in Fig. 2 (i) and Fig. 3. These indicate that a sampling rate larger than
a certain threshold value is necessary to ensure the discovery of the original
decomposable structure (S0 , S1 ).

Conclusion

In this paper, we used the concept of decomposability to extract the structural information from the given data (T, F ). Such information can explain the
hierarchical relations that exist among the attributes. We first clarified the computational complexity of the problem of finding a decomposable structure. Since
it is NP-complete, we proposed a heuristic algorithm, which is based on local
search method. As a guiding measure in this local search, we used the error sizes
of almost-fit F0 (S0 , F1 (S1 ))-decomposable extensions, for which a fast heuristic
algorithm is developed.
We then performed numerical experiments on three types of synthetically
generated data sets. Judging from the experimental results, our approach appears to be able to detect decomposition structures reasonably effectively. However, its performance critically depends on the number of data vectors in the
data sets; it appears essential to have enough number of data vectors for our
method to be effective. The number of necessary data vectors depends on the
types of data sets, and the sizes of the variable sets. More theoretical and experimental studies appear necessary in order to know the effect of these parameters
more accurately.

Acknowledgement
This work was partially supported by the Scientific Grant-in-Aid by the Ministry
of Education, Science, Sports and Culture of Japan.

References
1. M. Anthony and N. Biggs, Computational Learning Theory (Cambridge University
Press, 1992).
2. E.Boros, V.Gurvich, P.L.Hammer, T.Ibaraki and A.Kogan, Decompositions of partially defined Boolean functions, Discrete Applied Mathematics, 62 (1995) 51-75.

406

Hirotaka Ono, Kazuhisa Makino, and Toshihide Ibaraki

3. E. Boros, T. Ibaraki and K. Makino, Error-free and best-fit extensions of a partially


defined Boolean function, Information and Computation, 140 (1998) 254-283.
4. E. Boros, P. L. Hammer, T. Ibaraki, A. Kogan, E. Mayoraz and I. Muchnik, An
implementation of logical analysis of data, RUTCOR Research Report RRR 22-96,
Rutgers University, 1996; to appear in IEEE Trans. on Data Engineering.
5. Y. Crama, P. L. Hammer and T. Ibaraki, Cause-effect relationships and partially
defined Boolean functions, Annals of Operations Research, 16 (1988) 299-325.
6. P. Crescenzi and V. Kann, A compendium of NP optimization problems,
http://www.nada.kth.se/ viggo/index-en.html.
7. U. M. Fayyad, G. Piatetsky-Shapiro, P. Smyth, and R. Uthurusamy(eds.), Advances in Knowledge Discovery and Data Mining, 1996, AAAI Press.
8. M. R. Garey and D. S. Johnson, Computers and Intractability, Freeman, New York,
1979.
9. N. Garg, V. V. Vazirani and M. Yannakakis, Approximate max-flow min-(multi)cut
theorems and their applications, SIAM J. on Computing, 25 (1996) 235-251.
10. N. Garg, V. V. Vazirani and M. Yannakakis, Multiway cuts in directed and node
weighted graphs, ICALP94, LNCS 820 (1994) 487-498.
11. K. Makino, K. Yano and T. Ibaraki, Positive and Horn decomposability of partially
defined Boolean functions, Discrete Applied Mathematics, 74 (1997) 251-274.
12. S. Muroga, Threshold Logic and Its Applications, Wiley-Interscience, 1971.
13. R.C Read and R.E. Tarjan, Bounds on backtrack algorithms for listing cycles,
paths, and spanning tress, Networks, 5 (1975) 237-252.

Learning from Approximate Data


Shirley Cheung H.C.
Department of Mathematics, City University of Hong Kong
83 Tat Chee Avenue, Kowloon Tong, HONG KONG
[email protected]

Abstract. We give an algorithm to PAC-learn the coefficients of a multivariate polynomial from the signs of its values, over a sample of real
points which are only known approximately. While there are several papers dealing with PAC-learning polynomials (e.g. [3,11]), they mainly
only consider variables over finite fields or real variables with no roundoff error. In particular, to the best of our knowledge, the only other work
considering rounded-off real data is that of Dennis Cheung [6]. There,
multivariate polynomials are learned under the assumption that the coefficients are independent, eventually leading to a linear programming
problem. In this paper we consider the other extreme: namely, we consider the case where the coefficients of the polynomial are (polynomial)
functions of a single parameter.

Introduction

In the PAC model of learning one often finds concepts parameterized by (exact)
real numbers. Examples of such concepts appear in the first pages of well-known
textbooks such as [9]. The algorithmics for learning such concepts follows the
same pattern as that for learning concepts parameterized by Boolean values. One
randomly selects some elements x(1) , . . . , x(m) in the instance space X. Then,
with the help of an oracle, one decides which of them satisfy the target concept
c . Finally, one computes an hypothesis ch which is consistent with the sample,
i.e., a concept ch which is satisfied by exactly those x(i) which satisfy c .
A main result from Blumer et al. [5] provides a bound for the sample size
m which guarantees that the error of ch is less than with probability at least
1 , namely
 
 

1

1
VCD(C)
log
log
+
,
(1)
m C0

where C0 is a universal constant and VCD(C) is the Vapnik-Chervonenkis dimension of the concept class at hand. This result is especially useful when the
concepts are not discrete entities (i.e., not representable using words over a finite
alphabet), since in this case one can bound the size of the sample without using
the VC dimension.
A particularly important case of concepts parameterized by real numbers is
where the membership test of an instance x X to a concept c in the concept
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 407415, 2000.
c Springer-Verlag Berlin Heidelberg 2000

408

Shirley Cheung H.C.

class C can be expressed by a quantifier-free first-order formula. In this case,


concepts in Cn,N are parameterized by elements in IRn , the instance space X is
the Euclidean space IRN , and the membership of x X to c C is given by the
truth of n,N (x, c) where n,N is a quantifier-free first-order formula (over the
theory of the reals) with n + N free variables. In this case, a result of Goldberg
and Jerrum [8] bounds the VC-dimension of Cn,N by
VCD(Cn,N ) 2n log(8eds).

(2)

Here d is a bound for the degrees of the polynomials appearing in n,N and s is
a bound for the number of distinct atomic predicates in n,N .
One may say that at this stage the problem of PAC learning a concept c
Cn,N is solved. Given , > 0 we simply compute m satisfying (1) with the VCdimension replaced by the bound in (2). We then randomly draw x(1) , . . . , x(m)
X and finally compute a hypothesis ch Cn,N consistent with the membership
of x(i) to c , i = 1, . . . , m (which we obtain from some oracle). To obtain ch we
may use any of the algorithms proposed recently to solve the first-order theory
of the reals (cf. [10,2]).
It is at this stage, however, that our research begins: from a practical viewpoint, we can not read the elements x(i) exactly. Instead, we typically obtain
rational approximations x(i) . The membership of x(i) to c depends nevertheless
on x(i) and not on x(i) . Our problem thus becomes that of learning c from
approximate data. A key assumption is that we know the precision of these
approximations and that we can actually modify in our algorithm to obtain
better approximations.
In this paper, we will not deal with general concepts in Cn,N as defined
above but with a subclass where the membership test is given by applying the
sign function to a single polynomial. We will design an algorithm PAC-learning a
concept in this class from approximate data. In studying the complexity of this
algorithm we will naturally deal with a classical theme in numerical analysis
conditioning and we will find yet another instance of the dependence of
running time on the condition number of the input (cf. [7]).

The Problem

Consider a polynomial F IR[c, x


] where x
= (x1 , . . . , xN ). Let d be the total
degree of F. Then we can write
F=

d
X

gi (
x)ci

i=0

where gi (
x) is a polynomial of degree at most d i in x1 , . . . , xN .
Replacing the parameter c for a given c IR, F becomes a polynomial in
x1 , . . . , xN which we will denote by Fc . Let M IR, M > 0. When c varies in
[M, M], Fc describes a class of polynomials C(F). For an instance x X, we

Learning from Approximate Data

409

say that x satisfies c when Fc (x) 0. This makes C(F) into a concept class
by associating to each f C(F) the concept set {x X | f (x) 0}.
Our goal is to PAC learn a target polynomial Fc C(F) with parameter
c [M, M]. The instance space X is a subset of IRN and we assume a
probability distribution D over it. The error of a hypothesis Fch is given by
Error(ch ) = Prob (sign(Fc (x)) 6= sign(Fch (x)))
where the probability is taken according to D and the sign function is defined
by

1 if z 0
sign(z) =
0 otherwise
As usual, we will suppose that an oracle EXc : X {0, 1} is available computing EXc (x) = sign(Fc (x)). We finally recall that a randomized algorithm PAC
learns Fc with error and confidence when it returns a concept ch satisfying
Error(ch ) with probability at least 1 .
The goal of this paper is to PAC-learn Fc from approximate data. In the
next section we briefly explain how to do so from exact data since some of the
ideas used in the exact case will come handy in the approximate one.

Learning Fc under Infinite Precision

Should we be able to deal with arbitrary real numbers, the following algorithm
would PAC learn Fc .
Algorithm 1
Input (F, , , M)
Compute m using (1) and (2) with s = 1
Draw m random points x(i) IRN
Use the function EXc to obtain sign(Fc (x(i) )) for i = 1, . . . , m
From step 4, we obtain a number of polynomial inequalities in c
f1 (c) 0, f2 (c) < 0, f3 (c) < 0, . . . , fm (c) 0
6. Find any real ch [M, M] satisfying the system in step 5
7. Output: ch
1.
2.
3.
4.
5.

Here fi (c) = F(c, x(i) ) IR[c] and the sign ( 0 or < 0) is given by EXc (x(i) ).
Denote by the system of inequalities in step 5 above.
Note that, to execute step 6, we dont need the general algorithms for solving
the first-order theory over the reals mentioned in the preceding section but only
an algorithm to find a point satisfying a polynomial system of inequalities in one
variable (whose solution set is non-empty since c belongs to it). We next briefly
sketch how this may be done.
First, we need to know how to isolate the roots of a single polynomial f IR[c].

410

Shirley Cheung H.C.

Definition 1. Suppose 1 < 2 < < r are all the real roots of f in [M, M].
Then a finite union of intervals J = I1 I` is called an interval set for
f iff the following conditions hold:
1.
2.
3.
4.

Every Ii is an interval either open or closed.


For every i r there exists j ` such that i Ij .
For every j ` there exists i r such that i Ij .
Ii Ij = for all j 6= i.

If in addition r = ` then we say that J is an isolating set for f .


To find an isolating set for f we use Sturm sequences [1] to count the number of
real roots in [M, M] and then bisection to isolate each root of f in an interval.
(There are of course more intermediate uses of Sturm sequences to ensure that
each interval indeed contains exactly one root.) We can thus easily obtain an
isolating set via classical means.
Refinements of isolating sets are then defined in the most natural way.
Definition 2. Let J = I1 Ir and J 0 = I10 Ir0 be isolating sets for
f , where r is the number of real roots of f in [M, M] and every Ii and Ii0 is
an interval either open or closed. The set J 0 is then said to be a refinement of
J iff Ii0 Ii for all i.
By using bisection to further refine several isolating sets at once, we can solve
our original semi-algebraic system .
More precisely, we construct isolating sets J1 , . . . , Jm (one set for each fi ),
which are sufficiently refined to lead to a solution of our original system .
Definition 3. Following the notation above, we say that Li is a basic feasible
set for fi iff fi (c) > 0 for all c Li . We then say that L is a basic feasible set
for iff L is a basic feasible set for fi for all i {1, . . . , m}.
We can construct a basic feasible set L for from a collection of basic feasible
sets L1 , . . . , Lm for f1 , . . . , fm simply by setting L := L1 Lm . If the
intersection is empty, then we can try to find larger basic feasible sets so that
the intersection L becomes nonempty.
To find a particular Li we can first find an isolating set Ji for fi , and then
do the following: Take Li to be the union of those intervals I, lying in the
complement of Ji , such that fi > 0. Thus, as we refine the Ji , the intervals
making up the Li become larger, and, if the solution set of has non-empty
interior, we eventually arrive at a nonempty L.
Let us now consider the case where we dont actually know for certain.

Learning from Approximate Data

411

Learning Fc from Approximate Data

In the previous section, we assumed that exact data instances were used by our
algorithm. Now, we assume that we can select the value of a parameter such
that, for x IRN , each coordinate xi of x is read with relative precision . That
i satisfying
is, instead of xi , we read x
i | |xi |.
|xi x
Denote by f the polynomial obtained from evaluating F at x
instead of x.
If we get fi instead of fi Algorithm 1 will find a set L whose points all satisfy
.
Our question now is how to ensure that (c) is true as well, when c L and
(c)

is true. The rest of this paper is devoted to solve this question. Through it,
we will search for a solution ch which is not in the boundary of the solution set
of . This makes sense since solutions in the boundary of this set are unstable
under arbitrarily small perturbations. Thus, replacing fi by fi if necessary, we
will assume that our system has the form
f1 > 0, . . . , fm > 0.
This assumption simplifies
notation in the rest of this paper.
P
Consider F = i ai ci x , f ZZ[c, x1 , . . . , xN ]. Recall that we write F =
P
P
x)ci , i.e., gi (
x) =
. Here = (1 , . . . , N ) INN denotes a
i gi (
ai x
multiindex and || = 1 + + N d i.
1
Define = (1 + )d 1 and assume in the sequel that (3/2) d 1 (and
thus, that 1/2).
We now propose a new algorithm for learning fc when instances are read
only approximately. Its main loop can be written as follows.
Algorithm 2
1. Input (F, , , M)
2. Compute m using (1) and (2) with s = 1
3. Pick x(1) , . . . , x(m) X randomly and use the oracle EXc
to get sign(F(c , x(i) )) for all i {1, . . . , m}
1
4. Set := (3/2) d 1 and 0 = 1/8
5. Let := (1 + )d 1
For all i {1, . . . , m}
(i)
a. For j = 1, . . . , N read xj with precision , i.e.
(i)
(i)
(i)
such that |
xj xj | |xj |
b. Compute fi (c)
6. Call procedure SEARCH(f1, . . . , fm , , M), possibly halting here.
7. Set := 2 and goto step 5
Procedure SEARCH, which will be described in Subsection 4.2, attempts to
find a solution of knowing and . If SEARCH finds a solution of then it
halts the algorithm and returns a solution.

412

Shirley Cheung H.C.

Let x X and f IR[c] given by


f=

gi (x)ci =

We define kf k =

4.1

P
i

ai x ci .

|ai x |. Note that if S = max |xj | then kf k kF k1 S d .


jN

Newtons Method

Recall that Newtons method for f , starting at the point c0 IR, consists of
the following recurrence:
ci+1 = Nf (ci ), where Nf (ci ) := ci f (ci )/f 0 (ci ).
We call ci the ith Newton iterate of c0 , and we call the sequence (ci )
i=1 the
Newton iterates of c0 .
Definition 4. Consider a univariate polynomial f IR[x]. A point b IR is an
approximate zero of f iff the Newton iterates of b are all well-defined, and
there exists IR (the associated zero of b ) such that f () = 0 and
 2i 1
1
|b |, for all i 0.
|bi |
2
Definition 5. Suppose f is analytic and f 0 (c) 6= 0. Define
(f, c) = (f, c)(f, c)
where


f (c)
(f, c) = |Nf (c) c| = 0
f (c)

and

1
(k) k1
f (c)

(f, c) = sup 0
.

k2 f (c)k!

By definition, (f, c) is the length of the Newtons step for f at c. The next
result provides insight on the nature of (f, c).
Theorem 1. [4] There exists a universal constant 0 1/8 such that (f, c)
0 = c is an approximate zero of f . Also, if is the associated zero of c, then
|c | 2(f, c).
Note that Theorem 1 gives us a sufficient condition to guarrantee the existence
of a root of f near a point c. In addition, it provides a bound for the distance
from c to that root.

Learning from Approximate Data

4.2

413

The Procedure SEARCH

We now describe the procedure SEARCH mentioned above.


Procedure SEARCH
Input (f1 , . . . , fm , , M)
For i = 1 to m do
Compute an interval set Li for fi such that
all the intervals in Li have length at most 2Md
# The above can be done via bisection and Sturm sequences #
For j = 1 to size(Li ) do
if, for either z = a or z = b, ((fi , z ) 0 /2
and (fi , z ) 16dM2d1 2 (fi , z ) and 420(dM2d1 3 (fi , z ) 0 /2)
and |fi0 (z )| 2dMd2 kfi k (M + 64d(d 1)M2d1 2 (fi , z ))
then
set h := 16dM2d1 2 (fi , z )
set (c1 , c2 ) := (z 4h, z + 4h)
# An isolating interval for a real root of fi #
if fi0 (z ) < 0 then set ch := c1
else set ch := c2
set k := 1
while k < m and (k 6= i or fk (ch ) > 2Md kfk k ) do
k := k + 1
endwhile
if k = i or fk (ch ) > 2Md kfk k then HALT and Return ch
endfor
endfor

Correctness and Complexity of Algorithm 2

Theorem 2. If procedure SEARCH halts and returns a point ch , then ch is a


solution of .
We now consider the time complexity of Algorithm 2. A key parameter to
describe this complexity is the condition of (see [7] for complexity and conditioning).
Consider a set of inequalities . The set of its solutions is a union of open
intervals
s
[
(2j1 , 2j )
Sol() =
j=1

with M 1 < 2 < . . . < 2s M.


Let be an extremity of one of these intervals and i m such that fi () = 0.
We define


fk () |fi0 ()|
,
.
K() = min 1,
kfk k kfi k
km
k6=i

414

Shirley Cheung H.C.

Finally, let the condition number of be


1
.
j2s K(i )

C() = min

Theorem 3. If C() < then Algorithm 2 halts and returns a solution ch . The
number of iterations it performs (i.e. the number of times the procedure SEARCH
is executed) is bounded by
!'
&
1
log2 ([1 + min ] d 1)
.
log2
log2 (0 )
where min =

0
3
4d2
840d M
[5C()]3

and 0 is the initial value set in the beginning

of the algorithm.
The arithmetic complexity (number of arithmetic operations performed by the
algorithm) is bounded by
O[d3 m(d log M + log(C())) log(d log M + log(C()))].
Remark. In the previous discussion we have not considered the situation
where M (or M) belongs to Sol() but it is not a root of fi for i = 1, . . . , m.
A simple modification of procedure SEARCH would deal with that situation. The
definition of C() needs to be slightly modified as well. Theorem 3 remains unchanged.

References
1. A. Akritas. Elements of Computer Algebra with Applications. John Wiley & Sons,
1989.
2. S. Basu, R. Pollack, and M.-F. Roy. On the combinatorial and algebraic complexity
of quantifier elimination. In 35th annual IEEE Symp. on Foundations of Computer
Science, pages 632641, 1994.
3. F. Bergadano, N.H. Bshouty, and S. Varrichio. Learning multivariate polynomials
from substitutions and equivalence queries. Preprint, 1996.
4. L. Blum, F. Cucker, M. Shub, and S. Smale. Complexity and Real Computation.
Springer-Verlag, 1998.
5. A. Blumer, A. Ehrenfeucht, D. Haussler, and M.K. Warmuth. Learnability and
the Vapnik-Chervonenkis dimension. Journal of the ACM, 36:929965, 1989.
6. D. Cheung. Learning real polynomials with a Turing machine. In O. Watanabe, and
T. Yokomori, editor, ALT99, volume 1720 of Lect. Notes in Artificial Intelligence,
pages 231240. Springer-Verlag, 1999.
7. F. Cucker. Real computations with fake numbers. In J. Wiedermann, P. van
Emde Boas, and M. Nielsen, editors, ICALP99, volume 1644 of Lect. Notes in
Comp. Sci., pages 5573. Springer-Verlag, 1999.
8. P.W. Goldberg and M.R. Jerrum. Bounding the Vapnik-Chervonenkis dimension
of concept classes parameterized by real numbers. Machine Learning, 18:131148,
1995.

Learning from Approximate Data

415

9. M.J. Kearns and U.V. Vazirani. An Introduction to Computational Learning Theory. The MIT Press, 1994.
10. J. Renegar. On the computational complexity and geometry of the first-order
theory of the reals. Part I. Journal of Symbolic Computation, 13:255299, 1992.
11. R.E. Shapire and L.M. Sellie. Learning sparse multivariate polynomials over a field
with queries and counterexamples. In 6th annual ACM Symp. on Computational
Learning Theory, pages 1726, 1993.

A Combinatorial Approach to Asymmetric


Traitor Tracing
Reihaneh Safavi-Naini and Yejing Wang
School of IT and CS, University of Wollongong,
Wollongong 2522, Australia
[rei/yw17]@uow.edu.au

Abstract. To protect against illegal copying and distribution of digital


objects, such as images, videos and software products, merchants can
fingerprint objects by embedding a distinct codeword in each copy of
the object, hence allowing unique identification of the buyer. The buyer
does not know where the codeword is embedded and so cannot tamper
with it. However a group of dishonest buyers can compare their copies
of the object, find some of the embedded bits and change them to create
a pirate copy. A c-traceability scheme can identify at least one of the
colluders if up to c colluders have generated a pirate copy.
In this paper we assume the merchant is not trusted and may attempt to
frame a buyer by embedding the buyers codeword in a second copy of
the object. We introduce a third party called the arbiter who is trusted
and can arbitrate between the buyer and the merchant if a dispute occurs. We describe the system as a set system and give two constructions,
one based on polynomials over finite fields and the other based on orthogonal arrays, that provide protection in the above scenario.

Keywords:
Digital fingerprint, traceability schemes, cryptography, information security

Introduction

Traceability schemes are cryptographic systems that provide protection against


illegal copying and redistribution of digital data. When a digital object is sold,
the merchant embeds a distinct fingerprint in each copy hence allowing identification of the buyer. A fingerprint is a sequence of marks embedded in the object
which is not distinguishable from the original content. The buyer does not know
where the fingerprint is inserted and so cannot remove or tamper with it. The
collection of all mark strings used by the merchant is the fingerprinting code. A
copy of the object with an embedded fingerprint belonging to this code is called
a legal copy.
If two or more buyers collude they can compare their copies which will be
identical on non-mark places and different on all mark positions that at least
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 416425, 2000.
c Springer-Verlag Berlin Heidelberg 2000

A Combinatorial Approach to Asymmetric Traitor Tracing

417

two colluders have differing marks. Colluders then may change the marks to
construct an illegal copy. In an illegal copy the data is intact but the mark
sequence is not in the fingerprinting code.
The aim of the fingerprinting code are the following.
1. to ensure that a collusion of buyers cannot remove or tamper with the fingerprint and produce a legal copy other than their own copies.
2. to allow identification of at least one member of a colluding group who has
produced an illegal copy.
We use the term piracy to refer to the generation of illegal copies of digital
objects. In this paper we only consider binary marks.
1.1

Previous Works

Fingerprinting schemes have been widely studied in recent years. The main aim
of these schemes is to discourage illegal copying of digital objects such as softwares, by allowing the merchant to identify the original buyer of a copy.
Frameproof codes are introduced by Boneh and Shaw [1], [7], and provide
a general method of fingerprinting digital objects. The code is a collection of
binary marks and protects against generation of illegal copies. They also defined
c-secure codes that allow deterministic identification of at least one colluder if
an illegal copy of the object is constructed by a collusion of up to c colluders.
They showed [1] that c-secure codes for c 2 can not exist, and proposed a code
which determines the colluders with a very high probability.
Traceability schemes are introduced by Chor, Fiat and Naor [2] in the context of broadcast encryption schemes used for pay television. In their proposed
scheme each authorised user has a decoder with a set of keys that uniquely
determines the owner and allows him to decrypt the broadcast. Colluders attempt to construct a decoder that decodes the broadcast by combining the key
sets in their decoders. A subset of keys given to an authorised user defines a
fingerprinting codeword and the set of all such codewords defines the code
this is also called key fingerprinting. Traceability schemes allow detection of at
least one of the colluders in the above scenario. Stinson and Wei in [7] defined
traitor tracing schemes as set systems, studied their combinatorial properties,
and showed constructions using combinatorial designs. Kurosawa and Desmedt
gave a construction of one-time traceability scheme for broadcast encryption
in which the decryption key will be revealed once it is used. It was shown [8]
that this construction is not secure and colluders can construct a decoder that
can decrypt the broadcast and is not identical to the decoder set of any of the
colluders.
1.2

Asymmetric Tracing

In all the above schemes the merchant is assumed to be honest and so his knowledge of the fingerprints of all the buyers is not a security threat. This however

418

Reihaneh Safavi-Naini and Yejing Wang

is not always true and in particular in open environments such as the Internet
assuming full trust on the merchant is not realistic. If the merchant is dishonest
he may frame a buyer by inserting his unique code in another copy. In this case
there is no way for the buyer to prove his innocence.
Asymmetric traceability schemes proposed by Pfitzmann and Schunter [5]
remove honesty assumption of the merchant and in the case of piracy allow the
merchant to identify the original buyer, and be able to construct a proof for a
judge. The fingerprinted data can only be seen by the buyer but if a merchant
can capture such an object he can prove the identity of the buyer to the judge.
Their system requires four protocols, key-gen, fing, identify and dispute and are
all polynomial-time in the security parameter k. The security requirements are:
(i) a buyer should obtain a fingerprinted copy if all protocol participants honestly
execute the protocols; (ii) the merchant is protected from colluding buyers who
would like to generate an illegal copy of the data; and (iii) buyers must be protected from the merchant and other buyers. Although security of the merchant
is against collusions of maximum size c, a buyer must remain secure against any
size collusion. The proposed general scheme has computational security and uses
a general 2-party protocol, a signature scheme and a one-way function.
Pfitzmann and Waidners [6] extended this work by giving constructions that
are efficient for larger collusions. In these schemes a symmetric fingerprinting
scheme with unconditional security is combined with a number of computationally secure primitives such as signature schemes and one-way functions, and so
the final security is computational.
Kurosawa and Desmedt [4] also constructed a computationally secure asymmetric scheme in which there are ` agents that cooperatively generate the key.
The agents are not required in the tracing of a traitor, or providing a proof for
the judge (this is done by the merchant). They also proposed the first unconditionally secure scheme which uses polynomials over finite fields. However in
this scheme merchant cannot trace the traitor and the tracing is performed by
the arbiter. Moreover the scheme can be subjected to an extension of the attack
pointed out by Stinson and Wei [8]. Details of this attack is omitted because of
space limitation.
In our model of asymmetric traceability there is a set of publicly known
codewords that is used for fingerprinting objects. The merchant chooses the
codeword to be inserted into an object, but only inserts part of it. The scheme
consists of three procedures.
Fingerprinting is performed in two steps, starting with the merchant and
then completed by the arbiter.
First, the merchant chooses a fingerprint B and then inserts his partial
fingerprint B|M in the object O to produce OB|M . Merchant then gives
(OB|M , M, B|M , B) to the arbiter, who verifies that the object OB|M has
fingerprint B|M inserted in positions given by M . Then he inserts the rest
of the fingerprint to produce OB which is the fingerprinted object which will
be given directly to the buyer without merchant being able to access it. Both

A Combinatorial Approach to Asymmetric Traitor Tracing

419

the merchant and the arbiter store buyer B identification information in a


secure database.
Tracing is performed by the merchant. If the merchant finds a pirate copy
of the object, it extracts his embedded fingerprint F |M and identifies one of
the traitors using his information of partial fingerprints.
Arbitration is required if merchants accusation is not acceptable by the
accused buyer. In this case the merchant presents OF and the partial fingerprint Bj |M that identifies the buyer Bj . The accused buyer shows his ID.
The arbiter will use his arbitration rule which either verifies the merchants
claims, if merchant had honestly followed his tracing algorithm and the accused buyer is a correct output of this algorithm, or reject his accusation.
In this paper we describe a model for unconditionally secure asymmetric
traitor tracing schemes. We describe asymmetric traceability as a set system and
give two constructions based on polynomials over finite fields and orthogonal
arrays.
The paper organisation is as follows. In Section 2 we introduce the model. In
Section 3 we give a necessary and sufficient condition for existence of asymmetric
traceability scheme. In section 4 we show two constructions and in Section 5
conclude the paper.

Model

Suppose there are n buyers labelled by B1 , B2 , , Bn . Hamming weight of a


binary vector is the number of non-zero components of the vector. A buyer Bi has
a fingerprint which is a binary vector of length ` and fixed Hamming weight w,
Bi = (xi1 , xi2 , , xi` ) that will be embedded in ` positions P = {p1 , p2 , , p` }
of the object O. The collection of all such vectors define the fingerprint code.
The code is public but the assignment of the codewords to the buyers is secret.
A legal copy of the object O has a fingerprint belonging to the fingerprint code.
The position set is fixed, and for a user Bi the mark xij will be inserted in
position pj of the object. By restriction of a vector B to M P , denoted by
B|M , we mean the vector obtained by deleting all components of B, except those
in M . By intersection of two vectors Bi and Bj , denoted by Bi Bj , we mean
the binary `-vector having a 1 in all positions where Bi and Bj are both 1, and
0 in all other positions. We use |B| to denote the Hamming weight (number of
ones) of B.
The full set of embedding positions P is only known to the arbiter. There is a
subset M P of the positions known by the merchant. A buyers fingerprint B
includes two parts B|M and B|A . We assume that |B|M | = w1 for all buyers. For
a buyer, the merchant chooses the fingerprint B to be inserted into the object.
For a subset C = {i1 , i2 , , ic } {1, 2, , n} a position pj is said to be
undetectable if i1 , i2 , , ic have the same mark on that position. Let U be the
set of undetectable mark positions for C, then we define the feasible set of C as
F (C) = {B {0, 1}` : B|U = Bik |U , for some Bik C}.

420

Reihaneh Safavi-Naini and Yejing Wang

Let F denote a pirate fingerprint. We say F is produced by a collusion C if


F F (C).
Attacks
1. Colluding groups of buyers creating an illegal object: The colluding users C
use their fingerprinted objects OBi1 , , OBic to create a pirate object OF
where F F (C).
2. Merchants framing of a user: the merchant uses his knowledge of the system,
that is the code and the codeword he has allocated to the buyer B , to
construct another object fingerprinted with buyer Bs fingerprint.
It is important to note that we do not allow merchant to use a pirate copy,
OF in the framing attack. Such an attack would imply collusion of merchant
and buyers which is not considered in our attack model.
We will use the following tracing algorithm and arbitration rule for the merchant and the arbiter, respectively.
Merchants tracing algorithm
If the merchant captures a fingerprinted object OF , he can obtain F |M which
is the part of fingerprint embedded by him. Then for all i, 1 i n, merchant
calculates |(F Bi )M |, and accuses Bj whose allocated fingerprint restricted to
M , has the largest intersection with F . That is it satisfies:
|(F Bj )|M = max1in |(F Bi )|M
Arbitration rule
If an accused user Bj does not accept the accusation, the arbiter will be
called.
The merchant will provide the captured object, OF , the accused buyers
fingerprint Bj |M , and the accused buyers identity. The arbiter will (i) extract the
fingerprint F from OF ; (ii) find the number aF ; and (iii) accepts the accusation
if aF |F Bj | s, and rejects otherwise.
Here the number s is a fixed predetermined threshold parameter of the system
and aF is a number depending on the pirate word F .
Now we can formally define an asymmetric c-traceability scheme.
Definition 1. An asymmetric c-traceability scheme is a binary fingerprinting
code which has the following properties.
1. The merchant tracing algorithm can always find a traitor in any collusion
group of up to c colluders. That is the accused buyer Bj by the merchants
tracing algorithm is a member of the collusion C whenever a pirate fingerprint F is produced by C with size |C| c;
2. If the merchant correctly follows the tracing algorithm, his accusation will
always be accepted by the arbiter; and
3. If the merchant accuses an innocent buyer, the arbiter always reject his accusation.

A Combinatorial Approach to Asymmetric Traitor Tracing

421

The above definition implies that if a merchant accuses a traitor only based
on his suspicion and not by following the algorithm, the arbiter may accept
or reject his accusation. That is merchants correct application of his tracing
algorithm will serve as a proof for the arbiter.

A Combinatorial Approach

Stinson and Wei gave a combinatorial description of symmetric traceability


schemes. In symmetric schemes, the merchant is assumed honest and there is
no need for arbitration. The merchant embeds the fingerprints (codewords) in
each object and can trace a traitor if a pirate copy is found. The tracing algorithm is similar to the one in section 2 but now the algorithm uses the whole
codeword and not the part restricted to the merchant. An asymmetric scheme
restricted to positions M will reduce to a symmetric scheme.
For a pirate word F , Bj is called an exposed user if
|(F Bj )|M = max1in |(F Bi )|M .
Stinson and Wei (see [7], Definition 1.2) defined a symmetric c-traceability
scheme as follows.
Consider a set X = {x1 , x2 , , x` }, and a family B of subsets of X. A set
system (X, B) is a c-traceability if (i) |B| = w and (ii) whenever a pirate decoder
F is produced by C and |C| c, then any exposed user U is a member of the
coalition C.
The following theorem characterises symmetric c-traceability schemes as set
systems satisfying special properties.
Theorem 1. ([7]) There exists a c-traceability scheme if and only if there exists
a set system (X, B) such that |B| = w for every B B, with the following
property
for any d c blocks B1 , B2 , , Bd B and for any w-subset
S
F dj=1 Bj , there does not exist a block
B B \ {B1 , B2 , , Bd } such that |F Bj | |F B|
for 1 j d.

(1)

Note that in this theorem it is assumed that |F | = w for every pirate decoder
F . It is not difficult to show that this theorem is also true after relaxing the
assumption on F .
Theorem 2. There exists a (symmetric) c-traceability scheme if and only if
there exists a set system (X, B) such that |B| = w for every B B, with the
following property
for any d c blocks B1 , B2 , , Bd B and for any subset F
Sd
such that F j=1 Bj , there does not exist a block
B B \ {B1 , B2 , , Bd } such that |F Bj | |F B|
for 1 j d.

(2)

422

Reihaneh Safavi-Naini and Yejing Wang

We present the following theorem which characterises asymmetric schemes in


terms of set systems with special properties. The proof is omitted due to space
limitation.
Theorem 3. There exists an asymmetric c-traceability scheme if and only if
there exists a set system (X, B) with |B| = w for all B B, and a number s that
satisfy the following properties:
1. There exists a non-emptyset M X such that 0 < |B M | = w1 < w for
all B B, and for the set system (M, BM ), obtained by restricting (X, B) to
M , property (2) in theorem 2 holds;
Sd
Td
2. For every F , where i=1 Bi F i=1 Bi for some choice of B1 , , Bd
B and d c, there exists a number aF > 0 such that
|B F | < aF s |Bj F |, for all B B \ {B1 , B2 , , Bd },

(3)

where
|F Bj M | = max |F B M |.
BB

From theorem 3 it follows that both the fingerprinting code and the sub-code
inserted by the merchant are (symmetric) c-traceability schemes, and buyers
collusions are tracable.

Constructions

In this section we will construct asymmetric traceability schemes assuming the


weight of any pirate fingerprint is at least w. In symmetric traceability schemes
in [7], the weight of pirate fingerprint is exactly w.
First we give sufficient conditions for a set system to satisfy conditions of
theorem 3 and hence can be used to construct an asymmetric c-traceability
scheme.
Theorem 4. Suppose there exists a set system (X, B) and three positive integers
c, and s such that,
1. For any B B, |B| = w > c2 + 2cs;
2. For any pair Bi , Bj B, |Bi Bj | ;
3. There exists a subset X1 X such that 0 < |X1 B| = s for any B B.
Then there exists an asymmetric c-traceability scheme.
Proof. Let M = X \ X1 . Since |B| = w and |X1 B| = s, then for any B B,
|B M | = w s > c2 + (2c 1)s > c2 .
Also for any pair Bi , Bj B,
|Bi Bj M | |Bi Bj | .

A Combinatorial Approach to Asymmetric Traitor Tracing

423

Therefore using Lemma 61 of [8] the system (M, BM ) forms a symmetric ctraceability scheme. Hence condition 1 of theorem 3 is satisfied.
Now suppose
P F B1 B2 Bd and d c. Assume |F | w. Let xi =
|Bi F |. Then i xi w and so maxi {xi } w/c = c+2s. Let aF = maxi {xi }.
For any B B \ {B1 , B2 , , Bd } we have
aF |B F | > c + 2s |B (di=1 Bi )| = c + 2s | di=1 (B Bi )|
c + 2s c = 2s.

(4)

Now let Bj B be such that


|(Bj F )M | = max |(B F )M |.
BB

Noting that
|Bj0 F ||Bj F | = (|(Bj F )M ||(Bj0 F )M |)+(|(Bj0 F )X1 ||(Bj F )X1 |),
and
|(Bj F )M | |(Bj0 F )M | |(Bj0 F )X1 | |(Bj F )X1 | s.
We have
aF |Bj F | 2s.

(5)

From (4) and (5) we know that for any B B \ {B1 , B2 , , Bd },


|B F | < aF 2s |Bj F |,
and so condition 2 of theorem 3 is satisfied.
In the following we will construct two set systems satisfying conditions of
theorem 4, and hence resulting in asymmetric traceability schemes.
4.1

Construction 1

Theorem 5. There exists an asymmetric c-traceability scheme with


p
(q t) + (q t)2 + tq
c.
c=b
t
Proof. Let Fq be a field of q elements, t < q 1 be a positive integer, and X be
the set of all points {(x, y) : x, y Fq }. For a polynomial at xt + + a1 x + a0 ,
ai Fq , 0 i t and at 6= 0, define a block B X as
B = {(x, y) X : y = at xt + + a1 x + a0 }.
Let B be the family of all blocks defined as above. Then for any B B, |B| = q.
Since any set of t + 1 points (x1 , y1 ), (x2 , y2 ), , (xt+1 , yt+1 ) X is in at most
one block, therefore |B B 0 | t for every pair of B, B 0 B.

424

Reihaneh Safavi-Naini and Yejing Wang

Now fix s elements x1 , x2 , , xs Fq , where s q t. Let X1 = {(xi , y) :


1 i s, y Fq }. For any block B B we have |X1 B| = s. So if q >
c2 t + 2cs, (X, B) satisfies conditions of theorem 4. Since q > c2 t + 2cs implies
q > c2 t + 2c(q t), we have
p
p
(q t) + (q t)2 + tq
2(q t) + 4(q t)2 + 4tq
c=b
c,
c=b
2t
t
and the theorem is proved.
4.2

Construction 2

The second construction is based on orthogonal arrays. The following definition


and theorem on the existence of orthogonal arrays can be found in [3].
Definition 2. An orthogonal array OA(t, k, v) is a k v t array with entries
from a set of v 2 symbols, such that in any t rows, every t 1 column vector
appears exactly once.
Theorem 6. Let q be a prime power, and t < q be an integer. Then there exists
an OA(t, q + 1, q).
The following theorem gives the second construction.
Theorem 7. Let q be a prime power, t, s be integers such that 1< s < t < q.
s+ s2+(t1)(q+1)
c.
Then there exists an asymmetric c-traceability scheme with c = b
t1
Proof. Let A be an OA(t, q + 1, q). Let X = {(x, y) : 1 x k, 1 y v},
B be the family of all B = {(1, y1 ), (2, y2 ), , (k, yk )} where (y1 , y2 , , yk )T
is a column of A. Now consider the set system (X, B). We have |B| = k for
every B B, and |Bi Bj | t 1 for every pair of Bi , Bj B. This latter
is true because every t-tuple (y1 , y2 , , yt )T appears once in a given t rows of
the orthogonal array. Let s be an integer such that 1 < s < t. Define X1 =
{(x, y) : k s + 1 x k, 1 y v}. Then |X1 B| > 0 for every B B. Also
|X1 B| = s for every B B. If q + 1 > c2 (t 1) + 2cs, we obtain a set system
(X, B), satisfying conditions of theorem
4. Therefore there exists an asymmetric
c-traceability scheme with c = b

s+

s2 +(t1)(q+1)
c.
t1

Conclusions

In this paper we propose a model for unconditionally secure asymmetric traceability scheme in which the merchant can independently trace a traitor and as
long as he correctly follows the tracing algorithm, his decision will also be approved by the arbiter. The system ensures that an innocent buyer can neither
be framed nor accused unlawfully by the merchant. In the latter case merchants
accusation will always be rejected by the arbiter. We gave a characterisation of
asymmetric traceable system in terms of set systems and constructed two classes
of such systems.

A Combinatorial Approach to Asymmetric Traitor Tracing

425

References
1. D. Boneh and J. Shaw. Collusion-secure fingerprinting for digital data. In Advanced in Cryptology - CRYPTO95, Lecture Notes in Computer Science, volume
963, pages 453-465. Springer-Velag, Berlin, Heidelberg, New York, 1995
2. B. Chor, A. Fiat, and M Naor. Tracing traitors In Advanced in Cryptology CRYPTO94, Lecture Notes in Computer Science, volume 839, pages 257-270.
Springer-Velag, Berlin, Heidelberg, New York, 1994
3. C. J. Collbourn and J. H. Dinitz Eds. CRC Handbook of Combinatorial Designs.
CRC Press, 1996.
4. K. Kurosawa and Y. Desmedt. Optimum traitor tracing and asymmetric schemes.
In Advanced in Cryptology - EUROCRYPT98, Lecture Notes in Computer Science, volume 1462, pages 502-517. Springer-Velag, Berlin, Heidelberg, New York,
1998
5. B. Pfitzmann and M. Schunter. Asymmetric fingerprinting. In Advanced in Cryptology - EUROCRYPT96, Lecture Notes in Computer Science, volume 1070,
pages 84-95. Springer-Velag, Berlin, Heidelberg, New York, 1996
6. B. Pfitzmann and M. Waidner. Asymmetric fingerprinting for large collusions. In
proceedings of 4th ACM conference on computer and communications security,
pages 151-160, 1997.
7. D. Stinson and R. Wei. Combinatorial properties and constructions of traceability
schemes and framproof codes. SIAM Journal on Discrete Mathematics, 11:41-53,
1998.
8. D. Stinson and R. Wei. Key preassigning traceability schemes for broadcast encryption. In Proceedings of SAC98, Lecture Notes in Computer Science, volume
1556, pages 144-156. Springer-Velag, Berlin, Heidelberg, New York, 1999

Removing Complexity Assumptions


from Concurrent Zero-Knowledge Proofs?
(Extended Abstract)
Giovanni Di Crescenzo
Telcordia Technologies Inc., 445 South Street, Morristown, NJ, 07960.
[email protected]

Abstract. Zero-knowledge proofs are a powerful tool for the construction of several types of cryptographic protocols. Recently, motivated by
practical considerations, such protocols have been investigated in a concurrent and asynchronous distributed model, where protocols have been
proposed relying on various synchronization assumptions and unproven
complexity assumptions.
In this paper we present the first constructions of proof systems that are
concurrent zero-knowledge without relying on unproven complexity assumptions. Our techniques transform a non-concurrent zero-knowledge
protocol into a concurrent zero-knowledge one. They apply to large
classes of languages and preserve the type of zero-knowledge: if the original protocol is computational, statistical or perfect zero-knowledge, then
so is the transformed one.

Introduction

The notion of zero-knowledge (zk) proof systems was introduced in the seminal
paper of Goldwasser, Micali and Rackoff [13]. Using a zk proof system, a prover
can prove to a verifier that a certain string x is in a language L without revealing
any additional information that the verifier could not compute alone. Since their
introduction, zk proofs have proven to be very useful as a building block in
the construction of several cryptographic protocols, as identification schemes,
private function evaluation, electronic cash schemes and election schemes. Due
to their importance, considerable attention has been given to the study of which
adversarial settings and complexity assumptions are necessary for implementing
zk protocols, the ultimate goal being that of achieving the most adversarial
possible setting together with the minimal possible assumptions or none at all.
Complexity assumptions for zk proofs. Computational zk proofs were
shown to be constructible first for all languages in NP [12] and then for all
languages having an interactive proof system [1,14]. These proofs have interesting generality features but rely on unproven complexity assumptions, such as the
existence of one-way functions. Perfect zk proofs, instead, require no unproven
?

Copyright 2000, Telcordia Technologies, Inc. All Rights Reserved.

D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 426435, 2000.
c Springer-Verlag Berlin Heidelberg 2000

Removing Complexity Assumptions from Concurrent Zero-Knowledge Proofs

427

complexity assumption; it is known that they cannot be given for all languages
in NP, unless the polynomial time hierarchy collapses [4,11]. These proofs seem
to capture the intrinsic notion of zk and are notoriously harder to achieve; only
a class of random self-reducible languages [13,12,17] and formula composition
over them [6] are known to have perfect zk proofs. We also note that perfect zk
proofs are the ones used in practical applications, because of their efficiency.
Settings for zk proofs: concurrent zk. Recently, a lot of attention has been
paid to the setting where many concurrent executions of the same protocol take
place, capturing practical scenarios as, for instance, the Internet. Here the zk
property is much harder to achieve since an adversary can corrupt many verifiers
that are executing protocols with different provers. Constructions of concurrent
zk protocols in such a setting have been given in [2,9,10,16,7], relying on unproven
complexity assumptions and various synchronization assumptions. A negative
result on the possibility of obtaining small round complexity in this setting was
showed in [15].
Our results. In this paper we present the first protocols (i.e., proof systems or
arguments) that are proved to be concurrent zk without using unproven complexity assumptions. Our techniques transform a non-concurrent zk protocol to
a concurrent one by preserving the type of zk: if the original protocol is computational or perfect zk then so is the resulting protocol. We present two techniques,
the first being applicable to a larger class of languages but making stronger
synchronization assumptions than the second. We note that the synchronization
assumptions of our protocols are probably stronger than those made previously
in the literature. However we believe that our techniques provide a crucial step
towards the construction of concurrent zk proofs in the asynchronous model
without complexity assumption, an important open question, and probably the
ultimate in the area.
In the asynchronous model, we show some relationship between the problem
of obtaining concurrent zk proofs and the well studied problem of reducing the
soundness error of non-concurrent zk proofs. This relationship allows to derive,
under some assumptions, lower bounds on the round complexity of concurrent
zk proofs, and gives some evidence of round-optimality of our techniques.
Formal descriptions of protocols and proofs are omitted for lack of space.

Definitions

We present all definitions of interest: interactive protocols and interactive proof


systems (introduced in [13]), zk proof systems in the two-party model (introduced in [13]), and in various multi-party models, in order of increasing generality: a so-called strongly-synchronous model (firstly considered in this paper),
a so-called weakly-synchronous model (firstly considered in this paper), and the
asynchronous model (introduced in [9]).
Interactive protocols and proof systems. An interactive Turing machine
is a Turing machine with a public input tape, a public communication tape, a

428

Giovanni Di Crescenzo

private random tape and a private work tape. An interactive protocol (A,B) is
a pair of interactive Turing machines A,B sharing their public input tape and
communication tape. An interactive protocol = (A, B) is an interactive proof
system with soundness parameter k for the language L if B runs in polynomial
time and the following two requirements are satisfied: completeness, stating that
for any input x L, at the end of the interaction between A and B, B accepts
with probability at least 1 2|x| , and soundness, stating that for any input
x 6 L, and any algorithm A0 , the probability that, at the end of the interaction
between A0 and B, B accepts is at most 2k . We say that an interactive proof
system is public-coin if the messages of the verifier only consist of uniformly
chosen bits.
Zk proof systems. We define zk proof systems in various settings, under a
unified framework. Informally, a zk proof system for a language L in a certain
setting is an interactive proof system for L such that any efficient adversary cannot use his power in this setting to gain any information from his view that he
did not know before running the protocol. An efficient adversary is modeled as
a probabilistic polynomial time algorithm. The concept of gaining no information not known before the protocol is modeled using the simulation notion put
forward in [13]. The specification of the power of the adversary and of his view,
given below, depend on the specific setting. In the two-party setting a prover
and a verifier are intended to run a protocol for proving that x L, for some
language L and some common input x. In the multi-party settings we consider
a set of provers P = {P1 , . . . , Pq } and a set of verifiers V = {V1 , . . . , Vq }, such
that for i = 1, . . . , q, prover Pi and verifier Vi are intended to run a protocol (for
simplicity, the same protocol) for proving that xi L, for some language L and
some input xi common to Pi and Vi .
Two-party setting. In this setting the adversarys power consists of corrupting a
single verifier; namely, the adversary can impersonate such verifier and therefore
use his randomness and send and receive messages on his behalf.
Multi-party strongly-synchronous setting. Here the adversarys power consists of
corrupting up to all verifiers V1 , . . . , Vq ; namely, the adversary can impersonate
all such verifiers and therefore use their randomness and send and receive messages on their behalf. In fact, we can assume wlog that he always corrupts all of
them. In this setting there exists a global clock and the time measured by such
clock is available to all provers, to all verifiers and to the adversary. No matter
what the adversary does, however, each message takes at most a certain fixed
amount of time, denoted as d, in order to arrive to its receiver, where the value d
is known to all parties. The adversary is allowed to start any of the q executions
at any time (i.e., not necessarily the same time); however, the number q of pairs
of parties is known to all parties and cannot be changed by the adversary.
Multi-party weakly-synchronous setting. As in the previous setting, in this setting
there is a global clock, the adversary can corrupt up to all verifiers and he is
allowed to start any of the q executions at any time (i.e., not necessarily the
same time). Contrarily to the previous setting, here there is no fixed amount of
time delay d that a message can take to arrive to its destination (for instance, d

Removing Complexity Assumptions from Concurrent Zero-Knowledge Proofs

429

could depend on the number of messages currently sent in the system); however,
we assume that at any time d is the same for all messages. Here, for instance, the
adversary could at any time modify d to his advantage. Also, the absolute time
measured by the global clock does not need to be available to all parties. Still,
each party can measure relative time according to such clock (i.e., can measure
whether d seconds have passed since the end of some other event).
Multi-party asynchronous setting. As in the previous two settings, in this setting
the adversary can corrupt up to all verifiers; namely, the adversary can impersonate all such verifiers, use their randomness and send and receive messages on
their behalf; moreover, the adversary is allowed to start any of the q executions
at any time (i.e., not necessarily the same time). As in the weakly-synchronous
setting, the global clock is not available to all parties in the system, and there is
no fixed bound on the amount of time that each message takes in order to arrive
to its receiver. However, contrarily to the previous two settings, the local clock of
each party can measure time and at a rate possibly different from that of another
party. This can be used by the adversary to arbitrarily delay the messages sent
by the various verifiers that he is impersonating, and eventually create arbitrary
interleavings between the concurrent executions of a certain protocol. Moreover,
in this setting the number q of pairs of parties is not fixed in advance; therefore,
the adversary can generate any polynomial number (on the size of the inputs)
of executions of the same protocol.
We call the adversary in model X the X model adversary and his view, including
all public inputs and all verifiers random and communication tapes, the X model
adversarys view. We are now ready to define zk proof systems in each of the
above settings. We note that there exist three notions of zk: computational,
statistical and perfect, in order of increasing strength. Here, we define the third
one (although our results hold for all three).
Definition 1. Let X { two-party, multi-party strongly-synchronous, multiparty weakly-synchronous, and asynchronous }, let 1n be a security parameter,
let q be a polynomial and let = (A, B) be an interactive proof system with
soundness parameter k for the language L. We say that is q-concurrent perfect zk in model X if for all X model probabilistic polynomial time adversaries
A, there exists an efficient algorithm SA , called the simulator, such that for
all x1 , . . . , xq(n) L, where |x1 | = = |xq(n) | = n, the two distributions
SA (x1 ,. . ., xq(n) ) and V iewA (x1 ,. . ., xq(n) ) are equal, where V iewA (x1 ,. . ., xq(n) )
is the X model adversarys view.
Remarks. Variants of synchronous and asynchronous distributed models are
being widely investigated in the research field of Distributed Computing; our
approach of investigating these models was partially inspired by the research in
this field as well. Among all these models, the most adversarial scenario is in
the asynchronous model; the models considered in [2,9,10,16,7] all make some
synchronization assumptions, our weakly-synchronous and strongly-synchronous
models make probably more restricting synchronization assumptions (the first

430

Giovanni Di Crescenzo

being less restricting than the second). Note that a protocol that is zk in a certain
model is also zk in a model with stronger synchronization assumptions.

Concurrent Zk vs. Soundness Error Reduction

We show a relationship between the following two problems: (1) transforming


a two-party zk proof system into a concurrent zk proof system in the stronglysynchronous model, and (2) reducing the soundness error of a two-party zk proof
system. The latter problem, widely studied in the theory of interactive proofs
and zk proofs, asks whether, given a zk proof system with soundness parameter k1 , it is possible to construct a zk proof system for the same language with
soundness parameter k2 , for k2 > k1 (so that the error 2k1 decreases to 2k2 ).
Known techniques for such reductions are: sequential and parallel composition
(namely, repeating the original protocol several times in series or in parallel, respectively). Note that these techniques use no unproven complexity assumption.
Other techniques in the literature are for specific languages and use algebraic
properties of such languages, or unproven complexity assumptions. Informally,
our result says that a solution to problem (1) provides a solution to problem (2),
and relates the round complexity of the transformations.
Theorem 1. Let k, n, q be integers > 1 and let be a q-concurrent zk proof
system for language L in the asynchronous model and with soundness parameter
k. Then there exists (constructively) a two-party zk proof system 0 for L and
with soundness parameter k such that the following holds. If the number of
rounds of is r(n, k, q), where n is the size of the common inputs, then the
number of rounds of 0 is r0 = r(n, 1, k).
In the proof, protocol 0 runs k parallel executions of , each using the same input
x, and each using 1 as soundness parameter. One application of this result is that
any procedure for transforming a proof system that is two-party zk into one that
is zk even in the strongly-synchronous model gives a procedure for reducing the
soundness error of two-party zk proof systems. Another application is that if
a round-optimal procedure for reducing the soundness error of a two-party zk
proof systems is known then one obtains a lower bound on the round complexity
of any zk proof system in the asynchronous model for the same language. For
a large class of protocols [6,8], the most round-efficient technique (assuming
no unproven complexity assumptions or algebraic properties of the language are
used) to reduce the error from 1 to k consists of (k/ log k) sequential repetitions
of (log k) parallel repetition of the atomic protocol with soundness parameter
1. As a corollary of Theorem 1, we obtain that by further assuming that such
procedure is round-optimal then for such languages we obtain that any proof
system with soundness parameter 1, and that is q-concurrent zk (even) in the
strongly-synchronous model, must have round-complexity at least (q/ log q).
Conversely, a more round-efficient zk protocol in the asynchronous model would
give a better soundness error reduction procedure in the two-party model. These
arguments can be extended so that they apply to the two concurrent zk protocols
that we will present in Section 4 and 5.

Removing Complexity Assumptions from Concurrent Zero-Knowledge Proofs

431

A Protocol for the Strongly Synchronous Model

In this section we present a technique for constructing concurrent zk proof systems in the strongly synchronous model. The technique consists of transforming,
in this setting, a protocol that is two-party zk and satisfies a certain special property into a protocol that is concurrent zk. We stress that this result does not
use any unproven complexity assumption and preserves the type of zk of the
original proof system. We define CL1 as the class of languages having a twoparty zk proof system for which there exists an efficient simulator S running
in time cq(n) t(n), for some constant c, some polynomial t, and on inputs of
length n. Note that a language in CL1 is (log n)-concurrent zk but not necessarily poly(n)-concurrent zk. We remark that class CL1 contains essentially all
languages of interest. In particular, we do not know of a language that has been
given a two-party zk proof system in the literature and does not belong to it.
Theorem 2. Let L be a language belonging to class CL1 and let be the
two-party zk proof system associated with it. Also, let q be a polynomial. Then
L has a (q(n))-concurrent zk proof system 0 for L in the strongly-synchronous
model, where n is the length of the inputs. Moreover, if is computational,
statistical, or perfect zk then so is 0 .
The rest of this section is devoted to the proof of Theorem 2.
Description of the technique. Assume for simplicity that the protocol 0
starts at time 0. Let = (A,B) be the two-party zk proof system associated with
language L, let r be the number of rounds of , let q, k be the desired concurrency
and soundness parameters for 0 , respectively, and let z = dq(n)/(log q(n) +
log k)e. Also, let d be the bound on the time that a message takes to arrive to
its recipient, and let tmi be time marks, such that tmi = i (2dr), for all positive
integers i. We construct a protocol 0 =(P,V), as follows. On input the n-bit
string x, P uniformly chooses an integer w {1, . . . , z} and starts executing ,
by running As program, on input x, at the time step corresponding to the w-th
time mark following the current time (i.e., if the current time is t, P will start
protocol when the current time is (bt/2drc + w) (2dr)). V checks that the
execution of protocol on input x was accepting by running Bs program.
Properties of protocol 0 . We stress that protocol 0 assumes that party P
knows the current time measured by the global clock (for instance, P needs to
check the value of the current time). Here we need the assumption that the global
time is available to all parties, and this is one reason for which this technique does
not seem to directly extend to the weakly synchronous model. The completeness
and soundness of the protocol 0 directly follow from the analogue properties of
. The simulator S 0 for 0 consists of running Ps program when choosing the
time marks, and then simulator S for when simulating all concurrent proofs
within each time mark. It is not hard to show that the quality of the simulation
of S is preserved by S 0 . In order to show that S 0 runs in expected polynomial
time, we observe that the execution of S 0 is analogous to a variant of a classical
occupancy game of randomly tossing balls into bins, and analyze this game.

432

Giovanni Di Crescenzo

A balls-into-bins game. Let n be an integer, q be a polynomial, and wt :


N N be a penalty function; also, assume an adversary sequentially scans
a possibly infinite sequence of bins. The adversary is able to choose q(n) bins
sbin1 , . . . , sbinq(n) in an adaptive way (namely, the choice being possibly dependent on the history of the game so far). Each time bin sbini is chosen by
the adversary, a ball is tossed into one out of the z bins immediately following
bin sbini , which bin being chosen uniformly and independently from all previous
in bin j, we have
random choices. Now, denoting by nballj be the number of ballsP
that the goal of the adversary is to maximize the value val = j1 wt(nballj ),
while our goal is to show that for any adversary, val is poly(n). In our analysis, we will only need to consider the case in which wt is set equal to a specific
function obtained from our simulation process.
Equivalence between game and simulation. The equivalence between the
above described game and the simulation process comes from the following associations: each bin is a time area between any two time marks; each ball is
a concurrent execution of protocol ; the action of tossing a ball into a uniformly chosen bin is equivalent to Ps action of setting a begin time for the
next execution of protocol ; the penalty function wt, when evaluated on nballj ,
corresponds to the expected running time taken by S 0 in order to simulate the
nballj concurrent executions of starting at the j-th time mark. Moreover, we
observe that by our construction all executions of have to start at some time
mark; and that by our choice of the time distance between any two consecutive
time marks, each execution of is concluded within the same time area (namely,
before the next time mark). Therefore the entire simulation process can be seen
as a sequence of steps, each simulating a single time area. This implies that the
expected simulation time can be written as the sum of the values of the penalty
function at values nballj , for all j.
Analysis of the game. From the definition of function wt, we derive that:
(1) wt(0) = 0; (2) wt(d) cd t(n), for any d, for some constant c, and some
polynomial t. Specifically, (1) follows from the fact that no time is spent to
simulate a time area containing no execution of to be simulated and (2) follows
from our original assumptions on protocol . Note that during the duration of
the game at most q(n) balls are ever tossed, and each of them can land in one out
of at most z = dq(n)/(log q(n)+ log k)e bins. This, together with (1) and the fact
that q is a polynomial, implies that there are at most a polynomial number of
terms wt(d) contributing a non-zero factor to the value val. Therefore, in order
to show that val is bounded by a polynomial in n, it is enough to show that for
each nballj 6= 0, it holds that wt(nballj ) is bounded by a polynomial in n. To
this purpose, let us set z0 = 1 + 3c(dlog q(n) + log ke), fix a bin number j and
denote by Ed , for any natural number d, the event that nballj = d, and, finally,
by E the event that one of E1 , . . . , Ez0 1 happens. Then it holds that val is
!
z
X
3c2
d
q(n)t(n)

Prob [E ] (k q(n))

Prob [Ed ] c

d=z0

poly(kn)+


d 
z 
X
log q(n) + log k
q(n)
d=z0

q(n)

log q(n) + log k


q(n)

q(n)d
cd t(n)

Removing Complexity Assumptions from Concurrent Zero-Knowledge Proofs

poly(kn) +

d 
d
q(n) 
X
3q(n)
log q(n) + log k
d=z0

q(n)

433

cd t(n)

poly(kn) + t(n) q(n) = poly(kn),

where the first inequality follows from (1) and (2) above, and the second from
the expression of the distribution of the number of balls into a bin.

A Protocol for a Weakly Synchronous Model

In this section we present a concurrent zk proof system in a weakly synchronous


model for a large class of languages. This result does not make any unproven
complexity assumption and preserves the type of zk of the original proof system.
We define CL2 as the class of languages having a two-party zk proof system
for which completeness holds with probability 1, soundness with probability
at most 1/2 + (n), for a negligible function , and with the following property.
There exists a prover A0 , called the lucky prover, such that: (1) A0 runs in
polynomial time; (2) A0 makes B accept with probability exactly equal to 1/2
for any input x (i.e., in L or not); (3) for any probabilistic polynomial time B 0 ,
the transcript generated by the original prover A when interacting with B 0 and
the transcript generated by the lucky prover A0 when interacting with B 0 , are
equally distributed whenever the latter transcript is accepting and x L. We
note that all languages having a 3-round public-coin two-party perfect zk proof
system belong to CL2. Also, all languages in NP (using the computational zk
proof system in [3]) and all languages having an interactive proof system (using
the computational zk proof system in [14]) belong to CL2.
Theorem 3. Let L be a language belonging to class CL2 and let be the twoparty zk proof system associated with L. Also, let q be a polynomial. Then
L has a (q(n))-concurrent zk proof system 0 in the weakly-synchronous model,
where n is the length of the inputs. Moreover, if is computational, statistical,
or perfect zk then so is 0 .
Note that the result in Theorem 3 is uncomparable with the result in Theorem 2.
While in the former the assumptions on the synchronicity of the model is weaker,
in the latter the class of languages to which it applies is larger. The rest of this
section is devoted to the proof of Theorem 3.
Description of the technique. A first step in the construction of our proof
system 0 =(P,V) consists of performing some modified sequential composition
of the proof system =(A,B); specifically, a composition in which P runs the
program of the associated lucky prover A0 and V uses algorithm B to verify that
only one of the proofs is accepting (rather than all of them). More precisely, we
would like to repeat these executions until P finally gives a proof (using the lucky
prover) that is accepting. However note that we cannot repeat these executions
too many times otherwise a cheating prover could have a too high chance of
completing at least one of the several executions in which he was running the

434

Giovanni Di Crescenzo

lucky prover. Therefore, we need to guarantee a final execution of on which


P cannot delay his accepting proof any further. Specifically, the final execution
will be the (log q(n))-th execution, where q(n) is the max number of concurrent
executions of the protocol that the adversary can generate, and k is the desired
soundness parameter. In this final execution P runs algorithm A and V runs
algorithm B. Let us call 00 the protocol thus obtained; protocol 0 is obtained
by running kq(n) sequential executions of 00 .
Properties of protocol 0 . Contrarily to the protocol in Section 4, the prover
and the verifier of the protocol 0 in this section do not use any information
about the current time or about the value of the delay that a message takes to
go from its sender to its receiver. For the proof of the zk requirement, however, we
assume that at any time such delay is the same for all messages. We observe that
the completeness property of 0 directly follows from the analogue property of
. Moreover, the soundness property is proved as follows. Since has soundness
parameter 1, the probability that a prover is able to compute an accepting
proof in 00 is 1 2 log q(n) 1 1/q(n). Since the number of independent
executions of 00 in 0 is kq(n), for any prover, the verifier accepts with probability
(11/q(n))kq(n) ek , and therefore the soundness parameter of 0 is at least
k. In the rest of the section we prove that the requirement of concurrent zk is
satisfied by 0 . The construction of the simulator S 0 consists of almost always
running the same program that is run by the prover. Specifically, in order to
simulate the first log q(n)1 executions of in each iterations of 0 , the simulator
S 0 can just run the program of the prover P, since it requires only polynomial
time (recall that the prover P is running the lucky prover associated with ,
which runs in polynomial time). The only difficulty arises when the simulator
has to simulate the (log q(n))-th execution of inside a certain iteration of 0 .
Note that in this case in a real execution of 0 the prover always provides an
accepting proof. Here the strategy of the simulator S 0 will be that of repeatedly
rewinding the adversary A up to the time right before the beginning of this
particular execution, until, using the lucky prover again, S 0 is able to produce
an accepting proof for all concurrent executions of . Note that properties (1)
and (3) in the definition of lucky prover imply that the simulation is perfect. In
order to prove that S 0 runs in expected polynomial time, first observe that the
only executions that may ever cause S 0 to rewind are those corresponding to a
final execution of a certain iteration; then, observe that the expected number of
concurrent executions of one iteration of 0 that will ever have to run the final
execution of is, in fact, very small. Therefore, since the lucky prover can be
run in polynomial time, we only need to show that the expected time of the
simulation of all final executions in a single iteration is polynomial. To see this,
observe that this expected running time is

q(n) 
d 
q(n)d
X

d=1

q(n)
d

1
2log q(n)1

d 
q(n) 
X
3q(n)

2log q(n)1

d=1

d

1
2log q(n)1

2d

2d (q(n)),

where the first inequality is obtained as the probability that in d executions


of 0 a final execution of is run, times the expected time 2d to simulate all

Removing Complexity Assumptions from Concurrent Zero-Knowledge Proofs

435

final executions using the lucky prover, and summing over all d = 1, . . . , q(n).
We note that the number of rounds of 0 is kq(n) log q(n) but can be reduced to
kq(n) by replacing the sequential repetitions of 00 with a sequential pipelined
repetition (details omitted).
Acknowledgements. Many thanks to Alfredo De Santis, Russell Impagliazzo,
Rafail Ostrovsky, Giuseppe Persiano and Moti Yung for interesting discussions.

References
1. M. Ben-Or, J. Hastad, J. Kilian, O. Goldreich, S. Goldwasser, S. Micali, and P.
Rogaway, Everything Provable is Provable in Zero-Knowledge, CRYPTO 88.
2. T. Beth and Y. Desmedt, Identification Tokens - or: Solving the Chess Grandmaster
Problem, in Proc. of CRYPTO 90.
3. M. Blum, How to Prove a Theorem So No One Else Can Claim It, in Proc. of the
International Congress of Mathematicians, 1986.
4. R. Boppana, J. H
astad, and S. Zachos, Does co-NP have Short Interactive Proofs
?, in Inf. Proc. Lett., vol. 25, May 1987.
5. I. Damgaard, Interactive Hashing Simplifies Zero-Knowledge Protocol Design Without Complexity Assumptions, in Proc. of CRYPTO 93.
6. A. De Santis, G. Di Crescenzo, G. Persiano and M. Yung, On Monotone Formula
Closure of SZK, in Proc. of FOCS 94.
7. G. Di Crescenzo and R. Ostrovsky, On Concurrent Zero-Knowledge with PreProcessing, in Proc. of CRYPTO 99.
8. G. Di Crescenzo, K. Sakurai and M. Yung, On Zero-Knowledge Proofs: From
Membership to Decision, in Proc. of STOC 2000.
9. C. Dwork, M. Naor, and A. Sahai, Concurrent Zero-Knowledge, STOC 98.
10. C. Dwork and A. Sahai, Concurrent Zero-Knowledge: Reducing the Need for Timing Constraints, in Proc. of CRYPTO 98.
11. L. Fortnow, The Complexity of Perfect Zero-Knowledge, in Proc. of STOC 87.
12. O. Goldreich, S. Micali, and A. Wigderson, Proofs that Yield Nothing but their
Validity or All Languages in NP Have Zero-Knowledge Proof Systems, in Journal
of the ACM, vol. 38, n. 1, 1991.
13. S. Goldwasser, S. Micali, and C. Rackoff, The Knowledge Complexity of Interactive
Proof-Systems, in SIAM Journal on Computing, vol. 18, n. 1, February 1989.
14. R. Impagliazzo and M. Yung, Direct Minimum-Knowledge Computation, in Proc.
of CRYPTO 87.
15. J. Kilian, E. Petrank, and C. Rackoff, Lower Bounds for Zero-Knowledge on the
Internet, in Proc. of FOCS 98.
16. R. Richardson and J. Kilian, On the Concurrent Composition of Zero-Knowledge
Proofs, in Proc. of EUROCRYPT 99.
17. M. Tompa and H. Woll, Random Self-Reducibility and Zero-Knowledge Interactive
Proofs of Possession of Information, in Proc. of FOCS 87.

One-Way Probabilistic Reversible and


Quantum One-Counter Automata
Tomohiro Yamasaki, Hirotada Kobayashi, Yuuki Tokunaga, and Hiroshi Imai
Department of Information Science, Faculty of Science, University of Tokyo
731 Hongo, Bunkyo-ku, Tokyo 1130033, Japan
{yamasaki, hirotada, tokunaga, imai}@is.s.u-tokyo.ac.jp

Abstract. Kravtsev introduced 1-way quantum 1-counter automata


(1Q1CAs), and showed that several non-context-free languages can be
recognized by bounded error 1Q1CAs. In this paper, we first show that
all of these non-context-free languages can be also recognized by bounded
error 1PR1CAs (and so 1Q1CAs). Moreover, the accepting probability
of each of these 1PR1CAs is strictly greater than, or at least equal to,
that of corresponding Kravtsevs original 1Q1CA. Second, we show that
there exists a bounded error 1PR1CA (and so 1Q1CA) which recognizes
n
n
{an
1 a2 ak }, for each k 2. We also show that, in a quantum case, we
can improve the accepting probability in a strict sense by using quantum
interference. Third, we state the relation between 1-way deterministic 1counter automata (1D1CAs) and 1Q1CAs. On one hand, all of above
mentioned languages cannot be recognized by 1D1CAs because they are
non-context-free. On the other hand, we show that a regular language
{{a, b} a} cannot be recognized by bounded error 1Q1CAs.

Introduction

It has been widely considered that quantum mechanism gives new great power
for computation after Shor [8] showed the existence of quantum polynomial time
algorithm for integer factoring problem. However, it has been still unclear why
quantum computers are so powerful. In this context, it is worth considering
simpler models such as finite automata.
Quantum finite automata were introduced by Moore and Crutchfield [6] and
Kondacs and Watrous [3], independently. The latter showed that the class of languages recognizable by bounded error 1-way quantum finite automata (1QFAs)
is properly contained in the class of regular languages. This means that 1QFAs
are strictly less powerful than classical 1-way deterministic finite automata. This
weakness comes from the restriction of reversibility. Since any quantum computation is performed by unitary operators and unitary operators are reversible,
any transition function of quantum computation must be reversible. Ambainis
and Freivalds [2] studied the characterizations of 1QFAs in more detail by comparing 1QFAs with 1-way probabilistic reversible finite automata (1PRFAs), for
1PRFAs are clearly special cases of 1QFAs. They showed that there exist languages, such as {a b }, which can be recognized by bounded error 1QFAs but
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 436446, 2000.
c Springer-Verlag Berlin Heidelberg 2000

One-Way Probabilistic Reversible and Quantum One-Counter Automata

437

not by bounded error 1PRFAs. However, as we show in this paper, this situation
seems different in case of automata with one counter.
Kravtsev [4] introduced 1-way quantum 1-counter automata (1Q1CAs),
and
that several non-context-free
languages such
as L1 =
 i j k

 i jshowed
k
ba
ba
|
i
=
j
=
k
,
L
=
a
ba
ba
|
k
=
i
=
6
j
k
=
j
=
6
i
,
and
L3 =
a
2

 i j k
a ba ba | exactly 2 of i, j, k are equal , can be recognized by bounded
error 1Q1CAs. No clear comparisons with other automata such as 1-way
deterministic 1-counter automata (1D1CAs) or 1-way probabilistic reversible
1-counter automata (1PR1CAs) were done in [4]. In this paper, we investigate
the power of 1Q1CAs in comparison with 1PR1CAs and 1D1CAs.
We first show that all of these non-context-free languages can be also recognized by bounded error 1PR1CAs (and so 1Q1CAs). Moreover, the accepting
probability of each of these 1PR1CAs is strictly greater than, or at least equal
to, that of corresponding Kravtsevs original 1Q1CA.
Second, we show that there exists a bounded error 1PR1CA (and so 1Q1CA)
which recognizes Lk,4 = {a1 a2 ak }, for each k 2. This result is in contrast
to the case of no counter shown by Ambainis and Freivalds [2]. We extend this
result by showing that there exists a bounded error 1PR1CA (and so 1Q1CA)
which recognizes Lk,5 = {an1 an2 ank }, for each k 2. We also show that, in
a quantum case, we can improve the accepting probability in a strict sense by
using quantum interference.
Third, we state the relation between 1D1CAs and 1Q1CAs. On one hand, all
of above mentioned languages cannot be recognized by 1D1CAs because they are
non-context-free. On the other hand, we show that a regular language {{a, b} a}
cannot be recognized by bounded error 1Q1CAs.

Definitions

Definition 1 A 1-way deterministic 1-counter automaton (1D1CA) is defined


by M = (Q, , , q0 , Qacc , Qrej ), where Q is a finite set of states, is a finite
input alphabet, q0 is the initial state, Qacc Q is a set of accepting states,
Qrej Q is a set of rejecting states, and : Q S Q {1, 0, +1} is a
transition function, where = {c|, $}, symbol c|
6 is the left end-marker,
symbol $ 6 is the right end-marker, and S = {0, 1}.
We assume that each 1D1CA has a counter which can contain an arbitrary
integer and the counter value is 0 at the start of computation. According to
the second element of , 1, 0, +1 respectively, corresponds to decrease of the
counter value by 1, retainment the same and increase by 1.
Let s = sign(k), where k is the counter value and sign(k) = 0 if k = 0,
otherwise 1. We also assume that all inputs are started by c| and terminated by
$.
The automaton starts in q0 and reads an input w from left to right. At the ith
step, it reads a symbol wi in the state q, checks whether the counter value is 0 or
not (i.e. checks s) and finds an appropriate transition (q, wi , s) = (q 0 , d). Then

438

Tomohiro Yamasaki et al.

it updates its state to q 0 and the counter value according to d. The automaton
accepts w if it enters the final state in Qacc and rejects if it enters the final state
in Qrej .
Definition 2 A 1-way reversible 1-counter automaton (1R1CA) is defined as a
1D1CA such that, for any q Q, and s {0, 1}, there is at most one
state q 0 Q such that (q 0 , , s) = (q, d).
Definition 3 A 1-way probabilistic 1-counter automaton (1P1CA) is defined by
M = (Q, , , q0 , Qacc , Qrej ), where Q, , q0 , Qacc , and Qrej are the same as for
1D1CAs. A transition function is defined as QS Q{1, 0, +1} R+ ,
where , c|, $, and S are the same as for 1D1CAs. For any q, q 0 Q, , s
{0, 1}, d {1, 0, +1}, satisfies the following condition:
P
q0 ,d

(q, , s, q 0 , d) = 1.

The definition of a counter remains the same as for 1D1CAs.


A language L is said recognizable by a 1P1CA with probability p if there
exists a 1P1CA which accepts any input x L with probability at least p > 1/2
and rejects any input x 6 L with probability at least p. We may use the term
accepting probability for denoting this probability p.
Definition 4 A 1-way probabilistic reversible 1-counter automaton (1PR1CA)
is defined as a 1P1CA such that, for any q Q, and s {0, 1}, there is
at most one state q 0 Q such that (q 0 , , s, q, d) is non-zero.
Definition 5 A 1-way quantum 1-counter automaton (1Q1CA) is defined by
M = (Q, , , q0 , Qacc , Qrej ), where Q, , q0 , Qacc , and Qrej are the same as for
1D1CAs. A transition function is defined as Q S Q {1, 0, +1} C ,
where , c|, $, and S are the same as for 1D1CAs. For any q, q 0 Q, , s
{0, 1}, d {1, 0, +1}, satisfies the following conditions:

P
P

q 0 ,d

0
0
q 0 ,d (q1 , , s1 , q , d)(q2 , , s2 , q , d) =

1
0

(q1 = q2 )
,
(q1 6= q2 )

(q1 , , s1 , q 0 , +1)(q2 , , s2 , q 0 , 0) + (q1 , , s1 , q 0 , 0)(q2 , , s2 , q 0 , 1) = 0,

q 0 ,d

(q1 , , s1 , q 0 , +1)(q2 , , s2 , q 0 , 1) = 0.

The definition of a counter remains the same as for 1D1CAs.


The number of configurations of a 1Q1CA on any input x of length n is
precisely (2n + 1)|Q|, since there are 2n + 1 possible counter value and |Q|
internal states. For a fixed M , let Cn denote this set of configurations.
A computation on an input x of length n corresponds to a unitary evolution
in the Hilbert space Hn = l2 (Cn ). For each (q, k) Cn , q Q, k [n, n], let
|q, ki denote the P
basis vector in l2 (Cn ). A superposition of a 1Q1CA corresponds
to a unit vector q,k q,k |q, ki, where q,k C is the amplitude of |q, ki.

One-Way Probabilistic Reversible and Quantum One-Counter Automata

439

A unitary operator U for a symbol on Hn is defined as follows:


P
U |q, ki = q0 ,d (q, , sign(k), q 0 , d)|q 0 , k + di.
After each transition, a state of a 1Q1CA is observed. The computational
observable O corresponds to the orthogonal decomposition l2 (Cn ) = Eacc
Erej Enon . The outcome of any observation will be either accept(Eacc ) or
reject(Erej ) or non-halting(Enon). The probability of the acceptance, rejection and non-halting at each step is equal to the sum of the squared amplitude
of each basis state in new state for the corresponding subspace.
The definition of the recognizability remains the same as for 1P1CAs.
To describe concrete automata easily, we use the concept of simple 1Q1CAs.
A 1Q1CA is said simple if, for any , s {0, 1}, there is a unitary operator
V,s on l2 (Q) and a counter function D : Q {1, 0, +1} such that
(
hq 0 |V,s |qi if D(q 0 , ) = d
0
,
(q, , s, q , d) =
0
otherwise
where hq 0 |V,s |qi is the coefficient of |qi V,s |qi. We also use this representation
for 1D1CA, 1R1CA, and 1PR1CA.

Recognizability of L1 , L2 , and L3

Kravtsev
languages
 i j [4]k showed that several
 inon-context-free
such as L1
j
k
=
a
ba
ba
|
i
=
j
=
k
,
L
=
a
ba
ba
|
k
=
i
=
6
j
k
=
j
=
6
i
, and L3 =
2

 i j k
a ba ba | exactly 2 of i, j, k are equal , can be recognized by bounded error
1Q1CAs. In this section, we show that all of these languages can be also recognized by bounded error 1PR1CAs. Moreover, the accepting probability of each of
these 1PR1CAs is strictly greater than, or at least equal to, that of corresponding Kravtsevs original 1Q1CAs. This also indicates the existence of a 1Q1CA for
each of these languages whose accepting probability is strictly greater than, or
at least equal to, that of corresponding Kravtsevs original one, since a 1PR1CA
is regarded as a special
case of a 1Q1CA.



Let Li=j = ai baj bak | i = j and Li=(j+k)/2 = ai baj bak | i = (j +k)/2 .
The existence of a 1R1CA for each of these can be shown easily.
Lemma 1 There exist 1R1CAs MR (Li=j ), MR (Lj=k ), MR (Lk=i ) for Li=j ,
Lj=k , Lk=i , respectively.
MR (Lj=(k+i)/2 ),
Lemma 2 There
exist
1R1CAs
MR (Li=(j+k)/2 ),
MR (Lk=(i+j)/2 ) for Li=(j+k)/2 , Lj=(k+i)/2 , Lk=(i+j)/2 , respectively.
Proof: We show the case of Li=(j+k)/2 . Other cases of Lj=(k+i)/2 , Lk=(i+j)/2
can be shown in similar ways.
Let the state set Q = {q0 , q1 , q2 , q3 , q4 , q5 , qacc , qrej1 , qrej2 , qrej3 , qrej4 , qrej5 },
where q0 is an initial state, qacc is an accepting state, and qrej1 , qrej2 , qrej3 , qrej4 ,

440

Tomohiro Yamasaki et al.

qrej5 are rejecting states. Define the transition matrices V,s and the counter
function D of MR (Li=(j+k)/2 ) as follows:
Vc|,0 |q0 i = |q1 i, V$,0 |q1 i = |qrej1 i, Va,0 |q1 i = |q1 i,
Vb,0 |q1 i = |q2 i,
V$,0 |q2 i = |qrej2 i, Va,0 |q2 i = |qrej2 i, Vb,0 |q2 i = |q4 i,
V$,0 |q4 i = |qacc i, Va,0 |q4 i = |qrej4 i, Vb,0 |q4 i = |qrej4 i,
D(q1 , a) = +1,
D(q2 , a) = 1,
D(q4 , a) = 1,
D(q, ) = 0,
otherwise,

V$,1 |q1 i = |qrej1 i,


V$,1 |q2 i = |qrej2 i,
V$,1 |q3 i = |qrej3 i,
V$,1 |q4 i = |qrej4 i,
V$,1 |q5 i = |qrej5 i,

Va,1 |q1 i = |q1 i,


Va,1 |q2 i = |q3 i,
Va,1 |q3 i = |q2 i,
Va,1 |q4 i = |q5 i,
Va,1 |q5 i = |q4 i,

Vb,1 |q1 i = |q2 i,


Vb,1 |q2 i = |q4 i,
Vb,1 |q3 i = |q5 i,
Vb,1 |q4 i = |qrej4 i,
Vb,1 |q5 i = |qrej5 i.

Reversibility of this automaton can be checked easily.


2


Kravtsev [4] showed the recognizability of L1 = ai baj bak | i = j = k with
probability 1 1/c for arbitrary chosen c 3 by a 1P1CA and a 1Q1CA. This
1P1CA for L1 is clearly reversible, and so, L1 is recognized by 1PR1CA with
probability 1 1/c.


Here we show the recognizability of L2 = ai baj bak | k = i 6= j k = j 6= i .
Theorem 1 There exists a 1PR1CA MPR (L2 ) which recognizes L2 with probability 3/5.
Proof: After reading the left end-marker c|, MPR (L2 ) enters one of the following
three paths, path-1, path-2, path-3, with probability 1/4, 1/4, 1/2, respectively.
In path-1(path-2), MPR (L2 ) checks whether j = k(k = i) or not, by behaving
in the same way as MR (Lj=k )(MR (Lk=i )) except for the treatment of acceptance
and rejection. The input is accepted with probability 4/5 if j = k(k = i) is
satisfied, while it is always rejected if j 6= k(k 6= i).
In path-3, MPR (L2 ) checks whether i 6= (j + k)/2 or not, by behaving in
the same way as MR (Li=(j+k)/2 ) except for the treatment of acceptance and
rejection. The input is accepted with probability 4/5 if i 6= (j + k)/2 is satisfied,
while it is always rejected if i = (j + k)/2.
Then the input x L2 always satisfies the condition of path-3 and exactly one
of the conditions of first two paths. Hence, MPR (L2 ) accepts it with probability
3/5. On the other hand, MPR (L2 ) rejects any input x 6 L2 with probability at
least 3/5. Indeed, when the input satisfies i = j = k, the conditions of path-1 and
path-2 are satisfied while the condition of path-3 is not satisfied, hence, MPR (L2 )
rejects it with probability 3/5. Next, when i, j, k differ from one another, none of
the conditions of path-1 and path-2 are satisfied, hence MPR (L2 ) rejects it with
probability at least 3/5. Finally, when the input is not in the form of ai baj bak ,
it is always rejected, obviously.
2
Reversibility of this automaton is clear by its construction.
Corollary 1 There exists a 1Q1CA MQ (L2 ) which recognizes L2 with probability 3/5.
Note that the accepting probability 3/5 of this 1Q1CA MQ (L2 ) for L2 is greater
than the original Kravtsevs 4/7.

One-Way Probabilistic Reversible and Quantum One-Counter Automata

441



Next we show that L3 = ai baj bak | exactly 2 of i, j, k are equal can be
recognized by 1PR1CA with bounded error.
Theorem 2 There exists a 1PR1CA MPR (L3 ) which recognizes L3 with probability 4/7.
Proof: After reading the left end-marker c|, MPR (L3 ) enters one of the following
four paths, path-1, path-2, path-3, path-4, with probability 1/6, 1/6, 1/6, 1/2,
respectively.
In path-1(path-2)[path-3], MPR (L3 ) checks whether i = j(j = k)[k = i] or
not, by behaving in the same way as MR (Li=j )(MR (Lj=k ))[MR (Lk=i )] except for
the treatment of acceptance and rejection. The input is accepted with probability
6/7 if i = j(j = k)[k = i] is satisfied, while it is always rejected if i 6= j(j 6=
k)[k 6= i].
In path-4, MPR (L3 ) checks whether i 6= (j + k)/2 or not, by behaving in
the same way as MR (Li=(j+k)/2 ) except for the treatment of acceptance and
rejection. The input is accepted with probability 6/7 if i 6= (j + k)/2 is satisfied,
while it is always rejected if i = (j + k)/2.
Then the input x L3 always satisfies the condition of path-4 and exactly one
of the conditions of first three paths. Hence, MPR (L3 ) accepts it with probability
4/7. On the other hand, MPR (L3 ) rejects any input x 6 L3 with probability at
least 4/7. Indeed, when the input satisfies i = j = k, the conditions of path-1,
path-2, and path-3 are satisfied while the condition of path-4 is not satisfied,
hence, MPR (L3 ) rejects it with probability at least 4/7. Next, when i, k, j differ
from one another, none of the conditions of first three paths are satisfied, hence,
MPR (L3 ) rejects it with probability at least 4/7. Finally, when the input is not
in the form of ai baj bak , it is always rejected, obviously.
2
Reversibility of this automaton is clear by its construction.
Corollary 2 There exists a 1Q1CA MQ (L3 ) which recognizes L3 with probability 4/7.
Note that the accepting probability 4/7 of this 1Q1CA MQ (L3 ) for L3 is greater
than the original Kravtsevs 1/2 + .



n
n
Recognizability of Lk;5 = an
1 a2 ak

Here we show that another family of non-context-free languages Lk,5 =


{an1 an2 ank } for each fixed k 2, is also recognizable by bounded error
1PR1CAs.
First we show that Lk,4 = {a1 a2 ak }, for each fixed k 2, is recognizable
by a 1PR1CA with bounded error.
For each k 2, let Lk,i|i+1 = {{a1 , . . . , ai } {ai+1 , . . . , ak } } for each i, 1
i k 1.
Lemma 3 For each k 2, there exists a 1R1CA MR (Lk,i|i+1 ) for each Lk,i|i+1 ,
1 i k 1.

442

Tomohiro Yamasaki et al.

Proof: Let the state set Q = {q0 , q1 , qacc , qrej }, where q0 is an initial state, qacc
is an accepting state, and qrej is a rejecting state. Define the transition matrices
V,s and the counter function D of MR (Lk,i|i+1 ) as follows:
Vc|,0 |q0 i = |q1 i,

Vaj ,0 |q1 i = |q1 i, 1 j i


Vaj ,1 |q1 i = |qreji , 1 j i

D(q1 , aj ) = +1, i + 1 j k

V$,0 |q1 i = |qacci ,


D(q, ) = 0,
V$,1 |q1 i = |qacci , Vaj ,0 |q1 i = |q1 i, i + 1 j k
Vaj ,1 |q1 i = |q1 i, i + 1 j k

Reversibility of this automaton can be checked easily.

otherwise.

Theorem 3 For each k 2, there exists a 1PR1CA MPR (Lk,4 ) for Lk,4 with
probability 1/2 + 1/(4k 6).
Proof: After reading the left end-marker c|, one of the following k 1 paths is
chosen with the same probability 1/(k 1).
In the ith path, MPR (Lk,4 ) checks whether the input is in Lk,i|i+1 or not,
utilizing MR (Lk,i|i+1 ), for 1 i k 1. If the input is in Lk,i|i+1 , MPR (Lk,4 )
accepts it with probability p, while if the input is not in Lk,i|i+1 , MPR (Lk,4 )
always rejects it.
Since the input x Lk,4 satisfies the condition in any path, MPR (Lk,4 )
accepts it with probability p. On the other hand, for any input x 6 Lk,4 , there
exists at least one path whose condition is not satisfied. Thus, the probability
MPR (Lk,4 ) is at most p (k 2)/(k 1). Hence, if we take p such that p
(k 2)/(k 1) < 1/2 < p, MPR (Lk,4 ) recognizes Lk,4 with bounded error. To
maximize the accepting probability, we solve 1 p (k 2)/(k 1) = p, which
gives p = 1/2 + 1/(4k 6).
2
Reversibility of this automaton is clear by its construction.
Corollary 3 For each k 2, there exists a 1Q1CA MQ (Lk,4 ) for Lk,4 with
probability 1/2 + 1/(4k 6).
It has been known that, while there exists a 1QFA which recognizes Lk,4 with
bounded error, any 1PRFA cannot recognize Lk,4 with bounded error [2]. In this
point, Theorem 3 gives a contrastive result between no-counter and one-counter
cases.
Before showing the recognizability of Lk,5 , we prove one more lemma. Let
each Lk,#ai =#ai+1 = {x | (# of ai in x) = (# of ai+1 in x)} for 1 i k 1.
Lemma 4 For each k 2, there exists a 1R1CA MR (Lk,#ai =#ai+1 ) for each
Lk,#ai =#ai+1 , 1 i k 1.
Proof: Let the state set Q = {q0 , q1 , qacc , qrej }, where q0 is an initial state, qacc
is an accepting state, and qrej is a rejecting state. Define the transition matrices
V,s and the counter function D of MR (Lk,#ai =#ai+1 ) as follows:

One-Way Probabilistic Reversible and Quantum One-Counter Automata


Vc|,0 |q0 i = |q1 i,
V$,0 |q1 i = |qacci ,
V$,1 |q1 i = |qacci ,

443

Val ,0 |q1 i = |q1 i, 1 l k D(q1 , ai ) = +1,


Val ,1 |q1 i = |qreji , 1 l k D(q1 , ai+1 ) = 1,
D(q, ) = 0, otherwise.

Reversibility of this automaton can be checked easily.


Now we show the recognizability of Lk,5 =

{an1 an2

ank }.

Theorem 4 For each k 2, there exists a 1PR1CA MPR (Lk,5 ) which recognizes
Lk,5 with probability 1/2 + 1/(8k 10).
Proof: After reading the left end-marker c|, one of the following 2(k 1) paths,
path-1-1, . . . , path-1-(k 1), path-2-1, . . . , path-2-(k 1), is chosen with the
same probability 1/2(k 1).
In each path-1-i, MPR (Lk,5 ) checks whether the input is in Lk,i|i+1 or not,
utilizing MR (Lk,i|i+1 ), for 1 i k 1. If the input is in Lk,i|i+1 , MPR (Lk,5 )
accepts it with probability p, while if the input is not in Lk,i|i+1 , MPR (Lk,5 )
always rejects it.
In each path-2-i, MPR (Lk,5 ) checks whether the input is in Lk,#ai =#ai+1 or
not, utilizing MR (Lk,#ai =#ai+1 ), for 1 i k1. If the input is in Lk,#ai =#ai+1 ,
MPR (Lk,5 ) accepts it with probability p, while if the input is not in Lk,#ai =#ai+1 ,
MPR (Lk,5 ) always rejects it.
Since the input x Lk,5 satisfies the condition in any path, MPR (Lk,5 )
accepts it with probability p. On the other hand, for any input x 6 Lk,5 , there
exists at least one path whose condition is not satisfied. Thus, the probability
MPR (Lk,5 ) accepts it is at most p(2k 3)/(2k 2). Hence, if we take p such that
p (2k 3)/(2k 2) < 1/2 < p, MPR (Lk,5 ) recognizes Lk,5 with bounded error.
To maximize the accepting probability, we solve 1 p (2k 3)/(2k 2) = p,
which gives p = 1/2 + 1/(8k 10).
2
Reversibility of this automaton is clear by its construction.
Corollary 4 For each k 2, there exists a 1Q1CA MQ (Lk,5 ) which recognizes
Lk,5 with probability 1/2 + 1/(8k 10).

Improving the Accepting Probability of 1Q1CA for Lk;5

In the previous subsection, we showed that Lk,5 = {an1 an2 ank } is recognizable
by a bounded error 1PR1CA. In this section, we also show that, in a quantum
case, we can improve the accepting probability in a strict sense by using quantum
interference. We utilize the following result.
Theorem 5 (Ambainis et. al. [1]) Lk,4 = {a1 a2 ak } can be recognized by
a 1QFA M1QFA (Lk,4 ) with probability p, where p is the root of p(k+1)/(k1) +p = 1
in the interval of (1/2, 1).
By using M1QFA (Lk,4 ), we prove the existence of a 1Q1CA which recognizes
Lk,4 . The following two lemmas can be shown easily.

444

Tomohiro Yamasaki et al.

Lemma 5 For each k 3, if p(k+1)/(k1) + p = 1, then 1/2 < p < 2/3.


Lemma 6 For arbitrary m m unitary matrices U1 , U2 , there exists an 2 2
block unitary matrix N (U1 , U2 ) such that


1 U1
,
N (U1 , U2 ) =
2 U2
| {z }
2blocks

where the blocks indicated by are determined to hold unitary of N .


Now, we prove the main theorem.
Theorem 6 For each k 2, Lk,5 can be recognized by a 1Q1CA with probability
p, where p is the root of p(k+1)/(k1) + p = 1 in the interval of (1/2, 1).
Proof:
By using M1QFA (Lk,4 ), we can construct a 1Q1CA M =
(Q, , , q11 , Qacc , Qrej ) as follows. Let Q = {qim | 1 i 3k, m = 1, 2},
m
| m = 1, 2}, and Qrej = {qim | k + 1
= {ai | 1 i k}, Qacc = {q2k
i 2k 1, 2k + 1 3k, m = 1, 2}. For each , we define the transition
matrices {W,s } and the counter function D as follows:



Wc|,0 = N

 

Vc| O
Vc| O
,
O Ik
O Ik

Wa2i1 ,0 =

Va2i1 O
O Ik

Wa2i ,0 =

 

Va2i O
O Ik

W$,0 =



, for k 3, Wc|,0 =

Vc| O
O Ik




Va2i O

, Wa2i ,1 =
O Ik

 

V$ O
, W$,1 =
O Ik

 

Va2i1 O
, Wa2i1 ,1 =
O Ik

 

V$ O
O Ik

O I2k
Ik O

Va2i O
O Ik

O I2k
Ik O

I O
k
, for k = 2,
O Ik

 

 

O I2k

Ik O

 

Va2i1 O
,
O Ik

O I2k
Ik O

D(qj1 , a2i1 ) = +1, for 1 j k, 1 i bk/2c ,


D(qj1 , a2i ) = 1, for 1 j k, 1 i bk/2c ,
D(qj1 , ak ) = 0, for 1 j k, k is odd,
D(qj2 , a1 ) = 0, for 1 j k,
D(qj2 , a2i ) = +1, for 1 j k, 1 i b(k 1)/2c ,
D(qj2 , a2i+1 ) = 1, for 1 j k, 1 i b(k 1)/2c ,
D(qj2 , ak ) = 0, for 1 j k, k is even,

where each V is the transition matrix of M1QFA (Lk,4 ) and the


columns of the transition matrices correspond to the states in order of q11 , q21 , . . . , qk1 , q12 , q22 , . . . , qk2 (i.e. the order of the basis states is
q11 , q21 , . . . , qk1 , q12 , q22 , . . . , qk2 ). Let be defined in the manner described in Section 2.
If the input string is of the form an1 an2 . . . ank , in each of two paths, the input
is accepted. Thus, the probability of accepting is (p/2) 2 = p.

One-Way Probabilistic Reversible and Quantum One-Counter Automata

445

1 m2
If k = 2, the input string is of the form am
1 a2 , and m1 6= m2 , in the first
path, the input string is rejected and the states in the second path are never
entered. Thus, the input is always rejected.
mk
1 m2
If k 3, the input string is of the form am
1 a2 . . . ak , and there exists
at least one pair of (i, j) such that mi 6= mj , in at least one of two paths, the
counter value is not 0 upon reading the right end-marker. Thus, the probability
of accepting is at most (p/2) 1 = p/2. By Lemma 5, the probability of rejecting
is at least 1 p/2 > 1 (2/3) (1/2) = 2/3 > p.
Finally, if the input string is not of the form a1 a2 . . . ak , in each of two paths,
the input string is rejected with probability at least p, since each path is equivalent to M1QFA (Lk,4 ) when the counter is left out of consideration. Therefore,
2
the probability of rejecting is at least p.

Proposition 1 The accepting probability p of M is greater than 1/2 + 1/(8k


10), the accepting probability of MQ (Lk,5 ).
Proof: Omitted.

Relation between 1D1CAs and 1Q1CAs

As we have seen in Section 3, 4, and 5, some non-context-free languages can be


recognized by bounded error 1Q1CAs. It is clear that 1D1CAs cannot recognize
any non-context-free languages, since 1D1CAs are special cases of 1-way pushdown automata. This indicates the strength of 1Q1CAs. Conversely, we present
the weakness of 1Q1CAs by showing that there is a regular language which can
be recognized by a 1D1CA but not by a 1Q1CA with bounded error.
Theorem 7 The language {{a, b} a} cannot be recognized by a 1Q1CA with
bounded error.
Proof: Nayak [7] showed that, for each fixed n 0, any general 1-way QFA
recognizing {wa | w {a, b}, |w| n} must have 2(n) basis states. Thus
a 1Q1CA for {{a, b} a} should have at least 2(n) quantum basis states if the
input length is n. However, the number of basis states of a 1Q1CA for a language
of length n has precisely (2n + 1)|Q|. Since (2n + 1)|Q| < 2(n) for sufficiently
2
large n, it proves the theorem.

Conclusions and Open Problems

In this paper, we proved that there are non-context-free languages which can
be recognized by 1PR1CAs and 1Q1CAs, but cannot be recognized by 1D1CAs.
We also showed that there is a regular language which can be recognized by a
1D1CA, but cannot be recognized by a 1Q1CA.
One interesting question is what languages are recognizable by 1Q1CAs but
not by 1PR1CAs. Similarly, what are the languages recognizable by 1Q1CAs
but not by 1P1CAs?

446

Tomohiro Yamasaki et al.

Another question is concerning to a 2-counter case. It is known that a 2-way


deterministic 2-counter automaton can simulate a deterministic Turing machine
[5]. How about the power of 2-way quantum 2-counter automata, or 2-way quantum 1-counter automata?

References
[1] A. Ambainis, R. Bonner, R. Freivalds, and A. K
ikusts. Probabilities to accept
languages by quantum finite automata. In Proceedings of the 5th Annual International Conference on Computing and Combinatorics (COCOON99), Lecture Notes
in Computer Science, volume 1627, pages 174183, 1999.
[2] A. Ambainis and R. Freivalds. 1-way quantum finite automata: Strengths, weakness
and generalizations. In Proceedings of the 39th Annual Symposium on Foundation
of Computer Science, pages 332341, 1998.
[3] A. Kondacs and J. Watrous. On the Power of Quantum Finite State Automata. In
Proceedings of the 38th Annual Symposium on Foundation of Computer Science,
pages 6675, 1997.
[4] M. Kravtsev. Quantum finite one-counter automata. In Proceedings of the
26th Conference on Current Trends in Theory and Practice of Informatics (SOFSEM99), Lecture Notes in Computer Science, volume 1725, pages 431440, 1999.
[5] M. L. Minsky. Recursive unsolvability of posts problem of tag and other topics
in the theory of turing machines. Annals of Math., 74:3:437455, 1961.
[6] C. Moore and J. Crutchfield. Quantum automata and quantum grammars. Technical Report 97-07-02, Santa-Fe Institute Working Paper, 1997. Also available at
http://xxx.lanl.gov/archive/quant-ph/9707031.
[7] A. Nayak. Optimal lower bounds for quantum automata and random access codes.
In Proceedings of the 40th Annual Symposium on Foundation of Computer Science,
pages 369376, 1999.
[8] P. Shor. Algorithms for quantum computation: Discrete log and factoring. In
Proceedings of the 35th Annual Symposium on Foundation of Computer Science,
pages 5665, 1994.

Similarity Enrichment in Image Compression


through Weighted Finite Automata
Zhuhan Jiang1 , Bruce Litow2 , and Olivier de Vel3
1

School of Mathematical and Computer Sciences, University of New England,


Armidale NSW 2351, Australia
[email protected]
2
School of Information Technology, James Cook University,
Townsville, QLD 4811, Australia
[email protected]
Information Technology Division, DSTO, PO Box 1500, Salisbury SA 5108,
Australia
[email protected]

Abstract. We propose and study in details a similarity enrichment


scheme for the application to the image compression through the extension of the weighted finite automata (WFA). We then develop a mechanism with which rich families of legitimate similarity images can be
systematically created so as to reduce the overall WFA size, leading to
an eventual better WFA-based compression performance. A number of
desirable properties, including WFA of minimum states, have been established for a class of packed WFA. Moreover, a codec based on a special
extended WFA is implemented to exemplify explicitly the performance
gain due to extended WFA under otherwise the same conditions.

Introduction

There are many different compression schemes each of which concentrates on


often specific image or compression characteristics. For instance, a wavelet based
compression scheme makes use of the multiresolution analysis, see e.g. [1] and
the references there, while the JPEG standard hinges on the signal superposition
of the Fourier harmonics. Alternatively, similarities among given images and
their subimages may be explored to decorrelate the image components for the
perceived compression purpose. In this regard, weighted finite automata (WFA)
have been successfully applied to both image and video compressions, see e.g.
[2,3,4]. These WFA are basically composed of subimages as the states, and the
linear expansions of the state images in terms of themselves and the rest of state
images. For a given image under consideration, a typical inferred WFA will select
a collection of subimages to form the WFA states in such a way that the given
original image can be reconstructed, often as a close approximation, from the
inferred WFA. Such a WFA, when further encoded, may then be regarded as
a compressed image. The main objective of this work is therefore to propose
a similarity enrichment scheme that will reduce the overall size of an inferred
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 447456, 2000.
c Springer-Verlag Berlin Heidelberg 2000

448

Zhuhan Jiang, Bruce Litow, and Olivier de Vel

WFA, to set up the basic structure and develop interrelated properties of the
extended WFA, and to establish a mechanism that determines systematically
what type of similarity enrichment is theoretically legitimate for a WFA based
compression. In fact we shall also devise a simplified yet still fully-fledged image
compression codec based on a newly extended WFA, and demonstrate explicitly
that, under otherwise the same conditions, a codec based on similarity enriched
WFA will outperform those without such an enrichment.
Throughout this work we shall follow the convention and assume that all
images are square images, and that all WFA based compressors are lossy compressors. We recall that an image x of the resolution of n n pixels is mathematically an n n matrix whose (i, j)-th element xi,j takes a real value. For
any image of 2d 2d pixels, we define its multiresolution representation (x) by
(x) = {D (x) : D N }, where N = {0, 1, 2, 3, ...} and D (x) denotes the same
image at the resolution of 2D 2D pixels. In fact we will identify any image x
with its multiresolution representation (x) unless otherwise stated.
In order to address pixels of all resolutions in (x),
we follow the convention in [2] and divide x into 4
31
33
equal-sized quadrants, numbering them clockwise from
1
301 303
the top left by 1, 3, 2 and 0 respectively. These numbers
32
300 302
are the addresses of the corresponding quadrant subimages. Let  be an empty string and Q = {0, 1, 2, 3} be
0
2
the set of alphabet. Then a (x) with a Q will denote all four quadrant subimages of x. Furthermore
the subimage defined by
Fig. 1. Subimages addressable via a quadtree

a1 a2 ak (x) = ak (ak1 ( a2 (a1 (x)) ))

(1)

for a1 , a2 , ..., ak Q will thus represent ak -th quadrant of ak1 -th quadrant of
of a2 -th quadrant of a1 -th quadrant of x. For instance, 32 (x) represents the
larger shaded block in Fig. 1 and 300 (x), the smaller shaded block.
S
Let the set of quadrant addresses be given by Q where Q = m=0 Qm
with Q0 = {} and Qm = {a1 am : a1 , ..., am Q} for m 1. If we define
a multiresolution function as aPmapping : Q R satisfying the area1
preserving condition () = |Q|
aQ (a), where |Q| is the cardinality of
Q and R denotes the set of all real numbers, then each multiresolution image
(x) corresponds to a unique multiresolution function x : Q R defined
by x () = (x). In fact all images of finite resolution will be automatically
promoted to multiresolution images. For simplicity we shall always denote (x)
for any Q by x when no confusion is to occur, typically when x is in bold
face, and denote by (x) the average intensity of the image x.
There exist so far two forms of WFA that have been applied to image compression. The first was adopted by Culik et al [2,5] while the second was due to
Hafner [3,4]. For convenience, Culik et als WFA will be referred to as a linear
WFA while Hafners (m)-WFA will be termed a hierarchic WFA due to its hierarchic nature. We note that a linear WFA may also be regarded as a generalised

Similarity Enrichment in Image Compression

449

stochastic automaton [6], and can be used to represent real functions [7] and
wavelet coefficients [8], to process images [9], as well as to recognise speech [10].
In a WFA based image compressor, the design of an inference algorithm plays
an important role. An inference algorithm will typically partition a given image
into a collection of range blocks, i.e. subimages of the original given image,
then find proper domain blocks to best approximate the corresponding range
blocks. In general, the availability of a large number of domain blocks will result
in fewer number states when encoding a given image. This will in turn lead
to better compression performance. Some initial but inconclusive attempts to
engage more domain blocks have already been made in [11] for bi-level images.
The extra blocks there were in the form of certain transformations such as some
special rotations, or in the form of some unions of such domain blocks. Due to
the lack of theoretical justification there, it is not obvious whether and what
extra image blocks can be legitimately added to the pool of domain images.
Hence one of the main objectives of this work is to provide a sound theoretical
background on which one may readily decide how additional domain images may
be artificially generated by the existing ones, resulting in a similarity enriched
pool of domain images.
This paper is organised as follows. We first in the next section propose and
study two types of important mappings that are indispensible to a proper extension of WFA. They are the resolution-wise and resolution-driven mappings,
and are formulated in practically the broadest possible sense. Section 3 then sets
out to the actual extension of WFA, its associated graph representation as well
as the unification of the existing different forms of WFA. A number of relevant
properties and methods, such as the determination of minimum states for an
extended WFA, have also been established. Finally in section 4, the benefits of
the proposed similarity enrichment are demonstrated on the compression of the
Lena image through a complete codec based on a specific extended WFA.
We note that the important results in this work are often summarised in the
form of theorems. Although all proofs are fairly short, they are not explicitly
presented here due to the lack of space. Interested readers however may consult
[12] for further details.

Resolution-wise and Resolution-Driven Mappings

A fundamental question related to the generalisation of WFA is to find what


kind of similarity enrichment will preserve the original WFAs crucial features
that underpin their usefulness in the image compression. The resolution-driven
and resolution-wise mappings are therefore specifically designed for this purpose
and for their broadness. A resolution-driven mapping f is a mapping that maps
a finite sequence of multiresolution images {xi } into another multiresolution image x, satisfying the following invariance condition: for any k N , if xi and
yi are indistinguishable at the resolution of 2k 2k pixels for all i, then image
x = f ({xi }) and image y = f ({yi }) are also indistinguishable at the same resolution. A resolution-driven mapping is said to be a resolution-wise mapping if

450

Zhuhan Jiang, Bruce Litow, and Olivier de Vel

the resulting image x at any given resolution is completely determined through


f by the images {xi } at the same resolution.
Let F and G be the set of resolution-wise mappings and the set of resolutiondriven mappings respectively, and let I be the set of all invertible operators in F.
We will always use the addressing scheme (1) associated with Q = {0, 1, 2, 3} unless otherwise stated. Then the following theorem gives a rich family of resolutionwise mappings.
Theorem 1. Suppose a mapping h permutes pixels at all resolutions. That is,
for any multiresolution image x, the multiresolution image h(x) at any resolution
is a pixel permutation of x at the same resolution. If every addressible block in
the form of x at any resolution will always be mapped onto an addressible block
0
h(x) for some 0 Q in the mapped image, then the mapping h is an invertible
resolution-wise mapping, i.e. h I.
A straightforward corollary is that I contains the horizontal mirror mapping
m, the diagonal mirror mapping d, the anticlockwise rotation r by 90, as well as
the permutation of the |Q| quadrants. Obviously I F G, identity mapping
1 I, and I is a group with respect to the product, i.e. the composition of
functions. Moreover F and G are both linear spaces. We also note that, for any
Q , the zoom-in operator z defined by z (x) = x for all x belongs to G.
To understand more about I, we first introduce P, the group of all permu-

tations of Qs
 elements. A typical permutation p P can be written as p =

0 1 2 3
which means symbol i Q will be permuted to symbol ni Q.
n0 n1 n2 n3
As a convention, every permutation of k elements can be represented by a product of some disjoint cycles of the form (n1 , n2 , ..., nm ), implying that n1 will be
permuted to n2 and n2 will be permuted to n3 and so on and that nm will be
permuted back to n1 . Any elements that are not in any
 thus not be
 cycles will
012 345
permuted at all. Hence for instance the permutation 4 3 2 1 5 0 can be written as (1, 3)(0, 4, 5), or equivalently (0, 4, 5)(1, 3)(2) because the (2) there is
redundant.
Let p = {p }Q be
1 2 5 6
13 14 1 2
16 15 1 2
a sequence of permutations
4 3 8 7
16 15 4 3
13 14 4 3
p
pa
p P, then p represents an
- 9 10 5 6
- 10 9 7 6
13 14 9 10
invertible
resolution-wise mapaQ
16 15 12 11
12 11 8 7
11 12 8 5
ping in the following sense:
for any multiresolution image
Fig. 2. A resolution-wise mapping in action
x, the mapped multiresolution
image p(x) at any resolution of 2k 2k pixels is defined by, for m = 0 to k 1
in sequence, permuting the |Q| quadrants of the subimage x according to p
for all Qm . The horizontal mirror mapping m thus corresponds to {p }
with p = (0, 2)(1, 3) for all Q . As another example, let p = {p } with
p = (0, 1, 3, 2), p0 = (0, 2)(1, 3), p1 = (0, 1)(2, 3), p2 = (0, 3), p3 = (1, 2) and
p = (0) for all || > 1. Then the mapping process of p is shown in Fig. 2 in
which the leftmost image is gradually transformed to the rightmost resulting
image. Additional properties are summarised in the next theorem.

Similarity Enrichment in Image Compression

451


S
Theorem 2. Let P =
Pm = p I : p = {p }Q such that
m=0 Pm and
0
p0 = p00 0 , 00 Qm with m0 m , and let m be any non-negative integer.
Then
(i) Pm Pm+1 P I F G .
(ii) For any p Pm , its inverse, p1 , is also in Pm .
(iii) For any p, q Pm , the composition p q p(q) is again in Pm .
(iv) Pm is a finite group under the mapping composition.
(v) For any p = {p }Q Pm and any zoom-in operator za with a Q, we
set a0 = p (a) Q, q = {pa0 }Q , and P1 P0 in the case of m = 0.
0
Then q Pm1 and za p = qza . Moreover the mapping a a0 on Q is
one-to-one and onto.
For easy reference, a resolution-wise mapping
will be called permutative if it belongs to P. Fig. 3
exemplifies some of the typical operators in G: m is
the horizontal mirror, d is the diagonal mirror, r is
an anticlockwise rotation, (0, 3) is a quadrant permutation/exchange and z3 is a zoom-in operation
into quadrant 3. In fact, m, d and r all belong to
P0 . Moreover we can conclude from the properties
of G that the image negation is for instance also
a resolution-wise mapping. We note that the function space F is of great importance as is manifested
in the following theorem.

m-

?d

Rr
0 3z
(

Fig. 3.

Some
typical
resolution-driven mappings

Theorem 3. Let fia F and i R for all i I and a Q. If


X
fia ({j }) = |Q| i ,
iI ,

(2)

qQ
(k)

of 2k 2k pixel resolution determined iteratively by


ia
h
(0)
(1)
(0)
xi
= fia ({xj }) ,
xi = i ,
ia
ia
h
h
(m)
(m1)
(m+1)
(m)
= fia ({xj
}) ,
xi
= fia ({xj }) ,
xi

then the images xi

(3)

uniquely define for each i I a multiresolution image xi of intensity (xi ) = i .


(k)
The representation of xi at the resolution of 2k 2k pixels is given by xi precisely
for all i I. Moreover the xi will satisfy
xai = fia ({xj }) ,

fia F ,

iI .

(4)

Conversely if (4) holds for all i I , then (2) must be valid for i = (xi ).
In the case that corresponds eventually to a linear WFA, the results can be
represented in a very concise matrix, see [12] for details. To conclude this section,
we note that the symbols such as Pm , I, F, G and za will always carry their
current definitions, and that resolution-driven mappings can be regarded as the
similarity generating or enriching operators.

452

Zhuhan Jiang, Bruce Litow, and Olivier de Vel

Extended Weighted Finite Automata

The objective here is to show how resolution-wise or resolution-driven mappings


come into play for the representation, and hence the compression, of images. We
shall first propose an extended form of WFA and its graph representation, and
then devise a compression scheme based on such an extended WFA. In fact we
shall establish a broad and unified theory on the WFA for the purpose of image
compression, including the creation of extended WFA of minimum number of
states.
3.1

Definition and Graph Representation of Extended WFA

Suppose a finite sequence of multiresolution images {xk }1kn satisfy


xai = fia (x1 , ..., xr ) , xj = gj (x1 , ..., xj1 ) ,

fia F , gj G,

for 1 i r and r < j n. Then all images xk can be constructed at any


resolution from the image intensities k = (xk ). For all practical purposes we
however consider the following canonical form
xai =

r
X

a
fi,k
(xk ) , xj =

k=1

j1
X

gj,k (xk ) , a Q , 0 q < i r , r < j n .

(5)

k=1

We first represent (5) by an extended WFA of n states. This extended WFA


will consist of (i) a finite set of states, S = {1, 2, ..., n}; (ii) a finite alphabet Q;
(iii) a target state; (iv) a final distribution 1 , ..., n R; (v) a set of weight
a
F and gj,` G for a Q, q < k r, r < j n and 1 ` < j.
functions fi,k
The first q states will be called the pump states, and the next r q states
and the last n r states will be called the generic states and the relay states
respectively. For each state k S, image xk is the corresponding state image
although a more convenient but slightly abusive approach is to identify a state
simply with the state image. The target image is the state image corresponding
to the target state. In general the pump states refer to some preselected base
images, and these base images at any resoltions may be generated, or pumped
out, independent of the other state images. As an example, we consider the
following extended WFA with Q = {0, 1, 2, 3}, r = n = 5, q = 0 and
x01 = x3 ,

= x4 + d(x4 ) ,

x11

= x4 ,

x21
x31
x05
x25

x02 = x4 , x03 = x5 ,
x04
1
1
= x2 ,
x12 = x2 , x13 = x3 + x4 , x14
2
2
1
2
2
= x1 ,
x2 = x2 , x3 = x3 ,
x24
2
= d(x1 ), x32 = 0 , x33 = 0 ,
x34
1
1
1
1
= x5 , x15 = x5 + x4 + d(x4 ) ,
2
2
4
4
1
1
1
1
3
= x5 , x5 = x5 + x4 + d(x4 ) ,
2
2
4
4

= x4 ,
= 0,

(6)

Similarity Enrichment in Image Compression

453

where d denotes the diagonal reflec3:d(1)


tion, see Fig. 3. Let i = (xi ) for
=
1,2(1)
5
i = 1, ..., 5. Then (6) defines a valid
1: 12
1(1)
2(1)
WFA (5) if, due to (2), (1 , 2 , 3 ,
z 2: 1 y

2
5 1 1
0(1)
, 2 , 3 , 1, 12 for some
4 , 5 ) = 12

0(1)
1
1
1( 2 )
R. The diagram for the WFA,
3: 3
0,1,2(1)
12 )
with x1 as the target image, is drawn
1,2(
z
0(1)
1,3( 14 ) : 4:1 y
1
)
0,1,2,3( 2 )~
in Fig. 4. It is not difficult to see
:
0:d(1)
5: 12
1,3:d( 14 )
that the WFA will generate the tar
get image x1 given in Fig. 5. We
note that, in a graph representation,
Fig. 4. WFA of 5 states for (6)
i : i inside a circle represents state
i with intensity i , and label a(w) or a : h(w) on an arrow from state i to state
j implies xai contains linearly wxj or wh(xj ) respectively, where w is the weight.
Moreover the doubly circled state denotes the target state.
We note that the target image
determined by the extended WFA

Fig. 4 can also be generated by a linear WFA, at the cost of having more

than doubled number of states. The
x7
x1
linear WFA is given in Fig. 5 in which
x2
x8
?
?
?
?
each state is now labelled by the
corresponding state image and the
 
x9
image intensities i = (xi ) are given x3
5
x
x
10
by 1 = 7 = 12 , 2 = 5 = 8 =
? ^ ? 4
? 
?
11 = 12 , 3 = 9 = 13 , 4 = 10 = 1


and 6 = 2. Incidentally, if we keep
x5
x11
?=
s
just the first 6 states in Fig. 5 and
j

assign T = (5/36, 1/4, 1/6, 1/2,
x6
1/4, 1) to the final distribution
in Theorem 3, then the equations in
(4) again define a valid WFA with 6 Fig. 5. Transition diagram of a WFA for the
target image determined by (6)
states and 23 edges. The target image x1 in this case reduces to the diminishing triangles by Culik and Kari [5],
which is just the image x1 in Fig. 5 without the details above the diagonal.








0(1)

2(1)

2(1)

3(1)

0(1)

1(1)

3(1)

1(1)

1,2( 12 )

1,2( 12 )

1,2(1)

1,2(1)

1( 12 )

0(1)

0(1)

0,1,2,3( 21 )

3(1)

1,2(1)

1( 12 )

3( 12 )

0,1,2,3( 12 )

1,2(1)

0,1,2,3(1)

1,3( 14 )

3.2

0(1)

3(1)

0,1( 14 )

Packed WFA and the Associated Properties

For the practicality of applications, it is of interest to restrict ourselves to the


following special yet sufficiently general form of WFA relations
xai

n X
X
k=1

a,
Wi,k
(xk ) ,

x=

n X
X
k=1

k (xk ) , a Q , 0 q < i n ,

(7)

a,
, k R and R F is a nonempty finite set of resolution-wise
where Wi,k
mappings. The target image x corresponds to the only relay state, implicitly the

454

Zhuhan Jiang, Bruce Litow, and Olivier de Vel

state n + 1. However x may be absent if the target state is just one of the generic
states. An extended WFA defined through (7) will be called a packed WFA, and
the WFA is also said to be packed under R.
To analyse properly the properties of packed WFA, we first introduce a feature that refines a set of resolution-driven mappings. More specifically, a set
R I is said to be quadrantly-supportive if all mappings in R are linear and0
and a Q, there exist 0 R and a0 Q such that za = 0 za ,
thatfor all
a R
0 a0
i.e. (x) = (x ) holds for all multiresolution images x. As an example, P
and Pm for m 0 are all quadrantly-supportive. With these preparations, we
now summarise some additional finer properties for packed WFA in the next two
theorems.
Theorem 4. A packed WFA under a finite group R can always be expanded into
a linear WFA if R is also quadrantly-supportive. In particular, a WFA packed
under a finite subset of P can always be expanded into a linear WFA.
Alternatively, a packed WFA can be regarded as a linear WFA reduced or
packed under the similarities or symmetries dictated by R. We note that symmetries or similarities are immensely useful in various applications, including
for example the group theoretical analysis by Segman and Zeevi in [13], the image processing and understanding in [14], and the solutions and classification of
differential and difference systems in [15,16].
Given a linear WFA and a set R of resolution-wise mappings, we may reduce
the linear WFA to a packed WFA of fewer number of states. For this purpose
we sayPa set P
of images {xi } are R-dependent if there exists an i0 such that
finite

xi0 = finite
i6=i0
R ci (xi ) for some constants ci R. It is easy to see that
R-independent images are also linearly independent if 1 R. Moreover one can
show for a WFA packed under a finite group R I, if the generic state images
are R-dependent, then the WFA can be shrunk by at least 1 generic state.
Naturally it is desirable to have a WFA with as few states as possible while
not incurring too many additional edges. For any given image there is a lower
bound on the number of states a packed WFA can have if the WFA is to regenerate the given image.
Theorem 5. Suppose R I is a finite group and is quadrantly-supportive, and
that a packed WFA A under R has a target image x and has no pump states. Let
{xi }ni=1 be all the state images of the WFA. Then A has the minimum number
of states, the minimum required to reconstruct the target image x, if and only if
(i) all the state images xi are R-independent;
(ii) all state images are combinations of addressible subimages of x, i.e. all
state images are of the form
finite
X X
c, (x ) , c, R ;

R Q

(iii) target image x corresponds to a generic state.


To conclude this section, we note that the set R practically never exceeds
the scope of P in the application to image compression. This means that all

Similarity Enrichment in Image Compression

455

assumptions for the above two theorems are in fact automatically satisfied if R
is just a finite group. As far as WFA based image compression is concerned, R
doesnt even have to be a group: it suffices to be just a finite subset of F. We
also remark that the two apparently different formulations of WFA due to Culik
et al and Hafner respectively can be easily unified: for each hierarchic WFA due
to Hafner we can struct explicitly a linear WFA adopted by Culik et al, but not
vice versa. The details are again available in [12].

Implementation of a Packed WFA and the Resulting


Compression Improvement

The purpose here


is to show, through
an implemented
image compressor
based on the theory developed in
the previous sections, that similarity
enriched
WFA are indeed
more desirable and
Fig. 6. Extended WFA vs JPEG and vs linear WFA
beneficial to the
image compression. For clarity and simplicity of the actual implementation, we
do not consider any pump states here and will use only three resolution-wise
operators. They are respectively the horizontal, vertical and diagonal reflections.
Hence our compressor is in fact built on the simplistic treatment of the auxiliary techniques associated with the compression scheme based on an extended
WFA. For instance no entropy coding is performed after the quantisation of the
WFA weights. Despite these simplifications, the compression performance is still
on a par with the JPEG standard on natural images: slightly better than JPEG
at very low bitrates but otherwise marginally worse than JPEG in the present
simplistic implementation, see the l.h.s. figure in Fig. 6 for the compression of
the standard Lena image at 256 256 pixels in terms of RMSE. The little circles
there correspond to the WFA based compressor.
We now compare the compression performance on the Lena image for the
linear WFA and that for the packed WFA. First we note that in the encoding of a linear WFA, the storage spaces for the resolution-wise mappings are
completely eliminated. Despite this apparent equal footing, a codec based on extended WFA demonstrates a consistently superior compression ratio. In the case
of compressing the standard Lena image at 256 256 pixels, for instance, the
r.h.s. figure in Fig. 6 illustrates explicitly the better compression performance by
the codec based on an extended WFA in terms of PSNR. The curve traced out
there by the little circles corresponds to our currently implemented codec based
on a packed WFA. The other curve corresponds to the same codec when the
Lena 256x256: WFA vs JPEG

Lena 256x256: rotations vs no rotations

45

35

40

30

35

30

20

PSNR

RMSE

25

15

25

10

20

15

0.5

1.5
2
2.5
bpp: bit per pixel (x=JPEG, o=WFA)

3.5

10

0.5

1
1.5
2
2.5
3
bpp: bit per pixel (o=use rotations, x=no rotations)

3.5

456

Zhuhan Jiang, Bruce Litow, and Olivier de Vel

similarity enrichment is turned off. We finally note that the above benchmark
codec, for simplicity and speed, made use of only a topdown non-recursive inference algorithm. Hence a sizable improvement is naturally expected if a more
computation-intensive recursive inference algorithm, akin to that adopted in [5]
for the linear WFA, is instead implemented to the codec. These will however be
left to our future pursuit.

References
1. Jiang Z, Wavelet based image compression under minimum norms and vanishing
moments, in Yan H, Eades P, Feng D D and Jin J (edrs), Proceedings of PSA
Workshop on Visual Information Processing, (1999)15.
2. Culik II K and Kari J, Image compression using weighted finite state automata,
Computer Graphics 17 (1993)305313.
3. Hafner U, Refining image compression with weighted finite automata, Proceedings
of Data Compression Conference , edrs. Storer J and Cohn M, (1996)359368.
4. Hafner U, Weighted finite automata for video compression, IEEE Journal on Selected Areas in Communications , edrs. Enami K, Krikelis A and Reed T R,
(1998)108119.
5. Culik II K and Kari J, Inference algorithm for WFA and image compression, in
Fisher Y (edr), Fractal Image Compression: theory and application, Springer, New
York 1995.
6. Litow B and De Vel O, A recursive GSA acquisition algorithm for image compression, TR 97/2, Department of Computer Science, James Cook University 1997.
7. Culik II K and Karhumaki, Finite automata computing real functions, SIAM Journal of Computations 23 (1994)789814.
8. Culik II K, Dube S and Rajcani P, Effective compression of wavelet coefficients for
smooth and fractal-like data, Proceedings of Data Compression Conference , edrs.
Storer J and Cohn M, (1993)234243.
9. Culik II K and Fris I, Weighted finite transducers in image processing, Discrete
Applied Mathematics 58 (1995)223237.
10. Pereira F C and Riley M D, Speech recognition by composition of weighted finite
automata, At&T Labs, Murray Hill 1996.
11. Culik II K and Valenta V, Finite automata based compression of bi-level and simple
color images, presented at the Data Compression Conference, Snowbird, Utah 1996.
12. Jiang Z, Litow B and De Vel O, Theory of packed finite state automata, Technical
Report 99-173, University of New England, June 1999.
13. Laine A (edr), Wavelet Theory and Application: A Special Issue of the Journal of
Mathematical Imaging and Vision, Kluwer, Boston 1993.
14. Lenz R, Group Theoretical Methods in Image Processing, Lecture Notes in Computer Science 413, Springer, Berlin 1990.
15. Jiang Z, Lie symmetries and their local determinancy for a class of differentialdifference euqations, Physics Letters A 240 (1998)137143.
(k)
16. Jiang Z, The intrinsicality of Lie symmetries of un (t) = Fn (t, un+a , ..., un+b ),
Journal of Mathematical Analysis and Applications 227 (1998)396419.

On the Power of Input-Synchronized


Alternating Finite Automata
Hiroaki Yamamoto
Department of Information Engineering, Shinshu University,
4-17-1 Wakasato, Nagano-shi, 380-8553 Japan.
[email protected]

Abstract. In this paper, we introduce a new model of automata, called


input-synchronized alternating finite automata (i-SAFAs), and study
the power of i-SAFAs. We here consider two types of i-SAFAs, oneway i-SAFAs and two-way i-SAFAs. Then we show that (1) the class
of languages accepted by one-way i-SAFAs is equal to the class of regular languages, (2) two-way i-SAFAs are more powerful than one-way
i-SAFAs, that is, there exists a language L such that L is accepted by
a two-way i-SAFA but not accepted by any one-way i-SAFAs. In addition, we show that the class of languages accepted by f (n) parallelbounded two-way i-SAFAs is included in Nspace(S(n)), where S(n) =
min{n log n, f (n) log n}.

Introduction

Studying the power of synchronization in parallel computations is one of important problems in the field of computer science, and several researchers [2,5,6,7,9]
have studied the power of synchronization by using alternating machines. They
have shown that synchronization increases the power of alternating machines.
This paper is concerned with alternating finite automata with a new kind of synchronization, called an input-synchronized alternating finite automata (i-SAFAs),
which have a different synchronization from the existing synchronized alternating machines. Yamamoto [11] has shown an efficient recognition algorithm for
semi-extended regular expressions by using a variant of i-SAFAs. Thus the inputsynchronization is an important concept in the practical point of view as well as
the theoretical point of view. We show an interesting result that i-SAFAs have
a different characteristic from the existing models. In this paper, two types of iSAFAs are discussed; one is one-way i-SAFAs whose input head is permitted only
to move right or to remain stationary and the other is two-way i-SAFAs whose
input head is permitted to move left, to move right or to remain stationary.
Chandra et al. [1] introduced alternating finite automata (AFAs for short)
as a generalization of NFAs and showed that one-way AFAs also exactly accept
regular languages. Ladner et al. [8] studied two-way AFAs and showed that twoway AFAs also accept only regular languages. Thus one-way AFAs and two-way
AFAs have the same power.
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 457466, 2000.
c Springer-Verlag Berlin Heidelberg 2000

458

Hiroaki Yamamoto

The concept of synchronization was first introduced by Hromkovic. Slobodova [9] studied the power of synchronized alternating finite automata (SAFAs
for short), which are an extension of AFAs, and showed that SAFAs can accept
a wider class of languages than the class of regular languages. Dassow et al. [3]
showed that two-way SAFAs accept exactly context-sensitive languages, that
is, languages in Nspace(n). Here, for any function S(n) from natural numbers
to real numbers, by Nspace(S(n)) we denote the class of languages accepted
by nondeterministic Turing machines (NTMs) in O(S(n)) space. Hromkovic et
al. [5] improved this result and showed that the class of languages accepted by
one-way SAFAs is exactly equal to the class of context-sensitive languages. Thus
SAFAs are more powerful than AFAs, but one-way SAFAs and two-way SAFAs
also have the same power.
We will here show that one-way i-SAFAs accept only regular languages, but
two-way i-SAFAs accept a wider class than the class of regular languages. In
addition, we also show an upper bound of the power of two-way i-SAFAs.
The difference between i-SAFAs and SAFAs is in the synchronization system. SAFAs have a set of synchronizing symbols, and each time one of the
processes working in parallel enters a state with a synchronizing symbol, it must
wait until all other processes working in parallel enter accepting states or states
with the same synchronizing symbol. Thus all processes of an SAFA are synchronized by the same synchronizing symbol. Other models of synchronized automata also adopt a similar definition. On the other hand, i-SAFAs have a family
S = {S1 , . . . , St } of synchronizing sets such that each Si is a set of synchronizing
states, and processes of an i-SAFA are synchronized by the position of the input
head when entering a synchronizing state. That is, each time several processes
working in parallel enter synchronizing states belonging to the same synchronizing set Si , they all must start their computations from the same position of the
input. Note that it is not necessary that all processes of an i-SAFA working in
parallel enter synchronizing states in the same synchronizing set. For example,
it is possible that a process enters a synchronizing state in a synchronizing set
Si and other process enters a synchronizing state in a different synchronizing set
Sj . This time, these processes do not need to synchronize. Clearly, i-SAFAs are
also a generalization of AFAs because i-SAFAs without any synchronizing states
are AFAs.
In this paper, we will show the following results:
1. The class of languages accepted by one-way i-SAFAs is equal to the class of
regular languages,
2. There exists a language L such that L is accepted by a two-way i-SAFA but
not accepted by any one-way i-SAFAs. In fact, we show that there is a twoway i-SAFA accepting non-regular language L = {w#w# | w {0, 1}}.
In addition, we show that the class of languages accepted by f (n) parallelbounded two-way i-SAFAs is included in Nspace(S(n)), where S(n) =
min{n log n, f (n) log n}. We say that a two-way i-SAFA M is f (n) parallelbounded if, for any accepted input w of length n, the number of universal

On the Power of Input-Synchronized Alternating Finite Automata

459

configurations on the accepting computation tree of M on w is at most


O(f (n)).

2
2.1

One-Way i-SAFAs
Definitions

We first define one-way i-SAFAs.


Definition 1. A one-way i-SAFA M is a seven-tuple M = (Q, S, , , q0 , , F ),
where
Q is a finite set of states,
S = {S1 , . . . , St } is a family of synchronizing sets such that each Si ( Q)
is a set of synchronizing states and Si Sj = for any 1 i, j t,
is a finite input alphabet,
q0 ( Q) is the initial state,
is a function mapping Q to {, },
F ( Q) is a set of final states,
is a transition function mapping Q ( {}) to 2Q , where  denotes the
empty string.
If (q) = (, respectively), then q is called a universal (existential, respectively) state. A configuration of M is defined to be a pair (q, pos), where q is
a state and pos is a position of the input head. If q is a universal (existential,
respectively) state, then (q, pos) is called a universal (existential, respectively)
configuration. Among these configurations, if a state q is in F , then the configuration is also called an accepting configuration. The configuration (q0 , 1) is
called an initial configuration. The interpretation of (q, a) = {q1 , . . . , ql } is that
M reads the input symbol a and changes the state from q to q1 , . . . , ql . This
time, if a 6= , then M advances the input head one symbol right, and if a = ,
then M does not advance the input head (this is called an -move). We give a
precise definition of acceptance for one-way i-SAFAs.
Definition 2. A full computation tree of a one-way i-SAFA M on an input
w = a1 an is a labelled tree T such that

each node of T is labelled by a configuration of M ,


each edge of T is labelled by a symbol in {a1 , . . . , an , },
the root of T is labelled by (q0 , 1),
if a node v of T is labelled by (q, pos) and (q, a) = {q1 , . . . , qk } for a symbol
a {, apos } is defined, then v has k children v1 , . . . , vk such that each vi is
labelled by (qi , pos0 ) and every edge ei from v to vi is labelled by the symbol a.
Furthermore, if a = apos , then pos0 = pos + 1, and if a = , then pos0 = pos.

460

Hiroaki Yamamoto

Definition 3. Let T be a full computation tree of a one-way i-SAFA M on


an input w of length n and let v0 be the root of T . For a node v of T , let
= (p1 , b1 ) (pu , bu ) be the maximum sequence of labels on the path from v0
to v satisfying the following: (1) b1 b2 bu n, and (2) for any
i (1 i u), pi is a synchronizing state. For the sequence , we make a subsequence (pi1 , bi1 ) (pie , bie )(pu , bu ) by taking out all labels (pi , bi ) satisfying
bi < bi+1 for 1 i u 1 and (pu , bu ) in the order. Then the sequence
(pi1 , bi1 ) (pie , bie )(pu , bu ) is called a synchronizing sequence of v. This sequence means that only the last synchronizing state is considered when M travels
synchronizing states by consecutive -moves. In addition, for any synchronizing
set Ss ( S), let us consider a sequence (s1 , bi1 ) (sl , bil ) made by picking up
all labels (p0i , b0i ) with p0i Ss from a synchronizing sequence (p01 , b01 ) (p0l , b0l ) of
v. Then we call this subsequence an Ss -synchronizing sequence of v.

Definition 4. A computation tree T 0 of a one-way i-SAFA M on an input w


of length n is a subtree of a full computation tree T such that
if v is labelled by a universal configuration, then v has the same children as
in T ,
if v is labelled by an existential configuration, then v has at most one child,
let v1 and v2 be arbitrary nodes. For any synchronizing set Ss ( S), let
(s1 , b1 ) (sl1 , bl1 ) and (s01 , c1 ) (s0l2 , cl2 ) (l1 l2 ) be Ss -synchronizing
sequences of v1 and v2 , respectively. Then the sequence b1 bl1 is an initial
subsequence of the sequence c1 cl2 . This condition ensures that processes
working in parallel read an input symbol at the same position if they enter
synchronizing states belonging to Ss . We call this an input-synchronization.
We now associate a computation tree T 0 with a boolean function by regarding
states of M as variables as follows. Let (p1 , b1 ), . . . , (pt , bt ) be leaves of T 0 . Then
the boolean function f denoted by T 0 is defined to be p1 pt . Furthermore,
by eval(f ), we denote the value of f evaluated by assigning 1 to variables p F
and 0 to variables p
/ F.
Definition 5. An accepting computation tree of a one-way i-SAFA M on an
input w of length n is a finite computation tree of M on w such that
the root is labelled by the initial configuration,
each leaf is labelled by an accepting configuration with the input head position
n + 1, that is, labelled by a label (q, n + 1) with q F .
We say that a one-way i-SAFA M accepts an input w if there exists an accepting computation tree on w. We denote the language accepted by M by L(M ).
Clearly, all states occurring in the boolean function denoted by an accepting
computation tree are in F .

On the Power of Input-Synchronized Alternating Finite Automata

2.2

461

-Free One-Way i-SAFAs

We will here define -free one-way i-SAFAs, and show an algorithm to construct
an -free one-way i-SAFA from any given one-way i-SAFA. The only difference
from one-way i-SAFAs is that -free one-way i-SAFAs have no -moves. Thus
an -free one-way i-SAFA on an input w of length n always halts in n steps.
Unlike one-way i-SAFAs, we define the transition function of an -free one-way
i-SAFA to be a mapping from a pair (state, input symbol) to a monotone boolean
function in order to make the construction easier. Below is the formal definition.
Definition 6. An -free one-way i-SAFA M is a six-tuple M= (Q, S, , , q0 , F ),
where
Q is a finite set of states,
S = {S1 , . . . , St } is a family of synchronizing sets such that each Si ( Q)
is a set of synchronizing sates and Si Sj = for any 1 i, j t,
is a finite input alphabet,
q0 ( Q) is the initial state,
F ( Q) is a set of final states,
is a transition function mapping Q to F,
where F is a set of monotone boolean functions mapping {0, 1}|Q| to {0, 1}.
Definition 7. The full computation tree of an -free one-way i-SAFA M on an
input word w = a1 an is a labelled tree T such that

each node of T is labelled by a configuration of M ,


the root of T is labelled by the initial configuration (q0 , 1),
each edge of T is labelled by an input symbol a {a1 , . . . , an },
if a node v of T is labelled by (q, pos) and (q, apos ) = g(q1 , . . . , qk ), then v
has k children, v1 , . . . , vk , such that each vi is labelled by (qi , pos + 1) and
each edge ei from v to vi is labelled by apos .

A synchronizing sequence and an Ss -synchronizing sequence are defined in


the same way as one-way i-SAFAs. Now we define a language accepted by an
-free one-way i-SAFA.
Definition 8. Let M be an -free one-way i-SAFA. Then a computation tree
Tw of M on an input w is a subtree of the full computation tree T satisfying the
following:
For any node v, let V = {v 0 | v 0 is a child of v in T }. Then, for a subset
V1 V , v has only the nodes of V1 as the children,
let v1 and v2 be arbitrary nodes other than leaves. For any synchronizing
set Ss ( S), let (s1 , b1 ) (sl1 , bl1 ) and (s1 , c1 ) (sl2 , cl2 ) (l1 l2 ) be
Ss -synchronizing sequences of v1 and v2 , respectively. Then the sequence
b1 bl1 is an initial subsequence of the sequence c1 cl2 .
In the following, we associate a computation tree of an -free one-way i-SAFA
with a boolean function by regarding a configuration (q, i) as a variable.

462

Hiroaki Yamamoto

Definition 9. Let M = (Q, S, , , q0 , F ) be an -free one-way i-SAFA. By



, we mean a computation tree of M on an input w = a1 an such that
Tw,q
it is computed by starting from the state q. Then we define a boolean function

as follows. Let the label of v be (q 0 , pos), where
denoted by each node v of Tw,q
0
q Q.
1. If v is a leaf, then the boolean function denoted by v is (q 0 , pos),
2. if v is not a leaf and (q 0 , apos ) = g(q1 , . . . , qk ), then the boolean function
f denoted by v is defined as follows; let v10 , . . . , vk0 1 be children of v having
labels (q10 , i), . . . , (qk0 1 , i), respectively, and let f1 , . . . , fk1 be boolean functions
denoted by v10 , . . . , vk0 1 , respectively. Then f = g(g1 , . . . , gk ), where, for any
1 i k, gi = fj if there is qj0 such that qi = qj0 ; otherwise gi = 0.


. Then, by the boolean function denoted by Tw,q
,
Let r be the root of Tw,q

we mean the boolean function fw denoted by r, and say that Tw,q has a boolean
function fw . Such a boolean function fw is evaluated by the following assignment
to each variable, and its value is denoted by value(fw ). The assignment is done
as follows. Here note that |w| = n.
For each variable (q, i) occurring in fw ,

1. if i = n + 1, then


(q, i) =

1
0

if q F ,
if q
/ F,

2. if i < n + 1, then (q, i) = 0.


Let L(M ) be the language accepted by an -free one-way i-SAFA M . Then

with a boolean function fw
L(M ) = {w | there exists a computation tree Tw,q
0
such that q0 is the initial state and value(fw ) = 1}.

2.3

Conversion from a One-Way i-SAFA to an -Free One-Way


i-SAFA

Since an image of the transition function of an -free one-way i-SAFA is a boolean


function, it is convenient to associate a subtree of a computation tree of a oneway i-SAFA on i for the construction of an -free one-way i-SAFA. We introduce
two types of such computation trees.
Definition 10. Let M = (Q, S, , , q0 , , F ) be a one-way i-SAFA. Then,
1. by T1i ,q , we mean a computation tree of M on an input i such that (1) it
is computed by starting from the state q and (2) all the nodes other than the
root are labelled by a non-synchronizing state,
2. by T2i ,q , we mean a computation tree of M on an input i such that (1)
it is computed by starting from the state q and (2) each leaf is labelled
by either a synchronizing state or a non-synchronizing state, and if it is
labelled by a non-synchronizing state, then there is not any synchronizing
states on the path from the root to the leaf (hence note that q must be also
non-synchronizing state in this case).

On the Power of Input-Synchronized Alternating Finite Automata

463

Now, we extend the definition of -CLOSURE defined for an NFA with moves (see [4]) to a one-way i-SAFA.
Definition 11. Let M = (Q, S, , , q0 , , F ) be a one-way i-SAFA. Then, for
any state q Q, two sets -CL1 (q) and -CL2 (q) are defined as follows.
-CL1 (q)= { f | for i 0, f is the boolean function denoted by a computation
tree T1i ,q of M }.
-CL2 (q)= { f | for i 0, f is the boolean function denoted by a computation
tree T2i ,q of M }.
Let M = (Q, S, , , q0 , , F ) with Q = {q0 , . . . , ql } be a one-way i-SAFA.
Then the boolean function denoted by a computation tree of M has l + 1 variq }, S,
ables. We will construct an -free one-way i-SAFA M1 = (Q {
{#}, 1 , q, F1 ) from M , where q is a new state and # is a new symbol. The
differences between M and M1 are just in the transition functions and the sets
of final states. Let q be any state in Q. Then we define 1 as follows:
X
h(q0 , q1 , . . . , ql ),
(1)
1 (q, a) =
hH

where
H=

{g(g0 , g1 , . . . , gl ) | g0 -CL2 (q0 ), . . . , gl -CL2 (ql )},

(2)

gG

and
G=

{g|g = f (f0 , f1 , . . . , fl )},

(3)

f -CL1 (q)

then fi = qi1 qij , if


where (qi , a) = {qi1 , . . . , qij } and if (qi ) = P
(qi ) = then fi = qi1 qij . Note that Pmeans the repeated boolean
q , #) = f -CL (q ) f and a set F1
OR. For the initial state q, we have 1 (
2 0
P
f . Then F1 =
is defined as follows. For any qi Q, let gi =
f -CL1 (qi )
F {qi | eval(gi ) = 1}. Clearly, from the above construction, the following
property holds for M and M1 . Here, for any boolean functions f1 and f2 , f1 and
f2 are said to be equivalent, denoted by f1 f2 , if and only if the value of f1 is
equal to the value of f2 for any assignment to variables.
Lemma 12. Let M and M1 be a one-way i-SAFA and an -free i-SAFA described above, respectively. Then, for any q Q and a , if h is in H, then
there exists a computation tree Ta,q of M on the symbol a with a boolean function
fa such that h fa , and conversely, if Ta,q is a computation tree of M on the
symbol a with a boolean function fa , then there exists h H such that h fa .
Furthermore, if M enters a synchronizing state after reading a, then M1 also
enters the same synchronizing state and vice versa.
By this lemma, we immediately have the following theorem.

464

Hiroaki Yamamoto

Theorem 13. Let M be a one-way i-SAFA with m states. Then we can construct an -free one-way i-SAFA M1 such that M1 has m+1 states and L(M1 ) =
{#w | w L(M )}.
2.4

The Power of One-Way i-SAFAs

In the previous section, we have shown that one-way i-SAFAs can be converted
to -free one-way i-SAFAs. We here show that -free one-way i-SAFAs can be
simulated by AFAs, and thus one-way i-SAFAs accept exactly the class of regular
languages by Theorem 13.
Lemma 14. Let M be an -free one-way i-SAFA with m states including t synchronizing states. Then there exists an AFA N with m 2t states such that
L(M ) = L(N ).
Theorem 15. The class of languages accepted by one-way i-SAFAs is equal to
the class of regular languages.

Two-Way i-SAFAs

In this section, we show two results; one is that a two-way i-SAFAs can accept a
non-regular language, the other is that the class of languages accepted by f (n)
parallel-bounded two-way i-SAFAs is included in Nspace(S(n)), where S(n) =
min{n log n, f (n) log n}. Thus two-way i-SAFAs are more powerful than one-way
i-SAFAs.
3.1

Definitions

Definition 16. A two-way i-SAFA M is a seven-tuple M = (Q, S, , , q0 , , F ),


where
Q is a finite set of states,
S = {S1 , . . . , St } is a family of synchronizing sets such that each Si ( Q)
is a set of synchronizing sates and Si Sj = for any 1 i, j t,
is a finite input alphabet,
q0 ( Q) is the initial state,
is a function mapping Q to {, },
F ( Q) is a set of final states,
is a transition function mapping Q to 2Q{L,R,N } .
The interpretation of (q, a) = {(q1 , D1 ), . . . , (ql , Dl )} is that M reads the
input symbol a , changes the state from q to qi and moves the input head one
cell depending on Di . If Di = L then M moves the input head one cell to the
left, if Di = R then M moves the input head one cell to the right, if Di = N
then M does not move the input head. We give a precise definition of acceptance
of an input for two-way i-SAFAs.

On the Power of Input-Synchronized Alternating Finite Automata

465

Definition 17. The full computation tree of a two-way i-SAFA M on an input


w = a1 an is a labelled tree T such that
each node of T is labelled by a triple (q, pos, depth) of a state of M , a head
position of M and the depth of the node,
the root of T is labelled by (q0 , 1, 0),
if a node v of T is labelled by (q, pos, depth) and (q, apos ) = {(q1 , D1 ),
. . . , (qk , Dk )}, then v has k children v1 , . . . , vk such that each vi is labelled
by (qi , posi , depth + 1). This time, if Di = L then posi = pos 1, if Di = R
then posi = pos + 1, if Di = N then posi = pos.

Definition 18. Let T be the full computation tree of a two-way i-SAFA M on an


input w of length n and let v0 be the root of T . For a node v of T , let (p1 , b1 , d1 )
(pu , bu , du ) be the maximum sequence of labels on the path from v0 to v such
that for any i (1 i u), pi is a synchronizing state and bi n. Then this
sequence is called a synchronizing sequence of v. In addition, for any synchronizing set Ss ( S), let us consider the sequence (pi1 , bi1 , di1 ) (pil , bil , dil ) made
by picking up all labels (pi , bi , di ) with pi Ss from a synchronizing sequence
(p1 , b1 , d1 ) (pu , bu , du ) of v. Then, we call this sequence an Ss -synchronizing
sequence of v.

Definition 19. A computation tree T 0 of a two-way i-SAFA M on an input w


of length n is a subtree of the full computation tree T such that
if v is labelled by a universal configuration, then v has the same children as
in T ,
if v is labelled by an existential configuration, then v has at most one child,
let v1 and v2 be arbitrary nodes. For any synchronizing set Ss ( S), let
(s1 , b1 , d1 ) (sl1 , bl1 , dl1 ) and (s01 , c1 , d01 ) (s0l2 , cl2 , d0l2 ) (l1 l2 ) be Ss synchronizing sequences of v1 and v2 , respectively. Then these two sequences
must satisfy the following: (1) for any i (1 i l1 1), di d0i di+1 or
d0i di d0i+1 holds, (2) the sequence b1 bl1 is an initial subsequence of
the sequence c1 cl2 .
Suppose that several processes enter synchronizing states in a synchronizing
set Ss . Then the condition (1) means that a process cannot enter successively
synchronizing states in Ss before other processes enter a synchronizing state in
Ss . An accepting computation tree of a two-way i-SAFA M is defined in same way
as Definition 5. We say that M accepts an input w if there exists an accepting
computation tree on w. Let f (n) be a function from natural numbers to real
numbers. Then it is said that M is f (n) parallel-bounded if, for any accepted
input w of length n, the number of universal configurations on an accepting
computation tree of M on w is at most O(f (n)).

466

3.2

Hiroaki Yamamoto

The Power of Two-Way i-SAFAs

We show that two-way i-SAFAs are more powerful than one-way i-SAFAs, and
then show an upper bound for the power of two-way i-SAFAs.
Theorem 20. There exists a language L such that L can be accepted by a twoway i-SAFA but not accepted by any one-way i-SAFAs.
Let us consider L = {w#w# | w {0, 1}}. Since the language L is not
regular, it is clear that any one-way i-SAFAs cannot accept L because one-way
i-SAFAs accept only regular languages. Hence the following lemma leads to the
theorem.
Lemma 21. The language L = {w#w# | w {0, 1}} can be accepted by a
two-way i-SAFA.
The following theorem states an upper bound.
Theorem 22. The class of languages accepted by f (n) parallel-bounded two-way
i-SAFAs is included in Nspace(S(n)), where S(n) = min{n log n, f (n) log n}.

References
1. A.K. Chandra, D.C. Kozen and L.J. Stockmeyer, Alternation, J. Assoc. Comput.
Mach. 28,1, 114-133, 1981.
2. O.H. Ibarra and N.Q. Tran, On communication-bounded synchronized alternating
finite automata, Acta Informatica, 31, 4, 315-327, 1994.
3. J.Dassow, J.Hromkovic, J.Karhuaki, B.Rovan and A. Slobodova, On the power of
synchronization in parallel computation, In Proc. 14th MFCS89, LNCS 379,196206, 1989.
4. J.E. Hopcroft and J.D. Ullman, Introduction to automata theory language and
computation, Addison Wesley, Reading Mass, 1979.
5. J. Hromkovic, K. Inoue, B. Rovan, A. Slobodova, I. Takanami and K.W. Wagner,
On the power of one-way synchronized alternating machines with small space,
International Journal of Foundations of Computer Science, 3, 1, 65-79, 1992.
6. J. Hromkovic and K. Inoue, A note on realtime one-way synchronized alternating
one-counter automata, Theoret. Comput. Sci., 108, 2, 393-400, 1993.
7. J. Hromkovic, B. Rovan and A. Slobodova, Deterministic versus nondeterministic
space in terms of synchronized alternating machines, Theoret. Comput. Sci., 132,
2, 319-336, 1994.
8. R.E. Ladner, R.J. Ripton and L.J. Stockmeyer, Alternating pushdown and stack
automata, SIAM J. Computing, 13, 1, 1984.
9. A. Slobodova, On the power of communication in alternating machines, In Proc.
13th MFCS88, LNCS 324,518-528, 1988.
10. M.Y. Vardi, Alternating automata and program verification, In Computer Science
Today-Recent Trends and Developments, LNCS 1000, 471-485, 1996.
11. H. Yamamoto, An automata-based recognition algorithm for semi-extended regular
expressions, manuscript, 2000.

Ordered Quantum Branching Programs Are


More Powerful than Ordered Probabilistic
Branching Programs under a Bounded-Width
Restriction
Masaki Nakanishi, Kiyoharu Hamaguchi, and Toshinobu Kashiwabara
Graduate School of Engineering Science, Osaka University,
Toyonaka, Osaka 560-8531, Japan

Abstract. One of important questions on quantum computing is whether there is a computational gap between the model that may use
quantum effects and the model that may not. Researchers have shown
that some quantum automaton models are more powerful than classical
ones. As one of classical computational models, branching programs have
been studied intensively as well as automaton models, and several types
of branching programs are introduced including read-once branching programs and bounded-width branching programs. In this paper, we introduce a new quantum computational model, a quantum branching program, as an extension of a classical probabilistic branching program, and
make comparison of the power of these two models. We show that, under
a bounded-width restriction, ordered quantum branching programs can
compute some function that ordered probabilistic branching programs
cannot compute.

Introduction

There are many results that quantum computers might be more powerful than
classical computers [2,5], it is unclear whether there is a computational gap between the model that may use quantum effects and the model that may not.
Researchers have shown that some quantum automaton models are more powerful than classical ones [1,3]. It would give hints on the power of quantum computation to study about other computational models to see whether quantum
computational models can be more powerful than classical ones.
As one of classical computational models, branching programs have been
studied intensively as well as automaton models, and several types of branching
programs are introduced including read-once branching programs and boundedwidth branching programs [4].
In this paper, we introduce a new quantum computational model, a quantum
branching program, as an extension of a classical probabilistic branching program, and make comparison of the power of these two models. We show that,
under a bounded-width restriction, ordered quantum branching programs can
D.-Z. Du et al. (Eds.): COCOON 2000, LNCS 1858, pp. 467476, 2000.
c Springer-Verlag Berlin Heidelberg 2000

468

Masaki Nakanishi, Kiyoharu Hamaguchi, and Toshinobu Kashiwabara

compute some function that ordered probabilistic branching programs cannot


compute.
The remainder of this paper has the following organization. In Sect. 2, we
define several types of quantum branching programs and probabilistic branching
programs. In Sect. 3, we show that, under a bounded-width restriction, ordered
quantum branching programs can compute some function that ordered probabilistic branching programs cannot compute. We conclude with future work in
Sect. 4.

Preliminaries

We define technical terms.


Definition 1. Probabilistic Branching Programs
A probabilistic branching program (a PBP) is a directed acyclic graph that
has two terminal nodes, which are labeled by 0 and 1, and internal nodes, which
are labeled by boolean variables taken from a set X = {x1 , . . . , xn }. There is a
distinguished node, called source, which has in-degree 0. Each internal node has
two types of outgoing edges, called the 0-edges and the 1-edges respectively. Each
edge e has a weight w(e) (0 w(e) 1). Let E0 (v) and E1 (v) be the set of
0-edges and the set of 1-edges of a node v respectively. The sum of the weights
of the edges in E0 (v) and E1 (v) is 1. That is,
X
X
w(e) = 1,
w(e) = 1 .
eE0 (v)

eE1 (v)

A PBP reads n inputs and returns a boolean value as follows: Starting at the
source, the value of the labeled variable of the node is tested. If this is 0 (1), an
edge in E0 (v) (E1 (v)) is chosen according to the probability distribution given
as the weights of the edges. The next node that will be tested is the node pointed
by the chosen edge. Arriving at the terminal node, the labeled boolean value is
returned.
We say that a PBP P computes a function f (with error rate 1/2 ) if
P returns the correct value of f for any inputs with probability at least 1/2 +
( > 0).
t
u
We show examples of PBPs in Fig. 1.
Definition 2. Quantum Branching Programs
A quantum branching program (a QBP) is an extension of a probabilistic
branching program, and its form is same as a probabilistic branching program
except for edge weights. In a QBP, the weight of each edge has a complex number
w(e) (0 ||w(e)|| 1). The sum of the squared magnitude of the weights of the
edges in E0 (v) and E1 (v) is 1. That is,
X
X
||w(e)||2 = 1,
||w(e)||2 = 1 .
eE0 (v)

eE1 (v)

Ordered Quantum Branching Programs


x

0.2

1-edge
0-edge

0.8

0.8

469

y
0.2

1
1

1
1

Fig. 1. probabilistic branching programs that compute f = xy with error rate 0


and 0.2 respectively
The edge weight w(e) represents the amplitude with which, currently in the node
v, the edge will be followed in the next step.
Nodes are divided into the three sets of the accepting set (Qacc ), the rejecting
set (Qrej) and the non-halting set (Qnon ). The configurations of P are identified
with the nodes in Q = (Qacc Qrej Qnon ). A superposition of a QBP P is any
element of l2 (Q) (the space of mappings from Q to C with l2 norm). For each
q Q, |qi denotes the unit vector that takes value 1 at q and 0 elsewhere.
We define a transition function : (Q {0, 1} Q) C as follows:
(v, a, v 0 ) = w(e) ,
where w(e) is the weight of the a-edge (a = 0 or 1) from a node v to v 0 . If the aedge from v to v 0 does not exist, then (v, a, v 0 ) = 0. We define a time evolution
operator as follows:
X
(v, x(v), v 0 ) |v 0 i ,
Ux |vi =
v 0 Q

where x denotes the input of a QBP, and x(v) denotes the assigned value in x
to the labeled variable of the node v. If the time evolution operator is unitary,
we say that the corresponding QBP is well-formed, that is, the QBP is valid in
terms of the quantum theory.
We define the observable O to be Eacc Erej Enon , where
Eacc = span {|vi |v Qacc } , Erej = span {|vi |v Qrej } ,
Enon = span {|vi |v Qnon } .
A QBP reads n inputs and returns a boolean value as follows: The initial state
|0 i is the source |vs i. At each step, the time evolution operator is applied to the
state |i i, that is, |i+1 i = Ux |i i. Next, |i+1 i is observed with respect to
Eacc Erej Enon . Note that this observation causes the quantum state |i+1 i to

470

Masaki Nakanishi, Kiyoharu Hamaguchi, and Toshinobu Kashiwabara


1-edge

0-edge

+
-

+
y

+
+

+
0

+
+

+
1

Fig. 2. A quantum branching program that computes f = x y with no error.


The weight of each edge is 12 or 12 , and only signs are put on the figure.
be projected onto the subspace compatible with the observation. Let the outcomes
of an observation be accept, reject and non-halting corresponding to Eacc ,
Erej and Enon respectively. Until accept or reject is observed, applying the
time evolution operator and observation is repeated. If accept (reject) is
observed, boolean value 1 (0) is returned.
We say that a QBP P computes a function f (with error rate 1/2 ) if
P returns the correct value of f for any inputs with probability at least 1/2 +
( > 0).
t
u
We show an example of a QBP in Fig. 2. To check well-formedness, we introduce the following theorem.
Theorem 1.
A QBP P is well-formed.
for any input x, the transition function
satisfies the following condition.

P
1
q
=
q2
1
0
0
q0 (q1 , x(q1 ), q )(q2 , x(q2 ), q ) =
0 q1 6= q2 ,
where (q, a, q 0 ) denotes the conjugate of (q, a, q 0 ).
Proof. It is obvious since Ux is unitary if and only if the vectors Ux |vi are
orthonormal.
t
u
Definition 3. The Language Recognized by a Branching Program
A language L is a subset of {0, 1}. Let the n-th restriction Ln of a language L
be L {0, 1}n . A sequence of branching programs {Pn } recognizes a language L if
and only if, there exists (> 0), and the n-input branching program Pn computes
the characteristic function fLn (x) of Ln with error rate at most 1/2 for all
n N, where

1 (x Ln )
fLn (x) =
0 (x 6 Ln ) .
t
u

Ordered Quantum Branching Programs

471

Definition 4. Bounded-Width Branching Programs


For a branching program P , we can make any path from the source to a node
v have the same length by inserting dummy nodes. Let the resulting branching
program be P 0 . We say that P 0 is leveled. Note that P 0 does not need to compute
the same function as P . The length of the path from the source to a node v is
called the level of v. We define width(i) for P 0 as follows:
width(i) = |{v|the level of v is i.}| .
We define Width(P 0 ) as follows:
Width(P 0 ) = max{width(i)} .
i

We say that the width of P is bounded by Width(P 0 ).


A sequence of branching programs {Pn } is a bounded-width branching program
if, for a constant w, {Pn } satisfy the following condition.
P {Pn }, The width of P is bounded by w .
t
u
We also call a sequence of branching programs a branching program when
it is not confused. We denote a bounded-width QBP and a bounded-width PBP
as a bw-QBP and a bw-PBP respectively.
Definition 5. Ordered Branching Programs
Given a bounded-width branching program, we can make it leveled as shown
in the above. For a given variable ordering = (xk1 xk2 . . . xkn ), if the
appearances of the variables obey the ordering , that is, xki precedes xkj (i < j)
on any path from the source to a terminal node, and the labeled variables to all
the nodes at the same level are the same, we say that the branching program is
ordered.
t
u

Comparison of the Computational Power of Ordered


bw-QBPs and Ordered bw-PBPs

In this section, we show that ordered bw-QBPs can compute some function
that ordered bw-PBPs cannot compute. We define the function HALFn and the
language LHALF .
Definition 6. The Function HALFn and the Language LHALF
We define HALFn : Bn B as follows:

1
|{xi |xi = 1}| = n2
.
HALFn (x1 , . . . , xn ) =
0
otherwise
In the following, we denote the variables on which HALFn depends as X =
{xi |1 i n}. We define LHALF as follows:


LHALF = x x {0, 1}k , HALFk (x) = 1 .
t
u

472

3.1

Masaki Nakanishi, Kiyoharu Hamaguchi, and Toshinobu Kashiwabara

Ordered bw-QBPs That Recognize LHALF

In quantum computing, different computational paths interfere with each other


when they reach the same configuration at the same time. In [3], a quantum
finite automaton is constructed so that, only for inputs that the quantum finite
automaton should accept, the computational paths interfere with each other.
In this paper, we modify this technique for quantum branching programs, and
construct a quantum branching program that recognizes the language LHALF .
Theorem 2. Ordered bw-QBPs can recognize LHALF .
Proof. To show that ordered bw-QBPs can recognize LHALF , we construct an
ordered bw-QBP that computes HALFn for any n. Figure 3 illustrates the QBP.
We define the set of nodes Q as follows:
Q = {vs , v1 , v2 , v3 , vacc , vrej1 , vrej2 }


v(i,xk ) |xk X, 1 i 3


v(i,xk ,j,T) |xk X, 1 i 3, 1 j i


v(i,xk ,j,F) |xk X, 1 i 3, 1 j 3 i + 1 .
The labeled variable to the node v(i,xk ) , v(i,xk ,j,T) , and v(i,xk ,j,F) is xk . The
labeled variable to the node vs is x1 . The labeled variable to the node v1 , v2 ,
and v3 is xn .
We define the accepting set (Qacc ), the rejecting set (Qrej ), the set of 0-edges
(E0 ), the set of 1-edges (E1 ) and the weights of edges (w(e)) as follows:
Qacc = {vacc }, Qrej = {vrej1 , vrej2 } .


E0 = (vs , v(i,x1 ) ) |1 i 3


(v(i,xk ) , v(i,xk ,1,F) ) |1 i 3, 1 k n


(v(i,xk ,j,F) , v(i,xk ,j+1,F) ) |1 i 3, 1 j 3 i, 1 k n


(v(i,xk ,3i+1,F) , v(i,xk+1 ) ) |1 i 3, 1 k n 1


(v(i,xn ,3i+1,F) , vi ) |1 i 3
{(vi , vacc ), (vi , vrej1 ), (vi , vrej2 ) |1 i 3 } .


E1 = (vs , v(i,x1 ) ) |1 i 3


(v(i,xk ) , v(i,xk ,1,T) ) |1 i 3, 1 k n


(v(i,xk ,j,T) , v(i,xk ,j+1,T) ) |1 i 3, 1 j i 1, 1 k n


(v(i,xk ,i,T) , v(i,xk+1 ) ) |1 i 3, 1 k n 1


(v(i,xn ,i,T) , vi ) |1 i 3
{(vi , vacc ), (vi , vrej1 ), (vi , vrej2 ) |1 i 3 } .

Ordered Quantum Branching Programs

473

1-edge

n-1

0-edge
1-edge
and 0-edge

v3

vrej2

v2

vrej1

v1

vacc

v3,x1

vs
v2,x1

v1,x1,1,T
v1,x1

v1,x2
v1,x1,1,F
v1,x1,3,F
v1,x1,2,F

Fig. 3. a QBP that computes HALFn


1
w((vs , v(1,x1 ) )) = w((vs , v(2,x1 ) )) = w((vs , v(3,x1 ) )) = ,
3
1
w((v1 , vacc )) = w((v1 , vrej1 )) = w((v1 , vrej2 )) = ,
3


2i
1
1
w((v2 , vacc )) = , w((v2 , vrej1 )) = exp
,
3
3
3


4i
1
1
, w((v3 , vacc )) = ,
w((v2 , vrej2 )) = exp
3
3
3




4i
8i
1
1
w((v3 , vrej1 )) = exp
, w((v3 , vrej2 )) = exp
3
3
3
3
The weights of the other edges are all 1.
Adding some more nodes and edges, each node of the QBP can be made to
have
1. one incoming 0-edge and one incoming 1-edge with the weight of 1,
2. or, three incoming 0-edges and three incoming 1-edges with the same weights
as between (v1 , v2 , v3 ) and (vacc , vrej1 , vrej2 ).
and have
1. one outgoing 0-edge and one outgoing 1-edge with the weight of 1,
2. or, three outgoing 0-edges and three outgoing 1-edges with the same weights
as between (v1 , v2 , v3 ) and (vacc , vrej1 , vrej2 ).
In addition, incoming edges of each node can be made to be originated from the
nodes labeled by the same variable. Then it is straightforward to see that this
QBP can be well-formed by Theorem 1.
Given an input x, let the number of the variables in X = {x1 , . . . , xn } to
which the value 1 is assigned be k. Then the number of steps from v(i,x1 ) to vi is

474

Masaki Nakanishi, Kiyoharu Hamaguchi, and Toshinobu Kashiwabara

ik + (3 i + 1)(n k) + n. Thus for any two distinct i and j (1 i, j 3), the


number of steps from the source to vi (vj ) is the same if and only if k = n/2.
Therefore the superposition of this QBP becomes 13 |v1 i+ 13 |v2 i+ 13 |v3 i after
3n + 1 steps if HALFn (x) = 1. Since Ux ( 13 |v1 i + 13 |v2 i + 13 |v3 i) = |vacc i,
this ordered bw-QBP returns 1 with probability 1 if HALFn (x) = 1. On the
i
i
other hand, since Ux |vi i = 13 |vacc i + e3 |vrej1 i + e3 |vrej2 i, this ordered bwQBP returns 0 with probability 2/3 if HALFn (x) = 0. Therefore this ordered
t
u
bw-QBP computes HALFn with one-sided error.
3.2

Ordered bw-PBPs Cannot Recognize LHALF

Theorem 3. Ordered bw-PBPs cannot recognize LHALF .

t
u

To prove Theorem 3, we introduce the following definition and lemma.


Definition 7. Variation Distance
The variation distance of two probability distributions P1 and P2 over the
same sample space I is defined as follows:
1X
|P1 (i) P2 (i)| .
2
iI

Similarly, we define the variation distance of two vectors x1 = (a1 , . . . , an ) and


x2 = (b1 , . . . , bn ) (a1 , . . . , an , b1 , . . . , bn : real numbers) as follows:
1 X
|ai bi | .
2
1in

t
u
Lemma 1. Let m be the set that consists of all probability distributions of m
events, that is,
m = {(a1 , . . . , am ) |a1 0, . . . , am 0, a1 + . . . + am = 1 } .
For a finite set S m and a constant ( > 0), if the cardinality of S is
sufficiently large, the following holds.
D1 S, D2 S
(the variation distance of D1 and D2 ) <
Proof. We prove by induction on m. It is obvious that the lemma holds when
m = 2. We assume that the lemma holds when m = k 1. We consider the case
of m = k. We assume that the cardinality of S k is sufficiently large, and,
for any two distinct Di , Dj S, the variation distance of Di and Dj is greater
than or equal to . For ai , we define N (l ai r) as follows:



a 0(1 j N ), a1 + . . . + aN = 1,
.
N (l ai r) = (a1 , a2 , . . . , aN ) j
l ai r

Ordered Quantum Branching Programs

475

Since the cardinality of S is sufficiently large, the following holds.


c, i
S 0 = S k (c ai c + /2), and
the cardinality of S 0 is sufficiently large.
We fix c and i in the following. We assume that i = k without loss of generality. For x = (a1 , . . . , ak ), let the least index of the minimum of {a1 , . . . , ak1 } be
s. For example, if x = (0.35, 0.3, 0.05, 0.05, 0.25), the minimum is 0.05 and the
least index is s = 3. For x0 = (a1 , . . . , as1 , as + ak c, as+1 , . . . , ak1 ), we define
the function F as F (x) = x0 . For any two distinct x1 = (a1 , . . . , ak ) S 0 and
x2 = (b1 , . . . , bk ) S 0 (we assume that ak bk w.l.o.g.), since the variation distance of x1 and x2 is at least , the variation distance of the vectors F (x1 ) and
F (x2 ) is at least 12 ((ak bk )(ak c)(bk c)) = (bk c) /2 = /2.
Thus F (x1 ) differs from F (x2 ) for any two distinct x1 , x2 S 0 . Therefore
|S 0 | = |S 00 | if we define




1
00
0

F (x) x S
S =
.
1c
Note that, for a vector x S 0 and F (x) = (a1 , . . . , ak1 ), a1 + . . . + ak1 = 1 c
and a1 0, . . . , ak1 0. Thus, for a vector (b1 , . . . , bk1 ) S 00 , b1 +. . .+bk1 =
1 and b1 0, . . . , bk1 0. Therefore in the case of m = k1, there is S 00 k1
such that, for any two distinct Di , Dj S 00 , the variation distance of Di and

, and the cardinality of S 00 is sufficiently large. This is a


Dj is at least 2(1c)
contradiction.
t
u
We show the proof of Theorem 3 in the following.
(Proof of Theorem 3)
We assume that there is an ordered bw-PBP {Pn } that recognizes LHALF ,
that is, P {Pn } computes HALFn with error rate 1/2 . We say that a PBP
is in normal form when all the variables appear on any path from the source
to a terminal node. We assume that P is in normal form with the ordering
= (x1 . . . xn ) without loss of generality. Let S n2 be the set of the variables
of the former half of the variable ordering, that is, S n2 = {xj |1 j n2 }. When n
is sufficiently large, there are sufficient number of assignments to the variables in
S n2 such that, for any two distinct assignments, the weights of the assignments
differ. Let Da denotes the probability distribution for the nodes at which we
arrive when we compute according to a. That is, Da (v) is the probability such
that we arrive at the node v after we compute according to a. For sufficient
number of assignments, there are sufficient number of corresponding probability
distributions. Thus, since P is a bounded-width PBP, when n is sufficiently large,
there are two distinct assignment, a1 and a2 , to the variables in S n2 satisfying
the following conditions by Lemma 1.
The variation distance of Da1 and Da2 is less than .
The weight of a1 (the number of 1 in a1 ) differs from that of a2 .

476

Masaki Nakanishi, Kiyoharu Hamaguchi, and Toshinobu Kashiwabara

Let the arest be the assignment to the variables of the latter half of the
variable ordering such that, for the complete assignment a1 arest , HALFn (a1
arest ) = 1. Then if we compute according to a1 arest , we arrive at the terminal
node of 1 with probability at least 1/2 + . On the other hand, if we compute
according to a2 arest , we arrive at the terminal node of 1 with probability at
least 1/2 + = 1/2. We show the reason in the following.
Let I be
I = {i|Da1 (i) > Da2 (i)} .
Since the variation distance of Da1 and Da2 is less than ,

X
X
(Da1 (i) Da2 (i)) =
(Da2 (i) Da1 (i)) < .
iI

i6I

Thus comparing the probabilities with which we arrive at the terminal node of
1 computing according to a1 arest and a2 arest , the difference is at most .
Therefore we arrive at the terminal node of 1 with probability at least 1/2 +
= 1/2 if we compute according to a2 arest . However this probability must be
less than 1/2 . This is a contradiction.
t
u

Conclusion

In this paper, we show that there is a function that can be computed by ordered
bw-QBPs but cannot be computed by ordered bw-PBPs. This is an evidence
that introducing quantum effects to a computational model increases its power.
It is still the future work to study what results we obtain if we remove the restriction of bounded-width and variable ordering. Since quantum computational
models must be reversible, introducing classical reversible branching programs
and comparing them with quantum branching programs can also be future work.

References
1. A. Ambainis and R. Freivalds, 1-way quantum finite automata: strengths, weakness and generalizations, Proc. 39th Symp. on Foundations of Computer Science,
pp. 332341, 1998.
2. L. Grover, A fast quantum mechanical algorithm for database search, Proc. 28th
Symp. on the Theory of Computing, pp. 212219, 1996.
3. A. Kondacs and J. Watorus, On the power of quantum finite state automata, Proc.
38th Symp. on Foundations of Computer Science, pp. 6675, 1997.
4. C. Meinel, Modified branching programs and their computational power, Lecture
Notes in Computer Science 370, Springer-Verlag, Berlin, 1989.
5. P. Shor, Algorithms for quantum computation: discrete logarithms and factoring,
Proc. 35th Symp. on Foundations of Computer Science, pp. 124134, 1994.

Author Index

Aurenhammer, Franz, 23
Bach, Eric, 221
Barequet, Gill, 44
Bertossi, Alan A., 351
Boyar, Joan, 221
Brent, Richard P., 3
Chen, Zhi-Zhong, 105, 115
Cheung H.C., Shirley, 407
Cicalese, Ferdinando, 159
Deng, Xiaotie, 310
Di Battista, Giuseppe, 64
Di Crescenzo, Giovanni, 426
Dinneen, Michael J, 180
Duckworth, William, 34

Kobayashi, Hirotada, 436


Kojima, Hiromichi, 23
Kuusik, Ago, 74
Larsen, Kim S., 221
Leipert, Sebastian, 74
Li, Zhongfei, 310
Lin, Guo-Hui, 221
Lin, Yaw-Ling, 126
Liotta, Giuseppe, 64
Litow, Bruce, 447
Lubiw, Anna, 64
Makino, Kazuhisa, 396
Miller, Mirka, 193
Miyazaki, Shuichi, 202
Mundici, Daniele, 159
Mutzel, Petra, 95, 340

Fujita, Satoshi, 210


Ghosh, Sukumar, 242
Hada, Takeshi, 210
Halld
orsson, Magn
us M., 202
Hamaguchi, Kiyoharu, 467
He, Xin, 115
He, Yong, 232
Healy, Patrick, 74
Hernando, Carmen, 54
Houle, Michael E., 54
Hsu, Fang Rong, 126
Hurtado, Ferran, 54

Nakanishi, Masaki, 467


Nakano, Shin-ichi, 85
Nandy, Subhas C., 281
Nishizeki, Takao, 85
Ohsaki, Makoto, 23
Ono, Hirotaka, 396
Oswald, Marcus, 373
Papadimitriou, Christos H., 1
Park, Kunsoo, 262
Pinotti, M. Cristina, 351
Qin, Zhongping, 320

Ibaraki, Toshihide, 396


Imai, Hiroshi, 436
Iwama, Kazuo, 202
Jiang, Tao, 221
Jiang, Zhuhan, 447
Kashiwabara, Toshinobu, 467
Katoh, Naoki, 23
Khot, Subhash, 137
Kim, Sung Kwon, 299
Kim, Sung-Ryul, 262
Klau, Gunnar W., 340

Rahman, Md. Saidur, 85


Raman, Venkatesh, 137
Reinelt, Gerhard, 373
Reischuk, R
udiger, 383
Reznik, Yuriy A., 148
Ruskey, Frank, 330
Safavi-Naini, Reihaneh, 416
Sawada, Joe, 330
Shiau, Shyue-Horng, 252
Shin, Chan-Su, 299
Slamin, 193

478

Author Index

Takaoka, Tadao, 362


Taketomi, Shiro, 202
Tan, Zhiyi, 232
Tiskin, Alexandre, 272
Tokunaga, Yuuki, 436
Tsai, Yin-Te, 126
de Vel, Olivier, 447
Wang, Cao An, 291
Wang, Shouyang, 310
Wang, Yejing, 416
Weis, Stephan, 383
Weiskircher, Rene, 95

Whitesides, Sue, 64
Wormald, Nicholas C., 34
Xiong, Liu, 180
Xu, Yinfeng, 23, 320
Yamamoto, Hiroaki, 457
Yamasaki, Tomohiro, 436
Yang, Boting, 291
Yang, Chang-Biau, 252
Zheng, Xizhong, 170
Zhu, Binhai, 320
Zito, Michele, 34

You might also like