Computing and Combinatorics: 6th Annual International Conference, COCOON 2000 Sydney, Australia, July 26–28, 2000 Proceedings [1 ed.] 3540677879, 9783540677871

This book constitutes the refereed proceedings of the 6th Annual International Conference on Computing and Combinatorics

296 8 6MB

English Pages 478 [489] Year 2000

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Theoretical Problems Related to the Internet....Pages 1-2
Recent Progress and Prospects for Integer Factorisation Algorithms....Pages 3-22
Approximating Uniform Triangular Meshes in Polygons....Pages 23-33
Maximum Induced Matchings of Random Cubic Graphs....Pages 34-43
A Duality between Small-Face Problems in Arrangements of Lines and Heilbronn-Type Problems....Pages 44-53
On Local Transformation of Polygons with Visibility Properties....Pages 54-63
Embedding Problems for Paths with Direction Constrained Edges....Pages 64-73
Characterization of Level Non-planar Graphs by Minimal Patterns....Pages 74-84
Rectangular Drawings of Plane Graphs Without Designated Corners....Pages 85-94
Computing Optimal Embeddings for Planar Graphs....Pages 95-104
Approximation Algorithms for Independent Sets in Map Graphs....Pages 105-114
Hierarchical Topological Inference on Planar Disc Maps....Pages 115-125
Efficient Algorithms for the Minimum Connected Domination on Trapezoid Graphs....Pages 126-136
Parameterized Complexity of Finding Subgraphs with Hereditary Properties....Pages 137-147
Some Results on Tries with Adaptive Branching....Pages 148-158
Optimal Coding with One Asymmetric Error: Below the Sphere Packing Bound....Pages 159-169
Closure Properties of Real Number Classes under Limits and Computable Operators....Pages 170-179
A Characterization of Graphs with Vertex Cover Six....Pages 180-192
On the Monotonicity of Minimum Diameter with Respect to Order and Maximum Out-Degree....Pages 193-201
Online Independent Sets....Pages 202-209
Two-Dimensional On-Line Bin Packing Problem with Rotatable Items....Pages 210-220
Better Bounds on the Accommodating Ratio for the Seat Reservation Problem....Pages 221-231
Ordinal On-Line Scheduling on Two Uniform Machines....Pages 232-241
Agents, Distributed Algorithms, and Stabilization....Pages 242-251
A Fast Sorting Algorithm and Its Generalization on Broadcast Communications....Pages 252-261
Efficient List Ranking Algorithms on Reconfigurable Mesh....Pages 262-271
Tripods Do Not Pack Densely....Pages 272-280
An Efficient k Nearest Neighbor Searching Algorithm for a Query Line....Pages 281-290
Tetrahedralization of Two Nested Convex Polyhedra....Pages 291-298
Efficient Algorithms for Two-Center Problems for a Convex Polygon....Pages 299-309
On Computation of Arbitrage for Markets with Friction....Pages 310-319
On Some Optimization Problems in Obnoxious Facility Location....Pages 320-329
Generating Necklaces and Strings with Forbidden Substrings....Pages 330-339
Optimal Labelling of Point Features in the Slider Model....Pages 340-350
Mappings for Conflict-Free Access of Paths in Elementary Data Structures....Pages 351-361
Theory of Trinomial Heaps....Pages 362-372
Polyhedral Aspects of the Consecutive Ones Problem....Pages 373-382
The Complexity of Physical Mapping with Strict Chimerism....Pages 383-395
Logical Analysis of Data with Decomposable Structures....Pages 396-406
Learning from Approximate Data....Pages 407-415
A Combinatorial Approach to Asymmetric Traitor Tracing....Pages 416-425
Removing Complexity Assumptions from Concurrent Zero-Knowledge Proofs....Pages 426-435
One-Way Probabilistic Reversible and Quantum One-Counter Automata....Pages 436-446
Similarity Enrichment in Image Compression through Weighted Finite Automata....Pages 447-456
On the Power of Input-Synchronized Alternating Finite Automata....Pages 457-466
Ordered Quantum Branching Programs Are More Powerful than Ordered Probabilistic Branching Programs under a Bounded-Width Restriction....Pages 467-476
Recommend Papers

Computing and Combinatorics: 6th Annual International Conference, COCOON 2000 Sydney, Australia, July 26–28, 2000 Proceedings [1 ed.]
 3540677879, 9783540677871

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

Lecture Notes in Computer Science Edited by G. Goos, J. Hartmanis and J. van Leeuwen

1858

3

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

P reface

T he papers in t his volume were select ed for present at ion at t he 6t h Annual Int ernat ional Comput ing and Combinat orics Conference (COCOON 2000), in Sydney, Aust ralia from J uly 26 - 28, 2000. T he t opics cover many areas in t heoret ical comput er science and combinat orial opt imizat ion. T here were 81 high quality papers submit t ed t o COCOON 2000. Each paper was reviewed by at least t hree program commit t ee members, and t he 44 papers were select ed. It is expect ed t hat most of t hem will appear in a more complet e form in scient i c journals. In addit ion t o t he select ed papers, t he volume also cont ains t he papers from two invit ed keynot e speeches by Christ os P apadimit riou and Richard Brent . T his year t he Hao W ang A ward was given t o honor t he paper judged by t he program commit t ee t o have t he great est merit . T he recipient is \ Approximat ing Uniform Triangular Meshes in P olygons" by Franz Aurenhammer, Naoki Kat oh, Hiromichi Kojima, Makot o Ohsaki, and Yinfeng Xu. T he rst Best Y oung Researcher paper award was given t o William Duckwort h for his paper \ Maximum Induced Mat chings of Random Cubic Graphs". We wish t o t hank all who have made t his meet ing possible: t he aut hors for submit t ing papers, t he program commit t ee members and t he ext ernal referees, sponsors, t he local organizers, ACM SIGACT for handling elect ronic submissions, Springer-Verlag for t heir support , and Debbie Hat herell for her assist ance.

J uly 2000

Sponsoring Inst it ut ions University of New Sout h Wales University of Newcast le University of Sydney Comput er Science Associat ion of Aust ralasia

Ding-Zhu Du P et er Eades Xuemin Lin

Conference Organizat ion

P rogram Com m it t ee Co-chairs Ding-Zhu Du (University of Minnesot a, USA) P et er Eades (University of Sydney, Aust ralia) Xuemin Lin (University of New Sout h Wales, Aust ralia)

P rogram Com m it t ee David Avis (McGill, Canada) J ianer Chen (Texas A&M, USA) Francis Chin (Hong Kong U., Hong Kong) Vladimir Est ivill-Cast ro (Newcast le, Aust ralia), George Havas (UQ, Aust ralia) Hiroshi Imai (Tokyo, J apan) Tao J iang (UC Riverside, USA) Michael J uenger (Cologne, Germany) Richard Karp (UC Berkeley, USA) D. T . Lee (Academia Sinica, Taiwan) Bernard Mans (Macquarie U., Aust ralia) Brendan McKay (ANU, Aust ralia) Maurice Nivat (Universit e de P aris VII, France) Takeshi Tokuyama (Tohoku, J apan) Robert o Tamassia (Brown, USA) J ie 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 Com m it t ee Vladimir Est ivill-Cast ro (Conference Co-chair, University of Newcast le) Arun Sharma (Conference Co-chair, University of New Sout h Wales) Hai-Xin Lu (University of New Sout h Wales)

VIII

Conference Organizat ion

R eferees Kazuyuki Amano J o roy Beauquier Francois Bert ault Christ oph Buchheim S.W. Cheng L. Devroye Mat t hias Elf St anley Fung Yehuda Hassin Seokhee Hong T san-Sheng Hsu Wen-Lian Hsu Ming-Tat Ko J oachim Kupke T hierry Lecroq Weifa Liang Frauke Liers Chi-J en Lu Hsueh-I Lu

Marcus Oswald Andrzej P elc David P eleg St ephane P erennes Z.P. Qin Bruce Reed Maurice Rojas J ames L. Schwing Rinovia M.G. Simanjunt ak Slamin Rinovia Simanjunt ak P et er T ischer Da-Wei Wang J ohn Wat orus Mart in Wol Yinfeng Xu Ding Feng Ye Hong Zhu

Table of Cont ent s

Invit ed Talks T heoret ical P roblems Relat ed t o t he Int ernet Christos H. Papadimitriou

: : : : : : : : : : : : : : : : : : : : : : : : : :

Recent P rogress and P rospect s for Int eger Fact orisat ion Algorit hms Richard P. Brent

: : : : : :

1

3

H ao Wang A ward P aper Approximat ing Uniform Triangular Meshes in P olygons : : : : : : : : : : : : : : : : Franz A urenhammer, Naoki K atoh, Hiromichi K ojima, Makoto Ohsaki, Y infeng X u

:

23

: : : : : : : : : : : : :

34

T he B est Young R esearcher P aper Maximum Induced Mat chings of Random Cubic Graphs : : : W illiam Duckworth, Nicholas C. W ormald, Michele Zito

Com put at ional G eom et ry 1 A Duality between Small-Face P roblems in Arrangement s of Lines and Heilbronn-Type P roblems : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : Gill Barequet On Local Transformat ion of P olygons wit h Visibility P ropert ies Carmen Hernando, Michael E. Houle, Ferran Hurtado

:

44

: : : : : : : : :

54

G raph D rawing Embedding P roblems for P at hs wit h Direct ion Const rained Edges : : : : : : Giuseppe Di Battista, Giuseppe Liotta, A nna Lubiw, Sue W hitesides Charact erizat ion of Level Non-planar Graphs by Minimal P at t erns Patrick Healy, Ago K uusik, Sebastian Leipert

: :

64

: : : : : : :

74

Rect angular Drawings of P lane Graphs Wit hout Designat ed Corners Md. Saidur Rahman, Shin-ichi Nakano, Takao Nishizeki Comput ing Opt imal Embeddings for P lanar Graphs Petra Mutzel, Rene W eiskircher

: : : : :

85

: : : : : : : : : : : : : : : : : : : :

95

X

Table of Cont ent s

G raph T heory and A lgorit hm s 1 Approximat ion Algorit hms for Independent Set s in Map Graphs Zhi-Zhong Chen Hierarchical Topological Inference on P lanar Disc Maps : Zhi-Zhong Chen, X in He

: : : : : : : : :

105

: : : : : : : : : : : : : : : :

115

E cient Algorit hms for t he Minimum Connect ed Dominat ion on Trapezoid Graphs : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : Y aw-Ling Lin, Fang Rong Hsu, Y in-Te T sai

: : : : : : : :

126

Com plexity, D iscret e M at hem at ics, and N umber T heory P aramet erized Complexity of Finding Subgraphs wit h Heredit ary P ropert ies : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : Subhash K hot, Venkatesh Raman Some Result s on Tries wit h Adapt ive Branching Y uriy A . Reznik

: : : : : : : :

137

: : : : : : : : : : : : : : : : : : : : : : :

148

Opt imal Coding wit h One Asymmet ric Error: Below t he Sphere P acking Bound : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : Ferdinando Cicalese, Daniele Mundici

: :

159

Closure P ropert ies of Real Number Classes under Limit s and Comput able Operat ors : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 170 X izhong Zheng

G raph T heory and A lgorit hm s 2 A Charact erizat ion of Graphs wit h Vert ex Cover Six Michael J. Dinneen, Liu X iong

: : : : : : : : : : : : : : : : : : :

180

On t he Monot onicity of Minimum Diamet er wit h Respect t o Order and Maximum Out -Degree : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 193 Mirka Miller, Slamin

Online A lgorit hm s Online Independent Set s : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : Magnus M. Halldorsson, K azuo Iwama, Shuichi Miyazaki, Shiro Taketomi

: : : : : : : : : : :

T wo-Dimensional On-Line Bin P acking P roblem wit h Rot at able It ems Satoshi Fujita, Takeshi Hada

: : :

202

210

Bet t er Bounds on t he Accommodat ing Rat io for t he Seat Reservat ion P roblem : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 221 Eric Bach, Joan Boyar, Tao Jiang, K im S. Larsen, Guo-Hui Lin

Table of Cont ent s

Ordinal On-Line Scheduling on T wo Uniform Machines Zhiyi Tan, Y ong He

XI

: : : : : : : : : : : : : : : : :

232

: : : : : : : : : : : : : : : : : : : : :

242

P arallel and D ist ribut ed Com put ing Agent s, Dist ribut ed Algorit hms, and St abilizat ion : Sukumar Ghosh

A Fast Sort ing Algorit hm and It s Generalizat ion on Broadcast Communicat ions : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : Shyue-Horng Shiau, Chang-Biau Y ang

: : : : : : : : : :

252

: : : : : : : : : : : : : :

262

: : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :

272

E cient List Ranking Algorit hms on Recon gurable Mesh Sung-R yul K im, K unsoo Park

Com put at ional G eom et ry 2 Tripods Do Not P ack Densely A lexandre T iskin

An E cient k Nearest Neighbor Searching Algorit hm for a Query Line Subhas C. Nandy Tet rahedralizat ion of T wo Nest ed Convex P olyhedra Cao A n W ang, Boting Y ang

: : :

281

: : : : : : : : : : : : : : : : : : :

291

E cient Algorit hms for T wo-Cent er P roblems for a Convex P olygon Sung K won K im, Chan-Su Shin

: : : : :

299

: : : : : : : : : : : : : : : :

310

Combinat orial Opt im izat ion On Comput at ion of Arbit rage for Market s wit h Frict ion X iaotie Deng, Zhongfei Li, Shouyang W ang

On Some Opt imizat ion P roblems in Obnoxious Facility Locat ion Zhongping Qin, Y infeng X u, Binhai Zhu

: : : : : : : : :

320

: : : : : : : : : : : :

330

: : : : : : : : : : : : : : : :

340

Generat ing Necklaces and St rings wit h Forbidden Subst rings Frank Ruskey, Joe Sawada Opt imal Labelling of P oint Feat ures in t he Slider Model Gunnar W . K lau, Petra Mutzel

D at a St ruct ures and Com put at ional B iology Mappings for Conflict -Free Access of P at hs in Element ary Dat a St ruct ures : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : A lan A . Bertossi, M. Cristina Pinotti

: : : : : : : : :

351

XII

Table of Cont ent s

T heory of Trinomial Heaps Tadao Takaoka

: : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :

P olyhedral Aspect s of t he Consecut ive Ones P roblem Marcus Oswald, Gerhard Reinelt

: : : : : : : : : : : : : : : : : : :

T he Complexity of P hysical Mapping wit h St rict Chimerism Stephan W eis, R u¨ diger Reischuk

362 373

: : : : : : : : : : : :

383

: : : : : : : : : : : : : : : :

396

: : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :

407

Learning and Crypt ography Logical Analysis of Dat a wit h Decomposable St ruct ures : Hirotaka Ono, K azuhisa Makino, Toshihide Ibaraki Learning from Approximat e Dat a Shirley Cheung H.C.

A Combinat orial Approach t o Asymmet ric Trait or Tracing Reihaneh Safavi-Naini, Y ejing W ang

: : : : : : : : : : : : : :

Removing Complexity Assumpt ions from Concurrent Zero-Knowledge P roofs : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : Giovanni Di Crescenzo

: : : :

416

426

A ut om at a and Quant um Com put ing One-Way P robabilist ic Reversible and Quant um One-Count er Aut omat a Tomohiro Y amasaki, Hirotada K obayashi, Y uuki Tokunaga, Hiroshi Imai

: :

436

: : :

447

: : : : : : :

457

Similarity Enrichment in Image Compression t hrough Weight ed Finit e Aut omat a : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : Zhuhan Jiang, Bruce Litow, Olivier de Vel On t he P ower of Input -Synchronized Alt ernat ing Finit e Aut omat a Hiroaki Y amamoto

Ordered Quant um Branching P rograms Are More P owerful t han Ordered P robabilist ic Branching P rograms under a Bounded-Widt h Rest rict ion : : : : 467 Masaki Nakanishi, K iyoharu Hamaguchi, Toshinobu K ashiwabara

A ut hor Index

: : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :

477

T h e o re t ic a l P ro b le m s R e la t e d t o t h e In t e rn e t ( E x t e n d e d A b st ra c t )

C h r ist os H . P a p a d im it r iou ⋆

Universit y of California, Berkeley, USA, chr i st os@cs. ber kel ey. edu ht t p: / / www. cs. ber kel ey. edu/ ∼chr i st os/

T h e In t er n et h a s a r gu a b ly su p er sed ed t h e com p u t er a s t h e m ost com p lex coh esive a r t ifa ct ( if you ca n ca ll it t h a t ) , a n d is, q u it e p r ed ict a b ly, t h e sou r ce of a n ew gen er a t ion of fou n d a t ion a l p r ob lem s for T h eor et ica l C om p u t er Scien ce. T h ese n ew t h eor et ica l ch a llen ges em a n a t e fr om sever a l n ovel a sp ect s of t h e In t er n et : ( a ) It s u n p r eced en t ed size, d iver sit y, a n d a va ila b ilit y a s a n in for m a t ion r ep osit or y ; ( b ) it s n ovel n a t u r e a s a com p u t er sy st em t h a t in t er t w in es a m u lt it u d e of econ om ic in t er est s in va r y in g d egr ees of com p et it ion ; a n d ( c) it s h ist or y a s a sh a r ed r esou r ce a r ch it ect u r e t h a t em er ged in a r em a r ka b ly a d h o c yet glor iou sly su ccessfu l m a n n er . In t h is t a lk I w ill su r vey som e r ecen t r esea r ch ( d on e in colla b or a t ion w it h J oa n Feigen b a u m , D ick K a r p , E lia s K ou t sou p ia s, a n d Scot t Sh en ker , see [1,2]) on p r ob lem s of t h e t wo la t t er k in d s. See [3,5] for ex a m p les of t h eor et ica l wor k a lon g t h e r st a x is. T o a la r ge ex t en t , t h e In t er n et owes it s r em a r ka b le a scen t t o t h e su r p r isin g em p ir ica l su ccess of T C P ’s con gest ion con t r ol p r ot o col [4]. A flow b et ween t wo p oin t s st r ives t o d et er m in e t h e cor r ect t r a n sm ission r a t e b y t r y in g h igh er a n d h igh er r a t es, in a lin ea r ly in cr ea sin g fu n ct ion . A s lin k s sh a r ed b y sever a l flow s r ea ch t h eir ca p a cit y, on e or m or e p a cket s m a y b e lost , a n d , in r esp on se, t h e cor r esp on d in g flow h a lv e s it s t r a n sm ission r a t e. T h e fa n t a st ic em p ir ica l su ccess of t h is cr u d e m ech a n ism r a ises im p or t a n t , a n d a t t im es t h eor et ica lly in t er est in g, q u est ion s r ela t ed t o n ovel sea r ch a lgor it h m s ( t h e p r o cess clea r ly con t a in s a n ovel va r ia n t of b in a r y sea r ch ) , on -lin e a lgor it h m s ( w h en t h e t r u e ca p a cit y t h a t a flow ca n u se ch a n ges in a n u n k n ow n a n d , in a wor st ca se, a d ver sa r ia l fa sh ion ) , a n d a lgor it h m ic ga m e t h eor y ( w h y is it t h a t flow s seem t o b e u n w illin g, or u n m ot iva t ed , t o m ove a wa y fr om T C P ?) . In a sit u a t ion in w h ich t h e sa m e p iece of in for m a t ion is m u lt ica st t o m illion s of in d iv id u a ls, it is of in t er est t o d et er m in e t h e p r ice t h a t ea ch r ecip ien t m u st p a y in r et u r n . T h e in for m a t ion in q u est ion is of d i er en t va lu e t o ea ch in d iv id u a l, a n d t h is va lu e is k n ow n on ly t o t h is in d iv id u a l. T h e p a r t icip a n t s m u st en ga ge in a m e c h a n i s m , t h a t is t o sa y, a d ist r ib u t ed p r ot o col w h er eb y t h ey d et er m in e t h e in d iv id u a ls w h o w ill a ct u a lly r eceive t h e in for m a t ion , a n d t h e p r ice ea ch w ill p a y. E con om ist s over t h e p a st fou r t y yea r s h a ve st u d ied su ch sit u a t ion s a r isin g in a u ct ion s, welfa r e econ om ics, a n d p r icin g of p u b lic go o d s, a n d h a ve com e u p w it h clever m ech a n ism s | solu t ion s t h a t sa t isfy va r iou s set s of d esid er a t a ⋆

R esearch part ially supp ort ed by t he Nat ional Science Foundat ion.

D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 1 { 2 , 2 0 0 0 . c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

2

Christ os H. P apadimit riou

( \ a x iom s" ) | or in gen iou s p r o ofs t h a t sa t isfy in g ot h er set s of d esid er a t a is im p ossib le. In t h e con t ex t of t h e In t er n et , h owever , a n im p or t a n t com p u t a t ion a l d esid er a t u m em er ges: T h e p r o t o c o l s h o u ld be e c i e n t , w it h r esp ect t o t h e t ot a l n u m b er of m essa ges sen t . It t u r n s ou t t h a t t h is n ovel con d it ion ch a n ges t h e sit u a t ion d r a m a t ica lly, a n d ca r ves ou t a n ew set of p r icin g m ech a n ism s t h a t a r e a p p r op r ia t e a n d fea sib le.

R e fe r e n c e s 1. J oan Feigenbaum , Christ os H. P apadim it riou, Scot t Shenker, \ Sharing t he Cost of Mult icast Transmissions," P r oc. 2000 ST O C . 2. R ichard M. K arp, E lias K out soupias, Christ os H. P apadim it riou, Scot t Shenker, \ O pt im izat ion P roblem s in Congest ion Cont rol," m anuscript , April 2000. 3. J on K leinb erg, \ Aut horit at ive sources in a hyp erlinked environment ," P r oc. A C M SI A M Sy m posi u m on D i scr et e A l gor i t hm s, 1998. 4. Van J acobson \ Congest ion Avoidance and Cont rol," in A C M Si gC om m P r oceedi n gs, pp 314-329, 1988. 5. Christ os H. P apadim it riou, P rabhakar R aghavan, Hisao Tam aki, Sant osh Vem pala, \ Lat ent Semant ic Indexing: A P robabilist ic Analysis," P roc. 1998 P O D S , t o app ear in t he sp ecial issue of J C SS .

R e c e nt P ro g re ss an d P ro sp e c t s fo r Int e g e r Fac t o risat io n A lg o rit h m s Richard P. Brent Oxford University Comput ing Lab orat ory, Wolfson Building, P arks Road, Oxford OX1 3QD, UK r pb@coml ab. ox. ac. uk ht t p: / / www. coml ab. ox. ac. uk/

T he int eger fact orisat ion and discret e logarit hm problems are of pract ical imp ort ance b ecause of t he widespread use of public key crypt osyst ems whose security dep ends on t he presumed di culty of solving t hese problems. T his pap er considers primarily t he int eger fact orisat ion problem. In recent years t he limit s of t he b est int eger fact orisat ion algorit hms have b een ext ended great ly, due in part t o Moore’s law and in part t o algorit hmic improvement s. It is now rout ine t o fact or 100-decimal digit numb ers, and feasible t o fact or numb ers of 155 decimal digit s (512 bit s). We out line several int eger fact orisat ion algorit hms, consider t heir suit ability for implement at ion on parallel machines, and give examples of t heir current capabilit ies. In part icular, we consider t he problem of parallel solut ion of t he large, sparse linear syst ems which arise wit h t he MP QS and NF S met hods. A b st r a c t .

1

Int ro d u c t io n

T here is no known det erminist ic or randomised polynomial-t ime1 algorit hm for nding a fact or of a given composit e int eger N . T his empirical fact is of great int erest because t he most popular algorit hm for public-key crypt ography, t he RSA algorit hm [54], would be insecure if a fast int eger fact orisat ion algorit hm could be implement ed. In t his paper we survey some of t he most successful int eger fact orisat ion algorit hms. Since t here are already several excellent surveys emphasising t he number-t heoret ic basis of t he algorit hms, we concent rat e on t he comput at ional aspect s. T his paper can be regarded as an updat e of [8], which was writ t en just before t he fact orisat ion of t he 512-bit number RSA155. T hus, t o avoid duplicat ion, we refer t o [8] for primality t est ing, mult iple-precision arit hmet ic, t he use of fact orisat ion and discret e logarit hms in public-key crypt ography, and some fact orisat ion algorit hms of hist orical int erest . 1

For a p olynomial-t ime algorit hm t he exp ect ed running t ime should b e a p olynomial in t he lengt h of t he input , i.e. O ((log N ) ) for some const ant c . c

D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 3 { 2 2 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

4

1.1

Richard P. Brent

R andom ised A lgorit hm s

All but t he most t rivial algorit hms discussed below are r a n d o m i s ed a lg o r i t h m s , i.e. at some point t hey involve pseudo-random choices. T hus, t he running t imes are e x p ec t ed rat her t han w o r s t ca s e . Also, in most cases t he expect ed running t imes are conject ured, not rigorously proved.

1.2

P arallel A lgorit hm s

When designing parallel algorit hms we hope t hat an algorit hm which requires t ime T 1 on a comput er wit h one processor can be implement ed t o run in t ime T P  T 1 =P on a comput er wit h P independent processors. T his is not always t he case, since it may be impossible t o use all P processors e ect ively. However, it is t rue for many int eger fact orisat ion algorit hms, provided P is not t oo large. T he s p eed u p of a parallel algorit hm is S = T 1 =T P . We aim for a linear speedup, i.e. S =  ( P ).

1.3

Quant um A lgorit hm s

In 1994 Shor [57,58] showed t hat it is possible t o fact or in polynomial expect ed t ime on a quant um comput er [20,21]. However, despit e t he best e ort s of several research groups, such a comput er has not yet been built , and it remains unclear whet her it will ever be feasible t o build one. T hus, in t his paper we rest rict our at t ent ion t o algorit hms which run on classical (serial or parallel) comput ers. T he reader int erest ed in quant um comput ers could st art by reading [50,60].

1.4

M o ore’s Law

Moore’s \ law" [44,56] predict s t hat circuit densit ies will double every 18 mont hs or so. Of course, Moore’s law is not a t heorem, and must event ually fail, but it has been surprisingly accurat e for many years. As long as Moore’s law cont inues t o apply and result s in correspondingly more powerful parallel comput ers, we expect t o get a st eady improvement in t he capabilit ies of fact orisat ion algorit hms, wit hout any algorit hmic improvement s. Hist orically, improvement s over t he past t hirty years have been due bot h t o Moore’s law and t o t he development of new algorit hms (e.g. ECM, MP QS, NFS).

2

Int e g e r Fac t o risat io n A lg o rit h m s

T here are many algorit hms for nding a nont rivial fact or f of a composit e int eger N . T he most useful algorit hms fall int o one of two classes {

Recent P rogress and P rosp ect s for Int eger Fact orisat ion Algorit hms

5

A. T he run t ime depends mainly on t he size of N ; and is not st rongly dependent on t he size of f . Examples are {  Lehman’s algorit hm [28], which has worst -case run t ime O ( N 1 = 3 ).  T he Cont inued Fract ion algorit hm [39] and t he Mult iple P olynomial Quadrat ic Sieve (MP QS) algorit hm [46,59], p which under plausible assumpt ions have expect ed run t ime O (exp( c ln N ln ln N )) ; where c is a const ant (depending on det ails of t he algorit hm). For MP QS, c  1.  T he Number Field Sieve (NFS) algorit hm [29,30], which under plausible assumpt ions has expect ed run t ime O (exp( c(ln N ) 1 = 3 (ln ln N ) 2 = 3 )) ; where c is a const ant (depending on det ails of t he algorit hm and on t he form of N ). B. T he run t ime depends mainly on t he size of f ; t he fact or found. (We can assume t hat f  N 1 = 2 .) Examples are {  T he t rial division algorit hm, which has run t ime O ( f  (log N ) 2 ).  P ollard’s \ rho" algorit hm [45], which under plausible assumpt ions has expect ed run t ime O ( f 1 = 2  (log N ) 2 ).  Lenst ra’s Ellipt ic Curve (ECM) algorit hmp [34], which under plausible assumpt ions has expect ed run t ime O (exp( c ln f ln ln f )  (log N ) 2 ) ; where c  2 is a const ant . In t hese examples, t he t ime bounds are for a sequent ial machine, and t he t erm (log N ) 2 is a generous allowance for t he cost of performing arit hmet ic operat ions on numbers which are O ( N 2 ). If N is very large, t hen fast int eger mult iplicat ion algorit hms [19,24] can be used t o reduce t he (log N ) 2 t erm. Our survey of int eger fact orisat ion algorit hms is necessarily cursory. For more informat ion t he reader is referred t o [8,35,48,53].

3

Le n st ra’s E llip t ic C u rv e A lg o rit h m

Lenst ra’s e l li p t i c c u r v e met hod/ algorit hm (abbreviat ed ECM) was discovered by H. W. Lenst ra, J r. about 1985 (see [34]). It is t he best known algorit hm in class B. To save space, we refer t o [7,8,34] and t he references t here for a descript ion of ECM, and merely give some examples of it s successes here. 3.1

EC M Ex am ples

1. In 1995 we complet ed t he fact orisat ion of t he 309-decimal digit (1025-bit ) 10 Fermat number F 1 0 = 22 + 1. In fact F 1 0 = 45592577  6487031809 

4659775785220018543264560743076778192897  p 2 5 2 where 46597   92897 is a 40-digit prime and p 2 5 2 = 13043   24577 is a 252-digit prime. T he comput at ion, which is described in det ail in [7], t ook

6

Richard P. Brent

about 240 Mips-years. (A Mips-year is t he comput at ion performed by a hypot het ical machine performing 106 inst ruct ions per second for one year, i.e. about 3: 15  101 3 inst ruct ions. Is is a convenient measure but should not be t aken t oo seriously.) 2. T he largest fact or known t o have been found by ECM is t he 54-digit fact or 484061254276878368125726870789180231995964870094916937 of (64 3 − 1) 4 2 + 1, found by Nik Lygeros and Michel Mizony wit h P aul Zimmermann’s GMP -ECM program [63] in December 1999 (for more det ails see [9]). 3.2

P arallel/ D ist ribut ed Im plem ent at ion of EC M

ECM consist s of a number of independent pseudo-random t rials, each of which can be performed on a separat e processor. So long as t he expect ed number of t rials is much larger t han t he number P of processors available, linear speedup is possible by performing P t rials in parallel. In fact , if T 1 is t he expect ed run t ime on one processor, t hen t he expect ed run t ime on a MIMD parallel machine wit h P processors is 1= 2+  ) (1) T P = T 1 =P + O ( T 1 3.3

EC M Fact oring R ecords

54

D

52 50 48 46 44 42 40 38 1990

1992

1994

1996

1998

2000

F igure 1: Size of fact or found by ECM versus year

2002

Recent P rogress and P rosp ect s for Int eger Fact orisat ion Algorit hms

7

Figure 1 shows t he size D (in decimal digit s) of t he largest fact or found by ECM against t he year it was done, from 1991 (40D) t o 1999 (54D) (hist orical dat a from [9]).

3.4

Ex t rap olat ion of EC M R ecords

p

7.6

D

7.4 7.2 7.0 6.8 6.6 6.4 6.2 6.0 1990

1992

1994 p F igure 2:

1996 D

versus year

1998 Y

2000

2002

for ECM

Let D be t he number of decimal digit s in t he largest fact or found by ECM up t o a given dat e. pFrom t he t heoret ical t ime bound for ECM, assuming Moore’s law, we expect D t o be roughly a linear funct ion of calendar year (in fact p D ln D shouldpbe linear, but given t he ot her uncert aint ies we p have assumed for simplicity t hat ln D is roughly a const ant ). Figure 2 shows D versus year Y . T he st raight line shown in t he Figure 2 is p D =

Y − 1932: 3

9: 3

p or equivalent ly Y = 9: 3 D + 1932: 3 ;

and ext rapolat ion gives D = 60 in t he year Y = 2004 and D = 70 in t he year Y = 2010.

8

4

Richard P. Brent

Q u ad rat ic S ie v e A lg o rit h m s

Quadrat ic sieve algorit hms belong t o a wide class of algorit hms which t ry t o nd two int egers x and y such t hat x 6 =  y (mod N ) but x 2 = y2

(mod N ) :

(2)

Once such x and y are found, t hen GCD ( x − y ; N ) is a nont rivial fact or of N . One way t o nd x and y sat isfying (2) is t o nd a set of r e la t i o n s of t he form u 2i = v i2 w i

(mod N ) ;

(3)

where t he w i have all t heir prime fact ors in a moderat ely small set of primes (called t he f a c t o r ba s e ). Each relat ion (3) gives a colunm in a mat rix R whose rows correspond t o t he primes in t he fact or base. Once enough columns have been generat ed, we can use Gaussian eliminat ion in G F (2) t o nd a linear dependency (mod 2) between a set of columns of R . Mult iplying t he corresponding relat ions now gives an expression of t he form (2). Wit h probability at least 1=2, we have x 6 =  y mod N so a nont rivial fact or of N will be found. If not , we need t o obt ain a di erent linear dependency and t ry again. In quadrat ic sieve algorit hms t he numbers w i are t he values of one (or more) quadrat ic polynomials wit h int eger coe cient s. T his makes it easy t o fact or t he w i by s i e v i n g . For det ails of t he process, we refer t o [11,32,35,46,49,52,59]. T he best quadrat ic sieve algorit hm (MP QS) can, under plausible assumpt ions, fact or a number N in t ime  (exp( c(ln N ln ln N ) 1 = 2 )), where c  1. T he const ant s involved are such t hat MP QS is usually fast er t han ECM if N is t he product of two primes which bot h exceed N 1 = 3 . T his is because t he inner loop of MP QS involves only single-precision operat ions. Use of \ part ial relat ions", i.e. incomplet ely fact ored w i , in MP QS gives a signicant performance improvement [2]. In t he \ one large prime" (P -MP Q S) variat ion w i is allowed t o have one prime fact or exceeding m (but not t oo much larger t han m ). In t he \ two large prime" (P P -MP QS) variat ion w i can have two prime fact ors exceeding m { t his gives a furt her performance improvement at t he expense of higher st orage requirement s [33]. 4.1

P arallel/ D ist ribut ed Im plem ent at ion of M P QS

T he sieving st age of MP QS is ideally suit ed t o parallel implement at ion. Dierent processors may use dierent polynomials, or sieve over dierent int ervals wit h t he same polynomial. T hus, t here is a linear speedup so long as t he number of processors is not much larger t han t he size of t he fact or base. T he comput at ion requires very lit t le communicat ion between processors. Each processor can generat e relat ions and forward t hem t o some cent ral collect ion point . T his was demonst rat ed by A. K. Lenst ra and M. S. Manasse [32], who dist ribut ed t heir program and collect ed relat ions via elect ronic mail. T he processors were scat t ered around t he world { anyone wit h access t o elect ronic mail and a C compiler

Recent P rogress and P rosp ect s for Int eger Fact orisat ion Algorit hms

9

could volunt eer t o cont ribut e2 . T he nal st age of MP QS { Gaussian eliminat ion t o combine t he relat ions { is not so easily dist ribut ed. We discuss t his in x7 below. 4.2

M P QS Ex am ples

MP QS has been used t o obt ain many impressive fact orisat ions [10,32,52,59]. At t he t ime of writ ing (April 2000), t he largest number fact ored by MP QS is t he 129-digit \ RSA Challenge" [54] number RSA129. It was fact ored in 1994 by At kins e t a l [1]. T he relat ions formed a sparse mat rix wit h 569466 columns, which was reduced t o a dense mat rix wit h 188614 columns; a dependency was t hen found on a MasP ar MP -1. It is cert ainly feasible t o fact or larger numbers by MP QS, but for numbers of more t han about 110 decimal digit s GNFS is fast er [22]. For example, it is est imat ed in [16] t hat t o fact or RSA129 by MP QS required 5000 Mips-years, but t o fact or t he slight ly larger number RSA130 by GNFS required only 1000 Mips-years [18].

5

T h e S p e c ial N u m b e r F ie ld S ie v e ( S N F S )

T he

e ld s i e v e (NFS) algorit hm was developed from t he s p ec i a l n u m be r (SNFS), which we describe in t his sect ion. T he g e n e r a l n u m be r e ld s i e v e (GNFS or simply NFS) is described in x6. Most of our numerical examples have involved numbers of t he form n u m be r

e ld s i e v e

ae 

(4)

b;

for small a and b, alt hough t he ECM and MP QS fact orisat ion algorit hms do not t ake advant age of t his special form. T he s p ec i a l n u m be r e ld s i e v e (SNFS) is a relat ively new algorit hm which does t ake advant age of t he special form (4). In concept it is similar t o t he quadrat ic sieve algorit hm, but it works over an algebraic number eld de ned by a , e and b. We refer t he int erest ed reader t o Lenst ra e t a l [29,30] for det ails, and merely give an example t o show t he power of t he algorit hm. 5.1

SN F S Ex am ples

Consider t he 155-decimal digit number 9

F 9 = N = 22 + 1

as a candidat e for fact oring by SNFS. Not e t hat 8N = m 5 + 8, where m = 21 0 3 . We may work in t he number eld Q ( ), where sat is es 2

5

+ 8 = 0;

T his idea of using machines on t he Int ernet as a \ free" sup ercomput er has b een adopt ed by several ot her comput at ion-int ensive project s

10

Richard P. Brent

and in t he ring of int egers of Q ( ). Because m 5 + 8 = 0 (mod N ) ;

t he mapping  : !7 m mod N is a ring homomorphism from Z [ ] t o Z =N Z . T he idea is t o search for pairs of small coprime int egers u and v such t hat bot h t he algebraic int eger u + v and t he (rat ional) int eger u + m v can be fact ored. (T he fact or base now includes prime ideals and unit s as well as rat ional primes.) Because  ( u + v ) = ( u + m v ) (mod N ) ; each such pair gives a relat ion analogous t o (3). T he prime ideal fact orisat ion of u + v can be obt ained from t he fact orisat ion of t he n o r m u 5 − 8v 5 of u + v . T hus, we have t o fact or simult aneously two int egers u + m v and j u 5 − 8v 5 j. Not e t hat , for moderat e u and v , bot h t hese int egers are much smaller t han N , in fact t hey are O ( N 1 = d ), where d = 5 is t he degree of t he algebraic number eld. (T he opt imal choice of d is discussed in x6.) Using t hese and relat ed ideas, Lenst ra e t a l [31] fact ored F 9 in J une 1990, obt aining F 9 = 2424833  7455602825647884208337395736200454918783366342657  p 9 9 ;

where p 9 9 is an 99-digit prime, and t he 7-digit fact or was already known (alt hough SNFS was unable t o t ake advant age of t his). T he collect ion of relat ions t ook less t han two mont hs on a network of several hundred workst at ions. A sparse syst em of about 200,000 relat ions was reduced t o a dense mat rix wit h about 72,000 rows. Using Gaussian eliminat ion, dependencies (mod 2) between t he columns were found in t hree hours on a Connect ion Machine. T hese dependencies implied equat ions of t he form x 2 = y 2 mod F 9 . T he second such equat ion was nont rivial and gave t he desired fact orisat ion of F 9 . More recent ly, considerably larger numbers have been fact ored by SNFS, for example, t he 211-digit number 102 1 1 − 1 was fact ored early in 1999 by a collaborat ion called \ T he Cabal" [13].

6

T h e G e n e ral N u m b e r F ie ld S ie v e ( G N F S )

T he g e n e r a l n u m be r e ld s i e v e (GNFS or just NFS) is a logical ext ension of t he special number eld sieve (SNFS). When using SNFS t o fact or an int eger N , we require two polynomials f ( x ) and g ( x ) wit h a common root m mod N but no common root over t he eld of complex numbers. If N has t he special form (4) t hen it is usually easy t o writ e down suit able polynomials wit h small coe cient s, as illust rat ed by t he two examples given in x5. If N has no special form, but is just some given composit e number, we can also nd f ( x ) and g ( x ), but t hey no longer have small coe cient s. Suppose t hat g ( x ) has degree d > 1 and f ( x ) is linear 3 . d is chosen empirically, but it is known from t heoret ical considerat ions t hat t he opt imum value 3

T his is not necessary. For example, Mont gomery found a clever way of choosing two quadrat ic p olynomials.

Recent P rogress and P rosp ect s for Int eger Fact orisat ion Algorit hms

11

is 

d

We choose m = bN

1= (d + 1)

3 ln N ln ln N



1= 3

:

c and writ e X

d

aj m j

N = j

= 0

where t he a j are \ base m digit s". T hen, de ning

f (x ) = x − m ;

X

d

j

= 0

aj x j ;

g(x ) =

it is clear t hat f ( x ) and g ( x ) have a common root m mod N . T his met hod of polynomial select ion is called t he \ base m " met hod. In principle, we can proceed as in SNFS, but many di cult ies arise because of t he large coe cient s of g ( x ). For det ails, we refer t he reader t o [36,37,41,47,48,62]. Su ce it t o say t hat t he di cult ies can be overcome and t he met hod works! D ue t o t he const ant fact ors involved it is slower t han MP QS for numbers of less t han about 110 decimal digit s, but fast er t han MP QS for su cient ly large num bers, as ant icipat ed from t he t heoret ical run t imes given in x2. Some of t he di cult ies which had t o be overcome t o t urn GNFS int o a pract ical algorit hm are: 1. P olynomial select ion. T he \ base m " met hod is not very good. P et er Mont gomery and Brian Murphy [40,41,42] have shown how a very considerable improvement (by a fact or of more t han t en for number of 140{155 digit s) can be obt ained. 2. Linear algebra. Aft er sieving a very large, sparse linear syst em over G F (2) is obt ained, and we want t o nd dependencies amongst t he columns. It is not pract ical t o do t his by st ruct ured Gaussian eliminat ion [25, x5] because t he \ ll in" is t oo large. Odlyzko [43,17] and Mont gomery [37] showed t h at t he Lanczos met hod [26] could be adapt ed for t his purpose. (T his is nont rivial because a nonzero vect or x over G F (2) can be ort hogonal t o it self, i.e. x T x = 0.) To t ake advant age of bit -parallel operat ions, Mont gomery’s program works wit h blocks of size dependent on t he wordlengt h (e.g. 64). 3. Square root s. T he nal st age of GNFS involves nding t he square r oot of a (very large) product of algebraic numbers4 . Once again, Mont gomery [36] found a way t o do t his. 4

An idea of Adleman, using quadrat ic charact ers, is essent ial t o ensure t hat t he desired square root exist s wit h high probability.

12

6.1

Richard P. Brent

R SA 155

At t he t ime of writ ing, t he largest number fact ored by GNFS is t he 155-digit RSA Challenge number RSA155. It was split int o t he product of two 78-digit primes on 22 August , 1999, by a t eam coordinat ed from CWI, Amst erdam. For det ails see [51]. To summarise: t he amount of comput er t ime required t o nd t he fact ors was about 8000 Mips-years. T he two polynomials used were f ( x ) = x − 39123079721168000771313449081

and g ( x ) = + 119377138320x 5

− 80168937284997582x 4 − 66269852234118574445x 3 + 11816848430079521880356852x 2 + 7459661580071786443919743056x − 40679843542362159361913708405064 :

T he polynomial g ( x ) was chosen t o have a good combinat ion of two propert ies: being unusually small over t he sieving region and having unusually many root s modulo small primes (and prime powers). T he e ect of t he second property alone makes g ( x ) as e ect ive at generat ing relat ions as a polynomial chosen at random for an int eger of 137 decimal digit s (so in e ect we have removed at least 18 digit s from RSA155 by judicious polynomial select ion). T he polynomial select ion t ook approximat ely 100 Mips-years or about 1.25% of t he t ot al fact orisat ion t ime. For det ails of t he polynomial select ion, see Brian Murphy’s t hesis [41]. T he t ot al amount of CP U t ime spent on sieving was 8000 Mips-years on assort ed machines (calendar t ime 3.7 mont hs). T he result ing mat rix had about 6: 7  106 rows and weight (number of nonzeros) about 4: 2  108 (about 62 nonzeros per row). Using Mont gomery’s block Lanczos program, it t ook almost 224 CP U-hours and 2 GB of memory on a Cray C916 t o nd 64 dependencies. Calendar t ime for t his was 9.5 days. Table 1. RSA130, RSA140 and RSA155 fact orisat ions RSA130 Tot al CP U t ime in Mips-years 1000 Mat rix rows 3: 5  106 Tot al nonzeros 1: 4  108 Nonzeros p er row 39 Mat rix solut ion t ime (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 P rogress and P rosp ect s for Int eger Fact orisat ion Algorit hms

13

Table 1 gives some st at ist ics on t he RSA130, RSA140 and RSA155 fact orisat ions. T he Mips-year t imes given are only rough est imat es. Ext rapolat ion of t hese gures is risky, since various algorit hmic improvement s were incorporat ed in t he lat er fact orisat ions and t he scope for furt her improvement s is unclear.

7

P aralle l Lin e ar A lg e b ra

At present , t he main obst acle t o a fully parallel and scalable implement at ion of GNFS (and, t o a lesser ext ent , MP QS) is t he linear algebra. Mont gomery’s block Lanczos program runs on a single processor and requires enough memory t o st ore t he sparse mat rix (about ve byt es per nonzero element ). It is possible t o dist ribut e t he block Lanczos solut ion over several processors of a parallel machine, but t he communicat ion/ comput at ion rat io is high [38]. Similar remarks apply t o some of t he best algorit hms for t he int eger discret e logarit hm problem. T he main di erence is t hat t he linear algebra has t o be performed over a (possibly large) nit e eld rat her t han over G F (2). In t his Sect ion we present some preliminary ideas on how t o implement t he linear algebra phase of GNFS (and MP QS) in parallel on a network of relat ively small machines. T his work is st ill in progress and it is t oo early t o give de nit ive result s. 7.1

A ssum pt ions

Suppose t hat a collect ion of P machines is available. It will be convenient t o assume t hat P = q2 is a perfect square. For example, t he machines might be 400 Mhz P Cs wit h 256 MByt e of memory each, and P = 16 or P = 64. We assume t hat t he machines are connect ed on a reasonably high-speed network. For example, t his might be mult iple 100Mb/ sec Et hernet s or some higher-speed propriet ary network. Alt hough not essent ial, it is desirable for t he physical network t opology t o be a q  q grid or t orus. T hus, we assume t hat a processor P i ; j in row i can communicat e wit h anot her processor P i ; j ′ in t he same row or broadcast t o all processors P i ;  in t he same row wit hout int erference from communicat ion being performed in ot her rows. (Similarly for columns.) T he reason why t his t opology is desirable is t hat it mat ches t he communicat ion pat t erns necessary in t he linear algebra: see for example [4,5,6]. To simplify t he descript ion, we assume t hat t he st andard Lanczos algorit hm is used. In pract ice, a block version of Lanczos [37] would be used, bot h t o t ake advant age of word-lengt h Boolean operat ions and t o overcome t he t echnical = 0 when we are working over a nit e eld. problem t hat u T u can vanish for u 6 T he overall communicat ion cost s are nearly t he same for blocked and unblocked Lanczos, alt hough blocking reduces st art up cost s. If R is t he mat rix of relat ions, wit h one relat ion per column, t hen R is a large, sparse mat rix over G F (2) wit h slight ly more columns t han rows. (Warning: in t he lit erat ure, t he t ransposed mat rix is oft en considered, i.e. rows and columns are oft en int erchanged.) We aim t o nd a nont rivial d e p e n d e n c y , i.e. a nonzero

14

Richard P. Brent

vect or x such t hat R x = 0. If we choose b = R y for some random y , and solve R x = b, t hen x − y is a dependency (possibly t rivial, if x = y ). T hus, in t he descript ion below we consider solving a linear syst em R x = b. T he Lanczos algorit hm over t he real eld works for a posit ive-de nit e symmet ric mat rix. In our case, R is not symmet ric (or even square). Hence we apply Lanczos t o t he n o r m a l eq u a t i o n s RT Rx = RT b

rat her t han direct ly t o R x = b. We do not need t o comput e t he mat rix A = R T R , because we can comput e A x as R T ( R x ). To comput e R T z , it is best t o t hink of comput ing ( z T R ) T because t he element s of R will be scat t ered across t he processors and we do not want t o double t he st orage requirement s by st oring R T as well as R . T he det ails of t he Lanczos it erat ion are not import ant for t he descript ion below. It is su cient t o know t hat t he Lanczos recurrence has t he form wi +

1

= A w i − ci ; i w i − ci ; i − 1 w i − 1

where t he mult ipliers ci ; i and ci ; i − 1 can be comput ed using inner product s of known vect ors. T hus, t he main work involved in one it erat ion is t he comput at ion of A w i = R T ( R w i ). In general, if R has n columns, t hen w i is a d e n s e n -vect or. T he Lanczos process t erminat es wit h a solut ion aft er n + O (1) it erat ions [37]. 7.2

Sparse M at rix -Vect or M ult iplicat ion

T he mat rix of relat ions R is sparse and almost square. Suppose t hat R has n columns, m  n rows, and  n nonzeros, i.e.  nonzeros per column. Consider t he comput at ion of R w , where w is a dense n -vect or. T he number of mult iplicat ions involved in t he comput at ion of R w is  n . (T hus, t he number of operat ions involved in t he complet e Lanczos process is of order  n 2  n 3 .) p For simplicity assume t hat q = P divides n , and t he mat rix R is dist ribut ed across t he q  q array of processors using a \ scat t ered" dat a dist ribut ion t o balance t he load and st orage requirement s [5]. Wit hin each processor P i ; j a sparse mat rix represent at ion will be used t o st ore t he relevant part R i ; j of R . T hus t he local st orage of requirement is O (  n =q2 + n =q). Aft er each processor comput es it s local mat rix-vect or product wit h about  n =q2 mult iplicat ions, it is necessary t o sum t he part ial result s ( n =q-vect ors) in each row t o obt ain n =q component s of t he product R w . T his can be done in several ways, e.g. by a syst olic comput at ion, by using a binary t ree, or by each processor broadcast ing it s n =q-vect or t o ot her processors in it s row and summing t he vect ors received from t hem t o obt ain n =q component s of t he product R w . If broadcast ing is used t hen t he result s are in place t o st art t he comput at ion of R T ( R w ). If an inner product is required t hen communicat ion along columns of t he processor array is necessary t o t ranspose t he dense n -vect or (each diagonal processor P i ; i broadcast s it s n =q element s along it s column).

Recent P rogress and P rosp ect s for Int eger Fact orisat ion Algorit hms

15

We see t hat , overall, each Lanczos it erat ion requires comput at ion O (  n =q2 + n ) on each processor, and communicat ion of O ( n ) bit s along each

row/ column of t he processor array. Depending on det ails of t he communicat ion hardware, t he t ime for communicat ion might be O (( n =q) log q) (if t he binary t ree met hod is used) or even O ( n =q + q) (if a syst olic met hod is used wit h pipelining). In t he following discussion we assume t hat t he communicat ion t ime is proport ional t o t he number of bit s communicat ed along each row or column, i.e. O ( n ) per it erat ion (not t he t ot al number of bit s communicat ed per it erat ion, which is O ( n q)). T he overall t ime for n it erat ions is TP 

 n 2 =P + n 2 ;

(5)

where t he const ant s and depend on t he comput at ion and communicat ion speeds respect ively. (We have omit t ed t he communicat ion \ st art up" cost since t his is typically much less t han n 2 .) Since t he t ime on a single processor is T 1   n 2 , t he e c i e n c y E P is EP =

and t he condit ion for E P 

T1 P TP



  + P

1=2 is  

P :

Typically = is large (50 t o several hundred) because communicat ion between processors is much slower t han comput at ion on a processor. T he number of nonzeros per column,  , is typically in t he range 30 t o 100. T hus, we can not expect high e ciency. Fort unat ely, high e ciency is not crucial. T he essent ial requirement s are t hat t he (dist ribut ed) mat rix R t s in t he local memories of t he processors, and t hat t he t ime for t he linear algebra does not dominat e t he overall fact orisat ion t ime. Because sieving typically t akes m u c h longer t han linear algebra on a single processor, we have considerable leeway. For example, consider t he fact orisat ion of RSA155 (see Table 1 above). We have n  6: 7  106 ,   62. T hus n 2  4: 5  101 3 . If t he communicat ions speed along each row/ column is a few hundred Mb/ sec t hen we expect t o be a small mult iple of 10− 8 seconds. T hus n 2 might be (very roughly) 106 seconds or say 12 days. T he sieving t akes 8000 Mips-years or 20 processor-years if each processor runs at 400 Mips. Wit h P processors t his is 20=P years, t o be compared wit h 12/ 365 years for communicat ion. T hus, sieving t ime  communicat ion t ime

600 P

and t he sieving t ime dominat es unless P > 600. For larger problems we expect t he sieving t ime t o grow at least as fast as n 2 .

16

Richard P. Brent

For more typical fact orisat ions performed by MP QS rat her t han GNFS, t he sit uat ion is bet t er. For example, using Arjen Lenst ra’s implement at ion of P P MP QS in t he Magma package, we fact ored a 102-decimal digit composit e c1 0 2 (a fact or of 142 1 3 − 1) on a 4  250 Mhz Sun mult iprocessor. T he sieving t ime was 11.5 days or about 32 Mips-years. Aft er combining part ial relat ions t he mat rix R had about n = 73000 columns. T hus n 2  5: 3  109 . At 100 Mb/ sec it t akes less t han one minut e t o communicat e n 2 bit s. T hus, alt hough t he current Magma implement at ion performs t he block Lanczos met hod on only one processor, t here is no reason why it could not be performed on a network of small machines (e.g. a \ Beowulf" clust er) and t he communicat ion t ime on such a network would only be a few minut es. 7.3

R educing C om municat ion T im e

If our assumpt ion of a grid/ t orus t opology is not sat is ed, t hen t he communicat ionp t imes est imat ed above may have t o be mult iplied by a fact or of order P . In order t o reduce t he communicat ion t ime (wit hout buying bet t er q = hardware) it may be wort hwhile t o perform some st eps of Gaussian eliminat ion before swit ching t o Lanczos. If t here are k relat ions whose largest prime is p , we can perform Gaussian eliminat ion t o eliminat e t his large prime and one of t he k relat ions. (T he work can be done on a single processor if t he relat ions are hashed and st ored on processors according t o t he largest prime occurring in t hem.) Before t he eliminat ion we expect each of t he k relat ions t o cont ain about  nonzeros; aft er t he eliminat ion each of t he remaining k − 1 relat ions will have about  − 1 addit ional nonzeros (assuming no \ cancellat ion"). From (5), t he t ime for Lanczos is about T = n ( z =P + n ) ;

where z =  n is t he weight (number of nonzeros) of t he mat rix R . T he e ect of eliminat ing one relat ion is n ! n 0 = n − 1, z ! z 0 = z + (  − 1)( k − 1) −  , T ! T 0 = n 0( z 0=P + n 0) . Aft er some algebra we see t hat T 0 < T if k
3  d n . Draw a circle wit h radius 32 d n around each point in S n0 n S k0 . Since w ( p 0n ) = l ( S n0 n S k0 ; S n0 [ V ) by (2), t hese circles are pairwise disjoint . By t he same reason, and because boundary dist ances de ned by V 0 = V [ S k0 are at most 3 d n , t hese circles all lie complet ely inside P . Obviously, t hese circles are also disjoint from t he j V j circles of radius d n cent ered at V . Finally, t he lat t er circles are pairwise disjoint , since d n  l ( V ; V ) = 2. Consequent ly, A

9  (n − k ) + 4

(P ) 

A

00

(4)

where A 00 denot es t he area inside of P which is covered by t he circles cent ered at V . Combining (3) and (4), and observing A 0 + A 00 =  j V j now implies n < 2k , a cont radict ion. It has t o be observed t hat t he number k depends on n . T he following fact guarant ees t he assumpt ion in Lemma 5, provided n is su cient ly large. Let B (P ) denot e t he perimet er of P . L e m m a 6 . T he con dition d n



A

(P ) = (  

B

(P )) im plies

n



2k .

P roof. By (3) we have n

(P ) − jV j:  (d n )2

A

 

To get a bound on k , observe t hat at most l ( e ) = 2d n − 1 point s are placed on each edge e of P . T his sums up t o k



(P ) − jV j: 2d n

B

Simple calculat ions now show t hat t he condit ion on implies n  2k .

dn

st at ed in t he lemma

T he following is a main t heorem of t his paper. T h e o r e m 2 . S uppose n is large en ough to assure the con dition s d n  l ( V ; V ) = 2 an d d n  A (P ) = (   B (P )) . T hen n o edge in the trian gulation T + = DT ( S n0 [ V ) is lon ger than 6  d n . M oreover, T + exhibits an edge len gth ratio of 6.

P roof. T wo cases are dist inguished, according t o t he value of w ( p 0n ).

Case 1: w ( p 0n ) < d n . Concerning upper bounds, Lemma 2 implies l ( e )  2  w ( p 0n ) < 2  d n for all edges e belonging t o non-crit ical t riangles of T + . If e belongs t o some crit ical t riangle, Lemma 3 shows t hat l ( e ) cannot be larger t han t he maximum edge lengt h on t he boundary of P , which is at most 3  d n by const ruct ion. Concerning lower bounds, Lemma 4 gives l ( e )  w ( p 0n ) for edges of int erior t riangles. We know w ( p 0n )  d n = 2 from Lemma 1, which implies d n . For edges spanned by V 0, we t rivially obt ain l (e)  d n = 2 because d n  0 0 l ( e )  d n as l ( V ; V )  d n by const ruct ion.

Approximat ing Uniform Triangular Meshes in P olygons

29

Case 2: w ( p 0n )  d n . T he upper bound 2  w ( p 0n ) for non-crit ical t riangles now gives l ( e )  6  d n , due t o Lemmas 5 and 6. T he lower bound for int erior t riangles becomes l ( e )  w ( p 0n )  d n . T he remaining two bounds are t he same as in t he former case. C o m p u t a t i o n a l i s s u e s . T he t ime complexity of comput ing t he t riangulat ion T + is dominat ed by St eps 2 and 3 of Algorit hm INSERT . In t he very rst it erat ion of t he algorit hm, bot h st eps can be accomplished in O (j V j log j V j) t ime. In each furt her it erat ion j we updat e t he current Voronoi diagram under t he insert ion of a new point p j in St ep 2, as well as a set of weight s for t he Voronoi vert ices and relevant polygon boundary point s in St ep 3. Since we already know t he locat ion of t he new point p j in t he current Voronoi diagram, t he region of p j can be int egrat ed in t ime proport ional t o t he degree of p j in t he corresponding Delaunay t riangulat ion, deg( p j ). We t hen need t o calculat e, insert , and delet e O (deg( p j )) weight s, and t hen select t he largest one in t he next it erat ion. T his gives a runt ime of O (deg( p j )  log n ) per it erat ion. T he following lemma bounds t he number of const ruct ed t riangles, of a cert ain type. Let us call a t riangle good if it is bot h int erior and non-crit ical. 3 .3

L e m m a 7 . T he in sertion of each poin t p j creates on ly a con stan t n um ber of

good trian gles. P roof. Consider t he endpoint s of all good t riangles incident t o p j in DT ( S j [

), and let X be t he set of all such endpoint s int erior t o P . T hen l ( X ; X )  )  w j − 1 ( p j ), due t o (2). On t he ot her hand, by Lemma 2, X lies in t he circle of radius 2  w j − 1 ( p j ) around p j . As a consequence, j X j is const ant . T he number of good t riangles incident t o p j is at most 2 j X j, as one such t riangle would have two endpoint s on P ’s boundary, ot herwise.

V

l (S j ; S j

For most choices of P and n , t he good t riangle type will be most frequent . Not e also t hat t he degree of all point s in t he nal t riangulat ion T + has t o be const ant . In conclusion, we obt ain a runt ime bound of O ( n 2 log n ) and a space complexity of O ( n ). However, Lemma 7 suggest s a runt ime of O (log n ) in most it erat ions.

4

A p p rox im a t io n R e s u lt s

Let us now ret urn t o t he t hree opt imizat ion problems for t he polygon P posed in t he int roduct ion. We will rely on T heorem 2 in t he following. Recall t hat , in order t o make t he t heorem hold, we have t o choose n su cient ly large. T h e o r e m 3 . T he trian gulation T

+

approxim ates the optim al solution for P rob-

lem 1 by a factor of 6. P roof. T heorem 2 guarant ees for T + an edge lengt h rat io of 6, and for no t rian-

gulat ion t his rat io can be smaller t han 1.

30

Franz Aurenhammer et al.

We now t urn our at t ent ion t o P roblem 2. Let t he point set S~ in conjunct ion wit h t he t riangulat ion T~ of S~ [ V be t he corresponding opt imum solut ion. Let d l o n g denot e t he opt imum ob ject ive value, t hat is, d l o n g measures t he longest edge in T~. T he lemma below relat es d l o n g t o t he opt imum value d n for t he ext reme packing problem for P . T he proof is omit t ed in t his ext ended abst ract . p

Lem m a 8.

dl o n g



3 2

d n :

We st rongly conject ure t hat t he st at ement of Lemma 8 can be st rengt hened  d n , which would improve t he bounds in T heorems 4 and 5 below. p T h e o r e m 4 . T he trian gulation T + con stitutes a 4 3{ approxim ation for P rob-

to

dl o n g

lem 2.

denot e t he longest edge in T + . By T heorem 2 we have l ( e m a x )  6pd n . Trivially d n  d n holds, and Lemma 8 implies t he t heorem, l ( e m a x ) =d l o n g  4 3. P roof. Let e m

ax

Finally let us consider P roblem 3. Let d p e r i denot e t he opt imum ob ject ive value for t his problem. We show t he following: p T h e o r e m 5 . T he trian gulation T + gives a 6 3{ approxim ation for P roblem 3. P roof. For any t priangulat ion of P wit h n St einer point s, it s longest edge cannot

p 3  d n by t he t riangle be short er t han 23  d n by Lemma 8. T his implies d p e r i  inequality. On t he ot her hand, for t he longest edge e m a x of T + we have l ( e m a x )  + 6  d n due t o T heorem 2. T he longest t riangle perimet p er  m a x t hat occurs in T is at most 3  l ( e m a x ). In summary,  m a x =d p e r i  6  3. We conclude t his sect ion by ment ioning an approximat ion result concerning minimum-weight t riangulat ions. T he easy proof is omit t ed. T h e o r e m 6 . Let S + be the vertex set of T +

m in im um -weight trian gulation of S . T hen T M W T (S + ).

5

+ +

an d let M W T ( S + ) den ote the is a 6{ len gth approxim ation for

E x p e rim e n t a l R e s u lt s

We have performed comput at ional experiment s in order t o see t he e ect iveness of t he proposed algorit hm. For space limit at ions, we focus on P roblem 1 and we only give det ailed result s for two typical convex polygons. T he rst polygon is rat her fat while t he second one is skinny and has a very long edge. T he lengt h of t he short est edge in bot h polygons is roughly equal t o d n for n = 50. We have t est ed t he four cases of n = 50; 100; 200; 300. As we described in Sect ion 3, Algorit hm INSERT places point s on t he boundary in t he rst run, and t hen is rest art ed t o produce t he t riangulat ion. T hereby, t he consecut ive dist ance between placed point s need t o be set t o 2d n  3d n in

Approximat ing Uniform Triangular Meshes in P olygons

31

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

order t o ensure t he desired result s t heoret ically. However, t he case of d n  2d n is also t est ed in our experiment s. T he comput at ional result s are summarized below (fat polygon left , skinny polygon right ). We observe t hat (1) t he act ual edge lengt h rat io is much bet t er t han t he worst -case rat io of 6 given by T heorem 3, and (2) t he number of flips per insert ion of a point is very small (roughly two). Alt hough t he example polygons do not sat isfy d n < l ( V ; V ) = 2 (as required by T heorem 3) we obt ained much bet t er rat ios. T his exhibit s t he pract ical e ect iveness of t he proposed algorit hm. Not e also t hat for a fat polygon (left ) t he choice of consecut ive dist ance of d n  2d n produces a bet t er rat io, while for a skinny polygon (right ) t he cont rary can be observed.

6

D is c u s s io n a n d E x t e n s io n s

We have considered t he problem of generat ing lengt h-uniform t riangular meshes for t he int erior of convex polygons. A unifying algorit hm capable of comput ing const ant approximat ions for several crit eria has been developed. T he basic idea has been t o relat e t he lengt h of t riangulat ion edges t o t he opt imum ext reme packing dist ance. T he met hod is easy t o implement and seems t o produce accept ably good t riangular meshes as far as comput at ional experiment s are concerned. In pract ical applicat ions, more general input polygons need t o be t riangulat ed. We st ress t hat our algorit hm works wit h minor modi cat ion for arbit rary polygons wit h possible holes. Convexity is used solely in t he proof of Lemma 8. As a consequence, T heorems 1 and 2, t he approximat ion result for P roblem 1, and T heorem 6 st ill hold. T he modi cat ion needed is t hat visible distan ces in a non-convex polygon P should be considered only, in t he proofs as well as concerning t he algorit hm. T hat is, for t he point set s S  P in quest ion, t he Delaunay t riangulat ion of S [ V con strain ed by P has t o be ut ilized rat her t han DT ( S [ V ). T he proof of Lemma 8 (and wit h it t he approximat ion result s for P roblems 2 and 3) st ill go t hrough for non-convex polygons P wit h int erior angles of at most 32 , provided n is large enough t o make t he value p23 d l o n g fall short of t he minimum dist ance between non-adjacent edges of P . We pose t he quest ion of est ablishing a version of Lemma 8 for general non-convex polygons, and of p improving t he respect ive bound 23 for t he convex case.

32

Franz Aurenhammer et al.

Viewed from t he point of applicat ions t o t he design of st ruct ures, it is also import ant t o generat e a t riangular mesh for approximat ing surfaces such as large-span st ruct ures. For t his direct ion, our result concerning P roblem 1 can be ext ended t o spherical polygons. More precisely, given a convex polygon whose vert ices lie on a hemisphere (or a smaller region of a sphere cut by a plane), t he problem is t o nd a t riangular mesh whose point s are on t he hemisphere t hat minimizes t he ob ject ive funct ion of P roblem 1. It can be shown t hat t he algop rit hm obt ained by appropriat ely modifying Algorit hm INSERT at t ains a 3 5 approximat ion rat io. A c k n o w l e d g e m e n t s . T his research was part ially supp ort ed by t he Aust rian Sp ezialforschungsb ereich F 003, Opt imierung und Kont rolle, and t he Grant -in-Aid for Scient ic Research on P riority Areas (B) (No. 10205214) by t he Minist ry of Educat ion, Science, Sp ort s and Cult ure of J apan. In addit ion, t he ft h aut hor was also supp ort ed by NSF of China (No. 19731001) and t he J apan Society for t he P romot ion of Science of J apan. We grat efully acknowledge all t hese supp ort s.

R e fe re n c e s 1. F . Aurenhammer, \ Voronoi diagrams { a survey of a fundament al geomet ric dat a st ruct ure" , A C M C om p u t in g S u rv ey s 23 (1991), 345-405. 2. M. Bern, D. Dobkin and D. Eppst ein, \ Triangulat ing p olygons wit hout large angles" , In t l. J . C om p u t . G eom . an d A p p l. 5 (1995), 171-192. 3. M. Bern and D. Eppst ein, \ Mesh generat ion and opt imal t riangulat ion" , in D.Z. Du (ed.), C om p u t in g in E u clid ean G eom et ry , World Scient ic P ublishing, 1992, 47-123. 4. M. Bern, D. Eppst ein and J .R. Gilb ert , \ P rovably good mesh generat ion" , J ou rn al of C om p u t er an d S y st em S cien ces 48 (1994), 384-409. 5. M. Bern, S. Mit chell and J . Rupp ert , \ Linear-size nonobt use t riangulat ion of p olygons" , P roceedings of t he 10t h Ann. ACM Symp osium on Comput at ional Geomet ry (1994), 221-230. 6. P. Chew, \ Guarant eed-Quality Mesh Generat ion for Curved Surfaces" , P roceedings of t he 9t h Ann. ACM Symp osium on Comput at ional Geomet ry (1993), 274-280. 7. H. Edelsbrunner and T .S. Tan, \ A quadrat ic t ime algorit hm for t he minmax lengt h t riangulat ion" , S IA M J ou rn al on C om p u t in g 22 (1993), 527-551. 8. T . Feder and D.H. Greene, \ Opt imal Algorit hms for Approximat e Clust ering" , P roceedings of t he 20t h Ann. ACM Symp osium ST OC (1988), 434-444. 9. T . Gonzalez, \ Clust ering t o minimize t he maximum int erclust er dist ance" , T h eoret ical C om p u t er S cien ce 38 (1985), 293-306. 10. D.S. J ohnson, \ T he NP -complet eness column: An ongoing guide" , J ou rn al of A lgorit h m s 3 (1982), 182-195. 11. E. Melisserat os and D. Souvaine, \ Coping wit h inconsist encies: A new approach t o produce quality t riangulat ions of p olygonal domains wit h holes" , P roceedings of t he 8t h Ann. ACM Symp osium on Comput at ional Geomet ry (1992),202-211. 12. H. Nooshin, K. Ishikawa, P.L. Disney and J .W . But t erwort h, \ T he t raviat ion process" , J ou rn al of t h e In t ern at ion al A sso ciat ion for S h ell an d S p at ial S t ru ct u res 38 (1997), 165-175.

Approximat ing Uniform Triangular Meshes in P olygons

33

13. M. Ohsaki, T . Nakamura and M. Kohiyama, \ Shap e opt imizat ion of a double-layer space t russ describ ed by a paramet ric surface" , In t ern at ion al J ou rn al of S p ace S t ru ct u res 12 (1997), 109-119. 14. K.F . Rot h, \ On a problem of Heilbronn" , P ro c. L on d on M at h em at ical S o ciet y 26 (1951), 198-204. 15. J . Rupp ert , \ A Delaunay Renement Algorit hm for Quality 2-Dimensional Mesh Generat ion" , J ou rn al of A lgorit h m s 18 (1995), 548-585.

M ax im u m In d u ce d M at ch in g s o f R an d o m C u b ic G rap h s William Duckwort h 1 , Nicholas C. Wormald 1 ? , and Michele Zit o2 ? ? 1

Depart ment of Mat hemat ics and St at ist ics, University of Melb ourne, Aust ralia f bi l l y, ni ck g@ms. uni mel b. edu. au 2 Depart ment of Comput er Science, University of Liverp ool, UK mi chel e@csc. l i v. ac. uk

In t his pap er we present a heurist ic for nding a large induced mat ching M of cubic graphs. We analyse t he p erformance of t his heurist ic, which is a random greedy algorit hm, on random cubic graphs using di erent ial equat ions and obt ain a lower b ound on t he exp ect ed size of t he induced mat ching ret urned by t he algorit hm. T he corresp onding upp er b ound is derived by means of a direct exp ect at ion argument . We prove t hat M asympt ot ically almost surely sat is es 0: 2704n  jM j  0: 2821n . A b st r a c t .

1

Int ro d u ct io n

An i n d u ced m a t c h i n g of a graph G = ( V ; E ) is a set of vert ex disjoint edges M  E wit h t he addit ional const raint t hat no two edges of M are connect ed by an edge of E n M . We are int erest ed in nding induced mat chings of large cardinality. St ockmeyer and Vazirani [11] int roduced t he problem of nding a maximum induced mat ching of a graph, mot ivat ing it as t he \ risk-free marriage problem" ( nd t he maximum number of married couples such t hat each person is compat ible only wit h t he person (s)he is married t o). T his in t urn st imulat ed much int erest in ot her areas of t heoret ical comput er science and discret e mat hemat ics as nding a maximum induced mat ching of a graph is a sub-t ask of nding a st rong edge-colouring of a graph (a proper colouring of t he edges such t hat no edge is incident wit h more t han one edge of t he same colour as each ot her, see (for example) [5,6,9,10]). T he problem of deciding whet her for a given int eger k a given graph G has an induced mat ching of size at least k is NP -Complet e [11], even for bipart it e graphs of maximum degree 4. It has been shown [3,13] t hat t he problem is AP X-complet e even when rest rict ed t o k s -regular graphs for k 2 f 3; 4g and any int eger s  1. T he problem of nding a maximum induced mat ching is polynomial-t ime solvable for chordal graphs [2] and circular arc graphs [7]. ⋆ ⋆⋆

Supp ort ed by t he Aust ralian Research Council Supp ort ed by EP SRC grant GR/ L/ 77089

D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 3 4 { 4 3 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

Maximum Induced Mat chings of Random Cubic Graphs

35

Recent ly Golumbic and Lewenst ein [8] have const ruct ed polynomial-t ime algorit hms for maximum induced mat ching in t rapezoid graphs, int erval-dimension graphs and co-comparability graphs, and have given a linear-t ime algorit hm for maximum induced mat ching in int erval graphs. In t his paper we present a heurist ic for nding a large induced mat ching M of cubic graphs. We analyse t he performance of t his heurist ic, which is a random greedy algorit hm, on random cubic graphs using di erent ial equat ions and obt ain a lower bound on t he expect ed size of t he induced mat ching ret urned by t he algorit hm. T he corresponding upper bound is derived by means of a direct expect at ion argument . We prove t hat M asympt ot ically almost surely sat is es 0: 2704n  jM j  0: 2821n . Lit t le is known on t he complexity of t his problem under t he addit ional assumpt ion t hat t he input graphs occur wit h a given probability dist ribut ion. Zit o [14] present ed some simple result s on dense random graphs. T he algorit hm we present was analysed det erminist ically in [3] where it was shown t hat , given an n -vert ex cubic graph, t he algorit hm ret urns an induced mat ching of size at least 3n =20 + o(1), and t here exist in nit ely many cubic graphs realising t his bound. T hroughout t his paper we use t he not at ion P (probability), E (expect at ion), u.a.r. (uniformly at random) and a.a.s. (asympt ot ically almost surely). When discussing any cubic graph on n vert ices, we assume n t o be even t o avoid parity problems. In t he following sect ion we int roduce t he model used for generat ing cubic graphs u.a.r. and in Sect ion 3 we describe t he not ion of analysing t he performance of algorit hms on random graphs using a syst em of di erent ial equat ions. Sect ion 4 gives t he randomised algorit hm and Sect ion 5 gives it s analysis showing t he a.a. sure lower bound. In Sect ion 6 we give a direct expect at ion argument showing t he a.a. sure upper bound.

2

U n ifo rm G e n e rat io n o f R an d o m C u b ic G rap h s

T he model used t o generat e a cubic graph u.a.r. (see for example Bollobas [1]) can be summarised as follows. For an n vert ex graph t ake 3n point s in n bucket s labelled 1 : : : n wit h t hree point s in each bucket and { choose u.a.r. a perfect mat ching of t he 3n point s.

{

If no edge of t he mat ching cont ains two point s from t he same bucket and no two edges cont ain four point s from just two bucket s t hen t his represent s a cubic graph on n vert ices wit h no loops and no mult iple edges. Wit h probability bounded below by a posit ive const ant , loops and parallel edges do not occur [1]. T he edges of t he random cubic graph generat ed are represent ed by t he edges of t he mat ching and it s vert ices are represent ed by t he bucket s. We may consider t he generat ion process as follows. Init ially, all vert ices have degree 0. T hroughout t he execut ion of t he generat ion process, vert ices will increase in degree unt il t he generat ion is complet e and all vert ices have degree 3. We refer t o t he graph being generat ed by t his process as t he e v o lv i n g gra p h .

36

3

W illiam Duckwort h, Nicholas C. Wormald, and Michele Zit o

A n aly sin g A lg o rit h m s U sin g D i e re nt ial E qu at io n s

We incorporat e t he algorit hm as part of a mat ching process generat ing a random cubic graph. During t he generat ion of a random cubic graph, we choose t he mat ching edges sequent ially. T he rst end-point of a mat ching edge may be chosen by any rule, but in order t o ensure t hat t he cubic graph is generat ed u.a.r., t he second end-point of t hat edge must be select ed u.a.r. from all t he remaining free point s. T he freedom of choice of t he rst end-point of a mat ching edge enables us t o select it u.a.r. from t he vert ices of given degree in t he evolving graph. T he algorit hm we use t o generat e an induced mat ching of cubic graphs is a greedy algorit hm based on choosing a vert ex of a given degree and performing some edge and vert ex delet ions. In order t o analyse our algorit hm using a syst em of di erent ial equat ions, we generat e t he random graph in t he order t hat t he edges are examined by t he algorit hm. At some st age of t he algorit hm, a vert ex is chosen of given degree based upon t he number of free point s remaining in each bucket . T he remaining edges incident wit h t his vert ex are t hen e x po s ed by randomly select ing a mat e for each spare point in t he bucket . T his allows us t o det ermine t he degrees of t he neighbours of t he chosen vert ex and we refer t o t his as p ro bi n g t hose vert ices. T his is done wit hout exposing t he ot her edges incident wit h t hese probed vert ices. Once t he degrees of t he neighbours of t he chosen vert ex are known, an edge is select ed t o be added t o t he induced mat ching. Furt her edges are t hen exposed in order t o ensure t he mat ching is induced. More det ail is given in t he following sect ion. In what follows, we denot e t he set of vert ices of degree i of t he evolving graph by V i and let Y i (= Y i ( t )) denot e j V i j (at t ime t ). T he number of edges in t he induced mat ching at any st age of t he algorit hm (t ime t ) is denot ed by M (= M ( t )) and we let s (= s ( t )) denot e t he number of free point s available in P 2 (3 − i ) Y i . Let bucket s at any st age of t he algorit hm (t ime t ). Not e t hat s = i= 0 E (  X) denot e t he expect ed change in a random variable X condit ional upon t he hist ory of t he process. One met hod of analysing t he performance of a randomised algorit hm is t o use a syst em of di erent ial equat ions t o express t he expect ed changes in variables describing t he st at e of an algorit hm during it s execut ion (see [12] for an exposit ion of t his met hod). We can express t he st at e of t he evolving graph at any point during t he execut ion of t he algorit hm by considering Y 0 , Y 1 and Y 2 . In order t o analyse our randomised algorit hm for nding an induced mat ching of cubic graphs, we calculat e t he expect ed change in t his st at e over one t ime st ep in relat ion t o t he expect ed change in t he size M of t he induced mat ching. We t hen regard E (  Y i ) = E (  M ) as t he derivat ive d Y i = d M , which gives a syst em of di erent ial equat ions. T he solut ion t o t hese equat ions describes funct ions which represent t he behaviour of t he variables Y i . T here is a general result which guarant ees t hat t he solut ion of t he di erent ial equat ions almost surely approximat es t he variables Y i . T he expect ed size of t he induced mat ching may be deduced from t hese result s.

Maximum Induced Mat chings of Random Cubic Graphs

4

37

T h e A lg o rit h m

In order t o nd an induced mat ching of a cubic graph, we use t he following algorit hm. We assume t he generat ed graph G t o be connect ed (since random cubic graphs are connect ed a.a.s.). T hen, at any st age of t he algorit hm aft er t he rst st ep and before it s complet ion, Y 1 + Y 2 > 0. T he degree of a vert ex v in t he evolving graph is denot ed by deg ( v ). We denot e t he init ial set of 3n point s by P . B ( p ) denot es t he bucket t hat a given point p belongs t o and we use q( b) t o denot e t he set of free point s in bucket b. T he set of induced mat ching edges ret urned is denot ed by M . Here is t he algorit hm; a descript ion is given below. s e l e c t ( p 1 ; P ); e x p o s e ( p 1 ; p 2 ); i s o l a t e ( B ( p 1 ) ; B ( p 2 )); M ( B ( p 1 ) ; B ( p 2 )); w h i l e ( Y 1 + Y 2 > 0) f i f ( Y 2 > 0) q ( u ); f s e l e c t ( u ; V 2 ); f p 1 g B ( p 2 );g e x p o s e ( p 1 ; p 2 ); v e ls e q ( u ); f s e l e c t ( u ; V 1 ); f p 1 ; p 2 g B ( p 3 ); e x p o s e ( p 1 ; p 3 ); a B ( p 4 ); e x p o s e ( p 2 ; p 4 ); b if ( deg ( a ) > deg ( b)) v a; e l s e i f ( deg ( b) > deg ( a )) v b; e ls e s e l e c t ( v ; f a; bg);g i s o l a t e ( u ; v ); M M [ ( u ; v );

g

T he funct ion s e l e c t ( s; S ) involves t he process of select ing t he element s u.a.r. from t he set S . T he funct ion e x p o s e ( p i ; p j ) involves t he process of delet ing t he select ed point p i from P , exposing t he edge ( B ( p i ) ; B ( p j )) by randomly select ing t he point p j from P and delet ing t he point p j from P . T he funct ion i s o l a t e ( B 1 ; B 2 ) involves t he process of randomly select ing a mat e for each free point in t he bucket s B 1 and B 2 and t hen exposing all edges incident wit h t hese select ed mat es. T his ensures t hat t he mat ching is induced. T he rst st ep of t he algorit hm involves randomly select ing t he rst edge of t he induced mat ching and exposing t he appropriat e edges. We split t he remainder of t he algorit hm int o two dist inct phases. We informally de ne P hase 1 as t he period of t ime where any vert ices in V 2 t hat are creat ed are used up almost immediat ely and Y 2 remains small. Once t he rat e of generat ing vert ices in V 2 becomes larger t han t he rat e t hat t hey are used up, t he algorit hm moves int o P hase 2 and t he ma jority of operat ions involve select ing a vert ex from V 2 and including it s incident edge in t he induced mat ching.

38

W illiam Duckwort h, Nicholas C. Wormald, and Michele Zit o

T here are two basic operat ions performed by t he algorit hm. Type 1 refers t o a st ep when Y 2 > 0 and a vert ex is chosen from V 2 . Similarly, Type 2 refers t o a st ep where Y 2 = 0 and a vert ex is chosen from V 1 . Figs. 1 and 2 show t he con gurat ions t hat may be encount ered performing operat ions of Type 1 and Type 2 respect ively (a.a.s.). For Type 1, we add t he edge incident wit h t he chosen vert ex. For Type 2, if (aft er exposing t he edges incident wit h t he chosen vert ex u ) exact ly one of t he neighbours of u has exact ly two free point s, we add t he edge incident wit h t his vert ex and t he chosen vert ex. Ot herwise we randomly choose an edge incident wit h t he chosen vert ex.

w

u

v

u

v

w

u

v w

F ig . 1 .

Select ing a vert ex from V 2 and adding it s incident edge t o M .

u

u

v

v*

u

v

v p

w

p 2a

F ig . 2 .

w

p 2b

v*

w

p

w

p 2c

Select ing a vert ex from V 1 and choosing an edge t o add t o M .

T he larger circles represent bucket s each cont aining 3 smaller circles represent ing t he point s of t hat bucket . Smaller circles coloured black represent point s t hat are free. Used point s are represent ed by whit e circles. P oint s which are not known t o be free at t his st age of t he algorit hm are shaded. In all cases, t he select ed vert ex is labelled u and t he ot her end-point of t he induced mat ching edge chosen is labelled v . A vert ex labelled v  denot es t hat a random choice has been made between 2 vert ices and t his one was not select ed. Aft er select ing a vert ex u of given degree, t he edges incident wit h t his vert ex are exposed. Once we probe t he degrees of t he neighbours of t his vert ex, we t hen make t he choice as t o which edge t o add t o t he induced mat ching. Only t hen are ot her edges exposed. T herefore, at t his st age, we do not know t he degrees of all t he vert ices at dist ance at most two from t he end-point s of t he select ed induced mat ching edge. A vert ex whose degree is unknown is labelled eit her w

Maximum Induced Mat chings of Random Cubic Graphs

39

or p . A vert ex labelled p will have one of it s incident edges exposed and will subsequent ly have it s degree increased by one. We refer t o t hese vert ices as i n c s . A vert ex labelled w will have all of it s incident edges exposed and we refer t o t hese vert ices as re m s . Should any re m be incident wit h ot her vert ices of unknown degree t hen t hese vert ices will be i n c s . Once t he choice of induced mat ching edge has been made, all edges incident wit h t he endpoint s of t he induced mat ching edge are exposed and subsequent ly t he edges of t he neighbours of t he end-point s of t he chosen edge are exposed. T his ensures t he mat ching is induced.

5

T h e Low e r B o u n d

T h e o r e m 1 . F o r a c u bi c gra p h o n n v e r t i ce s t h e s i z e o f a m a x i m u m i n d u ced 0: 2704n

m a t c h i n g i s a s y m p t o t i ca l ly a lm o s t s u re ly grea t e r t h a n

P roo f . We de ne a c lu t c h t o be a series of operat ions in P hase i involving t he select ion a vert ex from V i and all subsequent operat ions up t o but not including t he next select ion of a vert ex from V i . Increment t ime by 1 st ep for each clut ch of vert ices processed. We calculat e E (  Y i ) and E (  M ) for a clut ch in each P hase.

5 .1

P r e l i m i n a r y E q u a t i o n s fo r P h a s e 1

T he init ial st ep of P hase 1 is of Type 2 (at least a.a.s.). We consider operat ions of Type 1 rst and t hen combine t he equat ions given by t hese operat ions wit h t hose given by t he operat ions of Type 2. Operat ions of Type 1 involve t he select ion of a vert ex u from V 2 (which has been creat ed from processing a vert ex from V 1 ). T he expect ed change in Y 2 is negligible and can assumed t o be 0 since t his is phase 1 and Y 2 remains small as vert ices of V 2 are used up almost as fast as t hey are creat ed. T he desired equat ion may be formulat ed by considering t he cont ribut ion t o E (  Y i ) in t hree part s; delet ing v (t he neighbour of u ), delet ing t he neighbour(s) of v and increasing t he degree of t he ot her neighbours of t hese neighbours by one. Let i denot e t he cont ribut ion t o E ( Y i ) due t o changing t he degree of an i n c from i t o i + 1 and we have i

=

( i − 3) Y i + (4 − i ) Y i − 1 s

:

T his equat ion is valid under t he assumpt ion t hat Y − 1 = 0: We let i = i ( t ) denot e t he cont ribut ion t o E ( Y i ) due t o a edges incident wit h i n c s and we have i

=

( i − 3) s

Yi

+

(6Y 0 + 2Y 1 ) s

i

re m

and all it s

:

Let i = i ( t ) denot e t he cont ribut ion t o E ( Y i ) for an operat ion of Type 1 in P hase 1. We have 6Y 0 + 2Y 1 ( i − 3) Yi + i = i : s

s

40

W illiam Duckwort h, Nicholas C. Wormald, and Michele Zit o

We now consider operat ions of Type 2. Let h ; i (= h ; i ( t )) denot e t he cont ribut ion t o E (  Y i ) for operat ion 2h given in Fig. 2 (at t ime t ). We will also use  i j = 1 if i = j and  i j = 0 ot herwise. We have

a ;i

= − 3

b;i

= −

i

0

c;i

= −2

i

i

1

+ 

+

i

i

− 2

i

1

+



i

1

+ 2

0

;

+ 2 i;

i

i

+ 2 i:

T hese equat ions are formulat ed by considering t he cont ribut ion t o E ( Y i ) by delet ion of vert ices of known degree and t he cont ribut ion given by t he expect ed degree of vert ices of unknown degree. For an operat ion of Type 2 in P hase 1, neighbours of u (t he vert ex select ed at random from V 1 ) are in f V 0 [ V 1 g, since Y 2 = 0 when t he algorit hm performs t his type of operat ion. T he probability t hat t hese neighbours are in V 0 or V 1 are 3Y 0 =s and 2Y 1 =s respect ively. T herefore t he probabilit ies t hat , given we are performing an operat ion of Type 2 in P hase 1, t he operat ion is of type 2a, 2b or 4Y 2 9Y 2 2c are given by P (2a ) = s 21 , P (2b) = 1 2 Ys 20 Y 1 and P (2c) = s 20 respect ively. We de ne a birt h t o be t he generat ion of a vert ex in V 2 by processing a vert ex of V 1 . Let 1 (= 1 ( t )) be t he expect ed number of birt hs from processing a vert ex from V 1 (at t ime t ). T hen we have 1

= P (2a )

2

+

2Y 1 s

+ P (2b)

2

4Y 1

+

+ P (2c) 2

s

2

4Y 1

+

s

:

Here, for each case, we consider t he probability t hat vert ices of degree one (in t he evolving graph) become vert ices of degree two by exposing an edge incident wit h t he vert ex. Similarly, we let 2 = 2 ( t ) be t he expect ed number of birt hs from processing a vert ex from V 2 . T hen we have 2

=

6Y 0 + 2Y 1

2;

s

giving t he expect ed number of birt hs in a clut ch t o be 1 =(1 − 2 ) : For P hase 1, t he equat ion giving t he expect ed change in Y i for a clut ch is t herefore given by E( Y

i

) = P (2a )

a ;i

+ P (2b)

b;i

+ P (2c)

c;i

+

1

1−

i

:

2

T he equat ion giving t he expect ed increase in M for a clut ch is given by E( M

) = 1+

1

1−

2

since t he cont ribut ion t o t he increase in t he size of t he induced mat ching by t he Type 2 operat ion in a clut ch is 1.

Maximum Induced Mat chings of Random Cubic Graphs 5 .2

41

P r e l i m i n a r y E q u a t i o n s fo r P h a s e 2

In P hase 2, all operat ions are considered t o be of Type 1 and t herefore a clut ch consist s of one st ep, but we must also consider t he expect ed change in Y 2 since t his is no longer a negligible amount . T he expect ed change in Y i is given by E ( Y

i

)=

− 

i

i

2

where i remains t he same as t hat given for P hase 1 and t he expect ed increase in M is 1 per st ep. 5 .3

T h e D i e re n t ia l E q u a t io n s

T he equat ion represent ing E (  Y i ) for processing a clut ch of vert ices in P hase 1 forms t he basis of a di erent ial equat ion. Writ e Y i ( t ) = n z i ( t =n ),  i ( t ) = n  i ( t =n ), j ; i ( t ) = n j ; i ( t =n ), s ( t ) = n ( t =n ), i ( t ) = n i ( t =n ) and j ( t ) = n ! j ( t =n ). T he di erent ial equat ion suggest ed is 0

zi

=

4z 12 a ;i

2

12z 0 z 1

+

2

9z 02

+

b;i

c;i

2

!

+

1

1− !

( i 2 f 0; 1g)

i

2

where di erent iat ion is wit h respect t o x and x n represent s t he number of clut ches. From t he de nit ions of , , s , and we have =

i

(i − 3)

a ;i

= −3

b;i

= −

i

0

c;i

= −2

i

= i

=

!

1

=

!

2

=

P

i

zi

4 z 12 2

1)

2

(i − 3)z i + (4− i )z i −

1

i

− 2

i

1

+



i

1

+ + 2 i + 2 (i − 3)z i + (4− i )z i − 1 ;

0

zi

+

;

+

1

2 (3 i= 0

(i − 3)

(6z 0 + 2z 1 )((i − 3)z i + (4− i )z i −

+

i

+ 2 (i − 3)z i + (4− i )z i − 1 ;

− i )zi ;

+

6z 0 + 2z 1

+

2z 1

i



; 



2

6z 0 + 2z 1

;

+

12z 0 z 1 2



2

+

4z 1

+

4 z 12 2

 

2

2

+

4z 1

;

and

2:

Using t he equat ion represent ing t he expect ed increase in t he size of M aft er processing a clut ch of vert ices in P hase 1 and writ ing M ( t ) = n z ( t =n ) suggest s t he di erent ial equat ion for z as z

0

= 1+

!

1

1− !

: 2

42

W illiam Duckwort h, Nicholas C. Wormald, and Michele Zit o

4 z 12

0

zi

=

2

a ;i

+

0

dzi dz

We comput e t he rat io

z i (x z 0( x

=

12z 0 z 1 2

b;i

1+

) )

and we have 9 z 02

+

2

c;i

+

! 1 ! 2

1−



i

! 1 1− ! 2

( i 2 f 0; 1g)

where di erent iat ion is wit h respect t o z and all funct ions can be t aken as funct ions of z . For P hase 2 t he equat ion represent ing E (  Y i ) for processing a clut ch of vert ices suggest s t he di erent ial equat ion 0

zi

= 

i

− 

i

2

(0 

i



2) :

(1)

T he increase in t he size of t he induced mat ching per clut ch of vert ices processed 0 z (x ) in t his P hase is 1, so comput ing t he rat io ddzzi = z i0( x ) gives t he same equat ion as t hat given in (1). Again, di erent iat ion is wit h respect t o z and all funct ions can be t aken as funct ions of z . T he solut ion t o t his syst em of di erent ial equat ions represent s t he cardinalit ies of t he set s V i for given M (scaled by n1 ). For P hase 1, t he init ial condit ions are z 0 (0) = 1; z i (0) = 0 ( i > 0) : T he init ial condit ions for P hase 2 are given by t he nal condit ions for P hase 1. Wormald [12] describes a general result which ensures t hat t he solut ions t o t he di erent ial equat ions almost surely approximat e t he variables Y i . It is simple t o de ne a domain for t he variables z i so t hat T heorem 5.1 from [12] may be applied t o t he process wit hin each phase. An argument similar t o t hat given for independent set s in [12] or t hat given for independent dominat ing set s in [4] ensures t hat a.a.s. t he process passes t hrough phases as de ned informally, and t hat P hase 2 follows P hase 1. Formally, P hase 1 ends at t he t ime corresponding t o ! 2 = 1 as de ned by t he equat ions for P hase 1. Once in P hase 2, vert ices in V 2 are replenished wit h high probability which keeps t he process in P hase 2. T he di erent ial equat ions were solved using a Runge-Kut t a met hod, giving ! 2 = 1 at z = 0: 1349 and in P hase 2 z 2 = 0 at z > 0: 2704. T his corresponds t o t he size of t he induced mat ching (scaled by n1 ) when all vert ices are used up, t hus proving t he t heorem. tu

6

T he U pp er B ound

T h e o r e m 2 . F o r a c u bi c gra p h o n n v e r t i ce s t h e s i z e o f a m a x i m u m i n d u ced 0: 2821n

m a t c h i n g i s a s y m p t o t i ca l ly a lm o s t s u re ly le s s t h a n

P roo f . Consider a random cubic graph G on n vert ices. Let M ( G ; k ) denot e t he number of induced mat chings of G of size k . We calculat e E ( M ( G ; k )) and show t hat when k > 0: 2821n , E ( M ( G ; k )) = o(1) t hus proving t he t heorem. Let (2x )! N ( x ) = x !2 x :

Maximum Induced Mat chings of Random Cubic Graphs

E ( M ( G ; k ))

n



N (k )

2k =

32 k

43

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

(3( n − 2k ))! ( 32n )! 24 k : k ! ( n − 2k )! ( 32n − 5k )! (3n )! n ! 32 k

Approximat e using St irling’s formula and re-writ e using f ( x ) = x x ; and we have 1

E ( M ( G ; k )) n

Solving t his we nd t hat for

= k =n

32  f (3(1 − 2 )) f ( 23 ) 24  : f ( ) f (1 − 2 ) f ( 23 − 5 ) f (3)  

0: 2821 t he expression on t he right t ends t o 0. tu

Not e t hat t his bound may be improved by count ing only maximal mat chings. However t he improvement is slight and we do not include t he det ails here for reasons of brevity.

R e fe re n c e s 1. Bollobas, B.: Random Graphs. Academic P ress, London, 1985. 2. Cameron, K.: Induced Mat chings. Discret e Applied Mat h., 2 4 :97{102, 1989. 3. Duckwort h, W ., Manlove, D. and Zit o, M.: On t he Approximability of t he Maximum Induced Mat ching P roblem. J . of Combinat orial Opt imisat ion (Submit t ed). 4. Duckwort h, W . and Wormald, N.C.: Minimum Indep endent Dominat ing Set s of Random Cubic Graphs. Random St ruct ures and Algorit hms (Submit t ed). 5. Erd¨os, E.: P roblems and Result s in Combinat orial Analysis and Graph T heory. Discret e Mat h., 7 2 :81{92, 1988. 6. Faudree, R.J ., Gyarfas, A., Schelp, R.H. and Tuza, Z.: Induced Mat chings in Bipart it e Graphs. Discret e Mat h., 7 8 :83{87, 1989. 7. Golumbic, M.C. and Laskar, R.C.: Irredundancy in Circular Arc Graphs. Discret e Applied Mat h., 4 4 :79{89, 1993. 8. Golumbic, M.C. and Lewenst ein, M.: New Result s on Induced Mat chings. Discret e Applied Mat h., 1 0 1 :157{165, 2000. 9. Liu, J . and Zhou, H.: Maximum Induced Mat chings in Graphs. Discret e Mat h., 1 7 0 :271{281, 1997. 10. St eger, A. and Yu, M.: On Induced Mat chings. Discret e Mat h., 1 2 0 :291{295, 1993. 11. St ockmeyer, L.J . and Vazirani, V.V.: NP -Complet eness of Some Generalizat ions of t he Maximum Mat ching P roblem. Inf. P roc. Let t ., 1 5 (1):14{19, 1982. 12. Wormald, N.C.: Di erent ial Equat ions for Random P roces ses and Random Graphs. In Lect ures on Approximat ion and Randomized Algorit hms, 73{155, P W N, Warsaw, 1999. Micha l Karonski and Hans-J u¨ rgen P r¨omel (edit ors). 13. Zit o, M.: Induced Mat chings in Regular Graphs and T rees. In P roceedings of t he 25t h Int ernat ional Workshop on Graph T heoret ic Concept s in Comput er Science, volume 1 6 6 5 of Lect ure Not es in Comput er Science , 89{100. Springer-Verlag, 1999. 14. Zit o, M.: Randomised T echniques in Combinat orial Algorit hmics. P hD t hesis, Depart ment of Comput er Science, University of W arwick, UK, Novemb er 1999.

A D u a lit y b e t w e e n S m a ll-Fa c e P ro b le m s in A rra n g e m e n t s o f Lin e s a n d H e ilb ro n n -T y p e P ro b le m s Gill Barequet T he Technion| Israel Inst it ut e of Technology, Haifa 32000, Israel, bar equet @cs. t echni on. ac. i l , ht t p: / / www. cs. t echni on. ac. i l /  bar equet

Arrangement s of lines in t he plane and algorit hms for comput ing ext reme feat ures of arrangement s are a ma jor t opic in comput at ional geomet ry. T heoret ical b ounds on t he size of t hese feat ures are also of great int erest . Heilbronn’s t riangle problem is one of t he famous problems in discret e geomet ry. In t his pap er we show a duality b etween ext reme (small) face problems in line arrangement s (b ounded in t he unit square) and Heilbronn-typ e problems. We obt ain lower and upp er combinat orial b ounds (some are t ight ) for some of t hese problems. A b st r a c t .

1

In t ro d u c t io n

T he invest igat ion of arrangement s of lines in t he plane has at t ract ed much at t ent ion in t he lit erat ure. In part icular, cert ain ext remal feat ures of such arrangement s are of great int erest . Using st andard duality between lines and point s, such arrangement s can be mapped int o set s of point s in t he plane, which have also been st udied int ensively. In t his dual set t ing, dist ribut ions in which cert ain feat ures (de ned by t riples of point s) assume t heir maxima are oft en sought . In t his paper we show a connect ion between t hese two classes of problems and summarize t he known bounds for some ext remal-feat ure problems. Let A (L ) be an arrangement of a set L of n lines. We assume t he lines of A t o be in general posit ion, in t he sense t hat no two lines have t he same slope. T hus every t riple of lines de ne a t riangle. Let U = [0; 1]2 be t he unit square. An arrangement A is called n a r r o w if all it s lines int ersect t he two vert ical sides of U . A narrow arrangement A is called t r a n s p o s e d if t he lines of A int ersect t he vert ical sides of U in two sequences t hat , when sort ed in increasing y order, are t he reverse of each ot her. Clearly, every t ransposed arrangement is also narrow. Not e t hat a l l t he vert ices of a t ransposed arrangement lie in U . Lat er in t he paper we will also de ne t he set of c o n v e x arrangement s which is a proper subset of t he set of t ransposed arrangement s. In t his paper we invest igat e t he \ size" of t riangles de ned by t he lines of narrow arrangement s, according t o several measures of t he size of a t riangle. We consider t he arrangement s in which t he minimum size of a t riangle assumes it s maximum, and at t empt t o bound t his value. D . -Z . D u e t a l. ( E d s. ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 4 4 { 5 3 , 2 0 0 0 .

c S p r in g e r -Ve r la g B e r lin H e id e lb e r g 2 0 0 0

A Duality b etween Small-Face P roblems

45

Heilbronn’s t riangle problem is t he following: Let f P 1 ; P 2 ; : : : ; P n g be a set of n point s in U , such t hat t he minimum of t he areas of t he t riangles P i P j P k (for 1  i < j < k  n ) assumes it s maximum possible value G0 ( n ). Est imat e G0 ( n ). Heilbronn conject ured t hat G0 ( n ) = (bet t er t han O ( n1 )), namely, O ( p 1 n

1

O(n

lo g lo g

rst nont rivial upper bound 2 ). T he ), was given by Rot h [6]. Schmidt [9]

n

improved t his result twenty years lat er and obt ained G0 ( n ) =

p1

O( n

lo g

). T hen n

Rot h improved t he upper bound twice t o O ( n 1 110 5 ) [7] and O ( n 1 111 7 ) [8]. T he best current ly-known upper bound, G0 ( n ) = O ( n 8 17 − ) = O ( n 1 114 2 ) (for any " > 0), is due t o Komlos, P int z, and Szemeredi [3] by a furt her re nement of t he met hod of [7,8]. A simple probabilist ic argument by Alon et al. [1, p. 30] proves a lower bound of Ω ( n12 ). Erd}os [6, appendix] showed t he same lower bound by an example. However, Komlos, P int z, and Szemeredi [4] show by a rat her involved probabilist ic const ruct ion t hat G0 ( n ) = Ω ( long2n ). In a companion paper [2] we show a lower bound for t he generalizat ion of Heilbronn’s t riangle problem t o higher dimensions. In t his paper we consider some variant s of Heilbronn’s problem, in which ot her measures of t riangles de ned by t riples of point s are considered, and/ or some rest rict ions are imposed on t he locat ions of t he point s in U . Speci cally, in a m o n o t o n e d e c r e a s i n g dist ribut ion of point s, t he x -coordinat es and t he y coordinat es of t he point s appear in opposit e permut at ions, and a c o n v e x m o n o t o n e d e c r e a s i n g dist ribut ion is a monot one decreasing dist ribut ion in which t he point s form a convex (or concave) chain according t o t he respect ive permut at ion. :

: : :

:

=

2

"

:

: : :

: : :

T h e D u a lit y a n d t h e P ro b le m s

Let A be a narrow arrangement of n lines. We de ne two measures of t riangles. Let F 1 ( ) be t he vert ical height of a t riangle , t hat is, t he maximum lengt h of a vert ical segment cont ained in . Let F 2 ( ) be t he area of . Our goal is t o bound F 1 ( n ) = max A min  2 A F 1 ( ) and F 2 ( n ) = max A min  2 A F 2 ( ), where t he maximum is t aken over all narrow arrangement s A of n lines, and where t he minimum is t aken over all t riangles formed by t riples of lines in A . We use t he superscript s \ (mon)" and \ (conv)" for denot ing t he monot one decreasing and t he convex monot one decreasing variant s, respect ively. Denot e by l i (resp., r i ) t he y -coordinat e of t he int ersect ion point of t he line ‘ i 2 L wit h t he left (resp., right ) vert ical side of U . We dualize t he line ‘ i t o t he point P i = ( l i ; r i ). T his dualizat ion maps t he measures F 1 and F 2 of lines int o measures of t riples of point s in U . T he two opt imizat ion problems are mapped int o generalizat ions of Heilbronn’s problem, where t he di erence is in t he de nit ion of t he measure of a t riple of point s. Not e t hat t he dual of a t ransposed arrangement of lines is a monot one d e c r e a s i n g set of point s. T he measures G 1 and G 2 (de ned below) crucially rely on t he d e c r e a s i n g monot onicity of t he

46

Gill Barequet

point s. A \ convex" arrangement is an arrangement whose dual set of point s lies in convex posit ion. It is easy t o see t hat t he vert ical height of a t riangle is t he minimum lengt h of a vert ical segment t hat connect s a vert ex of t he t riangle t o t he line support ing t he opposit e edge. T his follows from t he convexity of a t riangle, and indeed t hat segment always lies inside t he t riangle. We now specify (in t erms of t he dual represent at ion) t he vert ical dist ance between t he int ersect ion of two lines t o a t hird line of A (in t he primal represent at ion). Refer t o Figure 1. T he equat ion of ‘ i is

1 lk

Q

i ;k

Q

i ;k j

r

i

r

j

r

k

lj

j

li

0

1

F ig . 1 .

Vert ical dist ance

y = ( r i − l i ) x + l i . We comput e t he dist ance between Q i ; k = ( x i ; k ; y i ; k ), t he int ersect ion point of ‘ i and ‘ k , and Q i ; k j j = ( x i ; k ; y i ; k j j ), t he vert ical project ion of Q i ; k on ‘ j . A simple calculat ion shows t hat Q i ; k = ( ( l − l l ) −− (l r − r ) ; ( l −l l r ) −− (l r r − r ) ). k

k

By subst it ut ing x i ; k in t he equat ion of ‘ j we nd t hat Finally,

Dist ( Q i ; k ; Q i ; k j j ) = j y i ; k −

y i ;k jj

r i (l k

j=

li r i lj r j lk r k

2(( l k −

li

y i ;k jj

=

k

r

j

i

rk

))

i

k

i

k

(l k − l i )− l j (r k − r i ) (l k − l i )− (r k − r i )

) − r j (l k − l i ) + r k (l j − (l k − l i ) + (r i − r k )

1 1 1

) + (r i −

i

k

i

k

lj



1 2

= 4 abs



i

i

.



li )

:

T he numerat or of t he last t erm is t he area of t he t riangle de ned by t he point s P i , P j , and P k . In case P i and P k are in monot one decreasing posit ion, t he

A Duality b etween Small-Face P roblems

47

denominat or is t he perimet er of t he axis-aligned box de ned by P i and P k . When set t ing G 1 ( P i ; P j ; P k ) = Dist ( Q i ; k ; Q i ; k j j ), maximizing t he smallest value of F 1 over t he t riangles de ned by t riples of lines of A dualizes t o maximizing t he smallest value of G 1 over t riples of point s in U . We denot e t he asympt ot ic value by G1 ( n ) = F 1 ( n ). We now comput e (in t he dual represent at ion) t he area of t he t riangle de ned by t hree lines of A (in t he primal represent at ion). Recall t hat Q i ;j

= (x i ; j

; yi ;j

)= (

lj

(l j −

li )

− li − (r j −

ri

;

) (l j −

lj r i li )

− li r j − (r j −

ri

)

):

Tedious comput at ion shows t hat

x i ;j

1 abs 2

Area( Q i ; j

; Q j ;k ; Q k ;i

)=



yi ;j

x j ;k yj ;k x k ;i yk ;i

1 1 1

1 abs( x j ; k y k ; i − y j ; k x k ; i − x i ; j y k ; i + y i ; j x k ; i + x i ; j y j ; k − y i ; j x j ; k ) 2 (l i r j − l j r i + l k r i − l i r k + l j r k − l k r j )2 1 = abs 2 (( l j − l i ) + ( r i − r j ))(( l k − l i ) + ( r i − r k ))(( l k − l j ) + ( r j − =

0

li r i @ 1 2

= 16 abs

lj r j lk r k

1 1 1

rk

))

1 2 A

2(( l j − l i ) + ( r i − r j ))  2(( l k − l i ) + ( r i − r k ))  2(( l k − l j ) + ( r j − r k ))

:

T he numerat or of t he last t erm is t he square of t he area of t he t riangle de ned by t he point s P i , P j , and P k . In case P i , P j , and P k are in monot one decreasing posit ion, t he denominat or is t he product of t he perimet ers of t he axis-aligned boxes de ned by P i , P j , and P k . When set t ing G 2 ( P i ; P j ; P k ) = Area( Q i ; j ; Q j ; k ; Q k ; i ), maximizing t he smallest value of F 2 over t he t riangles de ned by t riples of lines of A dualizes t o maximizing t he smallest value of G 2 over t riples of point s in U . We denot e t he asympt ot ic value by G2 ( n ) = F 2 ( n ). In summary, we de ne a duality between narrow arrangement s of lines and dist ribut ions of point s in t he unit square. We de ne measures of t riangles de ned by t riples of lines of t he arrangement s, and nd t heir dual measures of t riples of point s. We consider some special st ruct ures of t he arrangement s and t heir dual dist ribut ions of point s. In all cases we look for t he arrangement of lines (or dist ribut ion of point s) t hat maximizes t he minimum value of t he measure over all t riples of lines (or point s), and at t empt t o asympt ot ically bound t his value.

3

H e ilb ro n n ’s T ria n g le P ro b le m

As not ed in t he int roduct ion, t he best known lower bound for t he original Heilbronn’s t riangle problem, G0 ( n ) = Ω ( long2n ), is obt ained by Komlos, P int z, and Szemeredi [4]. T he same aut hors obt ain in [3] t he best known upper bound, 1 O ( n 1 1 4 2 ). :

: : :

48

Gill Barequet

Unlike t he measures G 1 and G 2 , it is not essent ial t o require t he set t o be in t he monot one case. Here we have only an upper bound:

d ec rea s in g T h e o re m

1.

( m on )

G0

(n ) =

1

O(n

2

).

Refer t o t he sequence of segment s t hat connect pairs of consecut ive point s. T he t ot al lengt h of t he sequence is at most 2. Cover t he whole sequence of segment s by at most n3 squares wit h side n6 . T hus at least one square cont ains t hree point s. T he area of t he t riangle t hat t hey de ne is at most n1 82 . P roo f.

For t he convex case t he bound is t ight : T h e o re m

2.

( co n v )

G0

(n ) = 

( n13 ) .

P r o o f . T he lower bound is obt ained by a simple example: P ut n point s equally spaced on an arc of radius 1 and of lengt h 2 (see Figure 2). T he point s are

1

si n (

i t h p oin t

i 4n

)

0

F ig . 2 .

c o s(

i 4n

)

1

Uniform dist ribut ion of point s on an arc

ordered from bot t om-right t o t op-left . T he coordinat es of t he i t h point are (cos(2i  ) ; sin(2i  )), for 1  i  n , where  = = (4n ). T he area of t he t riangle de ned by every t hree consecut ive point s is 4 cos( ) sin 3 ( ) = ( n13 ). It is also easy t o prove t he upper bound. Refer t o t he sequence of segment s t hat connect pairs of consecut ive point s. Drop all t he segment s of lengt h great er t han 8=n . Since t he maximum lengt h of such a convex and monot one chain is 2, less t han n = 4 segment s are dropped. Now drop all pairs of consecut ive segment s whose ext ernal angle is great er t han 4 =n . Since t he maximum t urning angle of such a convex chain is = 2, less t han n = 8 pairs are dropped. T hat is, less t han n = 4

A Duality b etween Small-Face P roblems

49

segment s are now dropped. In t ot al we have dropped less t han n = 2 segment s; t herefore two consecut ive segment s have not been dropped. T he area of t he t riangle which t hese two segment s de ne is upper bounded by 12 ( n8 ) 2 sin( 4n ) = 1  ( n 3 ).

4

V e rt ic a l H e ig h t

T h e o re m

3.

G1 ( n ) =

( n1 ) . 

T he lower bound is shown by an example.1 Set l i = ni − for 1  i  n (a set of almost -parallel lines). In t his example P roo f.



G 1 (P i ; P j ; P k



)=

1 n

and

i

(j − i )n i + j − (k − i )n i + k + (k − j )n j + k n j + 1 (n k − n i )

ri

i

=

,

n



;

which is minimized when i , j , and k are consecut ive int egers. It is easy t o verify t hat in t his example, for every i , G 1 ( P i ; P i + 1 ; P i + 2 ) = n (nn−+11 ) . Hence G1 ( n ) = 1 Ω ( n ). For t he upper bound we ret urn t o t he primal represent at ion of t he problem by an arrangement A of n lines. Since A is narrow, t here exist s a vert ical segment of lengt h 1 which st abs all t he n lines. Hence t here exist s a t riple of lines which are st abbed by a vert ical segment of lengt h at most n −2 1 . Such a t riple cannot de ne a t riangle whose vert ical height exceeds n −2 1 , t herefore F 1 ( n ) = O ( n1 ). We now refer t o t ransposed arrangement s of lines (t he dual of monot one decreasing Heilbronn’s set s of point s). T he best upper bound of which we are aware is Mit chell’s [5]. Here is a simpli ed version of t he proof of t his bound. Let  i denot e t he slope of ‘ i (for 1  i  n ). Assume wit hout loss of generality t hat at least n = 2 lines of L have posit ive slopes. For t he asympt ot ic analysis we may assume t hat all t he lines of L are ascending. Denot e by h t he minimum vert ical height of a t riangle in A (L ). T hen each pair of lines ‘ i ; ‘ j 2 L induces 3h

2

c o s(

) c o s(

)

(see Figure 3) t hrough which no ot her line of a hexagon of area 4 sin ( − ) L can pass. T his is since such a line would form wit h ‘ i and ‘ j a t riangle whose vert ical height is at most h = 2. T he int ersect ion of every pair of such hexagons is empty, for ot herwise t here would be a t  riangle whose vert ical height is less t han n h . Denot e by S t he t ot al area of t he 2 hexagons. On one hand, i

j

X

S

= 1

i< j



n

3h 2 cos(  i ) cos(  j )  4 sin(  j −  i )

where we use t he fact s t hat 0 < 1

j

i



3h 2 8 i



X 1

1

i< j

=4



n

sin(  j −  i )

for 1 

i



n



3h 2 8

X 1

and sin( )

i< j


1 levels. T hen G is n ot level plan ar if, an d on ly if it con tain s on e of the M L N P pattern s as described in section s 3.1, 3.2, an d 3.2. P roof. If a subgraph G p of G corresponds t o an MLNP pat t ern, t hen G must be non level planar. It remains t o proof t he opposit e direct ion. Suppose t here exist s a minimal pat t ern P of non level planarity t hat is not applicable for hierarchies. Let G be a level graph such t hat P is t he only pat t ern of non level planarity in G . Since G is not level planar, augment ing t he graph by an incoming edge for every source preserving t he leveling in t he graph const ruct s a non level planar hierarchy H = ( V ; E [ E H ;  ), where E H is t he set of all ext ra added edges. Let P be t he set of all subgraphs of H corresponding t o a MLNP pat t ern. By assumpt ion, we have for any G p 2 P , G p = ( Vp ; E p ;  ) t hat t here exist s an edge ep 2 E p \ E H . Removing for every G p 2 P t he edge ep from H , we const ruct a level planar graph H 0. By const ruct ion, H 0 cont ains G as a subgraph. Since every subgraph of a level planar graph must be level planar it self, t his cont radict s G being a non level planar subgraph.

5

C o n c lu s io n

We have given a charact erizat ion of level planar graphs in t erms of minimal forbidden subgraphs. T his descript ion of level planarity is a main cont ribut ion for solving t he N P -hard level planarizat ion problem for pract ical inst ances. Based on t he charact erizat ion of level planar graphs an int eger linear programming formulat ion for t he level planarizat ion problem can be given, allowing t o st udy t he associat ed polyt ope in order t o develop an e cient branch-and-cut approach.

R e fe re n c e s [1] G. Di Bat t ist a and E. Nardelli. Hierarchies and planarity t heory. I E E E T r an sact i on s on Syst em s, M an , an d C yber n et i cs, 18(6):1035{1046, 1988. [2] P. Eades, B. D. McKay, and N. C. Wormald. On an edge crossing problem. In P r oc. 9t h A ust r ali an C om put er Sci en ce C on f er en ce, pages 327{334. Aust ralian Nat ional University, 1986. [3] P. Eades and S. W hit esides. Drawing graphs in two layers. T heor et i cal C om put er Sci en ce, 131:361{374, 1994. [4] F . Harary. G r aph T heor y . Addison-Wesley, 1969. [5] M. J u¨ nger, S. Leip ert , and P. Mut zel. Level planarity t est ing in linear t ime. Technical Rep ort 98.321, Inst it ut f¨u r Informat ik, Universit ¨a t zu K¨oln, 1998. [6] P. Mut zel. An alt ernat ive met hod t o crossing minimizat ion on hierarchical graphs. In St ephen Nort h, edit or, G r aph D r awi n g. Sym posi um on G r aph D r awi n g, G D ’ 96 , volume 1190 of L ect ur e N ot es i n C om put er Sci en ce, pages 318{333. Springer-Verlag, 1996.

R e c t a n g u la r D raw in g s o f P la n e G ra p h s W it h o u t D e s ig n a t e d C o rn e rs ( E x t e n d e d A b s t ra c t ) Md. Saidur Rahman 1 , Shin-ichi Nakano2 , and Takao Nishizeki3 1

Depart ment of Comput er Science and Engineering, Bangladesh University of Engineering and Technology, Dhaka-100, Bangladesh. sai dur @cse. buet . edu

2

Depart ment of Comput er Science, Gunma University, Kiryu 376-8515, J apan.

3

Graduat e School of Informat ion Sciences, Tohoku University, Aoba-yama 05, Sendai 980-8579, J apan.

nakano@cs. gunma- u. ac. j p

ni shi @ecei . t ohoku. ac. j p

A b s t r a c t . A rect angular drawing of a plane graph G is a drawing of G such t hat each vert ex is drawn as a p oint , each edge is drawn as a horizont al or a vert ical line segment , and t he cont our of each face is drawn as a rect angle. A necessary and su cient condit ion for t he exist ence of a rect angular drawing has b een known only for t he case where exact ly four vert ices of degree 2 are designat ed as corners in a given plane graph G. In t his pap er we est ablish a necessary and su cient condit ion for t he exist ence of a rect angular drawing of G for t he general case in which no vert ices are designat ed as corners. We also give a linear-t ime algorit hm t o nd a rect angular drawing of G if it exist s.

K e y w o r d s : Graph, Algorit hm, Graph Drawing, Rect angular Drawing.

1

In t ro d u c t io n

Recent ly aut omat ic drawings of graphs have creat ed int ense int erest due t o t heir broad applicat ions, and as a consequence, a number of drawing styles and corresponding drawing algorit hms have come out [DET T 99]. Among di erent drawing styles a \ rect angular drawing" has at t ract ed much at t ent ion due t o it s applicat ions in VLSI floorplanning and archit ect ural floorplanning [BS88, H93, H95, KH97, KK84, L90, RNN98]. A rect an gu lar draw in g of a plane graph G is a drawing of G in which each vert ex is drawn as a point , each edge is drawn as a horizont al or a vert ical line segment , and t he cont our of each face is drawn as a rect angle. Not e t hat in a rect angular drawing of a plane graph G t he cont our of t he out er face of G is also drawn as a rect angle. F ig. 1(d) illust rat es a rect angular drawing of t he graph in F ig. 1(c). Clearly not every plane graph has a rect angular drawing. For example t he graph in F ig. 1(e) has no rect angular drawing. D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 8 5 { 9 4 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

86

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

3 2

13

11

13

2

14 1

16

4

12

15

1

11

12

13

2 14

b

14

a

4

1

11

16 15

12

4

16 15

5

10

17

9

5

5 10

7 8

10

17

6 9

6

7

d

17

9

6

7 8

8

c

(a) (b) a

b

3

3 2

13

(c)

4

13

2

14 1

10 9

11

b

14

a 12 16 15

1

11

12

4

16 15

5 17

5

7 10

6

8

c

d

17

9

7

6

8 c

(d)

d

(f) (e)

F i g . 1 . (a) Int erconnect ion graph, (b) dual-like graph, (c) good designat ion of

corners, (d) rect angular drawing, (e) bad designat ion of corners, and (f) 2-3 plane graph.

In a VLSI floorplanning problem, t he int erconnect ion among modules is usually represent ed by a plane graph, every inner face of which is t riangulat ed. F ig. 1(a) illust rat es such an int erconnect ion graph of 17 modules. T he dual-like graph of an int erconnect ion graph is a cubic graph in which every vert ex has degree 3 [L90]. F ig. 1(b) illust rat es a dual-like graph of t he graph in F ig. 1(a), which has 17 inner faces. Insert ing four vert ices a ; b; c and d of degree 2 in appropriat e edges on t he out er face cont our of t he dual-like graph as illust rat ed in F ig. 1(c), one wishes t o nd a rect angular drawing of t he result ing graph as illust rat ed in F ig. 1(d). If t here is a rect angular drawing, it yields a floorplan of modules. Each vert ex of degree 2 is a corner of t he rect angle corresponding t o t he out er rect angle. T homassen [T 84] gave a necessary and su cient condit ion for such a plane graph wit h exact ly four vert ices of degree 2 t o have a rect angular drawing. Linear-t ime algorit hms are given in [BS88, H93, KH97, RNN98] t o obt ain a rect angular drawing of such a plane graph, if it exist s. However, it has not been known how t o appropriat ely insert four vert ices of degree 2 as corners. If four vert ices a ; b; c and d of degree 2 are insert ed in edges as in F ig. 1(e), t hen t he result ing graph has no rect angular drawing.

Rect angular Drawings of P lane Graphs W it hout Designat ed Corners

87

In t his paper we assume t hat four or more vert ices of degree 2 have been insert ed t o all edges t hat may be drawn as edges incident t o corners in a rect angular drawing; for example, insert one or two vert ices of degree 2 t o each edge on t he out er cont our. T hus we consider a plane connect ed graph G in which every vert ex on t he out er cont our has degree 2 or 3, every vert ex not on t he out er cont our has degree 3, and t here are four or more vert ices of degree 2 on t he out er cont our. We call such a graph a 2-3 plan e graph. (See F ig. 1(f).) We do not assume t hat four vert ices of degree 2 are designat ed as corners in advance. We give a necessary and su cient condit ion for such a 2-3 plane graph G t o have a rect angular drawing, and give a linear-t ime algorit hm t o nd appropriat e four vert ices of degree 2 and obt ain a rect angular drawing of G wit h t hese vert ices as corners. T he rest of t he paper is organized as follows. Sect ion 2 describes some de nit ions and present s preliminary result s. Sect ion 3 present s our main result on rect angular drawing. F inally, Sect ion 4 concludes wit h an open problem.

2

P re lim in a rie s

In t his sect ion we give some de nit ions and present preliminary result s. Let G be a connect ed simple graph. We denot e t he set of vert ices of G by V ( G ), and t he set of edges of G by E ( G ). T he degree of a vert ex v is t he number of neighbors of v in G . We denot e t he maximum degree of a graph G by  . A graph is plan ar if it can be embedded in t he plane so t hat no two edges int ersect geomet rically except at a vert ex t o which t hey are bot h incident . A plan e graph is a planar graph wit h a xed embedding. A plane graph divides t he plane int o connect ed regions called faces . We regard t he con t ou r of a face as a clockwise cycle formed by t he edges on t he boundary of t he face. We denot e t he cont our of t he out er face of graph G by C o ( G ). We call a vert ex not on C o ( G ) an in n er ver t ex of G . For a simple cycle C in a plane graph G , we denot e by G ( C ) t he plane subgraph of G inside C (including C ). An edge of G which is incident t o exact ly one vert ex of a simple cycle C and locat ed out side C is called a leg of t he cycle C . T he vert ex of C t o which a leg is incident is called a leg-vert ex of C . A simple cycle C in G is called a k -legged cy cle of G if C has exact ly k legs in G . A k -legged cycle C is a m in im al k -legged cy cle if G ( C ) does not cont ain any ot her k -legged cycle of G . We say t hat cycles C and C 0 in a plane graph G are in depen den t if G ( C ) and G ( C 0) have no common vert ex. A set S of cycles is independent if any pair of cycles in S are independent . A rect an gu lar draw in g of a plane graph G is a drawing of G such t hat each edge is drawn as a horizont al or a vert ical line segment , and each face is drawn as a rect angle. In a rect angular drawing of G , t he cont our C o ( G ) of t he out er face is drawn as a rect angle and hence has four convex corners. Such a corner is called a cor n er of t he rect an gu lar draw in g . Since a rect angular drawing D of G has no bend and each edge is drawn as a horizont al or a vert ical line segment , only a vert ex of degree 2 of G can be drawn as a corner of D . T herefore, a graph

88

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

wit h less t han four vert ices of degree 2 on C o ( G ) has no rect angular drawing. T hus we consider a 2-3 plan e graph G in which four or more vert ices on C o ( G ) have degree 2 and all ot her vert ices have degree 3. We call a vert ex of degree 2 in G t hat is drawn as a corner of D a cor n er ver t ex . T he following result on rect angular drawings is known [T 84, RNN98]. L e m m a 1 . L et G be a 2-3 plan e graph. A ssu m e t hat fou r ver t ices of degree 2 are design at ed as cor n er s. T hen G has a rect an gu lar drawin g if an d on ly if G sat is es t he follow in g t hree con dit ion s [T 84]: ( c1) G has n o 1-legged cy cles; ( c2) every 2-legged cy cle in G con t ain s at least t w o design at ed vert ices; an d ( c3) every 3-legged cy cle in G con t ain s at least on e design at ed ver t ex . Fu r t her m ore on e can check in lin ear t im e w het her G sat is es t he con dit ion s above, an d if G does t hen on e can n d a rect an gu lar drawin g of G in lin ear t im e [R N N 98].

2

It is rat her di cult t o det ermine whet her a 2-3 plane graph G has a rect angular drawing unless four vert ices of degree 2 are designat ed as corners. Considering all combinat ions of four vert ices of degree 2 as corners and applying t he algorit hm in Lemma 1 for each of t he combinat ions, one can det ermine whet her G has a rect angular drawing. Such a st raight forward met hod requires t ime O ( n 5 ) since t here are O ( n 4 ) combinat ions, and one can det ermine in linear t ime whet her G has a rect angular drawing for each combinat ion. In t he next sect ion we obt ain a necessary and su cient condit ion for G t o have a rect angular drawing for t he general case in which no vert ices of degree 2 are designat ed as corners. T he condit ion leads t o a linear-t ime algorit hm.

3

R e c t a n g u la r D raw in g s W it h o u t D e s ig n a t e d C o rn e rs

T he following t heorem is our main result on rect angular drawings. T h e o r e m 2 . A 2-3 plan e graph G has a rect an gu lar drawin g if an d on ly if G sat is es t he follow in g fou r con dit ion s:

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

G has n o 1-legged cy cle; every 2-legged cy cle in G con t ain s at least t w o ver t ices of degree 2; every 3-legged cy cle in G con t ain s at least on e ver t ex of degree 2; an d if an in depen den t set S of cy cles in G con sist s of c 2 2-legged cy cles an d c 3 3-legged cy cles, t hen 2c 2 + c 3  4.

2

Before proving T heorem 2, we observe t he following fact . F a c t 3 I n an y rect an gu lar drawin g D of G , every 2-legged cy cle of G con t ain s at least t w o corn ers, every 3-legged cy cle of G con t ain s at least on e cor n er , an d every cy cle w it h fou r or m ore legs m ay con t ain n o corn er.

2

Rect angular Drawings of P lane Graphs W it hout Designat ed Corners

89

We now prove t he necessity of T heorem 2. N e c e s s i t y o f T h e o r e m 2 . Assume t hat G has a rect angular drawing D . T hen

has no 1-legged cycle, since t he face surrounding a 1-legged cycle cannot be drawn as a rect angle in D . By Fact 3 every 2-legged cycle in D cont ains at least two corners and every 3-legged cycle in D cont ains at least one corner. Since a corner is a vert ex of degree 2, every 2-legged cycle in G must have at least two vert ices of degree 2 and every 3-legged cycle must have at least one vert ex of degree 2. Let an independent set S consist of c 2 2-legged cycles and c 3 3-legged cycles in G . T hen by Fact 3 each of t he c 2 2-legged cycles in S cont ains at least two corners, and each of t he c 3 3-legged cycle in S cont ains at least one corner. Since all cycles in S are independent , t hey are vert ex-disjoint each ot her. T herefore t here are at least 2c 2 + c 3 corners in D . Since t here are exact ly four corners in D , we have 2c 2 + c 3  4. 2 G

In t he rest of t his sect ion we give a const ruct ive proof for t he su ciency of T heorem 2, and show t hat t he proof leads t o a linear-t ime algorit hm for nding a rect angular drawing of G if it exist s. We rst give some de nit ions. For a graph G and a set V 0 V ( G ), G − V 0 denot es a graph obt ained from G by delet ing all vert ices in V 0 t oget her wit h all edges incident t o t hem. For a plane graph G , we de ne a C o ( G ) -com pon en t as follows. A subgraph F of G is a C o ( G )-component if F consist s of a single edge which is not in C o ( G ) and bot h ends of which are in C o ( G ). T he graph G − V ( C o ( G )) may have a connect ed component . Add t o such a component all edges of G , each joining a vert ex in t he component and a vert ex in C o ( G ). T he result ing subgraph F of G is a C o ( G )-component , t oo. All t hese subgraphs F of G and only t hese are t he C o ( G )-component s. ; v p− 1 ; v p g, p 3, be a set of t hree or more consecut ive vert ices Let f v 1 ; v 2 ; on C o ( G ) such t hat t he degrees of t he rst vert ex v 1 and t he last vert ex v p are ; v p− 1 are two. exact ly t hree and t he degrees of all int ermediat e vert ices v 2 ; v 3 ; ; v p− 1 g a chain of G , and we call vert ices v 1 and T hen we call t he set f v 2 ; v 3 ; v p t he en ds of t he chain. Every vert ex of degree 2 in G is cont ained in exact ly one chain. A chain in G corresponds t o an edge of t he dual-like graph of an int erconnect ion graph int o which vert ices of degree 2 have been insert ed. T wo chains are con secu t ive if t hey have a common end. We now have t he following lemmas. L e m m a 4 . L et G be a 2-3 plan e graph, an d let k be t he n u m ber of ver t ices of degree 3 on C o ( G ) . I f a C o ( G ) -com pon en t F con t ain s a cy cle, t hen F con t ain s a cy cle w it h k or less legs.

2

L e m m a 5 . A ssu m e t hat a 2-3 plan e graph G sat is es t he fou r con dit ion s in T heorem 2 , an d t hat G has at m ost t hree ver t ices of degree 3 on C o ( G ) . T hen G has a rect an gu lar draw in g.

90

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

P roof. If G is a cycle, t hen clearly G has a rect angular drawing. T herefore we may assume t hat G has at least one vert ex of degree 3 on C o ( G ). If G had exact ly one vert ex of degree 3 on C o ( G ), t hen G would have a 1-legged cycle or a vert ex of degree 1, cont rary t o t he assumpt ion t hat G is a 2-3 plane graph sat isfying t he condit ions in T heorem 2. T hus G has eit her two or t hree vert ices of degree 3 on C o ( G ), and hence t here are t he following two cases t o consider. C a s e 1 : G has exact ly two vert ices of degree 3 on C o ( G ). In t his case G has exact ly one C o ( G )-component F . We now claim t hat F is a graph of a single edge. Ot herwise, F has a cycle, and t hen by Lemma 4 F has a 2-legged cycle, but t he 2-legged cycle cont ains no vert ex of degree 2, cont rary t o t he assumpt ion t hat G sat is es Condit ion (2). Clearly t he ends of t he edge in F are t he two vert ices of degree 3 on C o ( G ). Since G is a simple graph, t he two vert ices divide C o ( G ) int o two chains of G . Furt hermore, G has two 2-legged cycles C 1 and C 2 as indicat ed by dot t ed lines in F ig. 4(a). Since G sat is es Condit ion (2), each of C 1 and C 2 cont ains at least two vert ices of degree 2. We arbit rarily choose two vert ices of degree 2 on each of C 1 and C 2 as corner vert ices. T hen we can nd a rect angular drawing of G as illust rat ed in F ig. 2(b).

C2

C1

a

b

b

a

c d

d

G (a)

c

D (b)

F i g . 2 . Illust rat ion for Case 1.

C a s e 2 : G has exact ly t hree vert ices of degree 3 on C o ( G ).

In t his case G has exact ly one C o ( G )-component F . T he C o ( G )-component F has no cycle; ot herwise, by Lemma 4 G would have a 2-legged or 3-legged cycle cont aining no vert ex of degree 2, cont rary t o t he assumpt ion t hat G sat is es Condit ions (2) and (3). T herefore, F is a t ree, and has exact ly one vert ex of degree 3 not on C o ( G ). T hus G is a \ subdivision" of a complet e graph K 4 of four vert ices, and has t hree 3-legged cycles C 1 , C 2 and C 3 as indicat ed by dot t ed lines in F ig. 3(a). Since G sat is es Condit ion (3), each 3-legged cycle cont ains at least one vert ex of degree 2. We choose four vert ices of degree 2; one vert ex of degree 2 on each of t he t hree 3-legged cycles, and one vert ex of degree 2 arbit rarily. We 2 t hen obt ain a rect angular drawing D of G as illust rat ed in F ig. 3(b). By Lemma 5 we may assume t hat G has four or more vert ices of degree 3 on We now have t he following lemmas.

C o ( G ).

Rect angular Drawings of P lane Graphs W it hout Designat ed Corners C2

91

b

a

C1 a

b d

c

C3

d

G (a)

D

c

(b)

F i g . 3 . Illust rat ion for Case 2.

L e m m a 6 . A ssu m e t hat a 2-3 plan e graph G sat is es t he fou r con dit ion s in T heorem 2 , t hat G has fou r or m ore ver t ices of degree 3 on C o ( G ) , an d t hat t here is ex act ly on e C o ( G ) -com pon en t . T hen t he followin g ( a) -( d) hold:

( a) for an y 2-legged cy cle C , at m ost on e chain of G is n ot on C ; ( b) on e can choose fou r ver t ices of degree 2 in a w ay t hat at m ost t w o of t hem are chosen from an y chain an d at m ost t hree are chosen from an y pair of con secu t ive chain s; ( c) G has a 3-legged cy cle; an d ( d) if G has t w o or m ore in depen den t 3-legged cy cles, t hen t he set of all m in im al 3-legged cy cles in G is in depen den t .

2

L e m m a 7 . I f a 2-3 plan e graph G has t w o or m ore C o ( G ) -com pon en t s, t hen G has a pair of in depen den t 2-legged cy cle.

2

We are now ready t o prove t he following lemma. L e m m a 8 . A ssu m e t hat a 2-3 plan e graph G sat is es t he fou r con dit ion s in T heorem 2, an d t hat C o ( G ) has fou r or m ore ver t ices of degree 3. T hen G has a rect an gu lar draw in g.

P roof. We shall consider t he following two cases depending on t he number of C o ( G )-component s.

C a s e 1 : G has exact ly one C o ( G )-component .

By Lemma 6(c) G has a 3-legged cycle. We shall consider t he following two subcases depending on whet her G has a pair of independent 3-legged cycles or not . S u b c a s e 1 a : G has no pair of independent 3-legged cycle. By Lemma 6(b) we can designat e four vert ices of degree 2 as corners in a way t hat at most two of t hem are chosen from any chain and at most t hree are chosen from any pair of consecut ive chains of G . By Lemma 1 it su ces t o show t hat G sat is es t he t hree condit ions (c1)-(c3) regarding t he four designat ed vert ices.

92

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

Since G sat is es Condit ion (1) in T heorem 2, G has no 1-legged cycle and hence sat is es (c1). We now claim t hat G sat is es (c2), t hat is, any 2-legged cycle C in G cont ains at least two designat ed vert ices. By Lemma 6(a) at most one chain of G is not on C . Since any chain cont ains at most two of t he four designat ed vert ices, C must cont ain at least two of t hem. We t hen claim t hat G sat is es (c3), t hat is, every 3-legged cycle C in G has at least one designat ed vert ex. By Condit ion (3) C has a vert ex of degree 2. T herefore exact ly two of t he t hree legs of C lie on C o ( G ). Let x and y be t he leg-vert ices of t hese two legs, respect ively. Let P be t he pat h on C o ( G ) st art ing at x and ending at y wit hout passing t hrough any edge on C . T hen P cont ains at most two chains; ot herwise, eit her G would have more t han one C o ( G )-component s or G would have a pair of independent 3-legged cycles, a cont radict ion. Furt hermore, if P cont ains exact ly one chain t hen it cont ains at most two designat ed vert ices, and if P cont ains exact ly two chains t hen t hey are consecut ive and cont ain at most t hree designat ed vert ices. Hence, in eit her case, C cont ains at least one of t he four designat ed vert ices. S u b c a s e 1 b : G has a pair of independent 3-legged cycles. Let M be t he set of all minimal 3-legged cycles in G . By Lemma 6(d) M is independent . Let k = jM j , t hen clearly 2  k and k  4 by Condit ion (4). For each 3-legged cycle C m in M , we arbit rarily choose a vert ex of degree 2 on C m . If k < 4, we arbit rarily choose 4 − k vert ices of degree 2 on C o ( G ) which are not chosen so far in a way t hat at most two vert ices are chosen from any chain. T his can be done because G has four or more vert ices of degree 2 and every 2-legged cycle has two or more vert ices of degree 2. T hus we have chosen exact ly four vert ices of degree 2, and we regard t hem as t he four designat ed corner vert ices. In F ig. 4(a) four vert ices a ; b; c and d of degree 2 are chosen as t he designat ed corner vert ices; vert ices a ; c and d are chosen on t hree independent minimal 3legged cycles indicat ed by dot t ed lines, whereas vert ex b is chosen arbit rarily on C o ( G ). By Lemma 1 it su ces t o show t hat G sat is es t he condit ions (c1)(c3) regarding t he four designat ed vert ices. We can indeed prove t hat G sat is es Condit ions (c1)-(c3) regarding t he four designat ed vert ices. T he det ail is omit t ed in t his ext ended abst ract . C a s e 2 : G has two or more C o ( G )-component s. In t his case by Lemma 7 G has a pair of independent 2-legged cycles, C 1 and C 2 . One may assume t hat bot h C 1 and C 2 are minimal 2-legged cycles. By Condit ion (4) at most two 2-legged cycles of G are independent . T herefore, for = C 1 ; C 2 ), G ( C 0) cont ains eit her C 1 or C 2 . any ot her 2-legged cycle C 0( 6 Let k i , i = 1 and 2, be t he number of all minimal (not always independent ) 3-legged cycles in G ( C i ). T hen we claim t hat k i  2, i = 1 and 2. F irst consider t he case where C i has exact ly t hree vert ices of degree 3 on C o ( G ). T hen G ( C i ) has exact ly two inner faces; ot herwise, G ( C i ) would have a cycle which has 2 or 3 legs and has no vert ex of degree 2, cont rary t o Condit ion (2) or (3). T he cont ours of t he two faces are minimal 3-legged cycles, and t here is no ot her minimal 3-legged cycle in G ( C i ). T hus k i = 2. We next consider t he case where

Rect angular Drawings of P lane Graphs W it hout Designat ed Corners C1 a

b c

C2

d

a

93

b c

d G (a)

G (b)

F i g . 4 . (a)Illust rat ion for Case 1, and (b) illust rat ion for Case 2.

C i has four or more vert ices of degree 3 on C o ( G ). T hen we can show, similarly as in t he proof of Lemma 6(d), t hat t he set of all minimal 3-legged cycles of 3, t hen Condit ion (4) would not hold for G in G ( C i ) is independent . If k i  t he independent set S of k i + 1 cycles: t he k i 3-legged cycles in G ( C i ) and t he = i . T hus k i  2: 2-legged cycle C j , j = 1 or 2 and j 6 We choose two vert ices of degree 2 on each C i , 1  i  2, as follows. For each of t he k i minimal 3-legged cycle in G ( C i ), we arbit rarily choose exact ly one vert ex of degree 2. If k i < 2, t hen we arbit rarily choose 2 − k i vert ices of degree 2 in V ( C i ) which have not been chosen so far in a way t hat at most two vert ices are chosen from any chain. T his can be done because by Condit ion (2) C i has at least two vert ices of degree 2. T hus we have chosen four vert ices of degree 2, and we regard t hem as t he designat ed corner vert ices for a rect angular drawing of G . In F ig. 4(b) G has a pair of independent 2-legged cycles C 1 and C 2 , k 1 = 2, k 2 = 1, and four vert ices a ; b; c and d on C o ( G ) are chosen as t he designat ed vert ices. Vert ices a and d are chosen from t he vert ices on C 1 ; each on a minimal 3-legged cycle in G ( C 1 ). Vert ices b and c are chosen from t he vert ices on C 2 ; c is on t he minimal 3-legged cycle in G ( C 2 ), and b is an arbit rary vert ex on C 2 ot her t han c . By Lemma 1 it su ces t o show t hat G sat is es t he condit ions (c1)-(c3) regarding t he four designat ed vert ices. We can indeed prove t hat G sat is es Condit ions (c1)-(c3) regarding t he four designat ed vert ices. T he det ail is omit t ed in t his ext ended abst ract . 2

Lemmas 5 and 8 immediat ely imply t hat G has a rect angular drawing if G sat is es t he condit ions in T heorem 2. T hus we have const ruct ively proved t he su ciency of T heorem 2. We immediat ely have t he following corollary from T heorem 2. C o r o l l a r y 9 . A 2-3 plan e graph G has a rect an gu lar drawin g if an d on ly if G sat is es t he follow in g six con dit ion s:

( 1) G has n o 1-legged cy cle; ( 2) every 2-legged cy cle in G has at least t w o ver t ices of degree 2;

94

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

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

every 3-legged cy cle in G has a ver t ex of degree 2; at m ost t w o 2-legged cy cles in G are in depen den t of each ot her ; at m ost fou r 3-legged cy cles in G are in depen den t of each ot her ; an d if G has a pair of in depen den t 2-legged cy cles C 1 an d C 2 , t hen each of G ( C 1 ) an d G ( C 2 ) has at m ost t w o in depen den t 3-legged cy cles of G an d t he set f C 1 ; C 2 ; C 3 g of cy cles is n ot in depen den t for an y 3-legged cy cle C 3 in G .

2

We now have t he following t heorem. T h e o r e m 1 0 . G iven a 2-3 plan e graph G , on e can det er m in e in lin ear t im e w het her G has a rect an gu lar drawin g or n ot , an d if G has, on e can n d a rect an gu lar draw in g of G in lin ear t im e.

2

4

C o n c lu s io n s

In t his paper we est ablished a necessary and su cient condit ion for a 2-3 plane graph G t o have a rect angular drawing. We gave a linear-t ime algorit hm t o det ermine whet her G has a rect angular drawing, and nd a rect angular drawing of G if it exist s. T hus, given a plane cubic graph G , we can det ermine in linear t ime whet her one can insert four vert ices of degree 2 int o some of t he edges on C o ( G ) so t hat t he result ing plane graph G 0 has a rect angular drawing or not , and if G 0 has, we can nd a rect angular drawing of G 0 in linear t ime. It is left as an open problem t o obt ain an e cient algorit hm for nding rect angular drawings of plane graphs wit h t he maximum degree  = 4.

R e fe re n c e s [BS88] J . Bhasker and S. Sahni, A li n ear algor i t hm t o n d a r ect an gu lar du al of a pl an ar t r i an gu l at ed gr aph , Algorit hmica, 3 (1988), pp. 247-278. [DET T 99] G. Di Bat t ist a, P. Eades, R. Tamassia and I. G. Tollis, G r aph D r awi n g, P rent ice Hall, Upp er Saddle River, NJ , 1999. [H93] X. He, O n n di n g t he r ect an gu lar du als of plan ar t r i an gu lat ed gr ap hs, SIAM J . Comput ., 22(6) (1993), pp. 1218-1226. [H95] X. He, A n e ci en t par al lel algor i t hm f or n di n g r ect an gu lar du als of plan e t r i an gu l at ed gr aphs, Algorit hmica 13 (1995), pp. 553-572. [KH97] G. Kant and X. He, R egu lar edge labeli n g of 4- con n ect ed plan e gr aphs an d i t s appli cat i on s i n gr aph dr awi n g pr oblem s, T heoret ical Comput er Science, 172 (1997), pp. 175-193. [KK84] K. Kozminski and E. Kinnen, A n al gor i t hm f or n di n g a r ect an gu l ar du al of a pl an ar gr aph f or u se i n ar ea plan n i n g f or V L SI i n t egr at ed ci r cu i t s, P roc. 21st DAC, Albuquerque, J une (1984), pp. 655-656. [L90] T . Lengauer, C om bi n at i r i al A lgor i t hm s f or I n t egr at ed C i r cu i t L ayou t , J ohn W iley & Sons, Chichest er, 1990. [RNN98] M. S. Rahman, S. Nakano and T . Nishizeki, R ect an gu lar gr i d dr awi n gs of pl an e gr aphs, Comp. Geom. T heo. Appl., 10(3) (1998), pp. 203-220. [T 84] C. T homassen, P lan e r epr esen t at i on s of gr aphs, (Eds.) J . A. Bondy and U. S. R. Murty, P rogress in Graph T heory, Academic P ress Canada, (1984), pp. 43-69.

Computing Optimal Embeddings for Planar Graphs Petra Mutzel⋆ and Ren´e 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 first 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 efficiently 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.

1

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 defines 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, find 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 “Effiziente Algorithmen f¨ ur diskrete Probleme und ihre Anwendungen”

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

96

Petra Mutzel and Ren´e 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 fixed embedding ([13]). Figure 1 shows two different orthogonal drawings of the same graph that were generated using the bend minimization algorithm by Tamassia ([13]). The algorithm used different combinatorial embeddings as input. Drawing 1(a) has 13 bends while drawing 1(b) has only 7 bends. 5

0

4 3

1

2

6

2 0

1

3

6

7 4

8

7

5

8

(a)

(b)

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

For a fixed embedding, the bend minimization problem can be formulated as a flow 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 flow 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 inefficient 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 finding 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 first approach while making it possible to deal efficiently with high degree vertices. As in our first 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.

2

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 simplified 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 Ren´e 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 definition 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 different 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 defines a unique combinatorial embedding for each skeleton of a node in the SPQR-tree. Conversely, when we define an embedding for each skeleton of a node in the SPQR-tree, we define 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

...

Q

Q

T1

Q Q

T3

...

...

T2 Q

Q

T1

v Q

...

Q

Split

v

Q Q Q

Q Q

T2

Q

T3

...

...

Q

Q

Q

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 Ren´e 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 defined 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 definition 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 differs 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.

4

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)! different 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 finding 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 finding 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 define a bijection b : C → E from the cycles in P to the edges in B. This bijection defines a linear function c′ : E → R on the edges of B such that c′ (e) = c(b−1 (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

v1

v2

v3

v4

e4

vb

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 finding an embedding of P that minimizes the sum of the weights of the face cycles is equivalent to finding 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 Ren´e 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 define 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 finished, we use a mixed integer programming solver to find an integer solution. Then we check if any subtour elimination constraint is violated. We do this by finding a minimum cut in each ATSP-graph. The weight of each edge in the ATSP graph is defined 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.

5

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 first 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 first 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 figure 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

0 20

40

60 Vertices

(a)

80

100

20

40

60 Vertices

80

100

(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 find drawings with the minimum number of bends over all embeddings. Of course, this will make the solution of the ILP much more difficult. 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:303–326, 1997. [2] G. Di Battista and R. Tamassia. On-line planarity testing. SIAM Journal on Computing, 25(5):956–997, 1996.

104

Petra Mutzel and Ren´e 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

0

1 2 Separated constraints

3

(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:331–344, 1998. [4] D. Bienstock and C. L. Monma. Optimal enclosing regions in planar graphs. Networks, 19(1):79–94, 1989. [5] D. Bienstock and C. L. Monma. On the complexity of embedding planar graphs to minimize certain distance measures. Algorithmica, 5(1):93–109, 1990. [6] J. Cai. Counting embeddings of planar graphs using DFS trees. SIAM Journal on Discrete Mathematics, 6(3):335–352, 1993. [7] G. Carpaneto, M. Dell’Amico, and P. Toth. Exact solution of large scale asymmetric travelling salesman problems. ACM Transactions on Mathematical Software, 21(4):394–409, 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 260–269, 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:286–297, 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):609–612, 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. Cornu´ejols, R. Burkard, and G. W¨ oginger, editors, Proceedings of the Seventh Conference on Integer Programming and Combinatorial Optimization (IPCO), volume 1610 of LNCS, pages 361–376. 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):421–444, 1987.

A p p ro x im a t io n A lg o rit h m s fo r In d e p e n d e n t S e t s in M a p G ra p h s Zhi-Zhong Chen Depart ment of Mat hemat ical Sciences, Tokyo Denki University, Hat oyama, Sait ama 350-0394, J apan. chen@r . dendai . ac. j p

T his pap er present s p olynomial-t ime approximat ion algorit hms for t he problem of comput ing a maximum indep endent set in a given map graph G wit h or wit hout weight s on it s vert ices. If G is given t oget her wit h a map, t hen a rat io of 1 + can b e achieved in O ( n 2 ) t ime for any given const ant > 0, no mat t er whet her each vert ex of G is given a weight or not . In case G is given wit hout a map, a rat io of 4 can b e achieved in O ( n 7 ) t ime if no vert ex is given a weight , while a rat io of O (log n ) can b e achieved in O ( n 7 log n ) t ime ot herwise. Behind t he design of our algorit hms are several fundament al result s for map graphs; t hese result s can b e used t o design good approximat ion algorit hms for coloring and vert ex cover in map graphs, and may nd applicat ions t o ot her problems on map graphs as well. A b st r a c t .

1

In t ro d u c t io n

An in depen den t set in a graph G = ( V; E ) is a subset I of V such t hat no two vert ices of I are connect ed by an edge in E . If each vert ex of G is associat ed wit h a weight , t he weight of an independent set I in G is t he t ot al weight of vert ices in I . Given a vert ex-weight ed graph G = ( V; E ), t he m axim um in depen den t set (MIS) problem requires t he comput at ion of an independent set of maximum weight in G . T he special case where each vert ex of G has weight 1, is called t he un weighted m axim um in depen den t set (UMIS) problem. T he MIS problem is a fundament al problem in many areas; unfort unat ely, even t he UMIS problem is widely known t o be NP -hard. Since t he MIS problem is NP -hard, we are int erest ed in designing approxim ation algorithm s , i.e. polynomial-t ime algorit hms t hat nd an independent set of large but not necessarily maximum weight in a given graph. An approximat ion algorit hm A achieves a ratio of  if for every vert ex-weight ed graph G , t he independent set I found by A on input G has weight at least O P T ( G ) , where OP T ( G ) is t he maximum weight of an independent set in G . Hast _ ad [6] gave st rong evidence t hat no approximat ion algorit hm for t he UMIS problem achieves a rat io of n 1 − for any  > 0, where n is t he number of vert ices in t he input graph. Due t o t his, a lot of work has been devot ed t o designing approximat ion algorit hms for t he MIS problem rest rict ed t o cert ain D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 1 0 5 { 1 1 4 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

106

Zhi-Zhong Chen

classes of graphs (such as planar graphs, bounded-degree graphs, et c). T his paper considers t he MIS problem rest rict ed t o m ap graphs , which were int roduced by Chen et al. [5] recent ly. Int uit ively speaking, a m ap is a plane graph whose faces are classi ed int o n ation s and lakes . Tradit ional planarity says t hat two nat ions on a map M are adjacent if and only if t hey share at least a borderline. Mot ivat ed by t opological inference, Chen et al. [5] considered a modi cat ion of t radit ional planarity, which says t hat two nat ions on M are adjacent if and only if t hey share at least a border-point . Consider t he simple graph G whose vert ices are t he nat ions on M and whose edges are all f f 1 ; f 2 g such t hat f 1 and f 2 are nat ions sharing at least a border-point . G is called a m ap graph [5,10]; if for some int eger k , no point in M is shared by more t han k nat ions, G is called a k -m ap graph [5]. T he UMIS problem rest rict ed t o map graphs is NP -hard, because planar graphs are exact ly 3-map graphs [5] and t he UMIS problem rest rict ed t o planar graphs is NP -hard. It is known [1,7] t hat t he MIS problem rest rict ed t o planar graphs has a polyn om ial-tim e approxim ation schem e (P TAS). Recall t hat a P TAS for a maximizat ion (respect ively, minimizat ion) problem  is a polynomial-t ime algorit hm A such t hat given an inst ance I of  and an error paramet er  > 0, A comput es a solut ion S of I in t ime polynomial in t he size of I such t hat t he value of S is at least (1 −  )  OP T ( I ) (respect ively, at most (1 +  )  OP T ( I )), where OP T ( I ) is t he opt imal value of a solut ion of I . An int erest ing quest ion is t o ask whet her t he MIS problem rest rict ed t o map graphs also has a P TAS. Regarding t his quest ion, we show t hat if t he input graph is given t oget her wit h a map, t hen t he MIS problem rest rict ed t o map graphs has a pract ical P TAS. Combining t his result and t he T horup algorit hm [10] for const ruct ing a map from a given map graph, we obt ain a P TAS for t he MIS problem rest rict ed t o map graphs. Unfort unat ely, t he T horup algorit hm is ext remely complicat ed and t he exponent of it s polynomial t ime bound is about 120. So, it is nat ural t o assume t hat no map is given as part of t he input and no map const ruct ion is allowed in approximat ion algorit hms. Under t his assumpt ion, we rst show t hat t he MIS problem rest rict ed t o k -map graphs for any xed int eger k has a P TAS. T his P TAS runs in linear t ime, but is impract ical because it uses t he impract ical Bodlaender algorit hm [2] for t ree-decomposit ion. Using t his P TAS, we t hen obt ain an O ( n 7 )-t ime approximat ion algorit hm for t he UMIS problem rest rict ed t o general map graphs t hat achieves a rat io of 4. We also give two relat ively more pract ical approximat ion algorit hms. One of t hem is for t he MIS problem rest rict ed t o general map graphs, runs in O ( n 7 log n ) t ime, and achieves a rat io of O (log n ). T he ot her is for t he UMIS problem rest rict ed t o general map graphs, runs in O ( n 7 ) t ime, and achieves a rat io of 5. Behind t he design of our algorit hms are several fundament al result s for map graphs; t hese result s can be used t o obt ain t he following result s. First , t here is a P TAS for t he minimum weight ed vert ex cover (MWVC) problem rest rict ed t o map graphs. Second, a map graph G wit h n vert ices and m edges can be colored in O ( n 2 m ) t ime using at most 2   ( G ) colors, where  ( G ) is t he chromat ic number of G . T hird, for all opt imizat ion problems  such t hat  rest rict ed

Approximat ion Algorit hms for Indep endent Set s in Map Graphs

107

t o planar graphs has a P TAS as shown in [1],  rest rict ed t o k -map graphs has a P TAS as well for any xed int eger k . T hese result s do not involve map const ruct ions. T hey may nd applicat ions t o ot her problems on map graphs as well. T he rest of t his paper is organized as follows. Sect ion 2 gives precise de nit ions and st at es known result s t hat are needed lat er on. Sect ion 3 present s a P TAS for t he MIS problem where t he input graph is given t oget her wit h a map. Sect ion 4 describes two P TASs for t he MIS problem rest rict ed t o k -map graphs. Sect ion 5 present s nont rivial approximat ion algorit hms for t he MIS and UMIS problems rest rict ed t o map graphs. Sect ion 6 asks several open quest ions. See ht t p:/ / rnc2.r.dendai.ac.jp/ ~chen/ papers/ mapis.ps.gz, for a full version of t his paper.

2

P re lim in a rie s

T hroughout t his paper, a graph may have mult iple edges but no loops, while a sim ple graph has neit her mult iple edges nor loops. Let G = ( V; E ) be a graph. T he subgraph of G induced by a subset U of V is denot ed by G [U ]. An in depen den t set of G is a subset U of V such t hat G [U ] has no edge. T he in depen den ce n um ber of G , denot ed by ( G ), is t he maximum number of vert ices in an independent set of G . Let v 2 V . T he degree of v in G is t he number of edges incident t o v in G ; v is an isolated vert ex if it s degree is 0. T he n eighborhood of v in G , denot ed by N G ( v ), is t he set of vert ices adjacent t o v in G . Not e t hat j N G ( v )j bounds t he degree of v in G from below. For a subset U of V , let N G ( U ) = [ v 2 U N G ( v ). Let E be a plane graph. Let f be a face of E. T he boun dary of f is t he graph ( Vf ; E f ), where Vf and E f are t he set of vert ices and edges surrounding f , respect ively. T he size of f , denot ed by j f j, is j Vf j. We call f a cycle face if it s boundary is a simple cycle. A m ap M is a pair (E; ’ ), where (1) E is a plane graph (P ; E E ) and each connect ed component of E is biconnect ed, and (2) ’ is a funct ion t hat maps each inner face f of E t o 0 or 1 in such a way t hat whenever ’ ( f ) = 1, f is a cycle face. A face f of E is called a n ation on M if f is an inner face wit h ’ ( f ) = 1, while called a lake on M ot herwise. For an int eger k , a k -poin t in M is a p 2 P t hat appears on t he boundaries of exact ly k nat ions on M ; a k + -poin t in M is a p 2 P t hat appears on t he boundaries of more t han k nat ions on M . M is a k -m ap if t here is no k + -point in M . T wo nat ions are adjacen t if t heir boundaries share a p 2 P . T he graph of M is t he simple graph G = ( V; E G ) where V consist s of t he nat ions on M and E G consist s of all f f 1 ; f 2 g such t hat f 1 and f 2 are adjacent . We call G a m ap graph , while call G a k -m ap graph if M is a k -map. For clarity, we call t he element s of P poin ts , while call t he element s of V vertices . A nat ion f on M is isolated if f is an isolat ed vert ex of G . T he half square of a bipart it e graph H = ( X ; Y ; E H ) is t he simple graph G = ( X ; E ) where E = f f x 1 ; x 2 g j t here is a y 2 Y wit h f x 1 ; y g 2 E H and f x 2 ; y g 2 E H g.

108

Zhi-Zhong Chen

L e m m a 1 . [5] E very m ap graph G = ( V; E ) is the half square of a bipartite plan ar graph H = ( V; P ; E H ) with jP j  3j V j − 6.

For a map M = (E; ’ ) and a face f in E, we say t hat f touches a point p if p appears on t he boundary of f .

3

A P T A S fo r t h e C a s e w it h a G iv e n M a p

Let G = ( V; E ) be t he input map graph given wit h a map M = ((P ; E E ) ; ’ ) and a nonnegat ive weight t o each nat ion on M . Let  be t he given error paramet er. Let H be t he bipart it e planar graph ( V; P ; E H ) where E H = f f v; pg j v 2 V; p 2 P , and p is a point on t he boundary of nat ion v g. Obviously, H can be const ruct ed in linear t ime from M . Moreover, G is t he half square of H . Indeed, Lemma 1 is proved by furt her removing all redun dan t poin ts from H where a point p 2 P is redundant if for every pair f u; v g of neighbors of p in H , t here is a point q 2 P − f pg wit h f u; v g N H ( q). Our P TAS is a nont rivial applicat ion of t he Baker approach. Let h = d1 e. We may assume t hat G and hence H are connect ed. St art ing at an arbit rary vert ex r 2 V , we perform a breadt h- rst search (BFS) on H t o obt ain a BFS t ree T H . For each vert ex v in H , we de ne t he level number ‘ ( v ) of v t o be t he number of edges on t he pat h from r t o v in T H . Not e t hat only r has level number 0. For each i 2 f 0; : : : ; h − 1g, let H i be t he subgraph of H obt ained from H by delet ing all vert ices v wit h ‘ ( v ) 2i (mod 2h ). Obviously, each v 2 V appears in exact ly h − 1 of H 0 t hrough H h − 1 . Moreover, H i is clearly a (2h − 1)-out erplanar graph. For each i 2 f 0; : : : ; h − 1g, let G i be t he half square of H i . T he crux is t hat each G i is an induced subgraph of G , because all p 2 P appear in H i . Our st rat egy is t o comput e an independent set I i of maximum weight in G i for each i 2 f 0; : : : ; h − 1g. Since each vert ex of G appears in all but one of G 0 t hrough G h − 1 , t he independent set of maximum weight among I 0 ; : : : ; I h − 1 has weight at least (1 − h1 ) OP T ( G ) (1 −  ) OP T ( G ). Recall t hat OP T ( G ) is t he maximum weight of an independent set in G . So, it remains t o show how t o comput e a maximum weight independent set I i in G i for each i 2 f 0; : : : ; h − 1g. To do t his, we rst recall t he not ion of treewidth . A tree-decom position of a graph K = ( VK ; E K ) is a pair (f X j j j 2 J g; T ), where f X j j j 2 J g is a family of subset s of VK and T is a t ree wit h vert ex-set J such t hat t he following hold: { { {

[ j 2 J X j = VK . For every edge f v; w g 2 E K , t here is a j 2 J wit h f v; w g X j . For all j 1 ; j 2 ; j 3 2 J , if j 2 lies on t he pat h from j 1 t o j 3 in T , t hen X j 1 \ X j 3 X j2.

Each X j is called t he bag of vert ex j . T he treewidth of a t ree-decomposit ion (f X j j j 2 J g; T ) is maxf j X j j − 1 j j 2 J g. T he treewidth of K is t he minimum t reewidt h of a t ree-decomposit ion of K , t aken over all possible t reedecomposit ions of K .

Approximat ion Algorit hms for Indep endent Set s in Map Graphs

109

It is widely known t hat t he MIS problem rest rict ed t o graphs wit h bounded t reewidt h can be solved in linear t ime. However, t he t reewidt hs of our graphs G 0 ; : : : ; G h − 1 may not be bounded. Our st rat egy is t o resort t o H 0 ; : : : ; H h − 1 inst ead, and do a dynamic programming on t hem. T he result is t he following: T h e o r e m 1 . T here is a P T A S for the special case of the M IS problem restricted to m ap graphs where the in put graph is given together with a m ap M = (E; ’ ) . It run s in O ( h jEj 2 + 21 2 h − 8 h 2 jEj) tim e, where h = d1 e an d  is the given error param eter.

4

P T A S s fo r k-M a p G ra p h s

We use an ext ension of t he Baker approach, suggest ed in [4]. T he only di erence between t he ext ension and t he Baker approach is t hat inst ead of decomposing t he given graph G int o k 0-out erplanar subgraphs, we decompose G int o subgraphs of bounded t reewidt h such t hat each vert ex of G appears in all but one of t hese subgraphs. T he next lemma shows t hat such a decomposit ion is possible for a k -map graph. Given a k -m ap graph G an d an in teger h  2, it takes O ( h j G j) tim e to com pute a list L of h in duced subgraphs of G such that ( 1) each subgraph in L is of treewidth  k (6h − 4) an d ( 2) each vertex of G appears in exactly h − 1 of the subgraphs in L .

Lem m a 2.

By t he proof of Lemma 2, for all opt imizat ion problems  such t hat  rest rict ed t o planar graphs has a P TAS as shown in [1], we can emulat e Baker [1] t o show t hat  rest rict ed t o k -map graphs has a P TAS as well for any xed int eger k . In part icular, we have: For an y xed in teger k , there is a P T A S for the M IS problem 3 restricted to k -m ap graphs. It run s in O (23 2 ( 6 k h − 4 k ) hn ) tim e, where n is the size of the given k -m ap graph, h = d1 e, an d  is the given error param eter. T h e o re m 2 .

T he P TAS in T heorem 2 is impract ical. We next show a di erent P TAS for t he special case of t he UMIS problem where t he input graph is given t oget her wit h a k -map. T his P TAS is based on t he Lipt on and Tarjan approach. Alt hough t his P TAS is not bet t er t han t he one in Sect ion 3, t he t ools used in it s design seem t o be fundament al. Indeed, t he t ools will be used in t he next sect ion, and we believe t hat t hey can be used in ot her applicat ions. A map M = (E; ’ ) is well-form ed if (1) t he degree of each point in E is at least 3, (2) no edge of E is shared by two lakes, (3) no lake t ouches a point whose degree in E is 4 or more, and (4) t he boundary of each lake cont ains at least 4 edges. T he next lemma shows t hat a map can easily be made well-formed. L e m m a 3 . Given a m ap M = (E; ’ ) with at least three n ation s an d without isolated n ation s, it takes O (jEj) tim e to obtain a well-form ed m ap M 0 such that ( 1) the graph of M 0 is the sam e as that of M an d ( 2) for every in teger k  2, M is a k -m ap if an d on ly if so is M 0.

110

Zhi-Zhong Chen

Let M = (E; ’ ) be a well-formed map. T hen, each point on t he boundary of a lake on M is a 2-point in M and has degree 3 in E; moreover, for all int egers i  3, each i -point in M has degree i in E. Using t hese fact s, we can prove t he following lemma which improves a result in [5] signi cant ly. Lem m a 4.

T hen , m 

Let k  3 an d G be a k -m ap graph with n  k n − 2k .

3 vertices an d m edges.

From Lemma 4, we can prove t he following corollary. C o ro lla ry 1 .

T he followin g hold:

1. Given an in teger k an d a k -m ap graph G , it takes O (j G j) tim e to color G with at m ost 2k colors. Con sequen tly, given a k -m ap M = (E; ’ ) , it takes O ( k jEj) tim e to color the graph of M with at m ost 2k colors. 2. Given a m ap graph G = ( V; E ) , we can color G in O (j V j 2 j E j) tim e usin g at m ost 2   ( G ) colors, where  ( G ) is the chrom atic n um ber of G .

Indeed it has been known for a long t ime t hat k -map graphs are 2k -colorable [9], but Corollary 1 has t he advant age of being algorit hmic. It is also known t hat k -map graphs wit h k  8 can be colored wit h at most 2k − 3 colors [3], but t he proof does not yield an e cient algorit hm. Let G be a connect ed graph wit h nonnegat ive weight s on it s vert ices. T he weight of a subgraph of G is t he t ot al weight of vert ices in t he subgraph. A separator of G is a subgraph H of G such t hat delet ing t he vert ices of H from , where G leaves a graph whose connect ed component s each have weight  2 W 3 W is t he weight of G . T he size of a separat or H is t he number of vert ices in H . T he following lemma shows t hat k -map graphs have small separat ors. Given a k -m ap M = (E; ’ ) on which each n ation has an associated n on n egative weight an d at least two n ation s exist, it takes O (jEj) tim e to n d a p separator H of the graph G of M such that the size of H is at m ost 2 2k ( n − 1) .

Lem m a 5.

Using Lemma 5, we can emulat e Lipt on and Tarjan [8] t o prove t he following t heorem: For an y xed in teger k , there is a P T A S for the special case of the UM IS problem restricted to k -m ap graphs where the in put graph is given together 2 3 with a k -m ap M = (E; ’ ) . It run s in O (jEj log jEj + 22 8 8 h k n ) tim e, where n is 1 the n um ber of n ation s on M , h = d  e, an d  is the given error param eter.

T h e o re m 3 .

5

A p p ro x im a t io n A lg o rit h m s fo r M a p G ra p h s

T his sect ion present s four approximat ion algorit hms. T he rst t hree are for t he UMIS problem rest rict ed t o map graphs. T he fourt h is for t he MIS problem rest rict ed t o map graphs. T he input t o t he rst algorit hm is a map inst ead of a map graph; t his algorit hm is given here for t he purpose of helping t he reader

Approximat ion Algorit hms for Indep endent Set s in Map Graphs

111

underst and t he ot her t hree algorit hms. Also, t he second algorit hm is relat ively more pract ical t han t he t hird. For a well-formed map M = (E; ’ ), let G(M ) be t he plane graph obt ained from t he dual plane graph E of E by delet ing all vert ices t hat are lakes on M . Not e t hat corresponding t o each 2+ -point p in E, t here is a unique face F p in G(M ) such t hat t he vert ices on t he boundary of F p are exact ly t he nat ions on M t hat t ouch p; t he boundary of F p is a simple cycle. We call F p a poin t-face of G(M ). T hose faces of G(M ) t hat are not point -faces are called lake-faces . Consider t he following algorit hm, called M apI S1 : : A map M = (E; ’ ). If at most two nat ions are on M , t hen ret urn a maximum weight independent set of t he graph of M . If t here is an isolat ed nat ion on M , t hen nd such a nat ion f ; ot herwise, perform t he following subst eps: 2 . 1 . Modify M t o a well-formed map, wit hout alt ering t he graph of M . 2 . 2 . Const ruct G(M ). 2 . 3 . Find a minimum-degree vert ex f in G(M ). Const ruct a new map M 0 = (E; ’ 0), where for all faces f 1 of E, if f 1 = f or f 1 is a neighbor of f in t he graph of M , t hen ’ 0( f 1 ) = 0, while ’ 0( f 1 ) = ’ ( f 1 ) ot herwise. Recursively call M apI S1 on input M 0, t o comput e an independent set J in t he graph of M 0. Ret urn f f g [ J .

In p u t 1. 2.

3.

4. 5.

T h e o re m 4 .

M apI S1 achieves a ratio of 5 an d run s in O (jEj 2 ) tim e.

P roof. (Sket ch) T he number of edges in G(M ) is at most 3n − 6. So, t he degree of f in G(M ) is at most 5. We can t hen claim t hat t he neighborhood of f in G can be divided int o at most ve cliques.

Consider t he following algorit hm, called M apI S2 : : A map graph G = ( V; E ). If G has exact ly at most two vert ices, t hen ret urn a maximum weight independent set of G . Find a vert ex f in G such t hat ( G f )  5, where G f = G [N G ( f )]. Remove f and it s neighbors from G . Recursively call M apI S2 on input G , t o comput e an independent set J . Ret urn f f g [ J .

In p u t 1. 2. 3. 4. 5.

T h e o re m 5 .

M apI S2 achieves a ratio of 5, an d run s in O (j V j 

P f

2V

j N G ( f )j 6 )

tim e. P roof. By t he proof of T heorem 4, St ep 2 of M apI S2 can always be done.

112

Zhi-Zhong Chen

Consider t he following algorit hm, called M apI S3 : : A map graph G = ( V; E ), an int eger k  4, and a posit ive real number  less t han 1. If G has exact ly at most two vert ices, t hen ret urn a maximum weight independent set of G . Find a vert ex f in G such t hat ( G f ) is minimized among all vert ices f of G , where G f = G [N G ( f )]. If ( G f )  4, t hen perform t he following subst eps: 3 . 1 . Remove f and it s neighbors from G . 3 . 2 . Recursively call M apI S3 on input G t o comput e an independent set J . 3 . 3 . Ret urn f f g [ J . Repeat t he following subst eps unt il 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 t hat C cont ains at least k + 1

In p u t 1. 2. 3.

4.

vert ices. Remove all vert ices of C from G . Color G wit h at most 2k colors (cf. Corollary 1); let J 1 be t he maximum set of vert ices wit h t he same color. Comput e an independent set J 2 in G wit h j J 2 j  (1 −  ) ( G ). Ret urn t he bigger one among J 1 and J 2 . 4 .2 .

5. 6. 7.

To analyze M apI S3 , we need t he following lemma: L e m m a 6 . [5] Let G be the graph of a m ap M = (E; ’ ) . Let C be a clique of G con tain in g at least ve vertices. T hen , at least on e of the followin g holds:

C is a pizza , i.e., there is a poin t p in E such that all f 2 C touch p. C is a pizza-wit h-crust , i.e., there are a poin t p in E an d an f 1 2 C such that ( 1) all f 2 C − f f 1 g touch p an d ( 2) for each f 2 C − f f 1 g, som e poin t q6 = p in E is touched by both f 1 an d f . { C is a hamant asch , i.e., there are three poin ts in E such that each f 2 C touches at least two of the poin ts an d each poin t is touched by at least two n ation s.

{ {

T h e o r e m 6 . If we an d run s in O (j V j 

P

x k = 28 an d  = 0:25, then M apI S3 achieves a ratio of 4 j N G ( f )j 6 + j V j 3 j E j) tim e. f 2V

P roof. Let G 0 be t he input graph. We may assume t hat G 0 is connect ed. By t he proof of T heorem 5, it su ces t o prove t hat if ( G f )  5, t hen J 1 found in St ep (G 0) 5 or J 2 found in St ep 6 has size  . So, suppose t hat ( G f )  5. 4 Let n be t he number of vert ices in G 0 . Fix a well-formed map M of G 0 . For each int eger i > k , let h i be t he number of cliques C in G 0 such t hat (1) C cont ains exact ly i vert ices and (2) C is found in Subst ep 4.1 by t he algorit hm. We claimP t hat t he number x of edges in G(M ) is bounded from 1 h i ( i − 4). To see t his claim, let F 1 ; : : : ; F t be t he above by 3n − 6 − i= k+ 1 point -faces in G(M ) whose boundaries each cont ain at least t hree vert ices. For

Approximat ion Algorit hms for Indep endent Set s in Map Graphs

113

each j 2 f 1; : : : ; t g, x a vert ex f j on t he boundary of F j . We can t riangulat e each face F j by adding exact ly jF j j − 3 new edges incident t o f j ; call t hese new edges im agin ary edges incident t o f j . T here are exact ly jF j j − 3 imaginary edges P t (jF j j − 3). Let C be a clique of G 0 incident t o f j . T hus, x  3n − 6 − j = 1 found in Subst ep 4.1. We say t hat an imaginary edge f f j ; f 0g wit h j 2 f 1; : : : ; t g is con tributed by C , if f 0 is cont ained in C . Let i be t he number of vert ices in C . To prove t he claim, it remains t o prove t hat t he number of imaginary edges cont ribut ed by C is at least i − 4. By Lemma 6, only t he following t hree cases can occur: Case 1: C is a pizza. T hen, t here is a point p in M such t hat all nat ions f 0 in C t ouch p on M . Let F j be t he point -face in G(M ) t hat corresponds t o p. No mat t er whet her f j is in C or not , at least i − 3 imaginary edges incident t o f j are cont ribut ed by C . { Case 2: C is a pizza-wit h-crust . T hen, t here is a point p in M such t hat j C j − 1 nat ions in C t ouch p on M . Similarly t o Case 1, at least ( i − 1) − 3 imaginary edges are cont ribut ed by C . { Case 3: C is a hamant asch. T hen, t here are t hree point s p1 t hrough p3 in M such t hat each nat ion f 0 2 C t ouches at least two of t he t hree point s on M and each point is t ouched by at least two nat ions in C . Since i  k + 1  5, at most one of p1 t hrough p3 is a 2-point in M . Moreover, if one of p1 t hrough p3 is a 2-point , t hen C is act ually a pizza-wit h-crust and Case 2 applies. So, we may assume t hat p1 t hrough p3 are 2+ -point s in M . Let F j 1 be t he point face in G(M ) t hat corresponds t o p1 , and a1 be t he number of nat ions in C t hat t ouch p1 on M . De ne F j 2 , a2 , F j 3 , and a3 similarly. T hen, t he number of imaginary edges incident t o f j 1 (respect ively, f j 2 , or f j 3 ) cont ribut ed by C is at least a1 − 3 (respect ively, a2 − 3, or a3 − 3). T hus, t he number of imaginary edges cont ribut ed by C is at least ( a1 + a2 + a3 ) − 9  2i − 9  i − 4.

{

P 1

h i ( i − 4). T he degree of f in G(M ) is By t he claim, x  3n − 6 − i= k+ 1 at most b2nx c. On t he ot her hand, since ( G f )  5, t he degree of f in G(M ) P 1 P 1 is at least 5. T hus, 2 i = k + 1 h i ( i − 4)  n . In t urn, i = k + 1 h i i  n2 (( kk −+ 31 )) and P 1 h i  2 ( kn− 3 ) . i= k+ 1 Let J be t he bigger one among J 1 and J 2 . By St ep 6, j J jP  (1 −  )( ( G 0 ) − P 1 1 1  (n − h i ). By St ep 5 and Corollary 1, j J j  i h i ). T hus, i= k+ 1 i= k+ 1 2k jJ j jJ j 1 n k− 7 n  (1 −  )(1 −  ) and   . As t he value of (G 0) 2(k − 3) (G 0) (G 0) 4k (k − 3) (G 0) n

decreases, t he rst lower bound on

(G 0)

jJ j

bound on

(G 0)

T herefore, jJ j (G 0)



1 4

jJ j (G 0)

jJ j (G 0)

increases while t he second lower

decreases. T he worst case happens when 

(1 −  ) 

k− 7 3k − 2k − 7

. By

xing  =

1 4

n

(G 0)

=

4k (k − 3)(1− ) 3k − 2k − 7

.

and k = 28, we have

.

Finally, t he proof of T heorem 4 leads t o an approximat ion algorit hm for t he MIS problem rest rict ed t o map graphs t hat achieves a logarit hmic rat io.

114

Zhi-Zhong Chen

T h e o re m 7 .

Given a vertex-weighted m ap graph G = ( V; E ) , we can

in depen den t set of G whose weight is at least

lo g 76 6 lo g j V j

 OP T ( G ) , in O ((

n d an P f

2V

j N G ( f )j 7 + j G j)  log j V j) tim e.

6

C o n c lu d in g R e m a rk s

T he impract icalness of t he P TAS in T heorem 2 and hence t hat of M apI S3 mainly result from t he impract icalness of t he Bodlaender algorit hm [2] for t reedecomposit ion. A more pract ical algorit hm for t ree-decomposit ion can make our algorit hms more pract ical. Is t here a pract ical P TAS for t he MIS or UMIS problem rest rict ed t o map graphs? It would also be nice if one can design approximat ion algorit hms for t he problems t hat achieve bet t er rat ios t han ours. Can M apI S1 and M apI S2 be implement ed t o run fast er t han as claimed? Finally, we point out t hat Lemma 2 can be used t o design a P TAS for t he m in im um weighted vertex cover (MWVC) problem rest rict ed t o map graphs. T here is a P T A S for the M W V C problem restricted to m ap graphs. It run s in O ( n 2 ) tim e. T h e o re m 8 .

A ck n o w le d g m e n t s : I t hank P rofessors Seinosuke Toda and Xin He for helpful discussions, and a referee for helpful comment s on present at ion. R e fe re n c e s 1. B.S. Baker. Approximat ion algorit hms for NP -complet e problems on planar graphs. J . A C M 4 1 (1994) 153-180. 2. H.L. Bodlaender. A linear t ime algorit hm for nding t ree-decomp osit ions of small t reewidt h. SI A M J . C om pu t . 2 5 (1996) 1305-1317. 3. O.V. Borodin. Cyclic coloring of plane graphs. D i scr et e M at h. 1 0 0 (1992) 281-289. 4. Z.-Z. Chen. E cient approximat ion schemes for maximizat ion problems on K 3; 3 -free or K 5 -free graphs. J . A lgor i t hm s 2 6 (1998) 166-187. 5. Z.-Z. Chen, M. Grigni, and C.H. P apadimit riou. P lanar map graphs. ST O C ’ 98 , 514-523. See ht t p:/ / rnc2.r.dendai.ac.jp/ ~chen/ pap ers/ mg2.ps.gz for a full version. 6. J . H ast _ ad. Clique is hard t o approximat e wit hin n 1− . ST O C ’ 96 , 627-636. 7. R.J . Lipt on and R.E. Tarjan. A separat or t heorem for planar graphs. SI A M J . A ppl. M at h. 3 6 (1979) 177-189. 8. R.J . Lipt on and R.E. Tarjan. Applicat ions of a planar separat or t heorem. SI A M J . C om pu t i n g 9 (1980) 615-627. 9. O. Ore and M.D. P lummer. Cyclic colorat ion of plane graphs. R ecen t P r ogr ess i n C om bi n at or i cs, pp. 287-293, Academic P ress, 1969. 10. M. T horup. Map graphs in p olynomial t ime. F O C S’ 98 , 396-405.

H ie r a r c h ic a l T o p o lo g ic a l I n fe r e n c e o n P la n a r D is c M a p s Zhi-Zhong Chen 1 and Xin He2 1

Depart ment of Mat hemat ical Sciences, Tokyo Denki University, Hat oyama, Sait ama 350-0394, J apan. chen@r . dendai . ac. j p

2

Dept . of Comput . Sci. and Engin., St at e Univ. of New York at Bu alo, Bu alo, NY 14260, U.S.A. xi nhe@cse. buf f al o. edu

Given a set V and t hree relat ions . / d , . / m and . / i , we wish t o ask whet her it is p ossible t o draw t he element s v 2 V each as a closed disc homeomorph D v in t he plane in such a way t hat (1) D v and D w are disjoint for every ( v ; w ) 2 . / d , (2) D v and D w have disjoint int eriors but share a p oint of t heir b oundaries for every ( v ; w ) 2 . / m , and (3) D v includes D w as a sub-region for every ( v ; w ) 2 . / i . T his problem arises from t he st udy in geographic informat ion syst ems. T he problem is in NP but not known t o b e NP -hard or p olynomial-t ime solvable. T his pap er shows t hat a nont rivial sp ecial case of t he problem can b e solved in almost linear t ime. A b st r a c t .

1 1 .1

I n t r o d u c t io n To p o lo g ic a l In fe re n c e P ro b le m s

An inst ance of t he plan ar t opological in feren ce (P T I) problem is a t riple ( V; . / d is a nit e set , . / d (subscript d st ands for disjoin t ) and . / m m ), where V (subscript m st ands for m eet ) are two irreflexive symmet ric relat ions on V wit h . / d \ . / m = ; . T he problem is t o det ermine whet her we can draw t he element s v of V in t he plane each as a closed disc homeomorph D v in such a way t hat (1) D v and D w are disjoint for every ( v ; w ) 2 . / d , and (2) D v and D w have disjoint int eriors but share a point of t heir boundaries for every ( v ; w ) 2 . / m . T he P T I problem and it s ext ensions have been st udied for geographic informat ion syst ems [2,5,6,7,8,9]. In t he fu lly-con ju n ct ive case of t he P T I problem, it holds t hat for every pair of dist inct v ; w 2 V , eit her f ( v ; w ) ; ( w ; v )g  . / d or f ( v ; w ) ; ( w ; v )g  . / m . T he fully-conjunct ive P T I problem was rst st udied by Chen et al. [1] and subsequent ly by T horup [10]; t he lat t er gave a complicat ed ine cient but polynomial-t ime algorit hm for t he problem. Mot ivat ed by t he maps of cont emporary count ries in t he world, Chen et al. [1] rest rict s t he fully-conjunct ive P T I problem by requiring t hat no point of t he plane is shared by more t han k closed disc homeomorphs D v wit h v 2 V . Call t his rest rict ion t he fully-conjunct ive k -P T I problem. T he fully-conjunct ive 3-P T I problem is just t he ; ./

D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 1 1 5 { 1 2 5 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

116

Zhi-Zhong Chen and Xin He

problem of deciding whet her a given graph is planar. However, even t he fullyconjunct ive 4-P T I problem is di cult t o solve; a very complicat ed O ( n 3 )-t ime algorit hm for it was given in [1]. As has been suggest ed previously [1,5,6,7,9], a generalizat ion of t he P T I problem is obt ained by adding anot her irreflexive, ant isymmet ric and t ransit ive relat ion . / i (subscript i st ands for in clu sion ) on V wit h . / i \ ( . / d [ . / m ) = ; and requiring t hat D v includes D w as a sub-region for all ( v ; w ) 2 . / i . Unfort unat ely, no meaningful result has been obt ained for t his generalizat ion. A nat ural rest ric= ; t ion on . / i is t o require t hat each D v wit h v 2 V and f ( v ; w ) 2 . / i j w 2 V g 6 is t he union of all D w wit h ( v ; w ) 2 . / i . We call t his generalizat ion t he hierarchical t opological in feren ce (HT I) problem. In t he fu lly-con ju n ct ive case of t he HT I problem, for every pair of dist inct v ; w 2 V , exact ly one of t he following (1) t hrough (3) holds: (1) f ( v ; w ) ; ( w ; v )g  . / d ; (2) f ( v ; w ) ; ( w ; v )g  . / m ; (3) f ( v ; w ) ; ( w ; v )g \ ( . / d [ . / m ) = ; and jf ( v ; w ) ; ( w ; v )g\ . / i j = 1. Since no e cient algorit hm for t he fully-conjunct ive HT I problem is in sight , we seek t o rest rict it in a meaningful way so t hat an e cient algorit hm can be designed. As Chen et al. [1] rest rict ed t he fully-conjunct ive P T I problem, we rest rict t he fully-conjunct ive HT I problem by requiring t hat no point of t he plane is shared by more t han k m in im al closed disc homeomorphs D v , i.e., t hose D v wit h v 2 V such t hat f w 2 V j ( v ; w ) 2 . / i g = ; . Call t his rest rict ion t he fully-conjunct ive k -HT I problem. Unlike t he fully-conjunct ive 3-P T I problem, t he fully-conjunct ive 3-HT I problem is nont rivial. 1 .2

A G ra p h -T h e o re t ic Fo rm u la t io n

T hroughout t his paper, a graph may have mult iple edges but no loops, while a sim ple graph has neit her mult iple edges nor loops. Also, a cycle in a graph H always means a vert ex-simple cycle in H . A hierarchical m ap M is a pair (E; F ), where (1) E is a plane graph whose

connect ed component s are biconnect ed, and (2) F is a root ed forest whose leaves are dist inct faces of E. T he faces of E t hat are not leaves of F are called t he lakes on M , while t he rest faces of E are called t he leaf dist rict s on M . For each non-leaf vert ex of F , t he union of t he faces t hat are leaves in t he subt ree of F root ed at is called a n on -leaf district on M . M is a plan ar map if each vert ex of E is incident t o at most t hree edges of E. M is a disc map if (1) t he boundary of each leaf dist rict on M is a cycle and (2) for every non-leaf dist rict D on M , t here is a cycle C such t hat D is t he union of t he faces in t he int erior of C 1 . T he m ap graph G of M is t he simple graph whose vert ices are t he leaf dist rict s on M and whose edges are t hose f f 1 ; f 2 g such t hat t he boundaries of f 1 and f 2 int ersect . Not e t hat two dist rict s on a map M may share two or more disjoint borderlines (e.g. China and Russia share two disjoint borderlines wit h Mongolia in between). However, t he map graph G of M is always simple, meaning t hat t here is at most one edge between each pair of vert ices. Not e t hat G is planar when M is a planar map. We call ( G ; F ) t he abst ract of M . 1

In t op ology, D is a closed disc homeomorph.

Hierarchical Top ological Inference on P lanar Disc Maps

117

A graph-forest pair is a pair of a simple graph G and a root ed forest F whose leaves are exact ly t he vert ices of G . In t he st udy of geographic informat ion syst ems, we are given G and F and need t o decide whet her t he graph-forest pair ( G ; F ) is t he abst ract of a disc map. T his problem is equivalent t o t he fully-conjunct ive HT I problem. It s special case where each t ree in F is a single vert ex is equivalent t o t he fully-conjunct ive P T I problem. Moreover, it s special case where we ask whet her a given graph-forest pair ( G ; F ) is t he abst ract of a planar disc map is equivalent t o t he fully-conjunct ive 3-HT I problem. 1.3

O u r R e s u lt a n d It s S ig n i c a n c e

Our result is an O (jF j + j G j log j G j)-t ime algorit hm for deciding whet her a given graph-forest pair ( G ; F ) is t he abst ract of a planar disc map M , where j G j denot es t he t ot al number of vert ices and t he edges in G . T he di culty of t his problem comes from t he lack of informat ion in G about whet her t here are lakes on M and how many borderlines two leaf dist rict s on M can share. Since Chen et al.’s algorit hm [1] for t he fully-conjunct ive 4-P T I problem is a reduct ion t o t he fully-conjunct ive 3-P T I problem, we suspect t hat our result may serve as a basis for t ackling t he fully-conjunct ive 4-HT I problem or even more general cases. T he rest of t he paper is organized as follows. x 2 gives denit ions needed in lat er sect ions. T heorem 1 reduces t he problem t o t he special case where t he input planar graph G is biconnect ed. For t his special case, if we know t hat two vert ices z 1 and z 2 of t he input planar graph G can be embedded on t he out er face, t hen t he algorit hm in x 3 works. In x 4, we discuss how t o ident ify two such vert ices z 1 ; z 2 . See ht t p:/ / rnc2.r.dendai.ac.jp/ ~chen/ papers/ 3map.ps.gz for a full version.

2

D e n it io n s

Let G be a graph. V ( G ) and E ( G ) denot es t he vert ex-set and t he edge-set of G , respect ively. j G j denot es t he t ot al number of vert ices and edges in G . Let E 0  E ( G ) and U  V ( G ). T he su bgraph of G span n ed by E 0, denot ed by G [E 0], is t he graph ( V 0; E 0) where V 0 consist s of t he endpoint s of t he edges of E 0. G − E 0 denot es t he graph ( V ( G ) ; E ( G ) − E 0). T he su bgraph of G in du ced by U is denot ed by G [U ]. G − U denot es G [V ( G ) − U ]. If G is a plan e graph, t hen each of G [E 0], G − E 0, G [U ], and G − U in herit s an embedding from G in t he obvious way. A cu t vert ex of G is a v 2 V ( G ) such t hat G − f v g has more connect ed component s t han G . G is bicon n ect ed if G is connect ed and has no cut vert ex. A bicon n ect ed com pon en t of G is a maximal biconnect ed subgraph of G . We simply call connect ed component s 1-com pon en t s , and biconnect ed component s 2-com pon en t s . Let G be a plane graph. A k -face of G is a face of G whose boundary is a cycle consist ing of exact ly k edges. A su perface of G is G [U ] for some U  V ( G ) such t hat G [U ] is connect ed and each inner face of G [U ] is an inner 2- or 3-face

118

Zhi-Zhong Chen and Xin He

of G . T he in t erior of a superface G [U ] of G is t he open set consist ing of all point s p in t he plane t hat lie neit her on t he boundary nor in t he int erior of t he out er face of G [U ]. A graph-forest pair ( G ; F ) is plan ar if G is planar. A graph-forest -set (GFS) t riple is a t riple ( G ; F ; S ) such t hat ( G ; F ) is a planar graph-forest pair and S is a subset of V ( G ). For a root ed forest F and a non-leaf vert ex f of F , let L F ( f ) denot e t he set of all leaves of F t hat are descendant s of f . An edge-du plicat ed su pergraph of a simple graph G is a graph G such t hat (1) t he vert ices of G are t hose of G and (2) for each pair of adjacent vert ices in G, G has an edge between t he two vert ices. A plane graph G satis es a GFS t riple ( G ; F ; S ) if (1) G is an edge-duplicat ed supergraph of G and (2) for every non-leaf vert ex f of F , G[L F ( f )] is a superface of G whose int erior cont ains no vert ex of S . A GFS t riple is satis able if some plane graph sat ises it . A planar graph-forest pair ( G ; F ) is satis able if t he GFS t riple ( G ; F ; ; ) is sat isable. We can assume t hat a GFS t riple ( G ; F ; S ) (resp., graph-forest pair ( G ; F )) always sat ises t hat no vert ex of F has exact ly one child. By t his, jF j = O (j G j). T h e o re m 1 . T he problem of decidin g whet her a given plan ar graph-forest pair

( G ; F ) is t he abst ract of a plan ar disc m ap can be redu ced in O (j G j log j G j) t im e, t o t he problem of decidin g whet her a given G F S t riple ( G ; F ; S ) wit h G bicon n ect ed is sat is able.

3

B ic o n n e c t e d C a s e

Fix a GFS t riple ( G ; F ; S ) such t hat G is biconnect ed. We want t o check if ( G ; F ; S ) is sat isable. To t his end, we rst check whet her G [L F ( f )] is connect ed for all vert ices f of F . T his checking t akes O (j G j log j G j) t ime. If ( G ; F ) fails t he checking, t hen we st op immediat ely. So, suppose t hat ( G ; F ) passes t he checking. 3 .1

S P Q R D e c o m p o s it io n s

A t wo-t erm in al graph 2 (T T G) G = ( V; E ) is an acyclic plane digraph wit h a pair ( s; t ) of specied vert ices on t he out er face such t hat s is t he only sou rce (i.e. wit h no ent ering edge) and t is t he only sin k (i.e. wit h no leaving edge). We denot e s and t by s (G) and t (G), respect ively. We also call s and t t he poles of G and t he rest vert ices t he n on poles of G. A t wo-t erm in al su bgraph of G is a subgraph H of G such t hat H is a T T G and no edge of G is incident bot h t o a nonpole of H and t o a vert ex out side H . Alt hough G is a digraph, t he direct ions on it s edges are used only in t he denit ion of it s two-t erminal subgraphs b ut have no meaning anywhere else. Wit h t his in mind, we will view G as an undirect ed graph from now on. A split pair of G is eit her an unordered pair of adjacent vert ices, or an unordered pair of vert ices whose removal disconnect s t he graph ( V (G) ; E (G) [ f f s (G) ; t (G)gg). A split com pon en t of a split pair f u ; v g is eit her an edge f u ; v g 2

P reviously called a plan ar

st

-gr aph .

Hierarchical Top ological Inference on P lanar Disc Maps

119

or a maximal two-t erminal subgraph H (of G) wit h poles u and v such t hat f u ; v g is not a split pair of H . A split pair f u ; v g of G is m axim al if t here is no ot her split pair f w 1 ; w 2 g in G such t hat f u ; v g is cont ained in a split component of f w 1 ; w 2 g. T he decom posit ion t ree T of G describes a recursive decomposit ion of G wit h respect t o it s split pairs [3,4]. For clarity, we call t he element s of V ( T ) n odes . T is a root ed ordered t ree whose nodes are of four types: S, P, Q, and R. Each node  of T has an associat ed T T G, called t he skelet on of  and denot ed by Skl(  ). Also, it is associat ed wit h an edge in t he skelet on of t he parent of , called t he virt u al edge of in Skl( ). T is recursively dened as follows. T rivial case: G consist s of a single edge f s (G) ; t (G)g. T hen, T consist s of a single Q-node whose skelet on is G it self. S eries case: G is not biconnect ed. Let c1 ; : : : ; ck − 1 ( k  2) be t he cut vert ices of G. Since G is a T T G, each ci 2 f c1 ; : : : ; ck − 1 g is cont ained in exact ly two 2-component s Gi and Gi + 1 of G such t hat s (G) is in G1 and t (G) is in Gk . T he root of T is an S-node . Skl( ) is a pat h s (G) ; e1 ; c1 ; e2 ; : : : ; ck − 1 ; ek ; t (G). P arallel case: s (G) and t (G) const it ut e a split pair of G wit h split component s G1 ; : : : ; Gk ( k  2). T hen, t he root of T is a P -node . Skl( ) consist s of k parallel edges between s (G) and t (G), denot ed by e1 ; : : : ; ek . R igid case: none of t he above cases applies. Let f s 1 ; t 1 g; : : : ; f s k ; t k g be t he maximal split pairs of G. For i = 1; : : : ; k , let Gi be t he union of all t he split component s of f s i ; t i g. T he root of T is an R-node . Skl( ) is obt ained from G by replacing each Gi 2 f G1 ; : : : ; Gk g wit h an edge ei = f s i ; t i g. In t he last t hree cases, has children 1 ; : : : ; k (in t his order), such t hat i is t he root of t he decomposit ion t ree of graph Gi for all i 2 f 1; : : : ; k g. T he virt ual edge of node i is t he edge ei in Skl( ). Gi is called t he pert in en t graph of i and is denot ed by P rt( i ). By t he denit ion of T , no child of an S-node is an S-node and no child of a P -node is a P -node. Also not e t hat , for an R-node , t he two poles of Skl( ) are not adjacent in Skl( ). A block of G is t he pert inent graph of a node in T . For a non-leaf node in T and each child of , we call P rt ( ) a child block of P rt( ). Le m m a 1 . Let z 1 an d z 2 be t wo vert ices of G su ch t hat addin g a n ew edge bet ween z 1 an d z 2 does n ot dist roy t he plan arit y of G . T hen , it t akes O (j G j) tim e t o con vert G t o a T T G G wit h poles z 1 an d z 2 an d t o con st ru ct t he correspon din g decom posit ion t ree T of G. M oreover, every T T G G0 wit h poles z 1 an d z 2 su ch t hat G0 satis es ( G ; F ; S ) , can be obt ain ed by perform in g a sequ en ce of O (j G j) followin g operat ion s: 1. F lip t he skelet on of an R -n ode of T arou n d t he poles of t he skelet on . 2. P erm u t e t he children of a P -n ode of T . 3. A dd a n ew Q -n ode child t o a P -n ode of T su ch t hat origin ally has a Q -n ode child; fu rt her add a virt u al edge t o t he skelet on of .

A desired pair for ( G ; F ; S ) is an unordered pair f z 1 ; z 2 g of two vert ices of G such t hat if ( G ; F ; S ) is sat isable, t hen it is sat ised by a plane graph in which bot h z 1 and z 2 appear on t he boundary of t he out er face.

120

Zhi-Zhong Chen and Xin He

Our algorit hm is based on Lemma 1. In order t o save t ime, we want t o rst nd a desired pair f z 1 ; z 2 g for ( G ; F ; S ). If F is not a t ree, t hen we can let f z 1 ; z 2 g be an edge such t hat t here are two root s f 1 and f 2 in F wit h z 1 2 L F ( f 1 ) and z 2 2 L F ( f 2 ). If F is a t ree but j S j  2, t hen we can let z 1 and z 2 be two arbit rary vert ices in S . In case F is a t ree and j S j  1, it is not easy t o nd out z 1 and z 2 ; x4 is devot ed t o t his case. 3.2

B a s ic Id e a s

Suppose t hat we have found a desired pair f z 1 ; z 2 g for ( G ; F ; S ) and have convert ed G t o a T T G G wit h poles z 1 and z 2 . T hroughout x3.2, 3.3, and 3.4, when we say t hat ( G ; F ; S ) is not sat isable, we mean t hat ( G ; F ; S ) is sat ised by no plane graph in which z 1 and z 2 are on t he boundary of t he out er face. Let T be t he decomposit ion t ree of G. Our algorit hm processes t he P - or R-nodes of T in post -order. P rocessing a node  is t o perform Operat ions 1 t hrough 3 in Lemma 1 on t he subt ree of T root ed at  , and t o modify P rt(  ) and hence G accordingly. Before proceeding t o t he det ails of processing nodes, we need several denit ions. For a block B of G, G − B denot es t he plane subgraph of G obt ained from G by delet ing all vert ices in V ( B ) − f s ( B ) ; t ( B )g and all edges in E ( B ). For a plane subgraph H of G and a vert ex f of F , H \ L F ( f ) denot es t he plane subgraph of H induced by V ( H ) \ L F ( f ). Let  be a node of T . Let B = P rt (  ). A vert ex f in F is  -t hrou gh if B \ L F ( f ) cont ains a pat h between s ( B ) and t ( B ); is  -ou t -t hrou gh if (G− B )\ L F ( f ) cont ains a pat h between s ( B ) and t ( B ); is  -critical if it is bot h  -t hrough and  -out -t hrough. Not e t hat if a vert ex f of F is  -crit ical (resp.,  -t hrough, or  -out -t hrough), t hen so is every ancest or of f in F . A vert ex f of F is ext rem e  -crit ical if f is  -crit ical but no child of f in F is. Dene ext reme  -t hrough vert ices and ext reme  -out -t hrough vert ices similarly. Let  1 ; : : : ;  k be t he children of  in T . For each i 2 f 1; : : : ; k g, let ei be t he virt ual edge of  i in Skl(  ), and B i = P rt(  i ). For a vert ex f of F , E  ; f denot es t he set f ei j f is  i -t hroughg. We say f is  -cyclic , if t he plane subgraph of Skl(  ) spanned by E  ; f cont ains a cycle. Not e t hat if f is  -cyclic, t hen so is every ancest or of f in F . We say f is ext rem e  -cyclic , if f is  -cyclic but no child of f in F is. Le m m a 2 . For each n ode  of T , t here is at m ost on e ext rem e  -critical ( resp.,  -t hrou gh, or  -ou t -t hrou gh) vert ex in F .

For each node  in T , if t here is a  -t hrough (resp.,  -out -t hrough, or  crit ical) vert ex in F , t hen let x-t hr(  ) (resp., x-out -t hr(  ), or x-crt(  )) denot e t he ext reme  -t hrough (resp.,  -out -t hrough, or  -crit ical) vert ex in F ; ot herwise, let x-t hr(  ) = ? (resp., x-out -t hr(  ) = ? , or x-crt(  ) = ? ). Let  be a node of T . An em beddin g of P rt (  ) is a T T G t hat is an edgeduplicat ed supergraph of P rt(  ) and has t he same poles as P rt (  ). In an embedding B of P rt(  ), t he poles of B divide t he boundary of t he out er face of

Hierarchical Top ological Inference on P lanar Disc Maps

121

B int o two pat hs, which are called t he left side and t he right side of B , respect ively. An embedding B of P rt(  ) is pot en t ial if for every vert ex f in F wit h = ; , each connect ed component of B \ L F ( f ) is a superface of V (B ) \ L F (f ) 6 B \ L F ( f ) whose int erior cont ains no vert ex of S . When  is a P -node (resp., R-node), a pot ent ial embedding B 1 of P rt(  ) is bet t er t han anot her pot ent ial embedding B 2 of P rt (  ) if B 1 has more sides consist ing of exact ly one edge (resp., two edges) t han B 2 . An embedding of P rt(  ) is opt im al if it is pot ent ial and no pot ent ial embedding of P rt(  ) is bet t er t han it .

Le m m a 3 . S u ppose t hat an em beddin g G0 of G satis es ( G ; F ; S ) . Let  be a n ode of T . Let B  be t he su bgraph of G0 t hat is an em beddin g of P rt (  ) . Let O  be an opt im al em beddin g of P rt(  ) . T hen , t he em beddin g of G obt ain ed from G0 by replacin g B  wit h O  st ill sat is es ( G ; F ; S ) .

Right before t he processing of a P - or R-node  , t he following invariant holds for all  t hat is a non-S-child of  or a child of an S-child of  in T : { An opt imal embedding B  of P rt (  ) has been xed, except for a possible

flipping around it s poles. In t he descript ion of our algorit hm, for convenience, we will denot e t he xed embedding of P rt (  ) st ill by P rt (  ) for all nodes  of T t hat have been processed. 3.3

P ro c e s s in g R -N o d e s

Let  be an R-node of T . Let B = P rt(  ) and K = Skl(  ). Let  1 ; : : : ;  k be t he children of  in T . For each i 2 f 1; : : : ; k g, let ei be t he virt ual edge of  i in K , and B i = P rt(  i ). Since  is an R-node, each side of B cont ains at least two edges. If x-crt(  ) = f 6 = ? , at least one side of B must be a part of t he boundary of an inner 3-face 2 E ( G ), t hen of t he superface induced by L F ( f ). In t his case, if f s ( B ) ; t ( B )g 6 ( G ; F ; S ) is not sat isable because no side of B can be part of t he boundary of a 3-face in an embedding of G. So, we assume t hat f s ( B ) ; t ( B )g 2 E ( G ) when x-crt(  ) 6 = ? . P rocessing  is accomplished by performing t he following st eps: R -P ro c e d u re :

1. Comput e t he root ed forest F 0 obt ained from F by delet ing all vert ices t hat are not  -cyclic. 2. For all vert ices f in F 0, perform t he following subst eps: (a) For every inner face F of K [E  ; f ], check if F is also an inner 3-face of K ; if not , st op immediat ely because ( G ; F ; S ) is not sat isable. (b) For every edge ei 2 E  ; f t hat is not on t he out er face of K [E  ; f ], check  L F ( f ), t hen st op immediat ely because if V ( B i )  L F ( f ); if V ( B i ) 6 ( G ; F ; S ) is not sat isable.

122

Zhi-Zhong Chen and Xin He

3. For all root s f in F 0, perform t he following subst eps: (a) For every edge ei 2 E  ; f t hat is not on t he out er face of K [E  ; f ], check if (1) S \ ( V ( B i ) − f s ( B ) ; t ( B )g) = ; and (2) bot h sides of B i consist of a single edge; if (1) or (2) does not hold, t hen st op immediat ely because ( G ; F ; S ) is not sat isable. (b) For every vert ex v of K t hat is not on t he boundary of t he out er face 2 S ; if v 2 S , t hen st op immediat ely because of K [E  ; f ], check if v 6 ( G ; F ; S ) is not sat isable. (c) For every edge ei shared by t he boundaries of t he out er face of K [E  ; f ] and some inner face F of K [E  ; f ], check if some side of B i consist s of a single edge and has not been labeled wit h t he index of a face ot her t han F ; if no such side exist s, t hen st op immediat ely because ( G ; F ; S ) is not sat isable, while label one such side wit h t he index of F ot herwise. 4. For each side P of K consist ing of exact ly two edges, and for each edge ei on P , if some side P i of B i consist s of a single edge and has not been labeled, t hen mark t he side P i of B i \ out er". 5. For all child blocks B j of B , if at least one of t he following holds, t hen modify B by flipping B j around t he poles of B j : { A side of B j is marked \ out er" but is not on t he boundary of t he out er

face of B . { A side of B j is labeled wit h t he index of some face F of K but t hat side

is not on t he boundary of t he corresponding face of B . = ? , check whet her some side of B consist s of exact ly two 6. If x-crt(  ) = f 1 6 edges and t he common endpoint of t he two edges is in L F ( f 1 ); if no such side of B exist s, t hen st op immediat ely because ( G ; F ; S ) is not sat isable. Aft er  is processed wit hout failure, t he invariant in x3.2 hold for  .

3 .4

P ro c e s s in g o f P -N o d e s

Let  be a P -node of T . Let B = P rt(  ). Let  1 ; : : : ;  k be t he children of  in T . For each i 2 f 1; : : : ; k g, let ei be t he virt ual edge of  i in Skl(  ), and B i = P rt (  i ). If t here is neit her  -cyclic vert ex nor  -crit ical vert ex in F , t hen t he processing of  is nished by (1) checking if f s ( B ) ; t ( B )g 2 E ( G ) and (2) if so, modifying B by permut ing it s child blocks so t hat edge f s ( B ) ; t ( B )g forms one side of B . So, assume t hat t here is a  -cyclic or  -crit ical vert ex in F . T hen, ( G ; F ; S ) is not sat isable, if f s ( B ) ; t ( B )g 2 6 E ( G ). So, furt her assume t hat f s ( B ) ; t ( B )g 2 E ( G ). Since f s ( B ) ; t ( B )g  L F ( f ) for all  -t hrough vert ices f in F , every  -cyclic or  -crit ical vert ex must appear on t he pat h P from f 0 = x-t hr(  ) t o t he root f r of t he t ree cont aining f 0 in F . If f r is a  -crit ical vert ex, we process  by calling P -P rocedure1 below; ot herwise, we process  by calling P -P rocedure2 below.

Hierarchical Top ological Inference on P lanar Disc Maps

123

P -P ro c e d u re 1 :

1. Let E  ; f r = f ei 1 ; : : : ; ei h g where  i 1 is a Q-node. 2. For all j 2 f 2; : : : ; h g, mark ei j if (1) some side of B i j does not consist of  = ; , or (3) V ( B i j ) 6 exact ly two edges, or (2) S \ ( V ( B i j ) − f s ( B ) ; t ( B )g) 6 L F ( f 0 ). 3. Depending on t he number m of marked edges, dist inguish t hree cases: { Case 1: m = 0. T hen, perform t he following subst eps: (a) Modify B by permut ing it s child blocks so t hat (1) t he edge B i 1 is on t he left side of B and (2) B i 1 ; : : : ; B i h appear consecut ively. (b) For each j 2 f 2; : : : ; h g, add an edge f s ( B ) ; t ( B )g right aft er B i j . { Case 2: m = 1. Let t he marked edge be ei ‘ , and perform t he following: (a) If  i ‘ is an R-node, perform t he following subst eps: i. Check whet her some side P 0 of B i ‘ sat ises t hat (1) t here are exact ly two edges e01 and e02 on P 0 and (2) t he common endpoint of e01 and e02 is not in S but is in L F ( f ) where f = x-t hr(  i ‘ ). (Comment : f is on P , i.e., f is an ancest or of f 0 in F .) ii. If P 0 does not exist , t hen st op immediat ely because ( G ; F ; S ) is not sat isable; ot herwise, flip B i ‘ around it s poles if P 0 is not t he left side of B i ‘ . (b) If  i ‘ is an S-node, t hen perform t he following subst eps: i. If  i ‘ has more t han two children, t hen st op immediat ely because ( G ; F ; S ) is not sat isable. ii. Let t he children of  i ‘ be 1 and 2 . For each j 2 f 1; 2g, if no side of P rt ( j ) consist s of a single edge, t hen st op immediat ely for failure; ot herwise, flip P rt( j ) around it s poles when t he left side of P rt( j ) does not consist of a single edge. (c) Modify B by permut ing it s child blocks so t hat (1) t he edge B i 1 is on t he left side of B and (2) B i 1 ; : : : ; B i ‘ − 1 , B i ‘ + 1 ; : : : ; B i h ; B i ‘ appear consecut ively in t his order. (d) For all j 2 f 2; : : : ; h g− f ‘ g, add an edge f s ( B ) ; t ( B )g right aft er B i j . { Case 3: m  2. T hen, st op because ( G ; F ; S ) is not sat isable. P -P ro c e d u re 2 :

1. P erform St eps 1 and 2 of P -P rocedure1. 2. Depending on t he number m of marked edges, dist inguish t hree cases: { Case 1: m = 0. Same as Case 1 in P -P rocedure1. { Case 2: m = 1. Same as Case 2 in P -P rocedure1. { Case 3: m = 2. Let ei ‘ and ei ‘ ′ be t he two marked edges where i ‘ < i ‘ ′ . T hen, perform t he following subst eps: (a) If i ‘ is an R-node, t hen perform Subst eps 3(a)i and 3(a)ii of P P rocedure1; ot herwise, perform Subst eps 3(b)i and 3(b)ii of P -P rocedure1.

124

Zhi-Zhong Chen and Xin He

(b) If  i ‘ ′ is an R-node, perform t he modicat ion of Subst eps 3(a)i and 3(a)ii of P -P rocedure1 obt ained by (1) changing i ‘ t o i ‘ ′ and (2) changing t he word \ left " t o \ right "; ot herwise, perform t he modicat ion of Subst eps 3(b)i and 3(b)ii of P -P rocedure1 obt ained by doing (1) and (2). (c) Modify B by permut ing it s child blocks so t hat B i ‘ ′ ; B i 1 ; : : : ; B i ‘ − 1 , B i ‘ + 1 ; : : : ; B i ‘ ′ − 1 , B i ‘ ′ + 1 ; : : : ; B i h , B i ‘ appear consecut ively in t his order. (d) For all j 2 f 2; : : : ; h g − f ‘ ; ‘ 0g, add an edge f s ( B ) ; t ( B )g right aft er Bij . { Case 4: m  3. T hen, st op because ( G ; F ; S ) is not sat isable. Aft er  is processed wit hout failure, t he invariant in x3.2 hold for  . T h e o re m 2 . T he overall algorit hm can be im plem en t ed in O (j G j log j G j) tim e.

4

T h e S in g le - T r e e C a s e

Assume t hat F is a t ree and j S j  1. A can didat e edge is an edge f z 1 ; z 2 g of G such t hat (1) t he lowest common ancest or of z 1 and z 2 in F is t he root of F , = ;. and (2) if j S j = 1, t hen f z 1 ; z 2 g \ S 6 A plane graph G witn esses ( G ; F ; S ) if (1) G is an edge-duplicat ed supergraph of G , (2) for every non-leaf and n on -root vert ex f of F , G[L F ( f )] is a superface of G whose int erior cont ains no vert ex of S , (3) at most one face of G is a k -face wit h k  4, and (4) if j S j = 1 and a k -face F wit h k  4 exist s in G, t hen t he unique vert ex of S appears on t he boundary of F . Le m m a 4 . Let f z 1 ; z 2 g be a can didat e edge of G . T hen , ( G ; F ; S ) is satis able if an d on ly if t here is a plan e graph H su ch that ( 1) H witn esses ( G ; F ; S ) an d ( 2) bot h z 1 an d z 2 appear on t he bou n dary of t he ou t er face in H .

Using Lemma 4 and modifying t he algorit hm in x3, we can prove: T h e o re m 3 . G iven a graph-forest pair ( G ; F ) , it t akes O (jF j + j G j log j G j) tim e t o decide whet her ( G ; F ) is t he abst ract of a plan ar disc m ap.

R e fe r e n c e s 1. Z.-Z. Chen, M. Grigni, and C.H. P apadimit riou. P lanar map graphs. P r oc. 30t h ST O C (1998) 514{523. See ht t p:/ / rnc2.r.dendai.ac.jp/ ~chen/ pap ers/ mg2.ps.gz for a full version. 2. Z.-Z. Chen, X. He, and M.-Y. Kao. Nonplanar t op ological inference and p olit icalmap graphs. P r oc. 10t h SO D A (1999) 195{204. 3. G. Di Bat t ist a and R. Tamassia. On-line maint enance of t riconnect ed comp onent s wit h s p q r -t rees. A lgor i t hm i ca 1 5 (1996) 302{318. 4. G. Di Bat t ist a and R. Tamassia. On-line planarity t est ing. SI A M J . C om put . 2 5 (1996) 956{997.

Hierarchical Top ological Inference on P lanar Disc Maps

125

5. M.J . Egenhofer. Reasoning ab out binary t op ological relat ions. In: O. Gunt her and H.J . Schek (eds.): P roc. Advances in Spat ial Dat abase (1991) 143{160. 6. M.J . Egenhofer and J . Sharma. Assessing t he consist ency of complet e and incomplet e t op ological informat ion. G eogr aphi cal Syst em s 1 (1993) 47{68. 7. M. Grigni, D. P apadias, and C.H. P apadimit riou. Top ological inference. P r oc. 14t h I J C A I (1995) 901{906. 8. D. P apadias and T . Sellis. T he qualit at ive represent at ion of spat ial knowledge in two-dimensional space. V er y L ar ge D at a B ases J our n al 4 (1994) 479{516. 9. T .R. Smit h and K.K. P ark. Algebraic approach t o spat ial reasoning. I n t . J . on G eogr aphi cal I n for m at i on Syst em s 6 (1992) 177{192. 10. M. T horup. Map graphs in p olynomial t ime. P r oc. 39t h F O C S (1998) 396{405.

E cie nt A lg o rit h m s fo r t h e M in im u m C o n n e ct e d D o m in at io n o n Trap e zo id G rap h s Yaw-Ling Lin ? , Fang Rong Hsu ? ? , and Yin-Te T sai?

? ?

P rovidence University, 200 Chung Chi Road, Sa-Lu, Taichung Shang, Taiwan 433, R.O.C. f yl l i n, f r hsu, yt t sai g@pu. edu. t w

Given t he t rap ezoid diagram, t he problem of nding t he minimum cardinality connect ed dominat ing set in t rap ezoid graphs was solved in O ( m + n ) t ime [7]; t he result s is recent ly improved t o b e O ( n ) t ime by Kohler [5]. For t he (vert ex) weight ed case, nding t he minimum weight ed connect ed dominat ing set in t rap ezoid graphs can b e solved in O ( m + n log n ) t ime [11]. Here n ( m ) denot es t he numb er of vert ices (edges) of t he t rap ezoid graph. In t his pap er, we show a di erent approach for nding t he minimum cardinality connect ed dominat ing set in t rap ezoid graphs using O ( n ) t ime. For nding t he minimum weight ed connect ed dominat ing set , we show t he problem can b e e cient ly solved in O ( n log log n ) t ime. A b st r a c t .

1

Int ro d u ct io n

T he int ersect ion graph of a collect ion of t rapezoids wit h corner point s lying on two parallel lines is called t he t rapezoid graph . Trapezoid graphs is rst proposed by Dagan et al. [3] showing t hat t he channel rout ing problem is equivalent t o t he coloring problems on t rapezoid graphs. T hroughout t he paper, we use n ( m ) t o represent t he number of vert ices (edges) in t he given graph. Ma and Spinrad [10] show t hat t rapezoid graphs can be recognized in O ( n 2 ) t ime. Not e t hat t rapezoid graphs are cocomparability graphs, and properly cont ain bot h int erval graphs and permut at ion graphs [1]. Not e t hat int erval graphs are t he int ersect ion graph of int ervals on a real line; permut at ion graphs are t he int ersect ion graph of line segment s whose endpoint s lying on two parallel lines. A dom in at in g set of a graph G = ( V ; E ) is a subset D of V such t hat every vert ex not in D is adjacent t o at least one vert ex in D . Each vert ex v 2 V can be associat ed wit h a (non-negat ive) real weight , denot ed by w ( v ). T he w eight ed dom in at ion problem is t o nd a dominat ing set , D , such t hat it s weight w ( D ) = P w ( v ) is minimized. A dominat ing set D is in depen den t , con n ect ed or t ot al v2D ?

? ? ? ? ?

Corresp onding aut hor. Depart ment of Comput er Science and Informat ion Management . T he work was part ly supp ort ed by t he Nat ional Science Council, Taiwan, R.O.C, grant NSC-88-2213-E-126-005. Depart ment of Account ing. Depart ment of Comput er Science and Informat ion Management .

D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 1 2 6 { 1 3 6 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

E cient Algorit hms for t he Minimum Connect ed Dominat ion

127

if t he subgraph induced by D has no edge, is connect ed, or has no isolat ed vert ex, respect ively. Dominat ing set problem and it s variant s have many applicat ions in areas like bus rout ing, communicat ion network, radio broadcast , code-word design, and social network [4]. T he decision version of t he weight ed dominat ion problem is NP -complet e even for cocomparability graphs [2]. For t rapezoid graphs, Liang [8] shows t hat t he minimum weight ed dominat ion and t he t ot al dominat ion problem can be solved in O ( m n ) t ime. Lin [9] show t hat t he minimum weight ed independent dominat ion in t rapezoid graphs can be found in O ( n log n ) t ime. Srinivasan et al. [11] show t hat t he minimum weight ed connect ed dominat ion problem in t rapezoid graphs can be solved in O ( m + n log n ) t ime. For t he unweight ed case, t he O ( n log n ) fact or is improved by Liang [7], who show t hat t he minimumcardinality connect ed dominat ion problem in t rapezoid graphs can be solved in O ( m + n ) t ime. However, since t he number of edges, m , can be as large as O ( n 2 ), t he pot ent ial t ime-complexity of t he algorit hm is st ill O ( n 2 ). In t his paper, we show t hat t he minimum cardinality connect ed dominat ion problem in t rapezoid graphs can be solved opt imally in O ( n ) t ime. Furt her, for t he weight ed case, we show t he problem can be e cient ly solved in O ( n log log n ) t ime. T his paper is organized as follows. Sect ion 2 est ablishes basic not at ions and some int erest ing propert ies of t rapezoid graphs concerning t he connect ed dominat ion problem. Sect ion 3 gives our O ( n )-t ime algorit hm of nding t he minimumsized connect ed dominat ing set in t rapezoid graphs. Sect ion 4 shows t hat nding t he minimum weight ed connect ed dominat ion can be done in O ( n log log n ) t ime. Finally, we conclude our result s in Sect ion 5.

2

B asic N o t at io n s an d P ro p e rt ie s

A graph G = ( V ; E ) is a t rapezoid graph if t here is a t rapezoid diagram T such t hat each vert ex v i in V corresponds t o a t rapezoid t i in T and ( v i ; v j ) 2 E if and only if t i and t j int ersect s in t he t rapezoid diagram. Here t he t rapezoid diagram consist s of two parallel lines L 1 (t he upper line) and L 2 (t he lower line). Furt her, a t rapezoid t i is de ned by four corner point s a i ; bi ; c i ; d i such t hat [a i ::bi ] ([c i ::d i ]) is t he t op (bot t om) int erval of t rapezoid t i on L 1 ( L 2 ); not e t hat a i < bi and c i < d i . It can be shown t hat any t rapezoid diagram can be t ransformed int o anot her t rapezoid diagram wit h all corner point s are dist inct while t he two diagrams st ill correspond t o t he same t rapezoid graph. T hus, we assume t hat t he two parallel lines, L 1 and L 2 , are labeled wit h consecut ive int eger values 1; 2; 3; : : : ; 2n from left t o right ; t hat is, [ ni= 1 f a i ; bi g = [ ni= 1 f c i ; d i g = [1:: 2n ]. We assume t hat t hese t rapezoids are labeled in increasing order of t heir corner point s bi ’s. We de ne t j if bi < a j and d i < c j ; t hat is, t he t op (bot t om) int erval two t rapezoids t i of t i t ot ally lies on t he left of t he t op (bot t om) int erval of t j . Given a t rapezoid diagram, t he corresponded part ial ordered set is a t rapezoid order . Not e t hat two t l ) if and only if neit her t rapezoids t k ; t l int ersect each ot her (denot ed by t k

128

Yaw-Ling Lin, Fang Rong Hsu, and Yin-Te T sai

tk t l nor t l t k ; t hat is, t hey are incomparable in t he t rapezoid (part ial) order. T hroughout t he paper, we use t he words \ t rapezoid" and \ vert ex" int erchangeably for convenience. A vert ex v i ( v j ) is called a left ( r ight ) dom in at or if and only if t here are no vert ices lie on t he left (right ) of v i ( v j )in t he t rapezoid diagram. T hat is, (8v 2 V )( v 6 v i ) and (8v 2 V )( v j 6 v ). Let D be a minimum cardinality connect ed dominat ing set of t he t rapezoid graph G . Clearly, j D j = 1 if and only if t here is a vert ex v 2 G t hat is a left and right dominat or at t he same t ime. T wo adjacent vert ices u ; v form a sou rce pair ( sin k pair ) if and only if t here are no vert ices lie on t he left (right ) of u and v at t he same t ime. A vert ex v is a source (sink) vert ex if t here is anot her vert ex u such t hat f u ; v g form a source (sink) pair. P r o p o si t i o n 1 . G iven t he t rapezoid diagram , v is a sou rce ( sin k) ver t ex if an d

on ly if t here is a left ( r ight ) dom in at or d 2 V su ch t hat v d . It is easily seen t hat j D j = 2 if and only if j D j = 6 1 and t here is a pair f u ; v g 2 G t hat is a source pair and a sink pair at t he same t ime. For j D j 3, we have t he following lemma [6] for cocomparability graphs; it t hus holds for t rapezoid graphs as well. L e m m a 1 . For a con n ect ed cocom parabilit y graph G , t here ex ist s a m in im u m

cardin alit y con n ect ed dom in at in g set t hat in du ces a sim ple pat h in G . Fu r t her 3, t hen p i p i + 2 for m ore, let P = hp 1 ; : : : ; p k i be su ch a pat h w it h k 1 i k − 2, an d ever y ver t ex before minf p 1 ; p 2 g is covered by f p 1 ; p 2 g an d ever y ver t ex aft er maxf p k − 1 ; p k g is covered by f p k − 1 ; p k g.

Now consider t he case t hat j D j 3. Wit hin all left dominat ors, let b ( d ) be t he vert ex having t he right most t op (bot t om) corner; it is possible t hat b; d are t he same vert ex. By Lemma 1 and P roposit ion 1, it follows t hat t he minimum cardinality connect ed dominat ing set for j D j 3 can be found by nding a short est -lengt h pat h, from b or d , unt il one of t he left most left dominat ors f a ; c g is reached. T hat is, let P b a ; P b c ; P d a ; P d c denot e t hese four short est pat hs. Among t hese four pat hs, t he one wit h t he smallest cardinality is t he desired minimum cardinality connect ed dominat ing set .

3

M in im u m C ard in alit y C o n n e ct e d D o m in at io n

Immediat ely following t he previous discussions, t he st rat egy of t he algorit hm can be described as following: for each vert ex v , decide whet her v is a left (right ) dominat or, and check for t he special cases for 1 j D j 2. If it t urns out t hat j D j 3, we can nd t he short est -lengt h pat h from t he right most corners of left dominat ors unt il reaching t he rst right dominat or. We rst show t hat all t he dominat ors can be found in O ( n ) t ime. Consider t he r ight ( left ) t an gen t edge of a t rapezoid t i , t he vert ical line segment bi d i ( a i c i ) connect ing L 1 and L 2 , is called a r ight ( left ) st ick , denot ed by r i = bi d i ( l i = a i c i ). Treat ing a st ick as a degenerat ed case of t rapezoid, we say st icks

E cient Algorit hms for t he Minimum Connect ed Dominat ion

129

ri r j if and only if bi < bj and d i < d j . A group of st icks, S , is called a pen cil if every two st icks of S int ersect each ot her. Consider t he set of all right st icks S = f r 1 ; r 2 ; : : : ; r n g. A st ick in S is elim in at ed if t here is anot her st ick lies on t he left of it ; t he result ing st icks form a left -pen cil, denot ed by L = hr i 1 ; r i 2 ; : : : ; r i k i . > d i k . It is readily seen t hat < bi k , but d i 1 > d i 2 > Not e t hat bi 1 < bi 2 < vert ices f v i 1 ; v i 2 ; : : : ; v i k g are left dominat ors. T he following discussions concern propert ies of t he left -pencil; similar propert ies hold for t he right -pencil as well by symmet ry . P r o p o si t i o n 2 . L et L be t he left -pen cil of t he t rapezoid diagram . A ver t ex v is

n ot a left dom in at or if an d on ly if (9r 2 L )( r v ) . Fu r t her , t he left -pen cil L can be fou n d in O ( n ) t im e. T he left -pencil st ruct ure provides an e cient way

of checking whet her a given vert ex is a left dominat or. L e m m a 2 . A ll left ( r ight ) dom in at or s of t he t rapezoid graph can be iden t i ed in O ( n ) t im e.

Aft er obt aining all left dominat ors V L and right dominat ors V R in O ( n ) t ime, we comput e t he right most t op (bot t om) corners among all left dominat ors; let b = maxf bi j v i 2 V L g; d = maxf d i j v i 2 V L g. T he comput at ion of corners b and d clearly t akes O ( n ) t ime. Symmet rically, t he left most t op (bot t om) corners among all right dominat ors, a = minf a i j v i 2 V R g; c = minf c i j v i 2 V R g is comput ed in O ( n ) t ime. For brevity, when t he cont ext is clear, we also use a ; c ( b; d ) t o denot e t he vert ices v i ’s whose a i ’s, c i ’s ( bi ’s, d i ’s) values are minimized (maximized). Let D denot e t he minimum cardinality connect ed dominat ing set . Recall t hat , j D j = 1 if and only if t here is a vert ex v being a left and right dominat or at t he same t ime; it can be easily checked wit hin O ( n ) t ime. Now consider t he case t hat j D j = 2. In which case, we say t hat D = f u ; v g is a dom in at in g pair . It is possible t hat bot h vert ices of D are dominat ors, one left dominat or and one right dominat or. In which case, we must have a < b or c < d ; it follows t hat D = f a ; bg or f c; d g. However, t here is anot her possibility for j D j = 2: = f u ; v g be a dom in at in g pair of a t rapezoid diagram T . I f n on e of t he left dom in at or s of T in t er sect s w it h an y of t he r ight dom in at or s, i. e. , b < a an d d < c , t hen n eit her u n or v is a dom in at or . Now consider t he left -pencil L = hr i 1 ; r i 2 ; : : : ; r i g i and t he right -pencil R = h‘ j 1 ; ‘ j 2 ; : : : ; ‘ j h i . By P roposit ion 3 and 2, neit her u nor v fully dominat es L or R alt hough f u ; v g collect ively dominat e bot h L and R . T hus, we have two types of coverage of L and R in t erms of t he shapes of int ersect ion of t rapezoids u and v. Case 1: t he X -shaped int ersect ion. T hat is, we have u f r i g 0+ 1 ; : : : ; r i g g [ f ‘ j h 0+ 1 ; : : : ; ‘ j h g and v f r i 1 ; : : : ; r i g 0 g [ f ‘ j 1 ; : : : ; ‘ j h 0 g. Case 2: t he 8-shaped int ersect ion. T hat is, we have u f r i g 0+ 1 ; : : : ; r i g g [ f ‘ j 1 ; : : : ; ‘ j h 0 g and v f r i 1 ; : : : ; r i g 0 g [ f ‘ j h 0+ 1 ; : : : ; ‘ j h g. P r o p o si t i o n 3 . L et D

We can show t hat L e m m a 3 . T he X -shaped ( 8-shaped) dom in at in g pair of a t rapezoid diagram can be fou n d in O ( n ) t im e.

130

Yaw-Ling Lin, Fang Rong Hsu, and Yin-Te T sai

T h e o r e m 1 . T he m in im u m cardin alit y con n ect ed dom in at in g set of a t rapezoid diagram can be fou n d in O ( n ) t im e.

A l g o r it h m M C D S (T

) A t rap ezoid diagram T wit h n t rap ezoids. Each t rap ezoid v i is de ned by four corner p oint s a i ; b i ; c i ; d i , 1  i  n . T hey are lab eled wit h consecut ive int eger values 1; 2; 3; : : : ; 2n ; t hat is, [ ni = 1 f a i ; b i g = [ ni = 1 f c i ; d i g = [1: : 2n ]. O u t p u t : A minimum cardinality connect ed dominat ing set D . St ep 1: Ident ify all left dominat ors V L and right dominat ors V R . St ep 2: j D j = 1 if V L \ V R 6 = ; ; out put any vert ex v 2 V L \ V R as t he singlet on dominat ing set and st op. St ep 3: Comput e b = maxf b i j v i 2 V L g; d = maxf d i j v i 2 V L g; a = minf a i j v i 2 V R g; c = minf c i j v i 2 V R g. St ep 4: (* Deal wit h j D j = 2. *) St op and out put D = f a ; b g if a < b ; st op out put f c ; d g if c < d . Furt her, st op and out put D if t here is a dominat ing pair wit h X-shap ed or 8-shap ed int ersect ion. St ep 5: (* Now, j D j  3. *) Let P b a ; P b c ; P d a ; P d c b e t he four short est pat hs from f b; d g t o f a ; c g. Among t hese four pat hs, out put t he one wit h t he smallest cardinality.

Input:

End of M C D S

F ig. 1 .

Finding t he minimum cardinality connect ed dominat ing set in t rapezoid

graphs.

P roof. T he algorit hm is shown in Figure 1. Not e t hat St ep 1 of t he algorit hm t akes O ( n ) t ime by Lemma 2. Clearly St ep 2 and St ep 3 can be done in O ( n )

t ime. St ep 4 is t he most complicat ed case of t he algorit hm; it has been shown in Lemma 3 t hat t he dominat ing set can be correct ly found in O ( n ) t ime.  T he rest of t he proof appears in t he complet e paper.

4

M in im u m W e ig ht e d C o n n e ct e d D o m in at io n

A m in im al connect ed dominat ing set is a connect ed dominat ing set such t hat t he removal of any vert ex leaves t he result ing subset being no longer a connect ed dominat ing set . It is easily seen t hat a minimum weight ed connect ed dominat ing set is minimal since t he assigned weight s are non-negat ive. It can be shown [11] t hat a minimal connect ed dominat ing set of a t rapezoid graph is consist ed of t hree part s: S; P , and T ; here S denot es t he set of a dom in at in g sou rce (a left dominat or or a source pair), T denot es t he set of a dom in at in g t arget (a right dominat or or a sink pair), and P denot es a (light est ) chordless pat h from S t o T . Not e t hat t he dominat ing source (t arget ) can be a singlet on or a pair of vert ices.

E cient Algorit hms for t he Minimum Connect ed Dominat ion

131

We associat e wit h each vert ex v an aggregat ed w eight , w 0( v ), t o be t he sum of weight s of t he minimum connect ed dominat ing vert ices from t he source set t o v , cont aining t he vert ex v as t he dominat ing set . In ot her words, w

0

X

( v ) = minf

w (u ) u

j P : a pat h from a left dominat or (source pair) t o v g

2P

We rst show t hat t he source vert ices can be init ialized e cient ly. T he aggregat ed weight for a left dominat or u is, by de nit ion, w 0( u ) = w ( u ). For a nondominat or source vert ex v , it joins wit h anot her vert ex x t o form a minimum weight ed source pair cont aining v . It is possible t hat t he joint part ner x is a dominat or; t he aggregat ed weight of v can be t hus deduced from t he dominat or. T he general scheme of t he algorit hm will deal wit h t he sit uat ion properly. Ot herwise, x is anot her non-dominat or but t oget her f v ; x g const it ut e a minimum weight ed source pair. We call such kind of a source pair a n on -dom in at or sou rce pair . L e m m a 4 . T he aggregat ed w eight s of all n on -dom in at or sou rce pair s of t he t rapezoid graph can be fou n d in O ( n ) t im e.

P roof. T he proof appears in t he complet e paper.



Let two adjacent vert ices f u ; v g form a sink pair. If neit her u nor v is a right dominat or, we call such kind of a sink pair a n on -dom in at or sin k pair . Not e t hat t he t arget vert ices can eit her be a singlet on right dominat or or two vert ices forming a non-dominat or sink pair. For each non-dominat or sink vert ex v , t here is a (possibly none exist ed) ligh t est non-dominat or vert ex x so t hat t oget her f v ; x g form a non-dominat or sink pair. We assign such a non-dominat or sink vert ex v a m odi ed w eight of v wit h a value w ( v ) + w ( x ). We can show t hat L e m m a 5 . T he m odi ed w eight s of all n on -dom in at or sin k pair s of t he t rapezoid graph can be fou n d in O ( n ) t im e.

P roof. T he proof appears in t he complet e paper.



We now present our met hod of calculat ing t he aggregat ed weight s of every vert ex. T he idea is t o set up two priority queues, say Q 1 and Q 2 , along wit h t he two parallel lines, L 1 and L 2 , on t he t rapezoid diagram. T he (so far calculat ed) aggregat ed weight s of t he vert ices are st ored upon t he priority queues. T he algorit hm will consider bot h of t he priority queues and sweep along left (t op or bot t om) corners of t rapezoids in a zigzag fashion. Not e t hat we record t he aggregat ed weight s upon t he posit ion s of r ight cor n er s of t he t rapezoids considered so far; t he aggregat ed weight s are kept according t o t he increasing order along t he parallel lines. Since t he input diagram of t he t rapezoid graph is given in a nit e range of int egers, we can use t he dat a st ruct ure of van Emde Boas[12] t o maint ain a priority queue such t hat each operat ion of insert ing, searching, and delet ing an element in t he priority queue can be done in O (log log n ) t ime. T hus, by carefully maint aining t he priority queues and balancing t he order of t he visit ed vert ices, we can show t hat

132

Yaw-Ling Lin, Fang Rong Hsu, and Yin-Te T sai

L e m m a 6 . T he aggregat ed w eight s of all ver t ices of t he t rapezoid graph can be fou n d in O ( n log log n ) t im e.

P roof. We begin by insert ing t he aggregat ed weight s of all t he left dominat ors and non-dominat or source pairs int o t he priority queues Q 1 and Q 2 . Not e t hat t he t op right corners of source vert ices are insert ed int o Q 1 , and t he bot t om right corners are insert ed int o Q 2 . T he aggregat ed weight s are kept on bot h priority in increasing (weight ed) order. Let t he current ly maint ained list on Q 1 = < bi k and w 0( v i 1 ) < w 0( v i 2 ) < hv i 1 ; v i 2 ; : : : ; v i k i . It follows t hat bi 1 < bi 2 <   0  < w ( v i k ). Symmet rically, let Q 2 = hv j 1 ; v j 2 ; : : : ; v j k i ; we have d j 1 < d j 2 < < w 0( v j k ). In part icular, assume t hat a  < d j k and w 0( v j 1 ) < w 0( v j 2 ) <   vert ex v wit h posit ion b( v ) 2 [v i g ::v i g + 1 ] is insert ed int o Q 1 . In t he following, we describe how t o join a vert ex v int o Q 1 : T he vert ex v is discarded if w 0( v ) > w 0( v i g + 1 ). Ot herwise, we insert t he vert ex v int o Q 1 and remove all vert ices lied on t he left of b( v ) wit h w 0( ) larger t han w 0( v ). T he operat ion of joining d ( v )’s int o Q 2 follows symmet rically. Aft er t he source vert ices have been properly joined int o Q 1 and Q 2 , let Q 1 = hv i 1 ; v i 2 ; : : : i and Q 2 = hv j 1 ; v j 2 ; : : : i . T he algorit hm st art s by checking t he smaller value of f w 0( v i 1 ) ; w 0( v j 1 )g. Assume t hat w 0( v i 1 )  w 0( v j 1 ); it follows t hat vert ices v i ’s wit h t heir t op left corners sat isfying a i < bi 1 now have t heir aggregat ed values decided. T hat is, w 0( v i ) = w ( v i ) + w 0( v i 1 ). T he sit uat ion is illust rat ed in Figure 2. Not e t hat t he t op right corner of t he vert ex v i will t hen

a(v)

b(x) Q1 v

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

F ig. 2 .

Q1 v c(v)

d(x)

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

Finding t he aggregat ed weight s of all vert ices.

be joined int o Q 1 , and t he bot t om right corner of t he vert ex v i will be joined int o Q 2 . We t hen discard t he vert ex v i 1 from Q 1 . T he case t hat w 0( v j 1 ) < w 0( v i 1 ) can be handle symmet rically. It is readily veri ed t hat t he algorit hm described above gives t he correct aggregat ed weight s of all vert ices, and t he t ot al e ort s spent is at most O ( n log log n )  t ime. T he rest of t he proof appears in t he complet e paper. Let two adjacent vert ices f u ; v g form a dominat ing pair of t he t rapezoid graph. T here are t hree kinds of dominat ing pairs. T he rst case of a dominat ing pair is when one of t he vert ices is a left dominat or and t he ot her vert ex is a right dominat or. It is easily seen t hat t he general scheme of t he algorit hm deal wit h

E cient Algorit hms for t he Minimum Connect ed Dominat ion

133

t he sit uat ion correct ly. T he second case of a dominat ing pair is when one of t he vert ices is a dominat or, but t he ot her vert ex is n ot a dominat or. Here we show how t o nd t he minimum weight ed connect ed dominat ing pair of such kind. L e m m a 7 . T he m in im u m w eight ed con n ect ed dom in at in g pair , for m in g by a dom in at or an d a n on -dom in at or , can be fou n d in O ( n ) t im e given t he t rapezo id diagram .

P roof. T he proof appears in t he complet e paper.



T he t hird case of a dominat ing pair is when none of t he vert ices is a dominat or. T hat is, we have a X-shaped or a 8-shaped dominat ing pair. T he case considered here is act ually t he most complicat ed sit uat ion of t he algorit hm. We can also show t hat L e m m a 8 . T he m in im u m w eight ed con n ect ed, X -shaped or 8-shaped, dom in at in g pair of a t rapezoid diagram can be fou n d in O ( n log log n ) t im e.

P roof. First we show t hat t he minimum weight ed dominat ing pair wit h Xshaped int ersect ion can be found in O ( n log log n ) t ime. Let t he left -pencil L = hr i 1 ; r i 2 ; : : : ; r i g i and t he right -pencil R = h‘ j 1 ; ‘ j 2 ; : : : ; ‘ j h i . Furt her, let t he minimum weight ed dominat ing pair be t he set f v ; x g. Wit hout loss of generality we may assume t hat vert ex v dominat es t he lower part of L and t he upper part of R , while x dominat es t he upper part of L and t he lower part of R . T he idea here is t hat , while t he bot t om left corner of v locat ed at int erval [d i k + 1 ::d i k ], t he t op left corner of x must be locat ed before t he posit ion bi k ; i.e., a ( x ) 2 [bi 1 ::bi k ]. So, by pairing t hese f v ; x g’s pair and checking t heir dominat ion of t he right -pencil,

we can nd t he minimum, X-shaped, dominat ing pair. Maint ain two priority queues: Q 1 for t he upper int ervals of right -pencil and Q 2 for t he lower int ervals of t he right -pencil. Not e t hat Q 1 is init ialized by insert ing all upper posit ions of t he right -pencil R . Scan each vert ex x wit hin [bi 1 ::bi 2 ], t he rst upper int erval of L . Recall t he join operat ion we de ned in Lemma 6. We will join t he bot t om right corners of x (as well as t heir corresponded weight s w ( x )’s) int o t he queue Q 2 . T hen, for each vert ex v wit hin t he last lower int erval of L , [d i 1 ::d i 2 ], we probe t he t op right corners of v t o seek it s posit ion in Q 1 , say b( v ) 2 [a j k ::a j k + 1 ]. It follows t hat t hose x ’s whose bot t om right corners great er t han c j k + 1 can be paired wit h v t o become a dominat ing pair. To get t he light est joint vert ex, we can probe c j k + 1 int o Q 2 , seekin g t o t he r ight , and obt ain t he desired minimum joint part ner x . We maint ain t he sum of weight s of t he light est dominat ing pair obt ained so far; each t ime a joint part ner is found, t he sum of t heir weight s is compared wit h it . T he minimum weight ed dominat ing pair can t hus be found by t his manner. T he sit uat ion is illust rat ed in Figure 3. We obt ain t he nal minimum weight ed dominat ing pair by successively joining t he vert ices cornered at [bi 2 ::bi 3 ] int o Q 2 and probing vert ices cornered at [d i 2 ::d i 3 ] int o Q 1 , and so on, unt il t he nal int ervals [bi g − 1 ::bi g ] and [d i g − 1 ::d i g ] have been reached. Not e t hat posit ions d ( x )’s are a ccu m u la t ively joined (wit h side e ect s) int o Q 2 while posit ions b( v )’s are probed int o Q 1 int erleavedly wit h joining of d ( x )’s. Since each operat ion t o t he priority queue t akes O (log log n )

134

Yaw-Ling Lin, Fang Rong Hsu, and Yin-Te T sai

probe b(v) a(x)

x

?

L

Q1

a(x)

L

R c(v)

v

R c(v)

join d(x)

join b(x)

x Q1

Q2

?

v

Q2

probe d(v)

Finding a X-shaped (left ), or a 8-shaped (right ) minimum weight ed dominat ing pair. F ig. 3 .

t ime, and we spend only a const ant number of queue operat ions for each vert ex, it is not hard t o see t hat t he t ot al e ort s spent is at most O ( n log log n ) t ime. T he case of 8-shaped dominat ing pair is similar t o t he case discussed above.  T he rest of proof appears in t he complet e paper. We are now ready t o show t hat T h e o r e m 2 . T he m in im u m w eight ed con n ect ed dom in at in g set of a t rapezoid

diagram can be fou n d in O ( n log log n ) t im e.

A l g o r it h m W C D S (T

) A t rap ezoid diagram T wit h n t rap ezoids. O u t p u t : A minimum weight ed connect ed dominat ing set D . St ep 1: F ind t he left -p encil (right -p encil) and all left (right ) dominat ors. St ep 2: Init ialize t he aggregat ed weight s of left -dominat ors and non-dominat or source pair. St ep 3: F ind t he non-dominat or sink pairs, set t heir modi ed weight s, and mark t hese right dominat ors and non-dominat or sink pairs as t he t arget vert ices. ′ St ep 4: Calculat e t he aggregat ed weight s w ( ) of all t he vert ices along t he two parallel lines. Scan t hrough each right dominat or and t he modi ed sink pairs, and nd t he one wit h t he minimum aggregat ed weight . Let t he result ing aggregat ed weight of t he dominat ing set b e w 1 . St ep 5: Comput e t he minimum dominat ing pair, forming by a dominat or and a non-dominat or. Let t he result ing weight of t he pair b e w 2 . St ep 6: Comput e t he minimum dominat ing pair wit h X-shap ed or 8-shap ed int ersect ion. Let t he result ing weight of t he minimum dominat ing pair b e w 3 . St ep 7: T he smallest value wit hin t he set f w 1 ; w 2 ; w 3 g is t he desired weight of t he minimum weight ed connect ed dominat ing set . Out put t he corresp onded dominat ing set D by t racing back t he predecessor links. Input:

End of W CD S

F ig. 4 .

graphs.

Finding t he minimum weight ed connect ed dominat ing set in t rapezoid

E cient Algorit hms for t he Minimum Connect ed Dominat ion

135

P roof. T he algorit hm is shown in Figure 4. Not e t hat St ep 1 t o St ep 3 t akes O ( n ) t ime by Lemma 2, 4, and 5. St ep 4, by Lemma 6, can be done in O ( n log log n ) t ime. St ep 5 can be done wit hin O ( n ) t ime by Lemma 7. St ep 6 is t he most complicat ed case of t he algorit hm; Lemma 8 shows t hat it t akes O ( n log log n )

t ime. T he rest of t he proof appears in t he complet e paper.

5



C o n clu d in g R e m arks

Not e t hat previous result s [7, 11] solved t he problems by checking all possible source and sink pairs; t hus t hey had t o spend O ( m + n ) t ime for t he unweight ed case and O ( m + n log n ) t ime for t he weight ed case even when t he t rapezoid diagram was given. Not e t hat t he size of t he t rapezoid diagram is just O ( n ), but t hese algorit hms st ill spend pot ent ially Ω ( n 2 ) t ime when t he size of edges is large. Recent ly, Kohler [5] present s an O ( n ) t ime algorit hm for nding t he minimum cardinality connect ed dominat ing set in t rapezoid graphs. Using di erent approach, our algorit hm exploit s t he pen cil st ruct ure wit hin t he t rapezoid diagram t o nd t he minimum-sized connect ed dominat ing set in O ( n ) t ime. For t he weight ed problem, our algorit hm again uses t he pencil st ruct ure as well as priority queues of nit e int egers [12] t o nd t he minimum weight ed connect ed dominat ing set in O ( n log log n ) t ime.

R e fe re n ce s [1] Andreas Brandst ¨a dt , Van Bang Le, and J eremy P. Spinrad. G r aph C l asses: A Su r vey . SIAM monographs on discret e mat hemat ics and applicat ions, P hiladelphia, P. A., 1999. [2] M.-S. Chang. Weight ed dominat ion of cocomparability graphs. D i scr . A ppl i ed M at h. , 80:135{148, 1997. [3] I. Dagan, M.C. Golumbic, and R.Y. P int er. Trap ezoid graphs and t heir coloring. D i scr . A ppl i ed M at h. , 21:35{46, 1988. [4] T .W . Haynes, S.T . Hedet niemi, and P.J . Slat er. F u n dam en t al s of D om i n at i on i n G r aphs. Marcel Dekker, Inc., N. Y., 1998. [5] E. Kohler. Connect ed dominat ion and dominat ing clique in t rap ezoid graphs. D i scr . A ppl i ed M at h. , 99:91{110, 2000. [6] D. Krat sch and L. K. St ewart . Dominat ion on cocomparability graphs. SI A M J . D i scr et e M at h. , 6(3):400{417, 1993. [7] Y. D. Liang. St einer set and connect ed dominat ion in t rap ezoid graphs. I n f or m at i on P r ocessi n g L et t er s, 56(2):101{108, 1995. [8] Y. Daniel Liang. Dominat ions in t rap ezoid graphs. I n f or m at i on P r ocessi n g L et t er s, 52(6):309{315, Decemb er 1994. [9] Yaw-Ling Lin. Fast algorit hms for indep endent dominat ion and e cient dominat ion in t rap ezoid graphs. In I SA A C ’ 98 , LNCS 1533, pages 267{276, Taejon, Korea, Decemb er 1998. Springer-Verlag. [10] T .-H. Ma and J .P. Spinrad. On t he 2-chain subgraph cover and relat ed problems. J . A l gor i t hm s, 17:251{268, 1994.

136

Yaw-Ling Lin, Fang Rong Hsu, and Yin-Te T sai

[11] Anand Srinivasan, M.S. Chang, K. Madhukar, and C. P andu Rangan. E cient algorit hms for t he weight ed dominat ion problems on t rap ezoid graphs. Manuscript , 1996. [12] P. van Emde Boas. P reserving order in a forest in less t han logarit hmic t ime and linear space. I n f or m at i on P r ocessi n g L et t er s, 6:80{82, 1977.

P a ra m e t e riz e d C o m p le x it y o f F in d in g S u b g ra p h s w it h H e re d it a ry P ro p e rt ie s ⋆ Subhash Khot 1 and Venkat esh Raman 2 1

Depart ment of Comput er Science, P rincet on University, New J ersey, USA khot @cs. pr i ncet on. edu 2

T he Inst it ut e of Mat hemat ical Sciences, Chennai-600113, INDIA vr aman@i msc. er net . i n

We consider t he paramet erized complexity of t he following problem under t he framework int roduced by Downey and Fellows[4]: Given a graph G , an int eger paramet er k and a non-t rivial heredit ary prop erty  , are t here k vert ices of G t hat induce a subgraph wit h property  ? T his problem has b een proved NP -hard by Lewis and Yannakakis[9]. We show t hat if  includes all indep endent set s but not all cliques or vice versa, t hen t he problem is hard for t he paramet erized class W [1] and is xed paramet er t ract able ot herwise. In t he former case, if t he forbidden set of t he prop erty is nit e, we show, i n fact , t hat t he problem is W [1]-complet e (see [4] for denit ions). Our proofs, b ot h of t he t ract ability as well as t he hardness ones, involve clever use of Ramsey numb ers. A b st r a c t .

1

In t ro d u c t io n

Many comput at ional problems typically involve two paramet ers n and k , e.g. nding a vert ex cover or a clique of size k in a graph G on n vert ices. T he paramet er k cont ribut es t o t he complexity of t he problem in two qualit at ively di erent ways. T he paramet erized versions of V e r t e x C o v e r and U n d ir e c t e d F e e d b a c k V e r t e x S e t problems can be solved in O ( f ( k ) n ) t ime where n is t he input size, is a const ant independent of k and f is an arbit rary funct ion of k (against a naive ( n c k ) algorit hm for some const ant c). T his \ good behavior", which is ext remely useful in pract ice for small values of k , is t ermed x ed pa ra m et er t ra ct a bilit y in t he t heory int roduced by Downey and Fellows[2,3,4]. On t he ot her hand, for problems like C l iq u e and D o min a t in g S e t , t he best known algorit hms for t he paramet erized versions have complexity ( n c k ) for some const ant c. T hese problems are known t o be hard for t he paramet erized complexity classes W [1] and W [2] respect ively and are considered unlikely t o be xed paramet er t ract able (denot ed by FP T ) (see [4] for t he de nit ions and more on t he paramet erized complexity t heory). In t his paper, we invest igat e t he paramet erized complexity of nding induced subgraphs of any non-t rivial heredit ary property in a given graph. ⋆

P art of t his work was done while t he rst aut hor was at IIT Bomb ay and visit ed t he Inst it ut e of Mat hemat ical Sciences, Chennai

D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 1 3 7 { 1 4 7 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

138

Subhash Khot and Venkat esh Raman

A graph property  is a collect ion of graphs. A graph property  is nont rivial if it holds for at least one graph and does not include all graphs. A non-t rivial graph property is said t o be h ered it ar y if a graph G is in property  implies t hat every in d u ced su bgra p h of G is also in  . A graph property is said t o be in t erest in g [9] if t he property is t rue (as well as false) for in nit e families of graphs. Lewis and Yannakakis[9] (see also [6]) showed t hat if  is a non-t rivial and int erest ing heredit ary property, t hen it is NP -hard t o decide whet her in a given graph, k vert ices can be delet ed t o obt ain a graph which sat is es  . For a heredit ary property  , let F be t he family of graphs not having t he property. T he set of minimal members (minimal wit h respect t o t he operat ion of t aking induced subgraphs) of F is called t he forbidden set for t he property  . For example, t he collect ion of all bipart it e graphs is a heredit ary property whose forbidden set consist s of all odd cycles. Conversely, given any family F of graphs, we can de ne a heredit ary property by declaring it s forbidden set t o be t he set of all minimal members of F . Cai[1] has shown t hat t he graph modi cat ion problem for a non-t rivial heredit ary property  wit h a nit e forbidden set is xed paramet er t ract able (FP T ). T his problem includes t he node delet ion problem addressed by Lewis and Yannakakis (ment ioned above). While t he paramet erized complexity of t he quest ion, when  is a heredit ary property wit h an in nit e forbidden set , is open, we address t he paramet ric dual problem in t his paper. Given any property  , let P ( G; k;  ) be t he problem de ned below. G i v e n : A simple undirect ed graph G ( V; E ) P a r a m e t e r : An int eger k  j V j Q u e s t i o n : Is t here a subset V 0  V wit h j V 0j = k such t hat t he subgraph of G induced by V 0 has property  ? T his problem is t he same as ‘j V j − k ’ node delet ion problem (i.e. can we remove all but k vert ices of G t o get a graph wit h property  ) and hence NP hard. However t he paramet erized complexity of t his problem doesn’t follow from Cai’s result . We prove t hat if  includes all independent set s, but not all cliques or vice versa, t hen t he problem P ( G; k;  ) is W [1]-complet e when t he forbidden set of  is nit e and W [1]-hard when t he forbidden set is in nit e. T he proof is by a paramet ric reduct ion from t he I n d e p e n d e n t S e t problem. If  includes all independent set s and all cliques, or excludes some independent set s and some cliques t hen we show t hat t he problem is xed paramet er t ract able. Not e, from our and Cai’s result , t hat t he paramet erized dual problems dealt wit h, have compliment ary paramet erized complexity. T his phenomenon has been observed in a few ot her paramet erized problems as well. In a graph G( V; E ), nding a vert ex cover of size k is FP T whereas nding an independent set of size k (or a vert ex cover of size j V j − k ) is W [1]-complet e; In a given boolean 3-CNF formula wit h m clauses, nding an assignment t o t he boolean variables t hat sat is es at least k clauses is FP T whereas nding an assignment t hat sat is es at least ( m − k ) clauses (i.e. all but at most k clauses) is known t o be W [P ]hard [2] ( k is t he paramet er in bot h t hese problems). T he k -I r r e d u n d a n t S e t problem is W [1]-hard whereas C o -I r r e d u n d a n t set or ( n − k ) I r r e d u n d a n t

P aramet erized Complexity of F inding Subgraphs wit h Heredit ary P rop ert ies

139

S e t problem is FP T [5]. Our result adds one ot her (general) problem t o t his

list . T hroughout t he paper, by a graph we mean an undirect ed graph wit h no loops or mult iple edges. By a non-t rivial graph, we mean a graph wit h at least one edge. Given a graph G and A  V ( G), by I G ( A ) we mean t he subgraph of G induced by vert ices in A . For two graphs H and G, we use t he not at ion H  G t o mean t hat H is isomorphic t o an induced subgraph of G. For t he graph propert ies  we will be concerned wit h in t his paper, we assume t hat  is recursive; i.e. given a graph G on n vert ices, one can decide whet her or not G has property  in f ( n ) t ime for some funct ion of n . We had already de ned t he not ion of xed paramet er t ract able problems. To underst and t he hardness result , we give below some de nit ions. See [4] for more det ails. A paramet erized language L is a subset of    N where  is some nit e alphabet and N is t he set of all nat ural numbers. For ( x; k ) 2 L , k is t he paramet er. We say t hat a paramet erized problem A reduces t o a paramet erized problem B , if t here is an algorit hm  which t ransforms ( x; k ) int o ( x 0; g( k )) in t ime f ( k )j x j where f ; g : N ! N are arbit rary funct ions and is a const ant independent of k , so t hat ( x; k ) 2 A if and only if ( x 0; g( k )) 2 B . T he essent ial property of paramet ric reduct ions is t hat if A reduces t o B and if B is FP T , t hen so is A . Let F be a family of boolean circuit s wit h a n d , o r and n o t gat es; We allow t hat F may have many di erent circuit s wit h a given number of input s. Let t he weight of a boolean vect or be t he number of 1’s in t he vect or. To F we associat e t he paramet erized circuit problem L F = f ( C; k ) : C accept s an input vect or of weight k g: Let t he weft of a circuit be t he maximum number of gat es wit h fan-in more t han two, on an input -out put pat h in t he circuit . A paramet erized problem L belongs t o W [t ] if L reduces t o t he paramet erized circuit problem L F ( t ; h ) for t he family F ( t; h ) of boolean circuit s wit h t he weft of t he circuit s in t he family bounded by t , and t he dept h of t he circuit s in t he family bounded by a const ant h . T his nat urally leads t o a complet eness program based on a hierarchy of paramet erized problem classes:

F PT 

W [1] 

W [2] 

:::

T he paramet erized analog of NP is W [1], and W [1]-hardness is t he basic evidence t hat a paramet erized problem is unlikely t o be FP T . T he next sect ion deals wit h t he heredit ary propert ies for which t he problem is xed paramet er t ract able, and Sect ion 3 proves t he W [1]-hardness result for t he remaining heredit ary propert ies. Sect ion 4 concludes wit h some remarks and open problems.

140

2

Subhash Khot and Venkat esh Raman

H e re d it a ry P ro p e rt ie s T h a t A re F P T t o F in d

L e m m a 1 . I f a h e red it a r y p ro per t y  in clu d es a ll in d epen d en t set s a n d a ll cliqu es, o r ex clu des so m e in d epen den t set s as w ell as so m e cliqu es, t h en t h e p ro blem P ( G; k;  ) is x ed pa ra m et er t ra ct a ble.

P roof. For any posit ive int egers p and q, t here exist s a minimum number R ( p; q) (t he Ramsey number) such t hat any graph on at least R ( p; q) vert ices cont ains eit her a clique of  size p or an independent set of size q. It is well-known t hat p + q− 2 [8]. R ( p; q)  q− 1 Assume t hat  includes all cliques and independent set s. For any graph G wit h j V ( G)j  R ( k; k ), G cont ains eit her a clique of size k or an independent set of size k . Since all independent set s and all cliques have property  , t he answer t o t he problem P ( G; k;  ) in t his case is "yes". When j V ( G)j  R ( k; k ), we can use brut e force by picking all k -element s subset s of V ( G) and checking whet her t he induced subgraph on t he subset has prop erty  . T his will t ake t ime R ( kk ; k ) f ( k ) where f ( k ) is t he t ime t o decide whet her a given graph on k vert ices has property  . T hus t he problem P ( G; k;  ) is xed paramet er t ract able. If  excludes some cliques and some independent set s, let s and t respect ively be t he sizes of t he smallest clique and independent set which do not have property  . Since any graph wit h at least R ( s; t ) vert ices has eit her a clique of size s or an independent set of size t , no graph wit h at least R ( s; t ) vert ices can have property  (since  is heredit ary). Hence any graph in  has at most R ( s; t ) vert ices and hence  cont ains only nit ely many graphs. So if k > R ( s; t ), t hen t he answer t o t he P ( G; k;  ) problem is NO for any graph G. If k  R ( s; t ), t hen check, for each k subset of t he given vert ex set , whet  her t he induced subgraph on t he subset has property  . T his will t ake t ime nk f ( k )  Cn R ( s ; t ) for an n vert ex graph, where C is t ime t aken t o check whet her a graph of size at most R ( s; t ) has property  . Since s and t depend only on t he property  , and not on k or n , and k  R ( s; t ), t he problem P ( G; k;  ) is xed paramet er t ract able in t his case also. 2

We list below a number of heredit ary propert ies  (dealt wit h in [11]) each of which includes all independent set s and cliques, and hence for which t he problem P ( G; k;  ) is xed paramet er t ract able. C o r o l l a r y 1 . G iven a n y sim p le u n d irect ed gra p h G , a n d a n in t eger k , it is x ed pa ra m et er t ra ct a ble t o d ecid e w h et h er t h ere is a set o f k v e r t ices in G t h a t in d u ces ( a) a per fect gra p h , ( b) an in t er va l gra p h ( c) a ch o rd a l gra p h , ( d) a split gra p h , ( e) a n a st ero id a l t r ip le free ( A T -free) gra p h , ( f ) a co m pa ra bilit y gra p h , o r ( g) a per m u t a t io n gra p h . ( S ee [1 1 ] o r [7 ] fo r t h e d e n it io n s o f t h ese gra p h s. )

3

H e re d it a ry P ro p e rt ie s T h a t A re W -H a rd t o F in d

In t his sect ion, we show t hat t he problem P ( G; k;  ) is W [1]-hard if  all independent set s but not all cliques or vice versa.

includes

P aramet erized Complexity of F inding Subgraphs wit h Heredit ary P rop ert ies

141

For a graph G, let G denot e t he edge complement of G. For a property  , let  = f G j G has pr oper ty  g. We not e t hat  is heredit ary if and only if  is heredit ary, and  includes all independent set s but not all cliques if and only if  includes all cliques but not all independent set s. T hus it su ces t o prove W [1]-hardness when  includes all independent set s, but not all cliques. First we will show t hat , t he problem is in W [1] if t he forbidden set for  is nit e. L e m m a 2 . L et  be a n o n -t r ivia l h ered it ar y p ro per t y h a vin g a n it e fo r bid d en se t F = f H 1 ; H 2 ; : : : ; H s g. T h en t h e p ro blem P ( G; k;  ) is in W [1].

P roof. Let  = max (j H i j). Let A 1 ; : : : ; A q be all t he subset s of V ( G ) such t hat for every 1  j  q, I G ( A j ) is isomorphic t o some H i . T he set s A j ’s can be det ermined in O( f (  ) n  ) t ime by t rying every subset of V ( G) of size at most  . Here f is some funct ion of  alone. Consider t he boolean formula V q j = 1

(

W u2A j

xu )

If t his formula has a sat isfying assignment wit h weight (t he number of t rue variables in t he assignment ) k , t hen t he subset X of V ( G) de ned by X = f u 2  X for any j . T his V j x u = 1g is a subset of V ( G) of cardinality k such t hat A j 6 implies t hat G has an induced subgraph of size k wit h property  . Conversely if G has an induced subgraph of size k wit h property  , t hen set t ing x u = 1 for vert ices u in t he induced subgraph gives a sat isfying assignment wit h weight k . Since q  n  + 1 and j A i j   (a const ant ) for all i , it follows from t he de nit ions t hat t he problem is in W [1]. 2 We now show t hat t he problem is W [1]-hard when one of t he graphs in t he forbidden set of  is a complet e bipart it e graph. L e m m a 3 . L et  be a h ered it a r y p ro per t y t h a t in clu d es a ll in d epen d en t set s bu t n o t a ll cliqu es, h a vin g a n it e fo r bid d en set F = f H 1 ; H 2 ; : : : ; H s g. A ssu m e t hat so m e H i , sa y H 1 is a co m p let e bipa r t it e gra p h . T h en t h e p ro blem P ( G; k;  ) is W [1]-co m p let e.

P roof. In Lemma 2 we have shown t hat t he problem is in W [1].

S

Let  be as speci ed in t he Lemma. Let t = max (j V1 j ; j V2 j) where V1 V2 is bipart it ion of H 1 . If t = 1, H 1 = K 2 , and t he given problem P is ident ical t o t he k -independent set problem, hence W [1]-hard. So assume t  2. Not e t hat H 1  K t ; t . Let H s be t he clique of smallest size t hat is not in  , hence in t he forbidden set F . Now we will show t hat t he problem is W [1]-hard by a reduct ion from t he Independent Set P roblem. Let G1 be a graph in which we are int erest ed in nding an independent set of size k 1 . For every vert ex u 2 G1 we t ake r independent vert ices ( r t o be speci ed lat er) u 1 ; : : : ; u r in G. If ( u; v ) is an edge in G1 , we add all r 2 edges ( u i ; v j ) in G. G has no ot her edges.

142

Subhash Khot and Venkat esh Raman

We claim t hat t hat G1 has an independent set of size k 1 if and only if G has r k 1 vert ices t hat induce a subgraph wit h property  . Suppose G1 has an independent set f u i j1  i  k 1 g of size k 1 . T hen t he set of r k 1 vert ices f u ji j 1  i  k 1 ; 1  j  r g is an independent set in G and hence has property  . Conversely let S be a set of r k 1 vert ices in G which induces a subgraph wit h property  . T his means I G ( S) does not cont ain any H i , in part icular it does not cont ain H 1 . Group t he r k 1 vert ices according t o whet her t hey correspond t o t he same vert ex in G1 or not . Let X 1 ; : : : ; X h ; Y1 ; : : : ; Yp be t he groups and u 1 ; : : : ; u h ; v1 ; : : : ; vp be t he corresponding vert ices in G1 such t hat j X i j  t 8 i and j Yj j < t 8 j . Observe t hat f u 1 ; : : : ; u h g must be independent in G1 because if we have an edge ( u i ; u j ), H 1  K t ; t  I G ( X i ; X j )  I G ( S), a cont radict ion. set of size at least k 1 in G1 . T hereIf h  k 1 we have found an independent P h − 1. T hen j X i j  r ( k 1 − 1) which implies t hat fore assume t hat h  k 1 i= 1 P p j Y j  r or p  r = ( t − 1). Since vert ices in dist inct groups (one vert ex per j j = 1 group) in G and t he corresponding vert ices in G1 induce isomorphic subgraphs, t he vert ices v1 ; : : : ; vp induce a subgraph of G1 wit h property  (since  is heredit ary). Since t his subgraph has property  , it does not cont ain H s as an induced subgraph. We choose r large enough so t hat any graph on r =( t − 1) vert ices t hat does not cont ain a clique of size j H s j has an independent set of size k 1 . Wit h t his choice of r , it follows t hat G1 does cont ain an independent set of size k 1 . T he number r depends only on j H s j and t he paramet er k 1 and not on n 1 = j V ( G1 )j. So t he reduct ion is achieved in O( f ( k 1 ) n 1 ) t ime where f is some funct ion of k 1 and is some xed const ant independent of k 1 . 2 Next , we will show t hat t he problem is W [1]-hard even if none of t he graphs in t he forbidden set is complet e-bipart it e. T h e o r e m 1 . L et be a h ered it a r y p ro per t y t h a t in clu d es a ll in d epen d en t set s bu t n o t a ll cliqu es, h a vin g a n it e fo r bid d en set F = f H 1 ; H 2 ; : : : ; H s g. T h en t h e p ro blem P ( G; k; ) is W [1]-co m p let e.

P roof. T he fact t hat t he problem is in W [1] has already been proved in Lemma is complet e2. Assume t hat none of t he graphs H i in t he forbidden set of bipart it e. Let H s be t he clique of smallest size t hat is not in , hence in t he forbidden set F . For a graph H i in F , select (if possible) a subset of vert ices Z such t hat t he vert ices in Z are independent and every vert ex in Z is connect ed t o every vert ex in H i nZ . Let f H i j j1  j  si g be t he set of graphs obt ained from H i by removing such a set Z for every possible choice of Z . Since H i is not complet e-bipart it e, S every H i j is a non-t rivial graph. Let F 1 = F f H i j j1  i  s; 1  j  si g. Not e t hat F 1 cont ains a clique of size j H s j − 1 because a set Z , consist ing of a single vert ex, can be removed from t he clique H s . Let 1 be t he heredit ary property de ned by t he forbidden set F 1 . Observe t hat 1 also includes all independent set s but not all cliques. Let P1 be t he problem P ( G1 ; k 1 ; 1 ). We will prove t hat P1 is W [1]-hard lat er. Now, we will reduce P1 t o t he problem P ( G; k; ) at hand.

P aramet erized Complexity of F inding Subgraphs wit h Heredit ary P rop ert ies

143

S

Given G1 , we const ruct a graph G as follows. Let V ( G) = V ( G1 ) D where D is a set of r independent vert ices ( r t o be speci ed lat er). Every vert ex in V ( G1 ) is connect ed t o every vert ex in D . Let  = max i (j H i j). We claim t hat G1 has an induced subgraph of size k 1 wit h property  1 if and only if G has k 1 + r vert ices t hat induce a subgraph wit h property  .S Let A be a subset of V ( G1 ) ; j A j = k 1 such t hat I G 1 ( A ) 2  1 : Let S = A D . Suppose on t he cont rary t hat I G ( S) cont ains some H i as a subgraph. If t his H i cont ains some vert ices from D , we t hrow away t hese independent vert ices. T he remaining port ion of H i , which is some H i j ; 1  j  si , must lie in I G ( A ). But t his is a cont radict ion because I G ( A ) = I G 1 ( A ) and by hypot hesis, I G 1 ( A ) has property  1 and it cannot cont ain any H i j . Similarly H i cannot lie ent irely in I G ( A ) because F  F 1 , so I G ( A ) does not cont ain any H i as induced subgraph. T herefore I G ( S) does not cont ain any H i , hence it has property  and j Sj = k1 + r . Conversely, suppose we can choose a set S, j Sj = k 1 + r such t hat I G ( S) does not cont ain any H i . Since j D j = r we must choose at least k 1 vert ices from T V ( G1 ). Let A  S V ( G1 ) wit h cardinality k 1 . If I G ( A ) does not cont ain any H i j , we are t hrough. Ot herwise let H i 0 j 0  I G ( A ) for some i 0 ; j 0 . Now H i 0 j 0 is obt ained from H i 0 by delet ing an independent set of size at most  . Hence S can cont ain at most  − 1 vert ices from D , ot herwise we could add su cient a copy of H i 0 which is not number of vert ices Tfrom D t o t he graph H i 0 j 0 t o get T possible. Hence j S D j <  which implies t hat j S V ( G1 )j > k 1 + r −  . T hus T I G 1 ( S V ( G1 )) is an induced subgraph of G1 of size at least k 1 + r −  t hat does not cont ain any H i , in part icular it does not cont ain H s which is a clique of size say . We can select r (as before, by Ramsey T heorem ) such t hat any graph on k 1 + r − vert ices t hat does not cont ain a -clique has an independent set of size k 1 . Hence G1 has an independent set of size k 1 which has property 1 . T he number r depends only on t he family F and paramet er k 1 and not on n 1 = j V ( G1 )j. So t he reduct ion is achieved in O( g( k 1 ) n 1 ) t ime where g is some funct ion of k 1 and is a const ant . Also j V ( G)j = j V ( G1 )j + r , so t he size of t he input problem increases only by a const ant . We will be t hrough provided t he problem P1 is W [1]− hard. If any of t he H i j is complet e-bipart it e, t hen it follows from Lemma 3. Ot herwise, we repeat edly apply t he const ruct ion, given at t he beginning of t he proof, of removing set Z of vert ices from each graph in t he forbidden set , t o get families F 2 , F 3 ; : : : and corresponding problems P2 ; P3 ; : : : such t hat t here is a paramet ric reduct ion from Pm + 1 t o t o Pm . Since F m + 1 cont ains a smaller clique t han a clique in F m , event ually some family F m 0 cont ains a clique of size 2 (t he graph K 2 ) or a complet e-bipart it e graph. In t he former case, t he problem Pm 0 is same as paramet erized independent set problem, so W [1]-hard. In t he lat t er case Pm 0 is W [1]-hard by Lemma 3. 2 We can ext end T heorem 1 t o t he case when t he forbidden set is in nit e. However we could prove t he problem only W [1]-hard; we don’t know t he precise class in t he W -hierarchy t he problem belongs t o.

144

Subhash Khot and Venkat esh Raman

T h e o r e m 2 . L et  be a h ered it a r y p ro per t y t h a t in clu d es a ll in d epen d en t set s bu t n o t a ll cliqu es ( o r vice ver sa ) . T h en t h e p ro blem P ( G; k;  ) is W [1]-h a rd .

P roof. Every heredit ary property is de ned by a (possibly in nit e) forbidden

set [9] and so let t he forbidden family for  be F = f H 1 ; H 2 ; : : :g. T he proof is almost t he same as in T heorem 1. Not e t hat Lemma 3 does not depend on nit eness of t he forbidden family. Also t he only point where t he nit eness of F is used in T heorem 1 is in t he argument t hat if I G ( A ) does cont ain some H i 0 j 0 t hen S can cont ain at most  − 1 vert ices from t he set D . T his argument can be modi ed as follows. Since I G ( A ) cont ains some H i 0 j 0 , j V ( H i 0 j 0 )j  j A j = k 1 . Also H i 0 j 0 is obt ained from some H i by removing an independent set adjacent t o all ot her vert ices of H i . (If t here are more t han one such H i s from which H i 0 j 0 is obt ained, we choose an arbit rary H i .) Let  1 = max (j V ( H i )j − j V ( H i j )j) where t he maximum is t aken over all H i j such t hat j V ( H i j )j  k 1 . Hence if I G ( A ) does cont ain some H i 0 j 0 , we can add at most  1 vert ices from D t o get H i 0 . So S must cont ain less t han  1 vert ices from D . T he choice of r will have t o be modi ed accordingly. 2 Corollary 2 follows from T heorem 2 since t he collect ion of forest s is a heredit ary property wit h t he forbidden set as t he set of all cycles. T his collect ion includes all independent set s and does not include any clique of size  3. C o r o l l a r y 2 . T h e fo llo w in g p ro blem is W [1]-h a rd : G iven ( G; k ) , d oes G h a ve k ver t ices t h a t in d u ce a fo rest ?

T his problem is t he paramet ric dual of t he U n d ir e c t e d F e e d b a c k V e r t e x S e t problem which is known t o be xed paramet er t ract able [4]. C o r o l l a r y 3 . Fo llo w in g p ro blem is W [1]-co m p let e: G iven ( G; k ) , does t h ere ex ist an in du ced su bgra p h o f G w it h k ver t ices t h a t is bipa r t it e ?

P roof. Hardness follows from T heorem 2 since all independent set s are bipart it e

and no clique of size at least 3 is bipart it e. To show t hat t he problem is in W [1], given t he graph G, consider t he boolean formula V u 2 V (G )

( x u _ yu )

V

( u ; v ) 2 E ( G ) (( x u

_ xv )

V

( yu _ yv ))

We claim t hat G has an induced bipart it e subgraph of size k if and only if t he above formula has a sat isfying assignment wit h weight k . Suppose G has an induced bipart it e subgraph wit h k vert ices wit h part it ion V1 and V2 . Now for each vert ex in V1 assign x u = 1; yu = 0, for each vert ex in V2 assign x u = 0; yu = 1 and assign x u = yu = 0 for t he remaining vert ices. It is easy t o see t hat t his assignment is a weight k sat isfying assignment for t he above formula. Conversely, if t he above formula has a weight k sat isfying assignment , t he vert ices u such t hat x u = 1; yu = 0 or x u = 0; yu = 1 induce a bipart it e subgraph of G wit h k vert ices. T he corollary follows as t he above formula can be simulat ed by a W [1]-circuit (i.e. a circuit wit h bounded dept h, and weft 1). 2

P aramet erized Complexity of F inding Subgraphs wit h Heredit ary P rop ert ies

145

Corollary 4 can be proved along similar lines of Corollary 3. C o r o l l a r y 4 . Fo llo w in g p ro blem is W [1]-co m p let e: G iven ( G; k ) a n d a co n st a n t l , d oes t h ere ex ist a n l -co lo ra ble in d u ced su bgra p h o f size k ?

Finally we address t he paramet ric dual of t he problem addressed in Corollary 3. Given a graph G, and an int eger k , are t here k vert ices in G whose removal makes t he graph bipart it e? We will call t his problem ‘n − k bipart it e’. T he precise paramet erized complexity of t his problem is unknown since t hough bipart it eness is a heredit ary property, it has an in nit e forbidden set , and so t he problem is not covered by Cai’s result [1]. T he ‘edge’ count erpart of t he problem, given a graph G wit h m edges, and an int eger k , are t here k edges whose removal makes t he graph bipart it e, is t he same as asking for a cut in t he graph of size m − k . It is known[10] t hat t here exist s a paramet erized reduct ion from t his problem t o t he following problem, which we call ‘all but k 2-SAT ’. G i v e n : A Boolean 2 CNF formula F P a r a m e t e r : An int eger k Q u e s t i o n : Is t here an assignment t o t he variables of F t hat sat is es all but at most k clauses of F ? We show t hat t here is also a paramet erized reduct ion from t he ‘n − k bipart it e problem’ t o t he ‘all but k 2-SAT ’ problem. T h e o r e m 3 . T h ere is a pa ra m et er iz ed red u ct io n fro m t h e ‘n − k bipa r t it e p ro blem ’ t o t h e ‘a ll bu t k 2 -S A T ’ p ro blem .

P roof. Given a graph G , for every vert ex, we set two variables ( x u ; yu ) and const ruct clauses in t he same manner as in t he proof of Corollary 3. T he clauses are as follows: Set 1:

x u _ yu 8 u 2 V ( G ) x u _ x v ; yu _ yv 8( u; v ) 2 E ( G)

Each clause in Set 1 is repeat ed k + 1 t imes. Set 2:

x u _ yu

8 u 2 V ( G).

We show t hat it is possible t o remove k vert ices t o make t he given graph bipart it e if and only if t here is an assignment t o t he variables in t he above formula t hat makes all but at most k clauses t rue. If t here is an assignment t hat makes all but at most k clauses t rue, t hen t he clauses in Set 1 must be t rue because each of t hem occurs k + 1 t imes. T his ensures t hat t he variables x u ; yu corresponding t o t he vert ices are assigned respect ively 0,0 or 0,1 or 1,0 and each edge e = ( u; v ) has x u = x v = yu = yv = 0 or x u = 0; yu = 1 and x v = 1; yu = 0 or vice versa. T he vert ices s for which

146

Subhash Khot and Venkat esh Raman

x s = ys = 0 are removed t o get a bipart it e graph. At most k clauses in Set 2 are false. T his ensures t hat at most k vert ices are removed. Conversely if tShere exist k vert ices whose removal result s in a bipart it e graph wit h part it ion V1 V2 , consider t he assignment corresponding t o each vert ex u in t he graph, x u = yu = 0 if t he vert ex u is removed, x u = 1; yu = 0 if u 2 V1 and x u = 0; yu = 1 if u 2 V2 . It is easy t o see t hat t his assignment makes all but at most k clauses of t he formula t rue. Not e t hat t he reduct ion is act ually a polynomial t ime reduct ion. 2

4

C o n c lu d in g R e m a rk s

We have charact erized t he heredit ary propert ies for which nding an induced subgraph wit h k vert ices having t he property in a given graph is W [1]- hard. In part icular, using Ramsey T heorem, we have shown t hat if t he property includes all independent set s and all cliques or if it excludes some independent set s as well as cliques, t hen t he problem is xed paramet er t ract able. However, for some of t hese speci c propert ies, we believe t hat a more e cient xed paramet er algorit hms (not based on Ramsey numbers) is possible. It remains an open problem t o det ermine t he paramet erized complexity of bot h t he problems st at ed in T heorem 3 (t he ‘n − k bipart it e problem’ and t he ‘all but k 2-SAT ’ problem). More generally, t he paramet erized complexity of t he node-delet ion problem for a heredit ary property wit h an in nit e forbidden set is open. Finally we remark t hat our result s prove t hat t he paramet ric dual of t he problem considered by Cai[1] (and was proved FP T ) is W [1]-hard. T his observat ion adds weight t o t he conject ure ( rst made in [10]) t hat typically paramet ric dual problems have compliment ary paramet erized complexity. It would be int erest ing t o explore t his in a more general set t ing.

R e fe re n c e s 1. L. Cai, F ixed P aramet er Tract ability of Graph Modicat ion P roblem for Heredit ary P rop ert ies, I n for m at i on P r ocessi n g L et t er s, 5 8 (1996), 171-176. 2. R.G. Downey, M.R. Fellows, F ixed P aramet er Tract ability and Complet eness I: Basic t heory, SI A M J our n al on C om put i n g 2 4 (1995) 873-921. 3. R.G. Downey, M.R. Fellows, F ixed P aramet er Tract ability and Complet eness II: Complet eness for W [1], T heor et i cal C om put er Sci en ce 1 4 1 (1995) 109-131. 4. R.G. Downey, M.R. Fellows, P ar am et er i zed C om plexi t y , Springer Verlag New York, 1999. 5. R.G. Downey, M.R. Fellows, V. Raman, T he Complexity of Irredundant set s P aramet erized by Size, D i scr et e A ppli ed M at hem at i cs 1 0 0 (2000) 155-167. 6. M. R. Garey and D. S. J ohnson, P roblem [GT 21], C om put er s an d I n t r act abi li t y, A G ui de t o T he T heor y of N P -C om plet en ess, Freeman and Company, New York, 1979. 7. M. C. Golumbic, A lgor i t hm i c G r aph T heor y an d P er fect G r aphs. Academic P ress, New york, 1980.

P aramet erized Complexity of F inding Subgraphs wit h Heredit ary P rop ert ies

147

8. Harary, G r aph T heor y , Addison-Wesley P ublishing Company, 1969. 9. J . M. Lewis and M. Yannakakis, T he Node-Delet ion P roblem for Heredit ary P ropert ies is NP -complet e, J our n al of C om put er an d Syst em Sci en ces 2 0 ( 2 ) (1980) 219-230. 10. M. Maha jan and V. Raman, P aramet erizing ab ove Guarant eed Values: MaxSat and MaxCut , J our n al of A lgor i t hm s 3 1 (1999) 335-354. 11. A. Nat anzon, R. Shamir and R. Sharan, Complexity Classicat ion of Some Edge Modicat ion P roblems, in P r oceedi n gs of t he 25t h W or kshop on G r aph-T heor et i c C on cept s i n C om put er Sci en ce (WG’99), Ascona, Swit zerland (1999); Springer Verlag Lect ure Not es in Comput er 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.

1

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]).

0

00

01

000

0... 011

s3 s1

1

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.

2

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 (Shannon’s) entropy of the source (cf. [3]), η∞ and η−∞ are special cases of the Rényi’s 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

(

− log ξ 2 n −1

)) =

1 η−∞

(

− log ξ1 n −1

)) =

1 η∞

and the lower bound holds if:

(

rn ≤ η−∞1 log 1 − exp

(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 ). * n

(8)

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

(

(

Φ −1 ( rn − rn* ) σ log n

))(1 + O (1

log n

)) ,

(9)

where: Φ (x) =

x

1 2π

∫e

2

− t2

dt ,

(10)

−∞

2

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

3

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 ξ

2

(

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 W−1 −κ 2ξ 2−κ 2 n1−κ 2

1 n

log log n log n

)) + O ( ) , (log n − ∆ ( n,κ ,ξ ) − log log ξ ) + O ( ) 1

1 κ1

1

(

W−1 −κ 1ξ1−κ1 n1−κ1 1

1

1 n

log log n log n

(11)

(12)

(13)

where: κ 1 = η∞ log 2 , κ 2 = η−∞ log 2 , W−1 ( 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.

3

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

s

k

rn − s

s

n−k

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 ,

n

∑π 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 n−k 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 0’s (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

s

rn − s

k

s

rn − s

n−k

k

(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

s

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

n

( )∑ ( )( p q ) (1 − p q ) rn s

n k

s

rn − s k

s

rn − s n − k

ξ2k =

k =2

rn

yn + ξ 2 n ∑ s=0

( ) rn s

(

(

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

)

n −1

)

(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∞

n −1

(22.a)

− rn h∞

(22.b)

n

− rn h−∞

n −1

− rn h−∞

− rn h−∞

n

In addition, if n, rn → ∞ , and rn − log n h = O

(

(

)) ,

(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

(

n

n −∞

n

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

)

n

≤ 1 − p s q rn − s

)

n −1

(

≤ 1 − e − rnη∞

rn s

e

n −1

s

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 η = n1−1 . More precisely, for any given constant 1 < ξ 2 < ∞ we need: n −∞

(

rn ≥ η−−∞1 log 1 − exp

(

− log ξ 2 n −1

)) =

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 ξ

2

−∞

(

n

(

+ κ12 W−1 −κ 2ξ 2−κ 2 n1−κ 2

)

)) + O ( ) , 1 n

(25)

where according to (12) κ 2 = η−∞ log 2 , and W−1 ( 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 W−1 ( x ) (cf. [4]): W−1 ( x ) = log ( − x ) − log ( − log ( − x )) + O

(

log ( − log (− x )) log (− x )

), − e

−1

k , cont radict ing V 0 being a wit ness vert ex cover t o O 0. Hence t he degree of u is at most k + 1. T herefore a vert ex in an obst ruct ion for k { V e r t e x C o v e r has maximum degree k + 1. 2

Using t he above result , along wit h Lemma 1, we can easily derive t he following. Lem m a 4. T h e re is o n ly o n e co n n ec t ed o bs t r u c t io n fo r k { V e r t e x C o v e r w it h k + 2 v e r t ice s , w h ic h is t h e co m p le t e gra p h K k + 2 . F u r t h e r m o re , n o o t h e r o bs t r u c t io n fo r k { V e r t e x C o v e r h a s fe w e r v e r t ice s .

A Charact erizat ion of Graphs wit h Vert ex Cover Six

185

T he previous lemma shows t hat K k + 2 is t he smallest connect ed obst ruct ion for k { V e r t e x C o v e r . We can also show t hat t his is t he unique obst ruct ion wit h maximum degree. Lem m a 5. I f a v e r t e x in a co n n ec t ed o bs t r u c t io n fo r k { V e r t e x C o v e r h a s + 1, t h e n t h is o bs t r u c t io n is t h e co m p le t e gra p h w it h k + 2 v e r t ice s

d egree k (K k + 2).

P ro of. Suppose O = ( V ; E ) is a connect ed obst ruct ion for k { V e r t e x C o v e r and u is a vert ex in O wit h degree k + 1 and let N ( u ) be t he neighborhood of u . T hus j N ( u )j = k + 1. Let u v be any edge incident t o u . Let O 0 = O nu v ; we know V C ( O 0) = k . T his is illust rat ed in Figure 2. Let V 0 be a minimum vert ex cover of O 0. We have = V 0 (ot herwise O 0 is not an obst ruct ion). u 2 = V 0 and v 2

u v

N

(u )

F ig. 2. A vert ex u in O wit h degree k + 1. T he black vert ices must be in t he vert ex cover whenever u v is delet ed.

Since V 0 covers all edges incident t o u except u v , we have V 0 = N ( u )nf v g. Since N ( u )nf v g is t he vert ex cover for O 0, v is not adjacent t o any ot her vert ex w where w 2 = N ( u ), ot herwise, w must also be in V 0. T hus N ( v )  N ( u ) [ f u g. Since v is any vert ex in N ( u ), any vert ex in N ( u ) is connect ed t o u or vert ices in N ( u ). T hus f u g [ N ( u ) = V . Hence O has k + 2 vert ices. By Lemma 4, a connect ed obst ruct ion wit h k + 2 vert ices for k { V e r t e x C o v e r is t he complet e 2 graph K k + 2 , t hus O = K k + 2 in t his case. if  2.3

T his lemma shows t hat for any obst ruct ion O = ( V ; E ) for k { V e r t is t he maximum degree of O and j V j > k + 2 t hen  < k + 1. Vert ex B ounds for k{

ex C o v er

,

V er t ex C o v er

We now present two import ant result s t hat yield sharp upper bounds on t he number of vert ices for connect ed and disconnect ed k { V e r t e x C o v e r obst ruc-

186

Michael J . Dinneen and Liu Xiong

t ions. Lat er we will give some edge bounds t hat may be generalized (wit h some e ort ) t o k { V e r t e x C o v e r . T heorem 1. A co n n ec t ed o bs t r u c t io n fo r k {

V e r t e x C o v e r has at m ost

2k + 1

v e r t ice s .

P ro of. Assume O = ( V ; E ) is a connect ed obst ruct ion for k { V e r t e x C o v e r , where j V j = 2k + 2. We prove O is not a connect ed obst ruct ion for k { V e r t e x C o v e r by cont radict ions. T he same argument also holds for graphs wit h more vert ices. If O is a connect ed obst ruct ion of k { V e r t e x C o v e r , t hen V C ( O ) = k + 1. Hence V can be split int o two subset s V 1 and V 2 such t hat V 1 is a k + 1 vert ex cover and V 2 = V nV 1 . T hus j V 2 j = 2k + 2 − ( k + 1) = k + 1. Obviously, no edge exist s between any pair of vert ices in V 2 , ot herwise V 1 is not a vert ex cover. Each vert ex in V 1 has at least one vert ex in V 2 as a neighbor, ot herwise it can be moved from V 1 t o V 2 . (i.e., t he vert ex is not needed in t his minimal vert ex cover). T hus t he neighborhood of V 2 , N ( V 2 ) is V 1 . We now prove t hat no subset S of V 2 has j N ( S )j < j S j. [T his result , in fact , will immediat ely exclude t he case j V j > 2k + 2.] By way of cont radict ion, assume V 3 = S is a minimal subset in V 2 such t hat j N ( V 3 )j < j V 3 j. We say V 3 is minimal whenever if T is any subset in V 3 t hen j N ( T )j  j T j. Not e V 3 will cont ain at least 3 vert ices since every vert ex has degree at least 2 in biconnect ed graphs (see Lemma 2). Let V 4 = N ( V 3 ). T hus all edges adjacent t o V 3 are covered by V 4 . T hus V 4  V 1 and j V 4 j < j V 3 j. Let V 5 = V 2 nV 3 and V 6 = V 1 nV 4 . T he graph O can be split as indicat ed in Figure 3.

V4

V3

V6

V5

F ig. 3. Split t ing t he vert ex set of O int o four subset s.

A Charact erizat ion of Graphs wit h Vert ex Cover Six

187

We now prove t hat t he exist ence of such a set V 3 forces O t o be disconnect ed. Since V 3 is assumed minimal, no subset T in V 3 has j N ( T )j < j T j. T hus if we delet e any vert ex in V 3 , leaving V 30, t hen any subset T in V 30 has j N ( T )j  j T j. Recall t hat a mat ching in a bipart it e graph is a set of independent edges (wit h no common end point s). Recall Hall’s Marriage T heorem [Hal35]: H all’s M arriage T heorem : A bipa r t it e gra p h B = ( X 1 ; X 2 ; E ) h a s a m a t c h in g o f ca rd in a lit y j X 1 j if a n d o n ly if fo r ea c h s u bs e t A  X 1 , j N ( A )j  j A j .

T hus t here is a mat ching of cardinality j V 30j in t he bipart it e induced subgraph O 0 = ( V 30; N ( V 3 )) in O . T hus t here are j V 30j = j V 3 j − 1 independent edges between t he set V 3 and t he set V 4 . Let us now delet e all edges between V 4 and V 5 and all edges between V 4 and V 6 . Let C 1 = O [V 3 [ V 4 ], C 2 = O [V 5 [ V 6 ] be t hese disconnect ed component s in t he result ing graph. (T he induced graph C 1 is connect ed, while t he induced graph C 2 may or may not be.) As discussed above, t here exist s j V 3 j − 1 independent edges in C 1 . T hus t o cover t hese edges, V C ( C 1 )  j V 3 j − 1. We know j V 4 j < j V 3 j and all edges incident t o V 3 are covered by V 4 , t hus V C ( C 1 ) = j V 4 j. Now consider t he graph C 2 . Suppose, V C ( C 2 ) < j V 6 j. Since all delet ed edges are also covered by V 4 , V 4 [ V C ( C 2 ) must cover all edges in O . T hus V C ( O ) = j V 4 j + V C ( C 2 ) < j V 4 j + j V 6 j = k + 1. T his cont radict s t hat O is an obst ruct ion for k { V e r t e x C o v e r . T hus t he assumpt ion t hat V C ( C 2 ) < j V 6 j is not correct . Hence V C ( C 2 ) = j V 6 j even t hough edges between C 1 and C 2 were delet ed. T hus V C ( C 1 [ C 2 ) = j V 4 j + j V 6 j = k + 1. T herefore O can not be a connect ed obst ruct ion for k { V e r t e x C o v e r since t he result ing graph st ill requires a k + 1 vert ex cover whenever all edges between V 4 and V 5 and all edges between V 4 and V 6 are delet ed. T herefore t he assumpt ion t hat t here exist s a minimal subset V 3 in V 2 is not correct . Hence any subset S in V 2 has j N ( S )j  j S j. Once again, by applying Hall’s Marriage T heorem, t here is a mat ching of cardinality k + 1 in t he induced bipart it e subgraph O 0 = ( V 2 ; V 1 ) of O . To cover t hese k + 1 independent edges, a vert ex cover of size k + 1 is necessary. We know t hat if O is a connect ed graph, t here must exist ot her edges in O except t hese k + 1 independent edges. If t hose edges are delet ed, t he result ing graph st ill has vert ex cover k + 1. T hus O can not be a connect ed obst ruct ion for k { V e r t e x C o v e r if it has more t han 2k + 1 vert ices. 2 By ext ending t he above result , we can prove t he following corollary by induct ion. C orollary 1. A n y o bs t r u c t io n fo r k {

V e r t e x C o v e r h a s o rd e r a t m o s t

2k + 2.

We now ment ion some observat ions about t he k { V e r t e x C o v e r obst ruct ions. T he known obst ruct ions for t he small cases (see [CD94] for k  5, in

188

Michael J . Dinneen and Liu Xiong

addit ion t o t his paper’s k = 6) indicat e a very int erest ing feat ure: t h e m o re v e r t ice s , t h e fe w e r ed ge s . As proven above, a complet e graph K k + 2 is t he smallest obst ruct ion (and only one), but it seems t o have t he largest number of edges. T he cycle obst ruct ion C 2 k + 1 appears t o be t he only connect ed obst ruct ion wit h t he largest number of vert ices (and appears t o have t he smallest number of edges). 2.4

C om put ing A ll O bst ruct ions for 6 {

V er t ex C o v er

We divide our comput at ional t ask for nding all t he connect ed obst ruct ions for 6{ V e r t e x C o v e r int o two st eps. (1) We nd all connect ed obst ruct ions wit h order at most 11 for 6{ V e r t e x C o v e r . T his st ep is very st raight forward. Our algorit hm I sObst r uct i on is applied t o all non-isomorphic biconnect ed graphs wit h a number of vert ices between 9 and 11, of maximum degree 6, and of maximum number of edges 33. (2) To nd all connect ed obst ruct ions of order 12 and 13 for 6{ V e r t e x new degree and edge bounds were found and used, as indicat ed below.

C o v er

,

By t he Lemma 5, we know t hat if a connect ed obst ruct ion O has a vert ex of degree 7 for 6{ V e r t e x C o v e r , t hen t his obst ruct ion must be K 8 . T hus we only have t o consider graphs wit h maximum degree 6. Furt hermore, if t he degree for O is 6, we can easily prove t he following st at ement by cases. St at em ent 1. I f a co n n ec t ed o bs t r u c t io n O = ( V ; E ) fo r 6{ V e r t e x C o v e r h a s a v e r t e x o f d egree 6, t h e n j V j  10. F u r t h e r m o re , if j V j = 10 t h e n j E j  24, a n d if j V j = 9 t h e n j E j  25.

A consequence of t he proof for St at ement 1 (see [DX00]) is t he following: if a connect ed obst ruct ion O for 6{ V e r t e x C o v e r has 11 or more vert ices t hen t he degree of every vert ex is less t han or equal t o 5. Wit h anot her series of case st udies of graphs wit h vert ices of degree 5 we have t he following. St at em ent 2. I f a co n n ec t ed o bs t r u c t io n O = ( V ; E ) fo r 6{ V e r t e x C o v e r h a s 12 v e r t ice s t h e n j E j  24. F u r t h e r , if O h a s 13 v e r t ice s t h e n j E j  26.

T he proof of t his st at ement (see [DX00]) also gives a degree bound of 4 for any obst ruct ion wit h 13 vert ices. T he search space for nding all obst ruct ions wit h orders 12 and 13 for 6{ V e r t e x C o v e r has been ext remely reduced.

3

F in a l R e m a rk s

Our obst ruct ion checking procedure for k { V e r t e x C o v e r (primarily based on Lemmat a 1 and 5) was e cient enough t o process all biconnect ed graphs of order at most 11 for k = 6. To nd all of t he obst ruct ions wit h 12 vert ices for 6{ V e r t e x C o v e r , we only needed t o t est all non-isomorphic (biconnect ed) graphs wit h maximum degree 5 and at most 24 edges. For nding all obst ruct ions wit h 13 vert ices for 6{ V e r t e x C o v e r , we only need t o check all non-isomorphic graphs wit h maximum degree 4 and at most 26 edges. T his search space is very

A Charact erizat ion of Graphs wit h Vert ex Cover Six

189

manageable; it requires about two mont hs of comput at ion t ime! In Figures 4{5, we display all 188 connect ed obst ruct ions for 6{ V e r t e x C o v e r . We now ment ion a couple of areas left open by our research. It would be nice t o have a proof t hat C 2 k + 1 is t he only connect ed obst ruct ion for k { V e r t e x C o v e r , since we now known t hat 2k + 1 is an upper bound on t he number of vert ices. T here are some int erest ing open quest ions regarding edge bounds for k { V e r t e x C o v e r . As we point ed out earlier, t he obst ruct ions st art having fewer edges as t he number of vert ices increases. More t heoret ical result s t hat generalizes our speci c bounds for k = 6 seem possible.

R e fe re n c e s [AP S91]

S. Arnb org, A. P roskurowski, and D. Seese. Monadic second order logic, t ree aut omat a and forbidden minors. In Proceedi ngs of the 4th W or kshop on Computer Sci ence Logi c, CSL ’ 90, volume 533 of Lecture N otes on Computer Sci ence, pages 1{16. Springer-Verlag, 1991. [BF R98] R. Balasubramanian, M. R. Fellows, and V. Raman. An improved xedparamet er algorit hm for vert ex-cover. I nfor mati on Processi ng Letter s, 65(3):163{168, 1998. [CD94] K. Cat t ell and M. J . Dinneen. A charact erizat ion of graphs wit h vert ex cover up t o ve. In V. Bouchit t e and M. Morvan, edit ors, Order s, A lgor i thms and A ppli cati ons, ORD A L ’ 94, volume 831 of Lecture N otes on Computer Sci ence, pages 86{99. Springer-Verlag, J uly 1994. [CDD + 00] K. Cat t ell, M. J . Dinneen, R. G. Downey, M. R. Fellows, and M. A. Langst on. On comput ing graph minor obst ruct ion set s. T heoreti cal Computer Sci ence, 233(1-2):107{127, February 2000. [DX00] M. J . Dinneen and L. Xiong. T he minor-order obst ruct ions for t he graphs of vert ex cover six. Research Rep ort CDMT CS-118, Cent re for Discret e Mat hemat ics and T heoret ical Comput er Science, University of Auckland, Auckland, New Zealand, 29 pp. J anuary 2000. ( ht t p: / / www. cs. auckl and. ac. nz/ CDMTCS/ r esear chr epor t s/ 118vc6. pdf ) [F L89] M. R. Fellows and M. A. Langst on. An analogue of t he Myhill-Nerode T heorem and it s use in comput ing nit e-basis charact erizat ions. In I EEE Symposi um on Foundati ons of Computer Sci ence Proceedi ngs, volume 30, pages 520{525, 1989. [GJ 79] M. R. Garey and D. S. J ohnson. Computer s and I ntractabi li ty: A Gui de to the T heor y of N P-completeness. W . H. Freeman and Company, 1979. [Hal35] P. Hall. On represent at ion of subset s. J. London M ath. Soc. , 10:26{30, 1935. [LA91] J . Lagergren and S. Arnb org. F inding minimal forbidden minors using a nit e congruence. In Proceedi ngs of the I nter nati onal Col loqui um on A utomata, Languages and Programmi ng, volume 510 of Lecture N otes on Computer Sci ence, pages 533{543. Springer-Verlag, 1991. 18t h ICALP. [McK90] B. D. McKay. naut y User’s Guide (version 2.0). Tech Rep ort T R-CS90-02, Aust ralian Nat ional University, Depart ment of Comput er Science, 1990. [P ro93] A. P roskurowski. Graph reduct ions, and t echniques for nding minimal forbidden minors. In N. Rob ert son and P. D. Seymour, edit ors, Graph

190

Michael J . Dinneen and Liu Xiong

F ig. 4. All connect ed obst ruct ions for 6{

V er t ex C o v er

.

A Charact erizat ion of Graphs wit h Vert ex Cover Six

F ig. 5. All connect ed obst ruct ions for 6{

V er t ex C o v er

(cont inued).

191

192

[RS85]

Michael J . Dinneen and Liu Xiong Str ucture T heor y , volume 147 of Contemporar y M athemati cs, pages 591{ 600. American Mat hemat ical Society, 1993. N. Rob ert son and P. D. Seymour. Graph Minors { A survey. In Sur veys i n Combi nator i cs, volume 103, pages 153{171. Cambridge University P ress, 1985.

O n t h e M on ot on i ci t y of M i n i m u m D i a m et er w i t h R esp ect t o O r d er a n d M a x i m u m O u t - D egr ee Mirka Miller and Slamin Depart ment of Comput er Science and Software Engineering, T he University of Newcast le, NSW 2308, Aust ralia f mi r ka, sl ami ng@cs. newcast l e. edu. au

Considering t he t hree paramet ers of a direct ed graph: order, diamet er and maximum out -degree, t here are t hree opt imal problems t hat arise if we opt imise in t urn each one of t he paramet ers while holding t he ot her two paramet ers xed. T hese t hree problems are relat ed but as far as we know not equivalent . One way t o prove t he equivalence of t he t hree problems would b e t o prove t hat t he opt imal value of each paramet er is monot onic in each of t he ot her two paramet ers. It is known t hat maximum order is monot onic in b ot h diamet er and maximum out -degree and t hat minimum diamet er is monot onic in maximum out -degree. In general, it is not known whet her t he ot her t hree p ossible monot onicity implicat ions hold. In t his pap er, we consider t he problem of det ermining t he smallest diamet er K ( n ; d ) of a digraph G given order n and maximum out -degree d . Using a new t echnique for const ruct ion of digraphs, we prove t hat K ( n ; d ) is monot onic for all n k k k −1 −d such t hat dd −1 < n  d + d , t hus solving an op en problem p osed in 1988 by Miller and Fris.

A b st r a c t .

1

I n t r o d u ct i on

In communicat ion network design, t here are several fact ors which should be considered. For example, each processing element should be direct ly connect ed t o a limit ed number of ot her processing element s in such a way t hat t here always exist s a connect ion rout e from one processing element t o anot her. Furt hermore, in order t o minimize t he communicat ion delay between processing element s, t he direct ed connect ion rout e must be as short as possible. A communicat ion network can be modelled as a d igra p h , where each processing element is represent ed by a v e r t e x and t he direct ed connect ion between two processing element s is represent ed by an a rc . T he number of vert ices (processing element s) is called t he o rd e r of t he digraph and t he number of arcs (direct ed connect ions) from a vert ex is called t he o u t - d egree of t he vert ex. T he d ia m e t e r is de ned t o be t he largest of t he short est pat hs (direct ed connect ion rout es) between any two vert ices. In graph-t heoret ical t erms, t he problems in t he communicat ion network designs can be modelled as opt imal digraph problems. T he example described above corresponds t o t he so-called o rd e r / d egree p ro ble m : Const ruct digraphs wit h t he D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 1 9 3 { 2 0 1 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

194

Mirka Miller and Slamin

smallest possible diamet er K ( n ; d ) for a given order n and maximum out -degree d . Before we discuss in more det ail opt imal digraph problems, we give more formal de nit ions of t he t erms in graph t heory t hat will be used. A d irec t ed gra p h or d igra p h G is a pair of set s ( V ; A ) where V is a nit e nonempty set of dist inct element s called v e r t ice s ; and A is a set of ordered pair ( u ; v ) of dist inct vert ices u ; v 2 V called a rc s . T he o rd e r n of a digraph G is t he number of vert ices in G , t hat is, n = j V j . An in - n e igh bo u r (respect ively o u t - n e igh bo u r ) of a vert ex v in G is a vert ex u (respect ively w ) such t hat ( u ; v ) 2 A (respect ively ( v ; w ) 2 A ). T he set of all in-neighbour (respect ively out -neighbour) of a vert ex v is denot ed by N − ( v ) (respect ively N + ( v )). T he in - d egree (respect ively o u t - d egree ) of a vert ex v is t he number of it s in-neighbour (respect ively out -neighbour). If t he in-degree equals t he out -degree (= d ) for every vert ex in G , t hen G is called a d iregu la r digraph of degree d . A w a lk of lengt h l in a digraph G is an alt ernat ing sequence v 0 a 1 v 1 a 2 :::a l v l of vert ices and arcs in G such t hat a i = ( v i − 1 ; v i ) for each i , 1  i  l . A walk is closed if v 0 = v l . If all t he vert ices of a v 0 − v l walk are dist inct , t hen such a walk is called a pa t h . A c y c le is a closed pat h. T he d is t a n ce from vert ex u t o v , denot ed by  ( u ; v ), is t he lengt h of t he short est pat h from vert ex u t o vert ex v . Not e t hat in general  ( u ; v ) is not necessarily equal t o  ( v ; u ). T he d ia m e t e r of digraph G is t he longest dist ance between any two vert ices in G . Let v be a vert ex of a digraph G wit h maximum out -degree d and diamet er k . Let n i , for 0  i  k , be t he number of vert ices at dist ance i from v . T hen n i  d i , for 0  i  k , and so n

=

k X i

= 0

ni



1+

d

+

d

2

+

:::

+

d

k

=

dk + 1 d

− 1 − 1

(1)

T he right -hand side of (1) is called t he M oo re bo u n d and denot ed by M d ; k . If t he equality sign holds in (1) t hen t he digraph is called M oo re d igra p h . It is well known t hat Moore digraphs exist only in t he t rivial cases when d = 1 (direct ed cycles of lengt h k + 1, C k + 1 , for any k  1) or k = 1 (complet e digraphs of order 1) [10,3]. T hus for d  2 and k  2, inequality (1) d + 1, K d + 1 , for any d  becomes dk + 1 − d 2 k (2) n  d + d + :::+ d = d − 1 Let G( n ; d ; k ) denot es t he set of all digraphs G , not necessarily diregular, of order n , maximum out -degree d , and diamet er k . Given t hese t hree paramet ers, t here are t hree problems for digraphs G 2 G( n ; d ; k ), namely, 1. T he d egree / d ia m e t e r p ro ble m : det ermine t he largest order N ( d ; k ) of a digraph given maximum out -degree d and diamet er k . 2. T he o rd e r / d egree p ro ble m : det ermine t he smallest diamet er K ( n ; d ) of a digraph given order n and maximum out -degree d .

On t he Monot onicity of Minimum Diamet er

3. T he o rd e r / d ia m e t e r p ro ble m : det ermine t he smallest degree digraph given order n and diamet er k .

D (n ; k )

195

of a

Miller [6] point ed out t he following implicat ions regarding t o t he t hree problems above. a. b. c.

d1 < d2 k1 < k2 d1 < d2

) ) )

N ( d 1 ; k ) < N ( d 2 ; k ); N ( d ; k 1 ) < N ( d ; k 2 ); K ( n ; d 1 )  K ( n ; d 2 ).

It is not known whet her t he following t hree implicat ions hold or not . 1. 2. 3.

) ) n2 )

 (n 1 ; d )  (n 1 ; k ) 

for ( k 1 ; k 2  ( n 2 ; d ); ( n 2 ; k ), for ( n 1 ; n 2 

k1 < k2

D (n ; k 1 )

D ( n ; k 2 ),

n1 < n2

K

K

n1


, t hen

3 an d

K

3k− 5 2

( n ; 3)  < n



k.

Combining t his result and

3k − 1 ,

4

K

( n ; 3) =

2

k.

Anot her special case we can consider is digraphs of maximum out -degree 2. Alegre const ruct ed diregular digraph of (const ant ) out -degree 2, diamet er 4 and order 25, t hat is, A l 2 G(25; 2; 4). T his digraph is larger t han Kaut z digraph of t he same maximum out -degree and diamet er. Applying line digraph it erat ions and T heorem 2 t o A l , we obt ain L e m m a 1 For every k



5 a n d 25 

2k − 5

< n



25 

2k − 4 , G( n ; d ; k ) is n o t

2

em pty.

Furt hermore, Miller and Siran [9] proved t hat T h e o re m 5 If d

= 2 an d

k >

T his result implies t hat for Lemma 1, we have T h e o r e m 6 For every k



n >

2, t h e n

n

2k − 3,

 K

5 a n d 2k − 3 

2

2k + 1 − 4. ( n ; 2)  n



k.

25 

Combining t his result and 2k − 4 ,

K

( n ; 2) =

k.

2

We conclude t his paper wit h our current knowledge of t he K ( n ; 2) problem for n  200 (Table 1). New result s as displayed in bold-type, for example G 2 G(49; 2; 5) which is obt ained by applying T heorem 2 t o t he line digraph of Alegre digraph (see F igure 2).

On t he Monot onicity of Minimum Diamet er

199

L(Al)

L(Al)’ F i g . 2 . T he line digraph of Alegre digraph order 49 L ( A l ) 0

L (A l )

and non-diregular digraph of

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

( 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

K

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

T a b le 1 .

K

( n ; 2) 5 5 5 5 5 5 5 5 5

5 5 5 5 5 5 5 5 5 5

5 or or or or or or or or or or 6 6 6 6 6 6 6 6 6 6 6

6 6 6 6 6 6 6 6 6

6 6 6 6 6 6 6 6 6 6

n

K

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

T he values of

K

( n ; 2) 6

6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6

6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6

6 or or or or or or or or or or or or or or or or or or or or

7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7

( n ; d ) for

n

K

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

d

6 6 6 6 6

( n ; 2) or 7 or 7 or 7 or 7 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

= 2 and

n

n

K



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

200.

( 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

On t he Monot onicity of Minimum Diamet er

201

R efer en ces 1. E.T . Baskoro, Mirka Miller, J . Siran and M. Sut t on, Complet e charact erisat ion of almost Moore digraphs of degree 3, Discret e Mat hemat ics, t o app ear. 2. E.T . Baskoro, Mirka Miller, J . P lesnk and S. Znam, Digraphs of degree 3 and order close t o t he Moore b ound, J ournal of Graph T heory 2 0 (1995) 339{349 3. W .G. Bridges and S. Toueg, On t he imp ossibility of direct ed Moore graphs, J . Combinat orial T heory Series B 2 9 (1980) 339{341 4. M.A. F iol, J .L.A. Yebra and I. Alegre, Line digraph it erat ions and t he ( d ; k ) digraph problem, IEEE Transact ions on Comput ers C - 3 3 (1984) 400{403 5. M. Imase and M. It oh, A design for direct ed graphs wit h minimum diamet er, IEEE Trans. on Comput ers C - 3 2 (1983) 782{784 6. Mirka Miller, M. A. T hesis, Dept . of Mat h, St at s and Comp. Sci., U NE, Armidale (1986) 7. Mirka Miller and I. Fris, Minimum diamet er of diregular digraphs of degree 2, Comput er J ournal 3 1 (1988) 71{75 8. Mirka Miller and I. Fris, Maximum order digraphs for diamet er 2 or degree 2, P ullman volume of Graphs and Mat rices, Lect ure Not es in P ure and Applied Mat hemat ics 1 3 9 (1992) 269{278 9. Mirka Miller and J . Siran, Digraphs of degree two and defect two, submit t ed. 10. J . P lesnk and S. Znam, St rongly geodet ic direct ed graphs, Act a F . R. N. Univ. Comen. - Mat hemat ica XXIX (1974) 29{34

O n lin e In d e p e n d e n t S e t s Magnus M. Halldorsson ? , Kazuo Iwama ? ? , Shuichi Miyazaki, and Shiro Taket omi School of Informat ics, Kyot o University, Kyot o 606-8501, J apan f mmh, i wama, shui chi , t aket omi g@kui s. kyot o- u. ac. j p

At each st ep of t he online indep endent set problem, we are given a vert ex v and it s edges t o t he previously given vert ices. We are t o decide whet her or not t o select v as a memb er of an indep endent set . Our goal is t o maximize t he size of t he indep endent set . It is not di cult t o see t hat no online algorit hm can at t ain a p erformance rat io b et t er t han n − 1, where n denot es t he t ot al numb er of vert ices. Given t his ext reme di culty of t he problem, we st udy here relaxat ions where t he algorit hm can hedge his b et s by maint aining mult iple alt ernat ive solut ions simult aneously. We int roduce two models. In t he rst , t he algorit hm can maint ain a p olynomial numb er of solut ions (indep endent set s) and choose t he largest one as t he nal solut ion. We show t hat  ( l o g ) is t he b est comp et it ive rat io for t his model. In t he second more p owerful model, t he algorit hm can copy int ermediat e solut ions and grow t he copied solut ions in di erent ways. We obt ain an upp er b ound of O ( n = ( k log n )), and a lower b ound of + 1 n = (e log 3 n ), when t he algorit hm can make n op erat ions p er vert ex. A b st r a c t .

n

n

k

1

k

In t ro d u c t io n

An in d epen den t set (IS) in a graph is a set of vert ices t hat are mut ually nonadjacent . In t he on lin e independent set problem, a graph is given one vert ex at a t ime along wit h edges t o previous vert ices. T he algorit hm is t o maint ain a proper solut ion, and must at each st ep decide irrevocably whet her t o keep t he present ed vert ex as a part of t he solut ion. It s goal is t o nd as large a set as possible, relat ive t o t he size of t he largest independent set in t he graph. Online comput at ion has received considerable at t ent ion as a nat ural model of some propert ies of t he real world such as t he irreversibility of t ime and t he unpredict ability of t he fut ure. Aside from modeling real-t ime comput at ion, it also has been found t o be import ant in cont ext s where access t o dat a is limit ed, e.g. because of unfamiliar t errain, space const raint s, or ot her fact ors det ermining t he order of t he input . T he online IS problem occurs nat urally in resource scheduling. Request s for resources or set s of resources arrive online, and two request s can only be serviced ? ? ?

Current address: Science Inst it ut e, University of Iceland ([email protected]) Supp ort ed in part by Scient i c Research Grant , Minist ry of J apan, 10558044, 09480055 and 10205215.

D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 2 0 2 { 2 0 9 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

Online Indep endent Set s

203

simult aneously if t hey do not involve t he same resource. When t he ob ject ive is t o maximize t he t hroughput of a server, we have a (possibly weight ed) online IS problem. P reviously, t his has primarily been st udied in t he cont ext of scheduling int ervals [7]. T he usual measure of t he quality of an online algorit hm A is it s com pet it ive rat io or per for m an ce rat io . For t he online IS problem, it is de ned t o be  ( n ) = max I 2 I n o p t ( I ) =A ( I ), where I n is t he set of all t he sequences of vert ices and corresponding edges given as n -vert ex graphs, o p t ( I ) is t he cardinality of t he maximum independent set of I , and A ( I ) is t he size of t he independent set found by A on I . One reason why t he online IS problem has not received a great deal of at t ent ion is t hat any algorit hm is bound t o have a poor compet it ive rat io. It is not hard t o see t hat in t he basic model, once t he algorit hm decides t o add a vert ex t o it s set , t he adversary can ensure t hat no furt her vert ices can be added, even t hough all t he ot her n − 1 vert ices form an independent set . T hus, t he worst possible performance rat io of n − 1 holds for any algorit hm, even when t he input graph is a t ree. As a result , we are int erest ed in relaxat ions of t he basic model and t heir e ect s on t he possible performance rat ios. In t he color in g m odel st udied recent ly in [3], t he online algorit hm const ruct s a coloring online. T he IS solut ion out put will be t he largest color class. T his circumvent s t he st rait -jacket t hat t he single current solut ion imposes on t he algorit hm, allowing him t o hedge his bet s. T his model relat es nicely t o online coloring t hat has been st udied for decades. In part icular, posit ive result s known for some special classes of graphs carry over t o t his IS problem: O (log n ) for t rees and bipart it e graphs [1,2,8], and n 1 = k ! for k -colorable graphs [5]. Also, 2-compet it ive rat io is immediat e for line graphs, as well as rat io k for k + 1claw free graphs. On t he ot her hand, for general graphs, no algorit hm has a compet it ive rat io bet t er t han n = 4 [3], a rat io t hat is achieved by t he First Fit coloring algorit hm. O u r resu lt s. We propose t he m u lt i-solu t ion s model, where t he algorit hm can

maint ain a collect ion of independent set s. At each st ep, t he current vert ex can be added t o up t o r ( n ) di erent set s. T he coloring model is equivalent t o t he special case r ( n ) = 1. We are part icularly int erest ed in polynomially bounded comput at ion, t hus focusing on t he case when r ( n ) = n k , for some const ant k . For t his case, we derive an upper and a lower bound of  ( n = log n ) on t he best possible compet it ive rat io. For r ( n ) const ant , we can argue a st ronger Ω ( n ) lower bound. T hese result s are given in Sect ion 2. A st ill more powerful model proposed here is t he in her it an ce m odel. Again each vert ex can part icipat e in limit ed number of set s. However, t he way t hese set s are formed is di erent . At each st ep, r ( n ) di erent set s can be copied and t he current vert ex is added t o one copy of each of t he set s. T hus, adding a vert ex t o a set leaves t he original set st ill int act . T his model can be likened t o forming a t ree, or a forest , of solut ions: at each st ep, r ( n ) branches can be added t o t rees in t he forest , all labeled by t he current vert ex. Each pat h from a root t o a node (leaf or int ernal) corresponds t o one current solut ion.

204

Magn us M. Halldorsson et al.

T he inherit ance model is t he most challenging one in t erms of proving lower bounds. T his derives from t he fact t hat all t he lower bounds used t he ot her models, as well as for online graph coloring [4,3], have a property called t ran sparen cy : once t he algorit hm makes his choice, t he adversary immediat ely reveals her classi cat ion of t hat vert ex t o t he algorit hm. T his t ransparency property, however, t rivializes t he problem in t he inherit ance model. St ill we are able t o prove lower bounds in t he same ballpark, or Ω ( n = ( e k log3 n )) when r ( n ) = n k . T hese result s are given in Sect ion 3. N ot at ion . T hroughout t his paper, t ices, and we writ e vert ices v 1 ; v 2 ;   Namely, at t he i t h st ep, t he vert ex whet her it select s v i or not .

2

n

denot es t he t ot al number of given ver, where vert ices are given in t his order. is given and an online algorit hm decides

; vn vi

M u lt i-s o lu t io n s M o d e l

In t he original online IS problem, t he algorit hm can have only one bin, one candidat e solut ion. In t he mult i-solut ions model, t he algorit hm can maint ain a collect ion of independent set s, choosing t he largest one as t he nal solut ion. T he model is paramet erized by a funct ion r ( n ); each vert ex can be placed online int o up t o r ( n ) set s. When r ( n ) = 1, t his corresponds t o forming a coloring of t he nodes. When r ( n ) = 2n , an online algorit hm can maint ain all possible independent set s and t he problem becomes t rivial. We are primarily int erest ed in cases when r ( n ) is polynomially bounded. We nd t hat t he best possible performance rat io in t his model is  ( n = log r ( n )). In part icular, when r ( n ) is const ant , t he rat io is linear, while if r ( n ) is polynomial, t he rat io is  ( n = log n ). R em ar k. In online problems, t he algorit hm does not know t he lengt h n of t he input sequence. T hus, in t he mult i-solut ions model, t he algorit hm can assign t he i -t h node t o r ( i ) di erent set s, rat her t han r ( n ). However, it is well known t hat not informing of t he value of n has very limit ed e ect on t he performance rat io, a ect ing at most t he const ant fact or. T hus, in order t o simplify t he argument s, we may act ually allow t he algorit hm r ( n ) assignment s for every vert ex. T h e o r e m 1 . T here is an on lin e algor it hm w it h com pet it ive rat io at m ost O ( n = log r ( n )) in t he m u lt i-solu t ion s m odel.

P roof. Let t = dlog r ( n ) − 1e. View t he input as sequence of blocks, each wit h t

vert ices. For each block, form a bin corresponding t o each non-empty subset of t he t vert ices. Greedily assign each vert ex as possible t o t he bins corresponding t o set s cont aining t hat vert ex. T his complet es t he speci cat ion of t he algorit hm. Each node is assigned t o at most r ( n ) bins. Each independent set in each block will be represent ed in some bin. T hus, t he algorit hm nds an opt imal solut ion wit hin each block. It follows t hat t he performance rat io is at most n = t , t he number of blocks.

Online Indep endent Set s Low er M ou n d s

205

We rst give a linear lower bound for t he case of r ( n ) being

const ant . T h e o r e m 2 . A n y on lin e I S algor it hm has a com pet it ive rat io at least

n

2(r (n )+ 1)

in t he m u lt i-solu t ion s m odel. P roof. We describe t he act ion of our adversary. Vert ices have one of two st at es: good and bad . When a vert ex is present ed t o an online algorit hm, it s st at e is

yet undecided. Immediat ely aft er an online algorit hm decides it s act ion for t hat vert ex, it s st at e is det ermined. If a vert ex v becomes good, no subsequent vert ex has an edge t o v . If v becomes bad, all subsequent vert ices have an edge t o v . Not e t hat all good vert ices const it ut e an independent set , in fact t he opt imal one. Also, not e t hat once a bad vert ex is added t o a bin, no succeeding vert ex can be put int o t hat bin. T he adversary det ermines t he st at e of each vert ex as follows: If an online algorit hm put t he vert ex v int o a bin wit h r ( n ) vert ices or more, t hen v becomes a bad vert ex; ot herwise it ’s good. T hus, no bin cont ains more t han r ( n ) + 1 vert ex. T his upper bounds t he algorit hm’s solut ion. Each bad node becomes t he last node in a bin wit h r ( n ) copies of ot her good nodes. Since each node appears in at most r ( n ) bins, we have t hat t he number of good nodes is at least t he number of bad nodes, or at least n = 2. T his lower bounds t he size of t he opt imal solut ion.

T h e o r e m 3 . A n y on lin e I S algor it hm has a com pet it ive rat io at least

n

2 lo g ( n

2 r

(n ))

in t he m u lt i-solu t ion s m odel. P roof. In t he lower bound argument here, we consider a randomized adversary.

As before, we use good vert ices and bad vert ices. T his t ime, our adversary makes each vert ex good or bad wit h equal probability. We analyze t he average performance of an arbit rary online algorit hm. T he probability t hat a xed bin cont ains more t han C = log( n 2  r ( n )) vert ices is at most ( 12 ) C = n 2  1r ( n ) since all but t he last vert ex must be good. T he online algorit hm can maint ain at most n  r ( n ) bins. T hus, t he probability t hat t here is a bin wit h more t han C vert ices is at most 1 = n1 . Namely, wit h high probability t he online algorit hm out put s n r (n )  n 2r (n ) an independent set of size at most C . On t he ot her hand, t he expect ed value of t he opt imal cost , namely t he expect ed number of good vert ices, is 21  n = n2 . Hence, t he compet it ive rat io is at least n = 2(log( n 2  r ( n ))). R em ar k. Observe t hat t he graphs const ruct ed have a very speci c st ruct ure. For one, t hey are split graphs , as t he vert ex set can be part it ioned int o an independent

set (t he good nodes) and a clique (t he bad nodes). T he graphs also belong t o anot her subclass of chordal graphs: int erval graphs. Vert ex i can be seen t o correspond t o an int erval on t he real line wit h a st art ing point at i . If t he node becomes a bad node, t hen t he int erval reaches far t o t he right wit h an endpoint at n . If it becomes a good node, t hen t he right endpoint is set at

206

Magn us M. Halldorsson et al.

i + 1= 2. It follows t hat t he problem of scheduling int ervals online for maximizing t hroughput is hard, unless some informat ion about t he int ervals’ endpoint s are given. T his cont rast s wit h t he case of scheduling wit h respect t o makespan, which corresponds t o online coloring int erval graphs, for which a 3-compet it ive algorit hm is known [6]. Also, observe t hat t he lat t er lower bound (as well as t he const ruct ion in t he following sect ion) is oblivious (in t hat it does not depend on t he act ions of t he algorit hm), and hold equally well against randomized algorit hms.

3

In h e rit a n c e M o d e l

T he model we shall int roduce in t his sect ion is much more flexible t han t he previous one. At each st ep, an algorit hm can copy up t o r ( n ) bins and put t he current vert ex int o t hose copies or a new empty bin. (We rest rict t he number of copies t o r ( n ) − 1 when an online algorit hm uses an empty bin, because it is nat ural t o rest rict t he number of bins each vert ex can be put int o t o r ( n ) considering t he consist ency wit h mult i-solut ions model.) Not e t hat t his model is at least as powerful as t he mult i-solut ions model wit h t he same r ( n ). T he upper bound follows from T heorem 1. C o r o l l a r y 4 . T here is an on lin e algor it hm w it h com pet it ive rat io at m ost O ( n = log r ( n )) in in her it an ce m odel.

3 .1

A Low er B ou n d

As ment ioned before, a lower bound argument is a challenging one. Before showing our result , we discuss some nat ural ideas and see why t hose argument s only give us poor bounds. D is c u s s io n 1 Consider t he t ran sparen t adversary st rat egy of t he proof of T heorem 3. T here is an online algorit hm t hat against t his adversary always out put s an opt imal solut ion for split graphs. T he algorit hm uses only two bins at each st ep. At t he rst st ep, it maint ains t he empty bin and t he bin t hat cont ains v 1 . At t he i t h st ep ( i  2), t he algorit hm knows t hat t he vert ex v i − 1 is good or bad by observing whet her t here is an edge ( v i − 1 ; v i ) or not . If v i − 1 is good, t he algorit hm copies t he bin cont aining v i − 1 , adds v i t o t he copy, and forget s about t he bin not cont aining v i − 1 . Ot herwise, if v i − 1 is bad, exchange t he operat ions for t he two bins. Observe t hat t his algorit hm out put s a solut ion consist ing of all good vert ices. What t hen is t he di erence between our new model and t he old one? Not e t hat , in t he inherit ance model, an algorit hm can copy bins it current ly holds. To simulat e t his operat ion in t he mult i-solut ions model, an algorit hm has t o const ruct in advance two bins whose cont ent s are t he same. Since t he above algorit hm in t he inherit ance model copies at each st ep, an algorit hm in t he mult i-solut ion model must prepare exponent ial number of bins in t he worst case

Online Indep endent Set s

207

t o simulat e it . Hence, for t he current adversary, t he inherit ance model is exponent ially more powerful t han t he mult i-solut ions model. T hus, t o argue a lower bound in t he inherit ance model, we need a more powerful adversary. D is c u s s io n 2 In t he discussion of t he previous sect ion, what support ed t he online algorit hm in t he new model is t he informat ion t hat t he vert ex is good or bad given im m ediat ely aft er t he algorit hm processed t hat vert ex. Hence t he algorit hm knows whet her it is good or bad at t he next st ep. We now consider t he possibility of post poning t his decision of t he adversary. Divide t he vert ex sequence int o rounds. At t he end of each round, t he adversary det ermines t he st at es of vert ices it gave in t hat round. A vert ex t hen act s as a good vert ex while it s st at e is undet ermined. Unt il t he end of t he round, it is impossible for an online algorit hm t o make a decision depending on st at es of vert ices given in t hat round. If, at t he end of a round, an online algorit hm maint ains a bin t hat cont ains many vert ices of t hat round, we \ kill" t hat bin by making one of t hose vert ices bad. T his can be easily done by set t ing an appropriat e probability t hat a vert ex becomes bad. p T his approach st ill allows for an algorit hm wit h a compet it ive rat io of n . T he algorit hm maint ains an independent set I cont aining one vert ex from each round t hat cont ains a good vert ex. It also put s all t he vert ices of each round i int o an independent set I i . It is easy t o see t hat t he largest of I and t he I i ’s is p of size at least o p t , when t he opt imal solut ion cont ains o p t vert ices.

T he reason why t he above argument did not give a sat isfact ory lower bound is t hat t he adversary st rat egy was st ill weak: Once a decision is made, t he algorit hm knows t hat a good vert ex will never become bad. Here, we consider an adversary t hat makes a probabilist ic decision more t han once (approximat ely log n t imes) t o each vert ex. A B et t er Low er B ou n d

T h e o r e m 5 . A n y on lin e I S algor it hm has a com pet it ive rat io at least

n e k + 1 ( lo g n

)3

in t he in her it an ce m odel w it h r ( n ) = n k w h ere e is t he base of t he n at u ral loga r it hm . P roof. We rst describe informally t he act ion of t he adversary. He present s = log2 n new vert ices in each round. Between rounds he makes a decision t o make vert ices bad, not only for vert ices given in t he previous round, but also for some ot her vert ices already given. T he goal of t he adversary is t o st unt t he growt h of bins cont aining many vert ices by making some of t hem bad. At t he same t ime, it needs t o ensure t hat t he fract ion of vert ices t hat are good in t he end is large. T he adversary repeat s t he following st eps n = l 0 t imes:

l0

( 1 ) T he adversary present s a block of l 0 new vert ices. All t hose vert ices are good and each of t hem has edges t o all bad vert ices previously given. ( 2 ) As long as t here are two blocks b 1 ; b 2 of t he same size, replace t hem by t he union of t he two. At t he same t ime, each vert ex of t he combined block is changed int o a bad vert ex in depen den t ly wit h probability lok +g 1n .

208

Magn us M. Halldorsson et al.

Let t = log( n = l 0 ). Not e t hat each block is of size 2i l 0 , 0  i < t , and t he number of blocks is at most t + 1. Each t ime blocks are merged, t he adversary is said t o at t ack t he respect ive vert ices by probabilist ically changing t hem t o bad. T he probability of a vert ex surviving an at t ack is 1− lok +g 1n . Each vert ex receives at most t at t acks. Hence, t he probability t hat a vert ex is good at t he end of t he game is at least (1 − lok +g 1n ) t  1 . T he expect ed number of good vert ices, which is t he measure of t he opt imal ek+ 1 solut ion, is t hen at least n = e k + 1 . We now evaluat e t he performance of t he online algorit hm. It t hen appears t hat a smaller l 0 is harder for t he algorit hm t o keep large bins. Unfort unat ely, a smaller l 0 also makes proofs harder. T he following set t ing, l 0 = (log n ) 2 , is somewhat conservat ive: L e m m a 6 . S u ppose t hat l 0 = (log n ) 2 . T hen an y on lin e I S algor it hm in t he in her it an ce m odel w it h r ( n ) = n k can n ot produ ce in depen den t set s w hose size is (log n ) 3 or m ore in t he w or st case.

P roof. We maint ain t he following invariant ( ):

T here is no bin B cont aining only good vert ices t hat has ( ) more t han (log n ) 2 vert ices from a single block. When t he rst l 0 = (log n ) 2 vert ices are given, ( ) is obviously t rue. Suppose now t hat ( ) is t rue at some moment . It t hen also remains t rue when t he adversary int roduces in st ep (1) a new block of l 0 vert ices. Consider now t he case when two blocks b 1 and b 2 are merged. Let S be t he set of good vert ices in b 1 [ b 2 cont ained in a part icular bin B . If j S j  l 0 t he invariance remains t rue, so suppose ot herwise. Recall t hat t he adversary at t acks each vert ex in S wit h probability lok +g 1n . T herefore, t he probability t hat all vert ices in S survive t he at t acks is at most + 1 ( lo g n ) 2 ) = log n

k

(1 −

1 n ( k + 1 ) lo g

e

:

T he probability t hat t here is some bin t hat cont ains more t han [ b 2 is at most

l0

vert ices from

b1

n

k

+ 1

n ( k + 1 ) lo g

e

=

n

( k + 1 ) ( 1 − lo g e )


t ioned int o t hree subset s T 20 ; T 21 ; T 22 , as follows:

0, subset T 2 is part i-

( )− 1 [

d ef T 20 =

f (x ; y )j aj + 1 < x 

aj ; 1 − aj < y 

1g

=0

j

[ f (x ; y )j

1 3

< x 

a

( );

1− a

( )

< y 

1g

( )− 1 [

1 d ef

f (x ; y )j aj + 1 < x 

T2 =

j

1 2

< y 

1 − aj g

=0

[ f (x ; y )j d ef T 22 =

aj ;

1 3

< x 

f (x ; y ) 2 T 2 j

1 3

a

< y 

( );

1 2

< y 

1− a

( )g

1 g: 2

T he overall part it ioning of T int o 9 subset s is also illust rat ed in F igure 1 (a). Not e t hat , for example, if t he given it em is ( 49 ; 140 ) t hen it belongs t o subset T 22 since 31 < 94  21 and 31 < 140  21 . As for t he minimum size of it ems in each subset , we have t he following two lemmas (proofs are omit t ed here). Le m m a 1 . I f i > log2

2 9



− 1 then

1 3



(1 − a i ) >

2 9

Le m m a 2 . 1 ) T h e s i z e o f i t e m s i n T 0 i s grea t e r t h a n T 1 i s grea t e r t h a n

1 ; 4

− 4 ; 9

2

.

2 ) t h e size o f it e m s in 2

a n d 3 ) t h e s i z e o f i t e m s i n T 20 i s grea t e r t h a n 9



2

.

T wo-Dimensional On-Line Bin P acking P roblem wit h Rot at able It ems

2 .3

213

S t rip s

In t he proposed algorit hms, each bin is split int o small s t r i p s , and a given it em is packed int o a st rip of an appropriat e size. Before describing t he ways of split t ing of each bin int o st rips, let us consider t he following in nit e set X of reals: X

d ef

=

f

1 i

j i = 3; 4; 5; 7; 9; 11; 13 and j = 0; 1; 2; : : : g:

 2j

By using X , two (in nit e) set s of reals, X lo n g and X m e d , are dened as follows: X X

d ef lo n g

d ef m ed



1 2

= X [ = X [



(3)





a1 ; a2 ; : : : ; a

( )

(4)

where a i = 31 + 6  2 i 1− 1 + 3 for i  1. In what follows, given 0 < x  1, let x~ denot e t he smallest element in X lo n g t hat is great er t han or equal t o x , and let x^ denot e t he smallest element in X m e d t hat is great er t han or equal t o x . Not e t hat for any x < 31 , x =x~ (= x =x^ ) > 43 . T hree types of st rips used in t he proposed algorit hms are de ned as follows. D e n it io n 3 ( S t rip s) . A subregion of a bin is said t o be a lo n g st rip if it has a xed widt h 1 and a height t hat is drawn from set X lo n g . A subregion of a bin is said t o be a sh o rt st rip if it has a xed widt h 21 and a height t hat is drawn from set X lo n g . A subregion of a bin is said t o be a m e d iu m st rip if 1) it has a xed widt h (resp. height ) 23 and a height (resp. widt h) t hat is drawn from set X , or 2) it has a widt h (resp. height ) 1 − a i and a height (resp. widt h) a i , for some 1  i   (  ).

3 3 .1

T h e F irs t A lg o rit h m A lg o rit h m D e scrip t io n

In t his sect ion we describe our rst on-line algorit hm. T he a lgorit hm is described in an event -driven manner; i.e., it describes t he way of packing an input it em ( x ; y ) int o an act ive bin of an appropriat e size. A lg o rit h m A 1 If ( x ; y ) 2 T 0 [ T 1 , t hen o pe n a new bin, put t he it em int o t he bin, and c lo s e t he bin; ot herwise (i.e., if ( x ; y ) 2 T 2 [ T 3 ) execut e t he following operat ions: C ase 1 : if ( x ; y ) 2 T 20 [ T 30 , t hen obt ain an unused long st rip of height x~ (as an act ive st rip) by calling get long st rip( x ), put t he it em int o t he ret urned st rip, and c lo s e t he st rip. C ase 2 : if ( x ; y ) 2 T 21 [ T 31 , t hen obt ain an unused medium st rip of height x^ (as an act ive st rip) by calling get medium st rip( x ), put t he it em int o t he ret urned st rip, and c lo s e t he st rip. C ase 3 : if ( x ; y ) 2 T 22 [ T 32 , t hen obt ain an unused short st rip of height x~ (as an act ive st rip) by calling get short st rip( x ), put t he it em int o t he ret urned st rip, and c lo s e t he st rip.

214

Sat oshi Fujit a and Takeshi Hada

C ase 4 : if ( x ; y ) 2 T 33 , t hen put t he it em int o an act ive long st rip of height x~ if such a st rip wit h enough space is available. If t here exist no such st rips, aft er c lo s i n g a l l act ive long st rips of height x~, obt ain an unused long st rip of height x~ by calling get long st rip( x ), and put t he it em int o t he ret urned st rip. Not e t hat t he st rip is n o t c lo s ed at t his t ime.

F igure 1 (b) illust rat es t he correspondence of it ems wit h st rips, in algorit hm A 1 . T he performance of t he algorit hm, in t erms of t he occupat ion rat io of each closed st rip, is est imat ed as follows (proofs of Lemmas 4 and 5 are omit t ed). Le m m a 3 ( Lo n g st rip s) . A n y c lo s ed lo n g s t r i p o f s i z e S i s occ u p i ed by i t e m s 4 1 w i t h t o t a l s i z e a t lea s t ( 9 +  ) S i f t h e h e i gh t o f t h e s t r i p i s 2 , a n d w i t h s i z e a t

m o s t S2 , i f t h e h e i gh t i s le s s t h a n 21 .

By Lemma 2, a closed long st rip of height 12 is lled wit h it ems of size at least − 2 ; i.e., t he occupat ion rat io of t he bin is at least 49 −  . On t he ot her hand, by t he same lemma, it is shown t hat a closed long st rip of height 1i , for i  3, is lled wit h it ems of t ot al size more t han 23  i +1 1 , t hat is at least 12 . Hence t he lemma follows. P roo f .

2 9

Le m m a 4 ( S h o rt st rip s) . A n y c lo s ed s h o r t s t r i p o f s i z e S i s occ u p i ed by a n 4

1

i t e m w i t h s i z e a t lea s t 9 S i f t h e h e i gh t o f t h e s t r i p i s 2 , a n d w i t h s i z e a t m o s t S 1 , i f t h e h e i gh t i s le s s t h a n 2 . 2

Le m m a 5 ( M e d iu m st rip ) . 1 ) A m ed i u m s t r i p w i t h h e i gh t a i f o r 1  i   (  ) , i s l led w i t h a n i t e m w i t h s i z e m o re t h a n 16 (= 31  21 ) ; a n d 2 ) a m ed i u m 1 s t r i p w i t h h e i gh t i , f o r s o m e i  3, i s l led w i t h a n i t e m w i t h s i z e m o re t h a n 1 1 1 (= i + 1  2 ) . 2( i + 1) 3 .2

H ow t o S p lit a B in int o S t rip s ?

Next , we consider t he ways of split t ing (unused) bins int o st rips. In t he following, we give a formal descript ion of t hree procedures, get long st rip, get medium st rip, and get short st rip, t hat have been used in t he proposed algorit hm. p ro ce d u re get long st rip( x )

1. Recall t hat x~ denot es t he smallest element in X lo n g t hat is great er t han or equal t o x . If t here is no unused long st rip wit h height x~2j ( < 1) for any j  0, t hen execut e t he following operat ions: 0 0 0 (a) Let j 0 be an int eger such t hat x~2j < 1  x~2j + 1 . Not e t hat x~2j = 1 1 1 1 1 1 ; ; ; ; ; , or 113 . 2 3 5 7 9 11 (b) Open an unused bin, and part it ion it int o x~ 21j 0 long st rips wit h height 0 x~2j each. 2. Select one of t he \ lowest " st rips, say Q , wit h height x~2j ( < 1) for some j  0. 00 Let x~2j be t he height of st rip Q .

T wo-Dimensional On-Line Bin P acking P roblem wit h Rot at able It ems

215

3. If j 00 = 0 (i.e., if t he height of Q is x~) t hen ret urn Q as an act ive st rip; 00 00 ot herwise, part it ion Q int o j 00 + 1 st rips of height s x~2j − 1 ; x~2j − 2 , : : : ; x~; x~, respect ively, and ret urn a st rip of height x~ as an act ive one. p ro ce d u re get short st rip( x )

1. If t here is an unused short st rip of height x~, t hen ret urn it as an act ive one. 2. Ot herwise, obt ain an unused long st rip wit h height x~ by calling procedure get long st rip( x ), part it ion t he obt ained one int o two unused short st rips wit h height x~ each, and ret urn one of t hem as an act ive one. p ro ce d u re get medium st rip( x )

1. Recall t hat x^ denot es t he smallest element in X m e d t hat is great er t han or equal t o x . If t here is an unused h o r i z o n t a l medium st rip wit h height x^ (or, v e r t i ca l medium st rip wit h widt h x^ ), t hen ret urn it as an act ive one. 2. Ot herwise, if x^ > 31 , t hen open an unused bin, part it ion it int o two horizont al medium st rips of height x^ and two vert ical medium st rips of widt h x^ as in F igure 2 (a), and ret urn one of t he four st rips as an act ive one. 3. Ot herwise, i.e., if x^  13 , execut e t he following operat ions: (a) If t here is no unused medium st rip wit h height x^ 2j ( < 1) for any j  0, t hen open an unused bin, part it ion it int o x^ 21j 0 horizont al medium st rips 0 0 of height x^ 2j and b 3 x^12 j 0 c vert ical medium st rips of widt h x^ 2j as in 0 0 F igure 2 (b), where j 0 is an int eger such t hat x^ 2j < 1  x^ 2j + 1 . (b) Select one of t he \ lowest " medium st rips, say Q , wit h height x^ 2j ( < 1) 00 for some j  0. Let x^ 2j be t he height of st rip Q . (c) If j 00 = 0 (i.e., if t he height of Q is x^ ) t hen ret urn Q as an act ive 00 00 st rip; ot herwise, part it ion Q int o j 00 + 1 st rips of height s x^ 2j − 1 ; x^ 2j − 2 , : : : ; x^ ; x^ , respect ively, and ret urn a st rip of height x^ as an act ive one. By Lemma 5 and get medium st rip, we immediat ely have t he following lemma. Le m m a 6 . A n y c lo s ed bi n t h a t i s s p li t i n t o m ed i u m s t r i p s i s

l led w i t h i t e m s

1

w i t h t o t a l s i z e a t lea s t 2 .

3 .3

A n aly sis

T h e o re m 1 . R A1 1 

2: 6112 +  f o r a n y  >

0.

P roo f . Let L be a sequence of n it ems, consist ing of n 0 it ems in T 0 , n 1 it ems in T 1 , where n 0 + n 1  n . Not e t hat algorit hm A 1 requires b0 (= n 0 ) bins for it ems in T 0 and b1 (= n 1 ) bins for it ems in T 1 . Suppose t hat it also uses b2 (  0) bins split int o long st rips of height 1=2, and b3 (  0) bins split int o medium st rips of height more t han 1=3. Let S be t he t ot al size of it ems in L , and S 4 t he t ot al size of it ems t hat are not packed int o t he above n 0 + n 1 + b2 + b3 bins; i.e., it ems of height at most 1=3. If  is a const ant , algorit hm A 1 uses at most n 0 + n 1 + b2 + b3 + 2S 4 + O (1) bins and O P T requires at least maxf n 0 + maxf n 1 ; b2 g; S g bins. Hence R A1 1 

216

Sat oshi Fujit a and Takeshi Hada

f n 0 + n 1 + b2 + b3 + 2S 4 g=f maxf n 0 + max f n 1 ; b2 g; S gg. Since S 4  ( 49 −  ) b2 − 32 b3 − n41 by Lemmas 3, 4, and 6, we have

S −

4 n 9 0



2S + 19 n 0 + 21 n 1 + ( 91 +  0) b2 − 13 b3 : max f n 0 + maxf n 1 ; b2 g; S g

R A1 1 

When n 0 + maxf n 1 ; b2 g < S , R A1 1  2 + ( S1 ) f 19 n 0 + ( 19 +  0) b2 + 21 n 1 g. If n 1  b2 , R A1 1  2 + (1=S ) f 91 n 0 + ( 11 81 +  0) b2 g  2 + 11 18 +  0, and if n 1 > b2 , R A1 1  2 + (1=S ) f 91 n 0 + ( 11 81 +  0) n 1 g  2 + 11 18 +  0. On t he ot her hand, when n 0 + max f n 1 ; b2 g  S , it is at most R A1 1  2 + f 91 n 0 + ( 19 +  0) b2 + 21 n 1 g=f n 0 + max f n 1 ; b2 gg. If n 1  b2 , R A1 1  2 + f 91 n 0 + ( 11 81 +  0) b2 g=( n 0 + b2 )  2 + 11 18 +  0, and if n 1 > b2 , R A1 1  2 + f 91 n 0 + ( 11 81 +  0) n 1 g=( n 0 + n 1 )  2 + 11 18 +  0. Hence t he t heorem follows. T h e o re m 2 . R A1 1  P roo f .

2: 5624.

Consider t he following eight it ems

A : ( 21 + ; E : ( 113 + ;

1 2

1 2

+  ) B : ( 13 + ; +  ) F : ( 111 + ;

2 3

−  ) C : ( 13 + ; +  ) G : ( 111 + ;

1 11

1 3

+  ) D : ( 111 + ; +  ) H : ( 113 + ;

1 13

1 +  2 1 + 13

)  )

where  is a su cient ly small const ant such t hat it em B is in T 20 . Let L be a sequence of it ems consist ing of n copies of it ems A ; C ; F ; H , and 2n copies of it ems B ; D ; E ; G . Not e t hat since 111 + 113 = 12443 = 16 − 8 51 3 , by select ing  t o be su cient ly small, we can pack one copy of A ; C ; F ; H and two copies of B ; D ; E ; G , as in F igure 3. Hence O P T ( L ) = n . On t he ot her hand, in algorit hm A 1 , 1) n copies of it em A require n bins; 2) 2n copies of it em B require n bins, since B is classied int o T 20 ; 3) n copies of it em C require n4 bins, since C is classied int o T 21 ; 4) 2n copies of it em D require 21n3 bins; 5) 2n copies of it em E require 21n6 bins; 6) n copies of it em F require 1 n0 0 bins; 7) 2n copies of it em G require 122n0 bins; and 8) n copies of it em H require 1 n4 4 bins. Hence, in t ot al, it requires at least n + n +

n

4

+

2n 2n n 2n n + + + + > 2: 5624n 13 16 100 120 144

bins. Hence t he t heorem follows.

4

T h e S e c o n d A lg o rit h m

In t his sect ion, we propose an ext ension of t he rst algorit h m. T he basic idea behind t he ext ension is t o pack an it em in T 1 and it em(s) in T 3 in t he same bin, as much as possible. Recall t hat under t he \ on-line" set t ing, we cannot use any knowledge about t he input sequence L in t he algorit hm.

T wo-Dimensional On-Line Bin P acking P roblem wit h Rot at able It ems

4 .1

217

A lg o rit h m D e scrip t io n

In our second algorit hm, called Algorit hm A 2 , when an it em in T 1 is packed int o a new bin, t he bin is split int o two subregions; a square region of size 23  32 t hat will be lled wit h t he it em in T 1 , and t he remaining \ L-shaped" region t hat is reserved for possible usage by it ems in T 3 (not e t hat t he reserved L-shaped region will never be used, in t he worst case). On t he ot her hand, when an it em in T 3 is packed int o a new bin, under a cert ain condit ion described below, t he bin is part it ioned int o two subregions, and t he square region of size 32  32 is reserved for possible usage by it ems in T 1 (not e again t hat t he reserved square region will never be used, in t he worst case). In order t o balance t he advant age and disadvant age of t he above scenario, we part it ion 20% of bins devot ed t o it ems in T 3 for t he above use; t he remaining 80% of bins are used in t he same manner t o Algorit hm A 1 . A formal descript ion of t he algorit hm is given as follows. A lg o rit h m A 2 C ase 1 : If ( x ; y ) 2 T 0 [ T 2 , t hen it act s as in Algorit hm A 1 . C ase 2 : If ( x ; y ) 2 T 1 , t hen put t he it em int o an act ive bin if t here is an act ive bin t hat has been split int o two subregions, and t he small square region has not accommodat ed any it em; if t here is no such bin, t hen open a new bin, split it int o two subregions, and pack t he it em int o t he small square region. C ase 3 : If ( x ; y ) 2 T 3 , t hen it obt ains a st rip of height x~ (= x^ ) by calling procedures described in Sect ion 3.2 wit h a minor modicat io n such t hat an unused L-shaped region is a possible candidat e for t he split t ing int o st rips, and pack t he it em int o a st rip t o sat isfy t he following condit ions: 80% of bins dedicat ed t o it ems in T 3 are lled wit h closed st rips; and 20% of such bins are lled wit h st rips in such a way t hat t here remains an avail able square region of size 32  32 . 4 .2

A n aly sis

T h e o re m 3 . R A1 2 

2: 565 +  f o r a n y  >

0.

Let L be a sequence of n it ems. In t his proof, we use t he same symbols as in t he proof of T heorem 1; e.g., n 0 and n 1 denot e t he numbers of it ems in T 0 and T 1 , respect ively. Recall t hat algorit hm A 1 uses at most n 0 + n 1 + b2 + b3 + 2S 4 + O (1) bins and an opt imal algorit hm O P T requires at least max f n 0 + maxf n 1 ; b2 g; S g bins. If n 1  S24 , t hen since all it ems in T 1 are packed int o bins t hat is split int o small square region and an L-shaped region, t he \ average" occupat ion rat io of every closed bin can be increased from at least 14 t o at least 94 (not e t hat t he average occupat ion rat io of bins wit h st rips of height at most 13 , on t he ot her hand, reduces from 12 t o 52 ); i.e., t he worst case rat io is bounded by 25 = 2: 5. Hence, in t he following, we assume t hat n 1 > S24 . If n 1 > S24 , we can imaginally suppose t hat t he number of bins split int o st rips of height at most 13 each reduces from 2S 4 t o S 4 for some const ant < 2, by P roo f .

218

Sat oshi Fujit a and Takeshi Hada

using t he split t ing met hod illust rat ed in F igure 5. If t he number of (imaginal) bins used by it ems in T 3 is S 4 , t hen by using a similar argument t o T heorem 1, we have 11 1 2+ RA 2  36 (not e t hat if = 2, we have t he same bound wit h T heorem 1). T he number of (imaginal) bins reduces from 2S 4 t o at most 21 43 if all it ems are packed int o st rips of height 13 ; at most 31 07 ( < 12 34 ) if all it ems are packed int o st rips of height 14 ; and at most 24 65 ( < 21 43 ) if all it ems are packed int o st rips of height at most 51 . Hence we have  21 43 for any sequence L ; i.e., R A1 2 

2+

11  36

24 22 = 2+  13 39

2: 565:

Hence t he t heorem follows. F inally, by using a similar t echnique t o T heorem 2 we have t he following t heorem (we may simply consider a sequence consist ing of it ems A ; B and C ). T h e o re m 4 . R A1 2 

5

2: 25.

C o n c lu d in g R e m a rk s

In t his paper, we proposed two on-line algorit hms for solving t he two-dimensional bin packing problem wit h rot at able rect angular it ems. T he proposal of a nont rivial lower bound is an import ant open problem t o be solved (current ly best lower bounds on t he worst case rat io of an opt imal algorit hm for \ rot at able" set t ing are t he same as t he one-dimensional case; i.e., it is at least 1: 5401 for unbounded algorit hms [7], and at least 1: 69103 for bounded algorit hms [5]). An ext ension t o higher dimensional cases (e.g., t hree-dimensional box packing) would also be promising. A ckn ow le d g m e nt s: T his research was part ially support ed by t he Minist ry of Educat ion, Science and Cult ure of J apan, and Research for t he Fut ure P rogram from J apan Society for t he P romot ion of Science (J SP S): Software for Dist ribut ed and P arallel Supercomput ing (J SP S-RF T F 96P 00505).

R e fe re n c e s 1. D. Blit z, A. van Vliet , and G. J . Woeginger. Lower b ounds on t he asympt ot ic worst -case rat io of on-line bin packing algorit hms. unpublished manuscript , 1996. 2. D. Copp ersmit h and P. Raghavan. Mult idimensional on-line bin packing: Algorit hms and worst case analysis. O per . Res. L et t . , 8:17{20, 1989. 3. J . Csirik and A. van Vliet . An on-line algorit hm for mult idimensional bin packing. O per . Res. L et t . , 13:149{158, 1993. 4. M. R. Garey and D. S. J ohnson. C om put er s an d I n t r act abi li t y: A G ui de for t he T heor y of N P -C om plet en ess. 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 T3

y

T2

T1

T0

T3

y

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

0

1/3

1/2

2/3

0

1

1/3

1/2

2/3

1 x

x

(a) Boundaries for the classification of (b) Correspondence of items with strips. items by the values of x- and y-coordinates.

Fig. 1. Classification of items.

(a)

(b)

Fig. 2. Partition of a bin into medium strips. 1/3+δ F B

C

1/3+δ

D

1/11+δ 1/13+δ

G H B

1/2+δ

E A 1/2+δ 1/13+δ 1/11+δ

Fig. 3. A bad instance to give a lower bound.

220

Sat oshi Fujit a and Takeshi Hada

5. C. C. Lee and D. T . Lee. A simple on-line bin packing algorit hm. J . A ssoc. C om put . M ach. , 32:562{572, 1985. 6. M. B. Richey. Improved b ounds for harmonic-based bin packing algorit hms. D i scr et e A ppl. M at h. , 34:203{227, 1991. 7. A. van Vliet . An improved lower b ound for on-line bin packing algorit hms. I n for m at i on P r ocessi n g L et t er s, 43:277{284, 1992.

B e t t e r B o u n d s o n t h e A c c o m m o d a t in g R a t io fo r t h e S e a t R e s e rv a t io n P ro b le m ( E x t e n d e d A b s t ra c t ) Eric Bach 1 ? , J oan Boyar 2 ? ? , Tao J iang3 ; 4 ? ? ? , Kim S. Larsen 2 ? ? , and Guo-Hui Lin 4 ; 5 y 1

Comput er Sciences Depart ment , University of W isconsin { Madison, 1210 West Dayt on St reet , Madison, W I 53706-1685. bach@cs. wi sc. edu 2

3

Depart ment of Mat hemat ics and Comput er Science, University of Sout hern Denmark, Odense, Denmark. f j oan, ksl ar seng@i mada. sdu. dk Depart ment of Comput er Science, University of California, Riverside, CA 92521. j i ang@cs. ucr . edu

4

Depart ment of Comput ing and Software, McMast er University, Hamilt on, Ont ario L8S 4L7, Canada. 5 Depart ment of Comput er Science, University of Wat erloo, Wat erloo, Ont ario N2L 3G1, Canada. ghl i n@mat h. uwat er l oo. ca

A b st r a c t . In a recent pap er [J . Boyar and K.S. Larsen, T he seat reservat ion problem, A lgor i t hm i ca , 25(1999), 403{417], t he seat reser vat i on problem was invest igat ed. It was shown t hat for t he un i t pr i ce problem , where all t icket s have t he same price, all \ fair" algorit hms are at least 1= 2-accommodat ing, while no fair algorit hm is more t han (4= 5+ O (1= k ))accommodat ing, where k is t he numb er of st at ions t he t rain t ravels. In t his pap er, we design a more dext rous adversary argument , such t hat we improve t he upp er b ound on t he accommodat ing rat io t o (7= 9+ O (1= k )), even for fair randomized algorit hms against oblivious adversaries. For det erminist ic algorit hms, t he upp er b ound is lowered t o approximat ely .7699. It is shown t hat b et t er upp er b ounds exist for t he sp ecial cases wit h n = 2, 3, and 4 seat s. A concret e on-line det erminist ic algorit hm F i r s t - F i t and an on-line randomized algorit hm R a n d o m are also examined for t he sp ecial case n = 2, where t hey are shown t o b e asympt ot ically opt imal. ? ? ?

?

?

?



Supp ort ed in part by NSF Grant CCR-9510244. P art of t his work was carried out while t he aut hor was visit ing t he Depart ment of Comput er Sciences, University of W isconsin { Madison. Supp ort ed in part by SNF (Denmark), in part by NSF (U.S.) grant CCR-9510244, and in part by t he e s p r i t Long Term Research P rogramme of t he EU under project numb er 20244 ( a l c o m - it ). Supp ort ed in part by NSERC Research Grant OGP 0046613, a CIT O grant , and a UCR st art up grant . Supp ort ed in part by NSERC Research Grant OGP 0046613 and a CIT O grant .

D . -Z . D u e t a l. ( E d s. ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 2 2 1 { 2 3 1 , 2 0 0 0 .

c S p r in g e r -Ve r la g B e r lin H e id e lb e r g 2 0 0 0

222

Eric Bach et al. T he seat reservat ion problem, on-line algorit hms, accommodat ing rat io, adversary argument . K e y w o r d s:

1

In t ro d u c t io n

In many t rain t ransport at ion syst ems, passengers are required t o buy seat reservat ions wit h t heir t rain t icket s. T he t icket ing syst em must assign a passenger a single seat when t hat passenger purchases a t icket , wit hout knowing what fut ure request s t here will be for seat s. T herefore, t he seat reservat ion problem is an on-line problem, and a compet it ive analysis is appropriat e. Assume t hat a t rain wit h n seat s t ravels from a st art st at ion t o an end st at ion, st opping at k  2 st at ions, including t he rst and t he last . T he st art st at ion is st at ion 1 and t he end st at ion is st at ion k . T he seat s are numbered from 1 t o n . Reservat ions can be made for any t rip from a st at ion s t o a st at ion t as long as 1  s < t  k . Each passenger is given a single seat number when t he t icket is purchased, which can be any t ime before depart ure. T he algorit hms (t icket agent s) may not refuse a passenger if it is possible t o accommodat e him when he at t empt s t o make his reservat ion. T hat is, if t here is any seat which is empty for t he ent ire durat ion of t hat passenger’s t rip, t he passenger must be assigned a seat . An on-line algorit hm of t his kind is fa ir . T he algorit hms at t empt t o maximize income, i.e., t he sum of t he prices of t he t icket s sold. Nat urally, t he performance of an on-line algorit hm will depend on t he pricing policies for t he t rain t icket s. In [6] two pricing policies are considered: one in which all t icket s have t he same price, t he u n it p r ice p ro ble m ; and one in which t he price of a t icket is proport ional t o t he dist ance t raveled, t he p ro po r t io n a l p r ice p ro ble m . T his paper focuses on fair algorit hms for t he unit price problem. T he seat reservat ion problem is closely relat ed t o t he problem of opt ical rout ing wit h a number of wavelengt hs [1,5,9,14], call cont rol [2], int erval graph coloring [12] and int erval scheduling [13]. T he o -line version of t he seat reservat ion problem can be used t o solve t he following problems [8]: minimizing spill in local regist er allocat ion, job scheduling wit h st art and end t imes, and rout ing of two point net s in VLSI design. Anot her applicat ion of t he on-line version of t he problem could be assigning vacat ion bungalows (ment ioned in [15]). T he performance of an on-line algorit hm A is usually analyzed by comparing wit h an opt imal o -line algorit hm. For a sequence of request s, I , de ne t he co m pe t it iv e ra t io o f a lgo r it h m A a p p lied t o I t o be t he income of algorit hm A over t he opt imal income (achieved by t he opt imal o -line algorit hm). T he co m pe t it iv e ra t io o f a lgo r it h m A is t he in mum over all possible sequences of request s. T he de nit ion of t he a cco m m od a t in g ra t io o f a lgo r it h m A [6,7] is similar t o t hat of t he compet it ive rat io, except t hat t he only sequences of request s allowed are sequences for which t he opt imal o -line algorit hm could accommodat e all request s t herein. T his rest rict ion is used t o reflect t he assumpt ion t hat t he decision as t o how many cars t he t rain should have is based on expect ed t icket demand. Not e t hat since t he input sequences are rest rict ed and t his is a maximizat ion

Bet t er Bounds on t he Accommodat ing Rat io

223

problem, t he accommodat ing rat io is always at least as large as t he compet it ive rat io. Formally, t he accommodat ing rat io is de ned as follows: D e n i t i o n 1 . L e t earn A ( I ) d e n o t e h o w m u c h a fa ir o n - lin e a lgo r it h m A ea r n s w it h t h e requ e s t s equ e n ce I , a n d le t value( I ) d e n o t e h o w m u c h co u ld be ea r n ed if a ll requ e s t s in t h e s equ e n ce I w e re a cco m m od a t ed . A fa ir o n - lin e a lgo r it h m A is c -accommodat ing if, fo r a n y s equ e n ce o f requ e s t s w h ic h co u ld a ll h a v e bee n a cco m m od a t ed by t h e o p t im a l fa ir o - lin e a lgo r it h m , earn A ( I )  c  value( I ) − b , w h e re b is a co n s t a n t w h ic h d oe s n o t d e pe n d o n t h e in p u t s equ e n ce I . T h e accommodat ing rat io fo r A is t h e s u p re m u m o v e r a ll s u c h c .

Not e t hat in general t he const ant b is allowed t o depend on k . T his is because is a paramet er t o t he problem, and we quant ify rst over k . 1 .1

k

P re v io u s R e s u lt s

First , we not e t hat in t he case where t here are enough seat s t o accommodat e all request s, t he opt imal o -line algorit hm runs in polynomial t ime [10] since it is a mat t er of coloring an int erval graph wit h t he minimum number of colors. As int erval graphs are pe r fec t [11], t he size of t he largest clique is exact ly t he number of colors needed. Let ( k mod 3) denot e t he residue of k divided by 3, t hen we have t he following known result s: L e m m a 1 . [6] A n y fa ir ( d e t e r m in is t ic o r ra n d o m iz ed ) o n - lin e a lgo r it h m fo r t h e u n it p r ice p ro ble m is a t lea s t 1= 2- a cco m m od a t in g. L e m m a 2 . [6] N o fa ir ( d e t e r m in is t ic o r ra n d o m iz ed ) o n - lin e a lgo r it h m fo r t h e u n it p r ice p ro ble m ( k  6) is m o re t h a n f ( k ) - a cco m m od a t in g, w h e re f

( k ) = (8k − 8( k mod 3) − 9) = (10k − 10( k mod 3) − 15) :

Lemma 2 shows t hat no fair on-line algorit hm has an accommodat ing rat io much bet t er t han 4= 5. It is also proven in [6] t hat t he algorit hms F ir s t - F it and B e s t - F it are at most k = (2k − 6)-accommodat ing, which is asympt ot ically 1= 2. Let r A denot e t he asympt ot ic accommodat ing rat io of a fair on-line algorit hm A as k approaches in nity, t hen t he above two lemmas t ell t hat 1= 2  r A  4= 5. T he lower bound 1= 2 is also t he upper bound for F ir s t - F it and B e s t - F it . T his leaves an open problem whet her or not a bet t er algorit hm exist s [6]. 1 .2

O u r C o n t rib u t io n s

In t he next sect ion, we lower t he asympt ot ic upper bound on t he accommodat ing rat io from 4= 5 t o 7= 9, and lat er show t hat t his upper bound holds, even for fair randomized algorit hms against oblivious adversaries. For det erminist ic algorit hms, t he upper bound is furt her lowered t o approximat ely .7699. Furt hermore, it is shown t hat bet t er upper bounds exist for t he special cases wit h n = 2, 3, and 4 seat s. As a posit ive result , a concret e on-line det erminist ic algorit hm

224

Eric Bach et al.

is examined wit h regards t o t he unit price problem for t he special case n = 2. We show t hat F ir s t - F it is c k -accommodat ing, where c k approaches 3= 5 as k approaches in nity, and t hat it is asympt ot ically opt imal. We also examine an on-line randomized algorit hm R a n d o m for t he special case n = 2. We show t hat R a n d o m is 3= 4-accommodat ing and t hat is also asympt ot ically opt imal, in t he randomized sense. Due t o t he space const raint , we only provide t he proofs for some upper bound result s in t his ext ended abst ract . Det ailed proofs of all ot her result s can be found in t he full manuscript [3]. F ir s t - F it

2

A G e n e ra l U p p e r B o u n d

T he upper bound on t he accommodat ing rat io is lowered from 4= 5 t o 7= 9, and lat er t o approximat ely : 7699. T h e o r e m 1 . N o d e t e r m in is t ic fa ir o n - lin e a lgo r it h m fo r t h e u n it p r ice p ro ble m ( k  9) is m o re t h a n f ( k ) - a cco m m od a t in g, w h e re 8 > >
> :

(7k − 7( k mod 6) − 15) = (9k − 9( k mod 6) − when ( k (14k − 14( k mod 6) + 27) = (18k − 18( k mod when ( k

27) ; mod 6) = 0; 1; 2; 6) + 27) ; mod 6) = 3; 4; 5:

T he proof of t his t heorem is an adversary argument , which is a more dext rous design based on t he ideas in t he proof of Lemma 2 in [6]. Assume t hat n is divisible by 2. T he adversary begins wit h n = 2 request s for t he int ervals [3s + 1; 3s + 3] for s = 0; 1;   ; b( k − 3) = 3c. Any fair on-line algorit hm is able t o sat isfy t his set of bk = 3c  n = 2 request s. Suppose t hat aft er t hese request s are sat is ed, t here are q i seat s which cont ain bot h int erval [3i + 1; 3i + 3] and int erval [3i + 4; 3i + 6], i = 0; 1;   ; b( k − 6) = 3c. T hen t here are exact ly q i seat s which are empty from st at ion 3i + 2 t o st at ion 3i + 5. In t he following, rat her t han considering each q i at a t ime (as in [6]), we consider q 2 i ; q 2 i + 1 t oget her for i = 0; 1;   ; b( k − 9) = 6c. Let p i = q 2 i + q 2 i + 1 ( n ). We dist inguish between two cases: P roo f.

{ Case 1: p i  5n = 9; and { Case 2: p i > 5n = 9.

In t he rst case p i  5n = 9, t he adversary proceeds wit h n = 2 request s for t he int erval [6i + 2; 6i + 5] and n = 2 request s for t he int erval [6i + 5; 6i + 8]. For t hese n addit ional request s, t he on-line algorit hm can accommodat e exact ly p i of t hem. Figure 1(a) shows t his con gurat ion. T hus, for t hose 2n request s whose st art ing st at ion s 2 [6i + 1; 6i + 6], t he on-line algorit hm accommodat es n + p i of t hem. In t he second case p i > 5n = 9, t he adversary proceeds wit h n = 2 request s for t he int erval [6i + 3; 6i + 7], followed by n = 2 request s for int erval [6i + 2; 6i + 4] and n = 2 request s for t he int erval [6i + 6; 6i + 8]. For t hese 3n = 2 addit ional request s, t he on-line algorit hm can accommodat e exact ly 3n = 2 − p i of t hem. Figure 1(b)

Bet t er Bounds on t he Accommodat ing Rat io 1

2

3

4

5

6

7

8

(a) case 1:

9

p

i

1

r1



2

3

4

5

6

7

8

9

225

r1

r2

r2

r3

r3

r4

r4

r5

r5

r6

r6

r7

r7

r8

r8

5n = 9.

(b) case 2:

p

5n = 9.

>

i

F i g . 1 . Example con gurat ions for t he two cases.

shows t his con gurat ion. T hus, for t he 5n = 2 request s whose st art ing st at ion 2 [6i + 1; 6i + 6], t he on-line algorit hm accommodat es 5n = 2 − p i of t hem. In t his way, t he request s are part it ioned int o b( k − 3) = 6c + 1 groups; each of t he rst b( k − 3) = 6c groups consist s of eit her 2n or 5n = 2 request s and t he last group consist s of eit her n (if ( k mod 6) 2 f 0; 1; 2g) or n = 2 (if ( k mod 6) 2 f 3; 4; 5g) request s. For each of t he rst b( k − 3) = 6c groups, t he on-line algorit hm can accommodat e up t o a fract ion 7= 9 of t he request s t herein. T his leads t o t he t heorem. More precisely, let S denot e t he set of indices for which t he rst case happens, and let S denot e t he set of indices for which t he second case happens. When ( k mod 6) 2 f 0; 1; 2g, t he accommodat ing rat io of t his fair online algorit hm applied t o t his sequence of request s is s

P n

P

+ i

n

∈PS

(n +

+ i

p

i

)+

P

P i

∈S

2n +

∈S

i

∈S

( 5n

=

5n

=

2−

p

i

)

2

n



P

+ n

+ i

P

=

14n

i ∈S P

1+

∈S

=

9+

i

∈S

i

P

i

1+

i

2n +

14= 9+

P∈S

P

P

i

2+ i

35n

∈S

5n

∈S

=

=

18

2

35= 18

∈S

5= 2

∈S

1+ 14( ( k − 6− ( k m o d 6) ) = 6) = 9 1+ 2( ( k − 6− ( k m o d 6) ) = 6)

 =

7k − 7( k m o d 6) − 15 ; 9k − 9( k m o d 6) − 27

where t he last inequality holds because in general a = b = c = d < 1 and a < c imply t hat ( e + a x + c y ) = ( e + bx + d y )  ( e + a ( x + y )) = ( e + b ( x + y )). When ( k mod 6) 2 f 3; 4; 5g, t he rat io is P

P n =

2+ i

n =

∈PS

(n +

2+ i

∈S

p

i

)+

P

P

P i

∈S

2n + i

∈S

( 5n

=

5n

=

2− 2

p

i

)

n =



2+ n =

2+ i

P

=

1= 2+

∈S

=

9+

i ∈S P i

∈S

i

2n + i

P

14= 9+

1= 2+

P

P

i

2+ i

∈S

∈S

∈S

∈S

35n 5n

=

=

18

2

35= 18 5= 2

1= 2+ 14( ( k − ( k m o d 6) ) = 6) = 9 1= 2+ 2( ( k − ( k m o d 6) ) = 6)

 = T his complet es t he proof.

14n

i ∈S P

14k − 14( k m o d 6) + 27 : 18k − 18( k m o d 6) + 27

2

226

Eric Bach et al.

When k , t he number of st at ions, approaches in nity, t he f ( k ) in t he above t heorem converges t o 7= 9  : 7778. T herefore, for any fair on-line algorit hm A , we have 1= 2  r A  7= 9. T he following t heorem shows t hat r A is marginally smaller t han 7= 9. T h e o r e m 2 . A n y d e t e r m in is t ic fa ir o n - lin e a lgo r it h m A fo r t h e u np it p r ice p ro b 9) h a s it s a s y m p t o t ic a cco m m od a t in g ra t io 21  r A  7 − 3 2 2 < : 7699.

le m ( k

T his t heorem is proven using t he following modi cat ion t o t he proof of T heorem 1. Aft er algorit hm A accommodat es t he set of bk = 3c  p n = 2 request s, we p dist inguish between two cases: p i  5( 22 − 4) n = 6 and p i > 5( 22 − 4) n = 6. T he second case can be analyzed similarly t o Case 2 in t he proof ofpT heorem 1, yielding t hat algorit hm A accommodat es at most a fract ion (7 − 22) = 3 of t he subset of 5n = 2 request s whose st art ing st at ion s 2 [6i + 1; 6i + 6]. For t he rst case, we de ne p 0i t o be t he number of seat s which cont ain none of t p he t hree int ervals [6i + 1; 6i + 3], [6i + 4; 6i + 6] and [6i + 7; 6i + 9]. If 0 (5− 22) n = 2, t hen t he adversary proceeds wit h n = 2 request s for t he int erval pi  [6i + 2; 6i + 8]. T hen, algorit hm A can accommodat e only n + p 0i request s among t he subset of 3n = 2 request s whose st art ingp st at ion s 2 [6i + 1; 6i + 6], which is at p most a fract ion (7 − 22) = 3. If p 0i > (5 − 22) n = 2, t hen t he adversary proceeds rst wit h p 0i request s for t he int erval [6i + 2; 6i + 8] and t hen wit h n = 2 − p 0i request s for t he int erval [6i + 2; 6i + 5] and n = 2 − p 0i request s for t he int erval [6i + 5; 6i + 8]. Obviously, algorit hm A can accommodat e only p i − p 0i of t hem, or equivalent ly, it can only accommodat e n + p i − p 0i request s among t he subset of 2n − p 0i request p s whose st art ing st at ion s 2 [6i + 1; 6i + 6], which is at most a port ion of (7 − 22) = 3 again. An argument similar t o t hat in t he proof of T heorem 1 psays t hat t he asympt ot ic accommodat ing rat io of algorit hm A is at most (7 − 22) = 3  : 7699. 2 P roo f.

It is unknown if ext ending t his \ grouping" t echnique t o more t han two would lead t o a bet t er upper bound.

3

qi

’s

U p p e r B o u n d s fo r S m a ll V a lu e s o f n

In t his sect ion, we show bet t er upper bounds for small values of n . T his also demonst rat es t he power of t he adversary argument and t he \ grouping" t echnique. However, we not e t hat in t rain syst ems, it is unlikely t hat a t rain has a small number of seat s. So t he bounds obt ained here are probably irrelevant for t his applicat ion, but t hey could be relevant for ot hers such as assigning vacat ion bungalows. Trivially, for n = 1, any on-line algorit hm is 1-accommodat ing. As a warm up, let us show t he following t heorem for n = 2.

Bet t er Bounds on t he Accommodat ing Rat io T h e o re m 3 . If n p r ice p ro ble m ( k 

227

= 2, t h e n n o d e t e r m in is t ic fa ir o n - lin e a lgo r it h m fo r t h e u n it 9) is m o re t h a n f ( k ) - a cco m m od a t in g, w h e re

8 > >
> :

(3k − 3( k mod 6) − 6) = (5k − 5( k when (3k − 3( k mod 6) + 6) = (5k − 5( k when

mod 6) − 18) ; ( k mod 6) 2 f 0; 1; 2g; mod 6) + 6) ; ( k mod 6) 2 f 3; 4; 5g:

P roo f. T he adversary begins wit h one request for t he int erval [3s + 1; 3s + 3] for each s = 0; 1;   ; b( k − 3) = 3c. Aft er t hese request s are sat is ed by t he online algorit hm, consider for each i = 0; 1;   ; b( k − 9) = 6c how t he t hree request s [6i + 1; 6i + 3], [6i + 4; 6i + 6], and [6i + 7; 6i + 9] are sat is ed. Suppose t hat t he int ervals [6i + 1; 6i + 3], [6i + 4; 6i + 6], and [6i + 7; 6i + 9] are placed on t he same seat . T hen t he adversary proceeds wit h a request for t he int erval [6i + 3; 6i + 7] and t hen request s for each of t he int ervals [6i + 2; 6i + 4] and [6i + 6; 6i + 8]. T he on-line algorit hm will accommodat e t he rst request , but fail t o accommodat e t he last two. In t he second case, suppose only two adjacent int ervals (among [6i + 1; 6i + 3], [6i + 4; 6i + 6], and [6i + 7; 6i + 9]) are placed on t he same seat , say [6i + 1; 6i + 3] and [6i + 4; 6i + 6], t hen t he adversary proceeds wit h t hree request s for t he int ervals [6i + 2; 6i + 4], [6i + 3; 6i + 5], and [6i + 5; 6i + 8]. T he on-line algorit hm will accommodat e t he rst request but fail t o accommodat e t he last two. In t he last case, only t he int ervals [6i + 1; 6i + 3] and [6i + 7; 6i + 9] are placed on t he same seat . T hen t he adversary proceeds wit h two request s for t he int ervals [6i + 2; 6i + 5] and [6i + 5; 6i + 8]. T he on-line algorit hm will fail t o accommodat e bot h of t hem. It t hen follows easily t hat t he accommodat ing rat io of t he on-line algorit hm 2 applied t o t his sequence of request s is at most f ( k ) for k  9.

A speci c on-line algorit hm called F ir s t - F it always processes a new request by placing it on t he rst seat which is unoccupied for t he lengt h of t he journey. It has been shown [6] t hat F ir s t - F it is at most k = (2k − 6)-accommodat ing for general n divisible by 3. However, in t he following, we will show t hat for n = 2, F ir s t - F it is c -accommodat ing, where c is at least 3= 5. Combining t his wit h t he previous t heorem, F ir s t - F it is (3= 5 +  )-accommodat ing, where  > 0 approaches zero as k approaches in nity. T his means t hat for n = 2, F ir s t - F it is an asympt ot ically opt imal on-line algorit hm. T h e o r e m 4 . F ir s t - F it fo r t h e u n it p r ice p ro ble m is c - a cco m m od a t in g, w h e re c  3= 5. P roo f.

See t he full manuscript [3].

When

n

2

= 3; 4, we have t he following t heorems.

T h e o r e m 5 . I f n = 3, n o d e t e r m in is t ic fa ir o n - lin e a lgo r it h m fo r t h e u n it p r ice p ro ble m ( k  11) is m o re t h a n f ( k ) - a cco m m od a t in g, w h e re f

P roo f.

( k ) = (3k − 3(( k − 3) mod 8) − 1) = (5k − 5(( k − 3) mod 8) − 14)

See t he full manuscript [3].

2

228

Eric Bach et al.

T h e o r e m 6 . I f n = 4, n o d e t e r m in is t ic fa ir o n - lin e a lgo r it h m fo r t h e u n it p r ice p ro ble m ( k  9) is m o re t h a n f ( k ) - a cco m m od a t in g, w h e re 8 > >
> :

P roo f.

(5k − 5( k mod 6) − 6) = (7k − 7( k mod 6) − 18) ; when ( k mod 6) 2 f 0; 1; 2g; (5k − 5( k mod 6) + 12) = (7k − 7( k mod 6) + 12) ; when ( k mod 6) 2 f 3; 4; 5g:

2

See t he full manuscript [3].

Generally, let f n ( k ) denot e t he upper bound on t he accommodat ing rat io of t he det erminist ic fair on-line algorit hms for inst ances in which t here are n seat s and k st at ions. Let f n denot e t he asympt ot ic value of f n ( k ). So far, we have 3= 5, f 4  5= 7, and f n < : 7699 for n  5. Are f n ( k ) and f n f 2 = 3= 5, f 3  non-increasing in n ? So far we don’t know t he answer. It is known t hat t he accommodat ing rat io for F ir s t - F it cannot be bet t er t han k = (2k − 6) when n = 3 [6]. So it is int erest ing t o examine for n = 3, if t here is some algorit hm whose asympt ot ic accommodat ing rat io is bet t er t han 1= 2 or not . T he problem of nding a bet t er fair on-line algorit hm for t he unit price problem, for t he general case n  3, is st ill open.

4

R a n d o m iz e d A lg o rit h m s

In t his sect ion, we examine t he accommodat ing rat ios for randomized fair online algorit hms for t he unit price problem, by comparing t hem wit h an oblivious adversary. Some result s concerning randomized fair on-line algorit hms for t he proport ional price problem can be found in [4]. T h e o r e m 7 . N o ra n d o m iz ed fa ir o n - lin e a lgo r it h m fo r t h e u n it p r ice p ro ble m ( k  9) is m o re t h a n f ( k ) - a cco m m od a t in g, w h e re 8 > >
> :

(7k − 7( k mod 6) − 15) = (9k − 9( k mod 6) − when ( k (14k − 14( k mod 6) + 27) = (18k − 18( k mod when ( k

27) ; mod 6) = 0; 1; 2; 6) + 27) ; mod 6) = 3; 4; 5:

T he oblivious adversary behaves similarly t o t he adversary in t he proof of T heorem 1. T he sequence of request s employed by t he oblivious adversary depends on t he expect ed values of p i = q 2 i + q 2 i + 1 , which are de ned in t he proof of T heorem 1. T he oblivious adversary st art s wit h t he same sequence as t he adversary in t he proof of T heorem 1. T hen, for each i = 0; 1;   ; b( k − 9) = 6c, it decides on Case 1 or Case 2, depending on t he expect ed value E [p i ] compared wit h 5n = 9. By generat ing corresponding request s, t he linearity of expect at ions implies t hat t he expect ed number of request s accommodat ed by t he randomized algorit hm is at most a fract ion f ( k ) of t he t ot al number of request s. 2 P roo f.

Bet t er Bounds on t he Accommodat ing Rat io

229

Alt hough it is st raight forward t o show t hat T heorem 1 holds for randomized algorit hms, as in t he above, one cannot use t he same argument and show t he same for t he ot her t heorems. In fact , one can show t hat T heorem 3 is false when considering randomized algorit hms against oblivious adversaries. T he most obvious randomized algorit hm t o consider for t his problem is t he one we call R a n d o m . When R a n d o m receives a new request and t here exist s at least one seat t hat int erval could be placed on, R a n d o m chooses randomly among t he seat s which are possible, giving all possible seat s equal probability. T h e o r e m 8 . Fo r n = 2, R a n d o m fo r t h e u n it p r ice p ro ble m is a t lea s t a cco m m od a t in g. P roo f.

3 4

2

See t he full manuscript [3].

T his value of 43 is, in fact , a very t ight lower bound on R a n d o m ’s accommodat ing rat io when t here are n = 2 seat s. T h e o r e m 9 . Fo r n = 2, R a n d o m fo r t h e u n it p r ice p ro ble m ( k  f ( k ) - a cco m m od a t in g, w h e re f

(k ) =

3) is a t m o s t

1 3 + : 4 4( k − (( k − 1) mod 2))

We rst give t he request [1; 2] and t hen t he request s [2i ; 2i + 2] for i 2 f 1; : : : ; b( k − 2) = 2cg. If k is odd, we t hen give t he request [k − 1; k ]. R a n d o m will place each of t hese request s, and, since t here is no overlap, each of t hem is placed on t he rst seat wit h probability 12 . Now we cont inue t he sequence wit h [2i + 1; 2i + 3] for i 2 f 0; : : : ; b( k − 3) = 2cg. Each int erval in t his last part of t he sequence overlaps exact ly two int ervals from earlier and can t herefore be accommodat ed if and only if t hese two int ervals are placed on t he same seat . T his happens wit h probability 12 . T hus, all request s from t he rst part of t he sequence, and expect ed about half of t he request s for t he last part , are accept ed. More precisely we obt ain: P roo f.

k

+ 1− ( ( k − 1) m o d 2) 2

k

+ 21  k − 1 − ( ( k −21 ) − (( k − 1) mod 2)

m o d 2)

=

f

(k ):

2

T he accommodat ing rat io of 43 for R a n d o m wit h n = 2 seat s does not ext end t o more seat s. In general, one can show t hat R a n d o m ’s accommodat ing rat io is bounded above by approximat ely 17= 24 = 0: 70833. T he request sequence used t o prove t his is very similar t o t he sequence given t o F ir s t - F it and B e s t - F it in t he proof of T heorem 3 in [6], but it is given in a dierent order, t o make t he accommodat ing rat io lower. T h e o r e m 1 0 . T h e a cco m m od a t in g ra t io fo r R a n d o m is a t m o s t u n it p r ice p ro ble m , w h e n k  2 (mod 4) . P roo f.

See t he full manuscript [3].

17k + 14 24k

, fo r t h e

2

230

Eric Bach et al.

For ot her k , not congruent t o 2 modulo 4, similar result s hold. Using t he same sequence of request s (and t hus not using t he last st at ions) gives upper bounds of t he form 21 47 kk −− cc 21 for const ant s c 1 and c 2 which depend only on t he value of k (mod 4).

A ck n o w le d g m e n t s T he second aut hor would like t o t hank Fait h Fich for int erest ing discussions regarding t he seat reservat ion problem wit h n = 2 seat s. Guo-Hui Lin would like t o t hank P rofessor Guoliang Xue for many helpful suggest ions.

R e fe re n c e s 1. B. Awerbuch, Y. Bart al, A. F iat , S. Leonardi and A. Rosen, On-line comp et it ive algorit hms for call admission in opt ical networks, in P roceedi n gs of t he 4t h A n n ual E uropean Sym posi um on A lgor i t hm s ( E SA ’ 96) , LNCS 1136, 1996, pp. 431{444. 2. B. Awerbuch, Y. Bart al, A. F iat and A. Rosen, Comp et it ive non-preempt ive call cont rol, in P roceedi n gs of t he 5t h A n n ual A C M -SI A M Sym posi um on D i scret e A lgor i t hm s ( SO D A ’ 94) , 1994, pp. 312{320. 3. E. Bach, J . Boyar, T . J iang, K.S. Larsen and G.-H. Lin, Bet t er b ounds on t he accommodat ing rat io for t he seat reservat ion problem, P P -2000-8, Depart ment of Mat hemat ics and Comput er Science, University of Sout hern Denmark (2000). 4. E. Bach, J . Boyar and K.S. Larsen, T he accommodat ing rat io for t he seat reservat ion problem, P P -1997-25, Depart ment of Mat hemat ics and Comput er Science, University of Sout hern Denmark, May, 1997. 5. A. Bar-Noy, R. Canet t i, S. Kut t en, Y. Mansour and B. Schieb er, Bandwidt h allocat ion wit h preempt ion, in P roceedi n gs of t he 27t h A n n ual A C M Sym posi um on T heor y of C om put i n g ( ST O C ’ 95) , 1995, pp. 616{625. 6. J . Boyar and K.S. Larsen, T he seat reservat ion problem, A lgor i t hm i ca , 25(4) (1999), 403{417. 7. J . Boyar, K.S. Larsen and M.N. Nielsen, T he accommodat ing funct ion | a generalizat ion of t he comp et it ive rat io, in P roceedi n gs of t he Si xt h I n t er n at i on al W or kshop on A lgor i t hm s and D at a St r uct ures ( W A D S’ 99) , LNCS 1663, 1999, pp. 74{79. 8. M.C. Carlisle and E.L. Lloyd, On t he k -coloring of int ervals, in A dvances i n C om put i n g an d I n for m at i on { I C C I ’ 91 , LNCS 497, 1991, pp. 90{101. 9. J .A. Garay, I.S. Gopal, S. Kut t en, Y. Mansour and M. Yung, E cient on-line call cont rol algorit hms, J our nal of A lgor i t hm s, 23 (1997) 180{194. 10. F . Gavril, Algorit hms for minimum coloring, maximum clique, minimum covering by cliques, and maximum indep endent set of a chordal graph, SI A M J our n al on C om put i n g, 1(2) (1972), 180{187. 11. T .R. J ensen and B. Toft , G raph color i ng problem s, W iley, New York, 1995. 12. H.A. Kierst ead and W .T . Trot t er, J r., An ext remal problem in recursive combinat orics C ongressus N um erant i um , 33 (1981) 143{153. 13. R.J . Lipt on and A. Tomkins, On-line int erval scheduling, in P roceedi n gs of t he 5t h A nnual A C M -SI A M Sym posi um on D i scret e A lgor i t hm s ( SO D A ’ 94) , 1994, pp. 302{311.

Bet t er Bounds on t he Accommodat ing Rat io

231

14. P. Raghavan and E. Upfal, E cient rout ing in all-opt ical networks, in P roceedi n gs of t he 26t h A nnual A C M Sym posi um on T heor y of C om put i n g ( ST O C ’ 94) , 1994, pp. 134{143. 15. L. Van Wassenhove, L. Kroon and M. Salomon, Exact and approximat ion algorit hms for t he op erat ional xed int erval scheduling problem, Working pap er 92/ 08/ T M, INSEAD, Font ainebleau, France, 1992.

O rd in a l O n - L in e S ch e d u lin g o n T w o U n ifo rm M a ch in e s ⋆ Zhiyi Tan and Yong He Depart ment of Mat hemat ics, Zhejiang University Hangzhou 310027, P.R. China heyong@mat h. zj u. edu. cn

We invest igat e t he ordinal on-line scheduling problem on two uniform machines. We present a comprehensive lower b ound of any ordinal algorit hm, which const it ut es a piecewise funct ion of machine sp eed rat io s  1. We furt her prop ose an algorit hm whose comp et it ive rat io mat ches t he lower b ound for most of s 2 [1; 1 ). T he t ot al lengt h of t he int ervals of s where t he comp et it ive rat io does not mat ch t he lower b ound is less t han 0: 7784 and t he biggest gap never exceeds 0: 0521. A b st r a c t .

1

In t ro d u c t io n

In t his pap er, we consider ordinal on-line scheduling problem on two uniform machines wit h ob ject ive t o minimize t he m a k e s pa n (i.e., t he last job complet ion t ime). We are given n indep endent jobs J = f p 1 ;   ; p n g, which has t o b e assigned t o two uniform machines M = f M 1 ; M 2 g. We ident ify t he jobs wit h t heir processing t imes. Machine M 1 has sp eed s 1 = 1 and machine M 2 has sp eed s 2 = s  1. If p i is assigned t o machine M j , t hen p i =s j t ime unit s are required t o process t his job. Bot h machines and jobs are available at t ime zero, and no preempt ion is allowed. We furt her assume t hat jobs arrive one by one and we know not hing ab out t he value of t he processing t imes but t he order of t he jobs by processing t imes. Hence wit hout loss of generality, we supp ose p 1  p 2   p n . We are asked t o decide t he assignment of all t he jobs t o some machine at t ime zero by ut ilizing only ordinal dat a rat her t han t he act ual magnit udes. For convenience, we denot e t he problem as Q 2j or d i n a l on − l i n e j C m a x . C o m pe t it iv e a n a ly s is is a typ e of worst -case analysis where t he p erformance of an on-line algorit hm is compared t o t hat of t he opt imal o -line algorit hm [11]. For an on-line algorit hm A , let C A denot e t he makespan of t he solut ion produced by t he algorit hm A and C O P T denot e t he minimal makespan in an o -line version. T hen t he comp et it ive rat io of t he algorit hm A is de ned as t he smallest numb er c such t hat C A  cC O P T for all inst ances. An algorit hm wit h ⋆

T his research is supp ort ed by Nat ional Nat ural Science Foundat ion of China (grant numb er: 19701028) and 973 Nat ional Fundament al Research P roject of China (Informat ion Technology and High-P erformance Software).

D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 2 3 2 { 2 4 1 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

Ordinal On-Line Scheduling on T wo Uniform Machines

233

a comp et it ive rat io c is called c - co m pe t it iv e a lgo r it h m . An on-line det erminist ic (randomized) algorit hm A is called t he b est p ossible (or opt imal) algorit hm if t here is no det erminist ic (randomized) on-line algorit hm for t he discussed problem wit h a comp et it ive rat io b et t er t han t hat of A . P roblems wit h ordinal dat a exist in many elds of combinat orial opt imizat ion such as mat roid, bin-packing, and scheduling [7, 8, 9, 1]. Algorit hm which ut ilizes only ordinal dat a rat her t han act ual magnit udes are called o rd in a l a lgo r it h m . For ordinal scheduling, Liu et al. [8] gave t horough st udy on P m jj C m a x . Because ordinal algorit hm is, in some ext ent , st rict er t han t he non-clairvoyant one in t hat we must assign all jobs at t ime zero, classical on-line algorit hms dep ending on machine loads, such as List Scheduling ( L S ), are of no use. For m = 2; 3, [8] has present ed resp ect ive opt imal ordinal algorit hms. In t he same pap er, an algorit hm wit h comp et it ive rat io 101= 70 was given while t he lower b ound is 23= 16 for m = 4, and an algorit hm wit h comp et it ive rat io 1 + ( m − 1) = ( m + dm = 2 e)  5 = 3 was develop ed while t he lower b ound is 3= 2 for general m > 4. On t he ot her hand, our discussed problem also b elongs t o a kind of s e m i online scheduling, a variant of on-line where we do have some part ial knowledge on job set which makes t he problem easier t o solve t han st andard on-line scheduling problems. In our problem we know t he order of jobs by t heir processing t imes. Alt hough t here are many result s on semi on-line scheduling problem on ident ical machines [2, 5, 6, 10], t o t he aut hors knowledge, lit t le is known ab out uniform machine scheduling. Due t o t he ab ove mot ivat ion, t his pap er considers t he scheduling problem Q 2j or d i n a l on − l i n e j C m a x . We will give t he lower b ound of any ordinal algorit hm, which is, denot ed by c l o w , a piecewise funct ion dep endent on sp eed rat io s 2 [1; 1 ). We furt her present one algorit hm O rd in a l whose comp et it ive rat io mat ches t he lower b ound for t he ma jority of t he value of machine sp eed rat io s . T he t ot al lengt h of t he int ervals of s where t he comp et it ive rat io does not mat ch t he lower b ound is less t han 0: 7784, and t he biggest gap b etween t hem never exceeds 0: 0521. Anot her relat ed problem is t he classical clairvoyant on-line scheduling problem Q 2jj C m a x , which is deeply st udied. p Cho and Sahni [3] has shown t hat comp et it ive rat io of L S algorit hm is (1 + 5) = 2. E pst ein et al. [4] have proved t hat o n t he paramet ric comp et it ive rat io of L S is min

2s + 1 s+ 1

; 1 + 1s

, and L S is t hus

t he b est p ossible on-line algorit hm for any s . T hey furt her proved t hat randomizat ion does not help for s  2, present ed a simple memoryless randomized algorit hm wit h a comp et it ive rat io of (4 − s )(1 + s ) = 4  1: 5625, and devised barely random algorit hms wit h comp et it ive rat io at most 1.53 for any s < 2. T he pap er is organized as follows. Sect ion 2 gives t he lower b ound dep endent on s . Sect ion 3 present s t he algorit hm O rd in a l and proves it s comp et it ive rat io.

2

P a ra m e t ric L o w e r B o u n d

T his sect ion present s t he paramet ric lower b ound of any det erminist ic ordinal algorit hm applied t o Q 2j or d i n a l on − l i n e j C m a x . We generalize t he result s in t he following two t heorems.

234

Zhiyi Tan and Yong He h

T h e o r e m 1 . Fo r a n y s



p

2 1;

5+

265 20

h



p 7

1+

[

3

;1

, t h e co m pe t it iv e ra t io o f a n y

d e t e r m in is t ic o rd in a l a lgo r it h m is a t lea s t c l o w ( s ) , w h e re 8 > > > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > > > > :

p 2s + 2 3 2s + 1 2s s+ 1 2 3s + 2 3s s+ 2 3 4s + 3 4s s+ 3 4 5s + 4 5s s+ 4 5 6s + 5 6s s

s s s s s s s s s s s

2

s+ 1 s

s

2 2 2 2 2 2 2 2 2 2 2 2

[1; 5p+ 2 02 6 5 p)  [1; 1: 064) ; [ 1 + 3p 7 ; 1 + 2p 5 )  [1: 215; 1: 618) ; [ 1 + 2p 5 ; 3 + 6 5 7 )  [1: 618; 1: 758) ; [ 3 + 6 5p7 ; 2)  [1: 758; 2) ; [2; 1p+ 2 1 0 ) p [2; 2: 081) ; [ 1 + p2 1 0 ; 1 + p2 1 3 )  [2: 081; 2: 303) ; [ 1 + p2 1 3 ; 5 + 1 p03 4 5 )  [2: 303; 2: 357) ; [ 5 + p1 03 4 5 ; 1 +p 2 1 7 )  [2: 357; 2: 562) ; [ 1 + p2 1 7 ; 3 + 6 1p5 9 )  [2: 562; 2: 602) ; [ 3 + 6p1 5 9 ; 3 + 23 6 )  [2: 602; 2: 633) ; p [ 3 + 23 p6 ; 1 + 3)  [2: 633; 2: 732) ; [1 + 3; 1 )  [2: 732; 1 ) : p

p

T h e o r e m 2 . Fo r a n y s 2 [ 5 + 2 02 6 5 ; 1 + 3 7 ) , t h e co m pe t it iv e ra t io o f a n y d e t e r m in is t ic o rd in a l a lgo r it h m is a t lea s t c l o w ( s ) , w h e re 8 >
:

p 5s + 2 5s (3k − 4)s + (2k − 2) 4k − 5 (2k + 1)s + k (2k + 1)s

s s s

2 [ 5 + 2 02 6 5 ; s 2 (2)) ; 2 [s 2 ( k − 1) ; s 1 ( k )) ; k = 3; 4; : : : ; 2 [s 1 ( k ) ; s 2 ( k )) ; k = 3; 4; : : : ;

3,

(2k + 1)(2k − 3) +

p

(2k + 1) 2 (2k − 3) 2 + 4k (2k + 1)(3k − 4)(4k − 5) 2(2k + 1)(3k − 4)

is t h e po s it iv e roo t o f t h e equ a t io n

(3k − 4) s + 2k − 2 (2k + 1) s + k = (2k + 1) s 4k − 5 an d s 2 (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 t h e po s it iv e roo t o f t h e equ a t io n

(3k − 1) s + 2k (2k + 1) s + k = : (2k + 1) s 4k − 1

Ordinal On-Line Scheduling on T wo Uniform Machines

235

From t he de nit ion of s 1 ( k ) and s 2 (pk ), we can see t hat s 1 ( k − 1) < s 2 ( k − 1) < 1+ 7 , so t he lower b ound is well-de ned for 3 2. T he proofs will b e complet ed by adversary met hod. We analyze t he p erformance of t he b est p ossible algorit hm applied t o several inst ances. For easier reading and underst anding, we show T heorem 1 by proving t he following Lemmas 1-7 separat ely.

s 1 ( k ) < s 2 ( k ) and l i m k ! 1 s 2 ( k ) = any s  1 t hrough T heorem 1 and

p

L e m m a 1 . Fo r a n y s 2 [1 ; 5 + 2 02 6 5 ) a n d a n y o rd in a l o n - lin e a lgo r it h m A , t h e re e x is t s s o m e in s t a n ce s u c h t h a t C A =C O P T  c l o w ( s ) = (2s + 2) = 3:

P roo f. If an algorit hm A assigns p 1 t o M 1 and p 2 ; p 3 ; p 4 t o M 2 , consider t he inst ance wit h job set f p 1 = p 2 = 1; p 3 = p 4 = 1=s g. It follows t hat C A  (1 + 2=s ) =s , C O P T = 2=s , C A =C O P T  ( s + 2) = (2s ) > (2s + 2) = 3. If A assigns p 1 and at least one of p 2 ; p 3 ; p 4 t o M 1 , consider t he inst ance wit h job set f p 1 = 1; p 2 = p 3 = p 4 = 1= (3s ) g. It implies t hat C A  1 + 1= (3s ), C O P T = 1=s , (3s + 1) = 3 > (2s + 2) = 3. So we know t hat t he comp et it ive rat io C A =C O P T  will b e great er t han (2s + 2) = 3 as long as A assigns p 1 t o M 1 . Now we analyze t he case t hat A assigns p 1 t o M 2 . F irst ly, we deduce t hat b ot h p 2 and p 3 cannot b e assigned t o M 2 . Because ot herwise consider t he inst ance f p 1 = 1; p 2 = p 3 = 1= (2s ) g, it implies t hat C A  (1 + 1= (2s )) =s , C O P T = 1=s , C A =C O P T  (2s + 1) = (2s ) > (2s + 2) = 3. Denot e t he inst ance by (I1) for fut ure use. Secondly, p 4 must b e assigned t o M 2 . Ot herwise we have t he inst ance f p 1 = p 2 = p 3 = 1; p 4 = (2 − s ) =s g, which follows t hat C A  1 + 2=s , C O P T = 2 =s , C A =C O P T = ( s + 2) = 2 > (2 s + 2) = 3. Denot e t he inst ance by (I2). T hirdly, if A assigns at least one of p 5 and p 6 t o M 2 , consider f p 1 = = p 6 = 1= (5s ) g. It is clear t hat C A  (1 + 2= (5s )) =s , C O P T = 1=s , 1; p 2 =   A O P T  (5s + 2) = (5s ) > (2s + 2) = 3. Last ly, we are left t o consider t he case C =C where A assigns p 1 ; p 4 t o M 2 and p 2 ; p 3 ; p 5 ; p 6 t o M 1 . At t his moment , we choose f p 1 = p 2 = p 3 = 1; p 4 = p 5 = p 6 = 1=s g. T herefore, C A  2 + 2=s , C O P T = 3=s , C A =C O P T  (2 s + 2) = 3. In summary, we have proved for any s in t he given int erval, any algorit hm A tu is such t hat C A =C O P T  (2s + 2) = 3: p

p

L e m m a 2 . Fo r a n y s 2 [ 1 + 3 7 ; 1 + 2 5 ) a n d a n y o rd in a l o n - lin e a lgo r it h m A , t h e re e x is t s s o m e in s t a n ce s u c h t h a t C A =C O P T  c l o w ( s ) = (2s + 1) = (2s ) :

P roo f. Similarly we can get t he result by considering t he following series of

= p 5 = 1= (4s ) g, f p 1 =   = p 4 = 1; p 5 = 2s − 2g, inst ances: f p 1 = 1; p 2 =   = p 6 = 1= (5s ) g, f p 1 =   = p 5 = 1; p 6 = 2s − 3g, (I1), (I2), f p 1 = 1; p 2 =   = p5 = f p 1 = p 2 = p 3 = 1; p 4 = p 5 = (2 − s ) = (2s ) g, and f p 1 = 1; p 2 =   1= (4s ) g. tu Before going t o ot her lemmas, consider two inst ances. If algorit hm A assigns t o M 1 , let p 1 = 1 and no ot her job arrives, t hen we know t hat C A =C O P T  s . If algorit hm A assigns p 1 and p 2 t o M 2 , let p 1 = 1; p 2 = 1=s and no ot her job

p1

236

Zhiyi Tan and Yong He

comes, t hen C A =C O P T  ( s + 1) =s . Because s and p ( s + 1) =s are no less t han 5) = 2, in t he remainder of t he c l o w ( s ) de ned in T heorem 1 as long as s  (1 + proof of T heorem 1, we assume t hat M 1 processes p 2 and M 2 processes p 1 by any algorit hm A . p

L e m m a 3 . Fo r a n y s 2 [ 1 + 2 e x is t s s o m e in s t a n ce s u c h t h a t

5

; 2) a n d a n y o rd in a l o n - lin e a lgo r it h m A , t h e re (

COP

p s+ 1

CA



T

cl o w ( s )

s

2 3s + 2 3s

=

s

p

2 [ 1 + 2p 5 ; 3 + 6 5 7 ) ; 2 [ 3 + 6 5 7 ; 2) :

P roo f. If an algorit hm A assigns p 3 t o M 1 , consider t he inst ance f p 1 = p 2 = 1; p 3 = s − 1g. T hen C A =C O P T  s . T herefore A should assign p 3 t o M 2 . If p 4 is assigned t o M 1 , consider t he inst ance f p 1 = p 2 = 1 ; p 3 = p 4 = 1 =s g. We know C A =C O P T  ( s + 1) = 2. If p 4 is assigned t o M 2 , Consider f p 1 = 1; p 2 = (3s + 2) = (3s ). T hus we know t hat p 3 = p 4 = 1 = (3 s ) g. We have C A =C O P T  C A =C O P T  min f ( s + 1) = 2 ; (3 s + 2) = (3 s ) g. T he result can b e got by comparing t he two funct ions. tu p

L e m m a 4 . Fo r a n y s 2 [ 2 + 23 e x is t s s o m e in s t a n ce s u c h t h a t

6

;1

) a n d a n y o rd in a l o n - lin e a lgo r it h m A , t h e re (

CA COP

s



T

cl o w ( s )

=

2

s+ 1 s

s s

p p 2 [ 2 + 23 p6 ; 1 + 3) ; 2 [1 + 3; 1 ) :

P roo f. If p 2 is assigned t o M 1 by an algorit hm A , t he inst ance f p 1 = p 2 = 1g deduces C A =C O P T  s = 2. As illust rat ed in t he cont ent b efore Lemma 3, C A =C O P T  ( s + 1) =s , t he lemma can b e proved by comparing s = 2 wit h ( s + 1) =s . tu

By considering t he following two inst ances: f p 1 = 1; p 2 = p 3 = 1= ( s − 1) g and f p 1 = p 2 = 1; p 3 = p 4 = 1=s g, we conclude t hat M 1 should process p 2 and M 2 should process p 1 ; p 3 ; p 4p in any algorit hm A in order t o get t he desired lower b ound for 2  s < (2 + 2 6) = 3. Hence we assume it holds in t he rest of t he proof. p

L e m m a 5 . Fo r a n y s 2 [2 ; 1 + e x is t s s o m e in s t a n ce s u c h t h a t

13 2

) a n d a n y o rd in a l o n - lin e a lgo r it h m A , t h e re (

COP

p s+ 2

CA T



cl o w ( s )

=

3 4s + 3 4s

s s

2 [2; 1p+ 2 1 0 ) ; p 2 [1+ 2 10 ; 1+ 2 13 ):

P roo f. Similar t o t he proof of Lemma 4, we can get t he result s by t he inst ances

f p1 =

p2

= 1; p 3 = p 4 = p 5 = ( s − 1) = 3g and f p 1 = 1; p 2 =  

= p 5 = 1= (4s ) g.

tu

Ordinal On-Line Scheduling on T wo Uniform Machines p

p

L e m m a 6 . Fo r a n y s 2 [ 1 + 2 1 3 ; 1 + t h e re e x is t s s o m e in s t a n ce s u c h t h a t

17 2

) a n d a n y o rd in a l o n - lin e a lgo r it h m A ,

(

COP

p s+ 3

CA



cl o w ( s )

T

237

s

4 5s + 4 5s

=

s

p

2 [ 1 + p2 1 3 ; 5 + 1 p03 4 5 ) ; 2 [ 5 + 1 03 4 5 ; 1 + 2 1 7 ) :

P roo f. T he inst ances f p 1 = p 2 = 1; p 3 = p 4 = p 5 = ( s − 1) = 3g, f p 1 = p 2 = = p 6 = ( s − 1) = 4g, and f p 1 = 1; p 2 =   = p 6 = 1= (5s ) g can reach 1; p 3 =   t he goal. tu p

p

L e m m a 7 . Fo r a n y s 2 [ 1 + 2 1 7 ; 2 + t h e re e x is t s s o m e in s t a n ce s u c h t h a t

6

2 3

) a n d a n y o rd in a l o n - lin e a lgo r it h m A ,

(

COP

p s+ 4

CA



T

cl o w ( s )

s

5 6s + 5 6s

=

s

p

2 [ 1 + p2 1 7 ; 3 + 6 1p5 9 ) ; 2 [ 3 + 6 1 5 9 ; 2 + 23 6 ) :

f p1 = = 1; p 3 = p 4 = p 5 = ( s − 1) = 3g, f p 1 = p 2 = 1; p 3 =   = p 6 = ( s − 1) = 4g, f p 1 = p 2 = 1; p 3 =   = p 7 = ( s − 1) = 5g and f p 1 = 1; p 2 =   = p 7 = 1= (6s ) g. tu

P roo f. By considering t he following inst ances, we can have t he result s: p2

T hrough Lemma 1 t o 7, we have nished t he proof of T heorem 1. To prove T heorem 2, we rewrit e it as follows: h

p 5+

p



; 1 + 3 7 , t h e co m pe t it iv e ra t io o f a n y d e t e r m in is t ic o rd in a l a lgo r it h m is a t lea s t c l o w ( s ; l ) , w h e re



T h e o r e m 3 . Fo r a n y l ( l

8 > > >
> > :

3) a n d s 2

265 20

p 5s + 2 5s (3k − 4)s + (2k − 2) 4k − 5 (2k + 1)s + k (2k + 1)s 3s + 2 4

(3k − 4)s + 2k − 2 4k − 5

s

2 [ 5 + 2 02 6 5 ; s 2 (2)) ; 2 [s 2 ( k − 1) ; s 1 ( k )) ; k = 3; 4;   2 [s 1 ( k ) ; s 2 ( k )) ; k = 3; 4;   ; l ;

s

2 [s 2 ( l ) ;

s s

p

7

1+ 3

):

g is an increasing sequence of

lim k! 1

;l

and

k

3s + 2 (3k − 4) s + 2k − 2 = ; 4k − 5 4

one can easily verify t he equivalence of T heorem 2 and T heorem 3 as l !

1 .

P roo f. We prove t he result s by induct ion. For l = 3, by using t he similar met hods

in t he proof of Lemma 1 and Lemma 2, it is not di cult t o prove (

CA C

O P T



cl o w ( s )

=

p 5s + 2 5s 3s + 2 4

s s

2 [ 5 + p2 02 6 5 ; 2 [ 5 + 1 51 4 5 ;

p 145

5+

15 p 1+

7 3

);

):

But it is a lit t le bit di erent from t he desired b ound describ ed in t he t heorem, t o reach t he goal, we need more careful analysis. By t he same argument s as in

238

Zhiyi Tan and Yong He

t he proof of Lemma 1 and 2, we only need consider t he following assignment : A assigns p 2 ; p 3 ; p 5 t o M 1 , and p 1 ; p 4 ; p 6 t o M 2 . Because for ot her assignment s, t he rat io is no less t han c l o w ( s ) already. Inst ead of using t he inst ances which we did in t he proof of Lemma 2 t o achieve t he lower b ound of (3s + 2) = 4, we now dist inguish t hree cases according t o t he assignment of t he next two jobs p 7 ; p 8 . C a s e 1 Algorit hm A assigns p 7 t o M 2 . By considering t he inst ance f p 1 = 1 ; p 2 =  = p 7 = 1= (6s ) g, we have C A  (1 + 1= (2s )) =s , C O P T = 1=s , C A =C O P T  (2s + 1) = (2s ). C a s e 2 Algorit hm A assigns p 7 ; p 8 t o M 1 . By considering t he inst ance f p 1 = = p 8 = (2 − s ) = (4s − 1) g, we have C A  (5s + 4) = (4s − 1), p 2 = p 3 = 1; p 4 =   O P T = 7= (4s − 1), C A =C O P T  (5s + 4) = 7. C C a s e 3 Algorit hm A assigns p 7 t o M 1 and p 8 t o M 2 . T he inst ance f p 1 = 1 ; p 2 =  = p 8 = 1= (7s ) g deduces t hat C A  1=s (1 + 3= (7s )), C O P T = 1=s and A C =C O P T  (7 s + 3) = (7 s ). By st raight arit hmet ic calculat ion, we have

CA C

O P T



8 > > >
> > :

p 5s + 5s 5s + 7 7s + 7s 3s + 4

2

s

4

s

3

s

2

s

2 2 2 2

p

p

[ 5 + p2 02 6 5 ; 3 +p1 0 6 5 ) = [ 5 + 2 02 6 5 ; s 2 (2)) ; [ 3 + 1p0 6 5 ; 3 + 1p0 6 9 ) = [s 2 (2) ; s 1 (3)) ; [ 3 + 1p0 6 9 ; 7 + 2 p13 0 1 ) = [s 1 (3) ; s 2p(3)) ; [ 7 + 2 13 0 1 ; 1 + 3 7 ) = [s 2 (3) ; 1 + 3 7 ) :

Hence t he t heorem holds for l = 3. By induct ion, we assume t hat t he t heorem is t rue for all l < k , and furt her we can assume M 1 processes f p 2 ; p 3 ; p 5 ; p 7 ;   ; p 2 k − 1 g and M 2 processes f p 1 ; p 4 ; p 6 ;   ; p 2 k g in any algorit hm A wit h t he desired b ound. For l = k we dist inguish t hree cases according t o t he assignment of t he next two jobs: C a s e 1 Algorit hm A assigns p 2 k + 1 t o M 2 . By consider t he inst ance f p 1 = 1 ; p 2 =   = p 2 k + 1 = 1= (2k s ) g, we have t hat C A  1=s (1 + 1= (2s )), C O P T = 1=s , and C A =C O P T  (2 s + 1) = (2 s ). C a s e 2 Algorit hm A assigns p 2 k + 1 ; p 2 k + 2 t o M 1 . By considering f p 1 = p 2 = p 3 = 4

= p 2 k + 2 = (2 − s ) = ((2k − 2) s − 1) = x g, we have t hat C A  2 + k x , 1; p 4 =   (3k − 4)s + (2k − 2) C O P T = 1 + (2 k − 2) x , and C A =C O P T  . 4k − 5 C a s e 3 Algorit hm A assigns p 2 k + 1 t o M 1 and p 2 k + 2 t o M 2 . By considering f p 1 = = p 2 k + 2 = 1= ((2k + 1) s ) g,we have t hat C A  (1 + k = ((2k + 1) s )) =s , 1; p 2 =   O P T = 1=s , and C A =C O P T  ((2k + 1) s + k ) = ((2k + 1) s ). C (3k − 4)s + (2k − 2) (2k + 1)s + k ; ( 2 k + 1 ) s g, and We t hus have shown t hat C A =C O P T  min f 4k − 5 t he proof is complet ed. tu

3

T h e A lg o rit h m

O rdin al

In t his sect ion, we present an ordinal algorit hm for Q 2j or d i n a l on − l i n e j C m a x . T he algorit hm consist s of an in nit e series of procedures. For any s , it de nit ely chooses exact ly one procedure t o assign t he jobs. F irst we give t he de nit ion of procedures.

Ordinal On-Line Scheduling on T wo Uniform Machines

239

P r o c e d u r e ( 0 ) : Assign all jobs t o M 2 . P r o c e d u r e ( 1 ) : Assign jobs in t he subset f p 3 i + 2 ; p 3 i + 3 j i  0 g t o M 1 ; Assign jobs in t he subset J = f p 3 i + 1 j i  0g t o M 2 . P r o c e d u r e ( l ) , l  2 : Assign jobs in t he subset f p l i + 2 j i  0 g t o M 1 ; Assign jobs in t he subset f p 1 g [ f p l i + 3 ; p l i + 4 ; : : : ; p l i + l + 1 j i  0g t o M 2 . A lg o rit h m O p rd in a l 1. If s  1 + 3, assign jobs by P rocedure(0). 2. If s 2 [s ( l − 1) ; s ( l )), assign jobs by P rocedure( l ), where 8 >
:

l

2

= 0; = 1;

l

p

1+

13 4

− 1+

p

l (l 2 − 1)2 + 2l 3 (l + 1) l (l + 1)

l



2:

In t he ab ove de nit ion, s ( l ) is t he p osit ive root of equat ion for any l  2. Because it is an increasing sequence of l and l i m l ! t he algorit hm is well-de ned for all s  1.

(l + 1)s + l (l + 1)s

1 s(l )

=

= 1+

ls+ 2 2l

p

3,

T h e o r e m 4 . T h e pa ra m e t r ic co m pe t it iv e ra t io o f t h e a lgo r it h m O rd in a l is 8 > >
> :

2s + 2 3 ls+ l− 1 ls ls+ 2 2l s+ 1 s

(l − 1)2 + 2l (l − 1) l

s s s s

2 [s (0) ; s (1)) ; 2 [s ( l − 1) ; s 0( l )) ; l = 2; 3; : : : ; 2 [s 0( l )p; s ( l )) ; l = 2; 3; : : : ;  1 + 3;

(l 

2) is t h e po s it iv e roo t o f

ls+ l− 1 ls

=

ls+ 2 2l

.

rst show t hat C o r d i n a l =C O P T  c o r d i n a l ( s ). Let 1 and 2 b e t he complet ion t imes of M 1 and M 2 aft er processing all jobs by our algorit hm resp ect ively, and b b e t he t ot al processing t ime of all jobs. Obviously, C O P T  b= ( s + 1) and C O P T  p 1 =s , C o r d i n a l = max f 1 ; 2 g. We prove t he rat io by dist inguishing t he sp eed rat io sp. 3. In t his case, O rd in a l chooses P rocedure(0). It is clear t hat C ase 1 s > 1 + s+ 1 C O P T : T his is t he desired rat io. 1 = 0 and 2 = sb = s +s 1 s +b 1  s C a s e 2 s 2 [s (0) ; s (1)). In t his case, O rd in a l chooses P rocedure(1). We prove t he case of n = 3k , t he ot her cases of n = 3k + 1 and 3k + 2 can b e proved similarly. By t he rule of t he procedure, we have

P roo f. We

X− 1

k

1

2 3

(p3i + 2 + p3i + 3 ) 

= i= 0

=

2

=

1 s

(p3i + 1 + p3i + 2 + p3i + 3 ) i= 0

2( s + 1) b 2b =  3 3 s + 1

X− 1

k

p3i + 1 i= 0

X− 1

k



p1 s

+

1 3s

2( s + 1) O P T C ; 3

Xn

pi i= 2

=

b 2p 1 +  3s 3s

3s + 1 O P T C : 3s

240

Zhiyi Tan and Yong He 2(s + 1)

, we t hus get t he desired Not e t hat for s 2 [s (0) ; s (1)), we have 3 s3+s 1  3 rat io for t his case. C a s e 3 s 2 [s (1) ; s (2)). At t his moment , we need analyze P rocedure(2). We prove t he case of n = 2k , t he anot her case of n = 2k + 1 can b e proved similarly. In fact , we have X− 1

k

=

1

b

p2i + 2



p1

1 2s

i= 0

2

=

1 s

X− 2

k

(p1 +



p2i − 3 )

s

i= 0

+

s



2

+ 1 OPT C ; 2

Xn

pi

p1

=

+

2s

i= 2

b



2s

2s + 1 O P T C : 2s

By comparing ( s + 1) = 2 and (2s + 1) = (2s ), we know t hat 

C or di n a l COP

2s + 1 2s s+ 1 2



T

2 [s (1) ; s 0(2)) ; 2 [s 0(2) ; s (2)) ;

s s

where s 0(2) is de ned in t he t heorem. C a s e 4 s 2 [s ( l − 1) ; s ( l )) ; ( l  3). Consider P rocedure( l ) as follows. We only P k−1 pi l + 2  prove t he case of n = k l + 1 as ab ove. Obviously we have 1 = i= 0 P n 1 O P T p2 + l p : To get t he rat io b etween and C , we dist inguish two i 1 i= 3 sub cases according t o t he assignment of t he rst two jobs in t he opt imum. S u b c a s e 1 p 1 and p 2 are processed in t he same machine in t he opt imal schedule. T hen C O P T  ( p 1 + p 2 ) =s : T herefore we get 1

l



− 2 (p1 + 2l

p2 )

b

+

ls



l

+ 2 OPT C : 2l

S u b c a s e 2 p 1 and p 2 are not processed in t he same machine in t he opt imal schedule. T hen C O P T  p 2 and



1

l

− 2 l

p2

b

+

l

l



+ s− 1 l

Now we remain t o get t he rat io b etween t at ion, we have 2



=

p1 ls

1 s

l+ 1 X− 1 X

k

(p1 +

+

pi l +

j

)

i= 1 j = 3

( l − 1) b ls

=

 ls

(

1 l

+

O P T

p1

+

s

ls C

:

and C O P T : By st raight compu-

2

l

− 1 ls

( l − 1)( s + 1)

+ l− 1 ls

C

O P T

Xn

pi i= 2

)C O P T

:

Not e for l  3; and s > 2, we have ( l s + l − 1) = ( l s ) > ( l + s − 1) =l , and ( l s + 2) = ( l s ) > ( l + s − 1) =l , which imply t hat C o r d i n a l =C O P T  max f l s +l sl − 1 ; l s2+l 2 g. T he desired rat io can t hus b e obt ained.

Ordinal On-Line Scheduling on T wo Uniform Machines

241

To show t he algorit hm O rd in a l is c o r d i n a l -comp et it ive algorit hm, we consider t he following inst ances. If s 2 [s (0) ; s (1)), let p 1 = p 2 = p 3 = 1; p 4 = p 5 = p 6 = = p p l = 1 = ( l s ). If s 2 [s 0( l ) ; s ( l )), 1=s . If s 2 [s ( l − 1) ; s 0( l )), let p 1 = 1; p 2 =   = p l = 2= ( l s ). If s  1 + 3, let p 1 = 1; p 2 = 1=s . tu let p 1 = p 2 = 1; p 3 =   Comparing t he lower b ound wit h t he comp et it ive rat io of O r d i n a l , we conclude t hat our algorit hm is opt imal in t he following int ervals of s "

1;

5+

p 20

#

265

"

[

1+

p 3

#

7

;2

"

[

1+

p 2

10 3 + ;

p 4

#

33

p

h

[

1+



3; 1

;

t he t ot al lengt h of t he int ervals where t he rat io does not mat ch t he lower b ound is less t hanp 0: 7784 and t he biggest gap is approximat ely 0: 0520412 which occurs at s = 3 5 + 1 1 28 6 1 7  1: 14132.

R e fe re n c e s [1] Agnet is, A.: No-wait flow shop scheduling wit h large lot size. Rap 16.89, Dipart iment o di Informat ica e Sist emist ica, Universit a Degli St udi di Roma " La Sapienza" , Rome, It aly, 1989. [2] Azar, Y., Regev, O.: Online bin st ret ching. P ro c. of R A N D O M ’98 , 71-82(1998). [3] Cho, Y., Sahni, S.: Bounds for list scheduling on uniform processors. S IA M J . C om p u t in g 9 , 91-103(1980). [4] Epst ein, L., Noga, J ., Seiden, S. S., Sgall, J ., Woeginger, G.J .: Randomized online scheduling for two relat ed machines. P ro c. of t h e 10t h A C M -S IA M S y m p . on D iscret e A lgorit h m s , 317-326(1999). [5] He, Y., Zhang, G.: Semi on-line scheduling on two ident ical machines. C om p u t in g, 6 2 , 179-197(1999). [6] Kellerer, H., Kot ov, V., Sp eranza, M., Tuza, Z.: Semi online algorit hms for part it ion problem. O p er. R es. L et t ers, 2 1 , 235-242(1997). [7] Lawler, E. L.: Combinat orial Opt imizat ion: Networks and Mat roids. Holt , Rinehart and W inst on, Toront o, 1976. [8] Liu, W . P., Sidney, J . B., Van Vliet , A.: Ordinal algorit hms for parallel machine scheduling. O p er. R es. L et t ers, 1 8 , 223-232(1996). [9] Liu, W . P., Sidney, J . B.: Bin packing using semi-ordinal dat a. O p er. R es. L et t ers , 1 9 , 101-104(1996). [10] Seiden, S., Sgall, J ., Woeginger, G.: Semi-online scheduling wit h decreasing job sizes. Technical Rep ort , T U Graz, Aust ria, 1999. [11] Sleat or, D., Tarjan, R.E.: Amort ized e ciency of list up dat e and paging rules. C om m u n icat ion s of A C M 2 8 , 202-208(1985).

A g e n t s , D is t rib u t e d A lg o rit h m s , a n d S t a b iliz a t io n Sukumar Ghosh ⋆ T he University of Iowa, IA 52242, USA ghosh@cs. ui owa. edu

T his not e illust rat es t he use of agent s in t he st abilizat ion of dist ribut ed syst ems. T he goal is t o build st abilizing syst ems on t he Int ernet , where t he comp onent processes are not under t he cont rol of a single administ rat ion. T wo examples are present ed t o illust rat e t he idea: t he rst is t hat of mut ual exclusion on a unidirect ional ring , and t he second deals wit h t he const ruct ion of a DF S spanning t ree. A b st r a c t .

1

In t ro d u c t io n

An agent [7] is a program t hat can migrat e from one node t o anot her, perform various types of operat ions at t hese nodes, and can t ake aut onomous rout ing decisions. In cont rast wit h messages t hat are passive, an agent is an act ive ent ity t hat can be compared wit h a messenger. In t he past few years, agent s have proven t o be an at t ract ive t ool in t he design of various types of dist ribut ed services. T his not e examines t he use of agent s in t he design of st abilizing dist ribut ed syst ems [4]. Convent ional st abilizing syst ems expect processes t o run prede ned programs t hat have been carefully designed t o guarant ee recovery from all possible bad con gurat ions. However, in an environment like t he Int ernet , where processes are not under t he cont rol of a single administ rat ion, expect ing every process t o run prede ned programs for t he sake of st abilizat ion is unrealist ic. T his paper explores an alt ernat ive mechanism for st abilizing a dist ribut ed syst em, in which processes are capable of accommodat ing visit ing agent s. Consider a network of processes, where each process communicat es wit h it s immediat e neighbors using messages. Each process, in addit ion t o sending out it s own st at e, can read incoming messages, and updat e it s own st at e (using a set of rules). T he st at e of t he network consist s of t he st at es of each of t he processes, and can be classi ed int o t he cat egories l e g a l and i l l e g a l . Each updat e act ion modi es t he st at e of t he network. A st abilizing syst em guarant ees t hat regardless of t he st art ing st at e, t he network reaches a legal st at e in a bounded number of st eps, and remains in t he legal st at e t hereaft er. Convergence and closure are t he two cornerst ones of st abilizing syst ems [1]. ⋆

T his research was supp ort ed in part by t he Nat ional Science Foundat ion under grant CCR-9901391, and by t he Alexander Von Humb oldt Foundat ion, Germany while t he aut hor was visit ing t he University of Dort mund.

D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 2 4 2 { 2 5 1 , 2 0 0 0 . c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

Agent s, Dist ribut ed Algorit hms, and St abilizat ion

243

We assume t hat in addit ion t o t he ongoing act ivit ies in t he above network of processes, one or more processes can send out agent s t hat can migrat e from one process t o anot her. While t he individual processes maint ain t he closure of legal con gurat ions, agent s help t he syst em converge t o a legal con gurat ion as soon as it det ect s t hat t he con gurat ion is illegal. T he det ect ion involves t aking a t ot al or part ial snapshot of t he syst em st at e. Correct ive act ions by t he agent involve t he modi cat ion of shared variables of one or more processes t hat t he agent is scheduled t o visit . In seeking a solut ion t o t he problem of st abilizat ion wit h agent s, we make t he following assumpt ion: T he normal operat ion of t he syst em neit her depends on, nor is influenced by t he presence of agent s. [N o n - i n t e r fe r e n c e ]

Only at convenient int ervals, agent s are sent out t o init iat e a \ clean-up phase," but ot herwise t he operat ion of t he syst em cont inues as usual. T he individual processes are oblivious t o t he presence of t he agent (s). We do not t ake int o considerat ion any minor slowdown in t he operat ion of a node due t o t he sharing of t he resources by t he visit ing agent . Our solut ion can be viewed as a st abilizing ext ension of a dist ribut ed syst em as proposed Kat z & P erry [6]. However, agent s make t he implement at ion st raight forward, and somet imes elegant . We consider two well-known problems t o illust rat e our idea: t he rst deals wit h st abilizing mut ual exclusion on a unidirect ional ring rst illust rat ed by Dijkst ra [4], and t he second is a st abilizing algorit hm for const ruct ing a DFS spanning t ree for a given graph.

2

M o d e l a n d N o t a t io n s

Consider a st rongly connect ed network of processes. T he processes communicat e wit h one anot her t hrough messages. Any process can send out a message cont aining it s current st at e t o it s immediat e neighbors, and receive similar messages from it s immediat e neighbors. Each channel is of unit capacity. Furt hermore, channels are F IFO, i.e. t hrough any channel, messages are received in t he order t hey are sent . T he program for each process consist s of a set of rules. Each rule is a guarded act ion of t he form g ! A , where g is a boolean funct ion of t he st at e of t hat process and t hose of it s neighbors received via messages, and A is an act ion t hat is execut ed when g is t rue. An act ion by a process consist s of operat ions t hat updat e it s own st at e, followed by t he sending of messages t hat cont ain t he updat ed st at e. T he execut ion of each rule is at omic, and it de nes a st ep of a comput at ion. Furt hermore, when mult iple rules are applicable, any one of t hem can be chosen for execut ion. A c o m p u t a t i o n is a sequence of at omic st eps. It can be nit e or in nit e. T he ot her component of t he algorit hm is t he program t hat t he agent execut es every t ime it visit s a node. T he variables of t he agent will be called b r i e f c a s e v a r i a b l e s . A guard is a boolean funct ion of t he briefcase variables, and t he variables

244

Sukumar Ghosh

of t he process t hat t he agent is current ly visit ing. An act ion consist s of one or more of t he following t hree operat ions: (i) modi cat ion of it s briefcase variables, (ii) modi cat ion of t he variables of t he process t hat it is current ly visit ing, and (iii) ident i cat ion of t he n e x t p r o c e s s t o visit . T his next process can eit her be predet ermined, or it can be comput ed on-t he-fly, and will be represent ed by t he variable n e x t . We will use guarded commands t o express t he agent program. A privileged process, in addit ion t o everyt hing t hat an ordinary process does, can t est for t he arrival of an agent as a part of evaluat ing it s guard, and can send out an agent (wit h appropriat e init ializat ion) as a part of it s act ion. T hese agent s use t he same channel t hat t he messages use. However, agent s always receive a higher priority over messages, as represent ed by t he following assumpt ion: At any node, t he visit of an agent is an at omic event . Once an agent arrives at a node, t he node refrains from sending or receiving any message unt il t he agent leaves t hat node. [A t o m i c i t y ]

T hus from t he node’s point of view, an agent ’s visit consist s of an indivisible set of operat ions. Except ions may be made for privileged processes only. T his assumpt ion is import ant t o make any t ot al or part ial snapshot of t he syst em st at e t aken by t he agent a meaningful or consist ent one. For furt her det ails about t his issue, we refer t he readers t o [2]

3

M u t u a l E x c lu s io n

We consider here t he problem of st abilizing mut ual exclusion on a unidirect ional ring, rst illust rat ed by Dijkst ra in [4]. T he syst em consist s of a unidirect ional ring of N processes numbered 0 t hrough N − 1. P rocess i can only read t he st at e of it s left neighbor ( i − 1) m od N in addit ion t o it s own st at e. T he st at e of process i is represent ed by t he boolean b( i ). P rocess 0 is a privileged process, and behaves di erent ly from ot her processes. A process is said t o have a t oken, when it s guard is t rue. We need t o design a prot ocol, so t hat regardless of t he st art ing con gurat ion, (1) event ually a st at e is reached in which exact ly one process has a t oken, (2) t he number of t okens always remains one t hereaft er, and (3) in an in nit e comput at ion, every process receives a t oken in nit ely oft en. Consider t he program of t he individual processes rst . P rocess i has a boolean variable b( i ) t hat is sent out t o it s neighbor ( i + 1) using a message. ( Pr ogr am f or pr oc es s i : i 6 = 0) b( i ) 6 = b( i − 1) ! b( i ) := : b( i ) ( Pr ogr am f or pr oc es s 0) b(0) = b( N − 1) ! b(0) := : b(0)

It can be easily shown t hat t he number of t okens is great er t han 0, and t his number never increases. T herefore, once t he syst em is in a legal st at e (i.e., it has a single t oken) it cont inues in t hat st at e. T he st at es of t he processes may be corrupt ed at unpredict able moment s. To st eer t he syst em int o a legal con gurat ion, process 0 sends out an agent from t ime t o t ime. T his is done aft er process 0 execut es it s current act ion, if any,

Agent s, Dist ribut ed Algorit hms, and St abilizat ion

245

and appropriat ely init ializes t he briefcase variables. Furt hermore, t he following condit ion must hold: C o n d it io n 1 .

Unt il t he agent ret urns home, process 0 suspends subsequent

act ions1 . T he briefcase consist s of two booleans, B and t ok en , t hat are init ialized by process 0 when t he agent is sent out . As t he agent t raverses t he ring, it det ermines if t he number of t okens is great er t han one. In t hat case, t he agent modi es t he st at e of a process t o possibly reduce t he number of t okens. T he program for t he agent consist s of t he t hree rules ME1, ME2, and ME3 and is shown below. P r o g r a m f o r t h e a g e n t w h ile v is it in g n o d e i

Init ially, t ok en = f al se, B = b(0) (init ializat ion done by process 0) if

( ME1) B 6 = b( i ) ^ : t ok en ! B := b( i ); t ok en := t r u e; n ex t := ( i + 1) m od N ( ME2) B = 6 b( i ) ^ t ok en ! b( i ) := B ; n ex t := ( i + 1) m od N ( ME3) B = b( i ) ! n ex t := ( i + 1) m od N

Not e t hat t he briefcase variables can also be badly init ialized, or corrupt ed. However, t he agent is guarant eed t o ret urn t o process 0, which init ializes t he briefcase variables. In t he remainder of t his sect ion, we assume t hat t he briefcase variables have correct values. T h e o re m 1 .

When t he agent ret urns t o process 0, t he syst em ret urns t o a legal

con gurat ion. P r o o f.

When t he agent ret urns t o process 0 , t he following two cases are possible.

: t ok en = t r u e. T his implies t hat t he agent has det ect ed a t oken at some process j , T hereaft er, t he st at e b( k ) of any ot her process k ( k > j ) t hat had a t oken when t he agent visit ed it , has been complement ed, making t hat t oken disappear. T hus, in t he st at e o b s e r v e d by t he agent , t he values of b( i ) are t he same for all i  j , and are t he complement of t he values of b( i ) for all i < j . T his means t hat t he syst em is in a legal con gurat ion. C ase 1

: t ok en = f al se. In t his case, t he agent has not been able t o det ect any t oken. Since process 0 did not execut e a move in t he mean t ime, in t he o b s e r v e d s t a t e , t he values of b( i ) for every process i are ident ical. T his means t hat process has a t oken, and t he syst em is in a legal con gurat ion. C ase 2

1

To monit or t he arrival of t he agent , we rely on a built -in t imeout mechanism t hat is an int egral part of any message-passing syst em. We elab orat e on t his furt her in t he concluding sect ion.

246

Sukumar Ghosh

It t akes only one t raversal of t he ring by t he agent t o st abilize t he syst em, where a t raversal begins and ends at process 0. However, if a t ransient failure hit s a process immediat ely aft er t he agent ’s visit , t hen t he result ing illegal con gurat ion may persist unt il t he next t raversal of t he agent . It is import ant here t o not e t hat unlike t he original solut ion in [4], t he space complexity of t he processes as well as t he agent is const ant . T his makes t he solut ion scalable t o rings of arbit rary size. In t erms of space complexity, it is comparable t o [5] t hat uses only t hree bit s per process, and no agent s. However, t he communicat ion complexity, de ned as t he number of bit s t hat are sent (and received) t o move t he t oken from one process t o t he next , is subst ant ially lower (in fact , it is 1-bit ) in our solut ion, as opposed t o O ( N ) bit s in [5]. Why can’t we get rid of all t hese, and de ne a process having a t oken only when t he agent visit s t hat process? T his violat es t he condit ion of nonint erference. Since t he agent s are periodically invoked, t he syst em will come t o a st andst ill during t he int erim period, when t he agent is absent !

4 4 .1

D F S T re e G e n e ra t io n T h e A lg o rit h m

Consider a connect ed network of processes. T he network is represent ed by a graph G = ( V; E ), where V denot es a set of nodes represent ing processes, and E denot es t he set of undirect ed edges joining adjacent processes, t hrough which int erprocess communicat ion t akes place. A special process 0 is designat ed as t he r o o t . Every process i ( i 6 = 0) has a par en t process P ( i ) t hat is chosen from it s neighbors. By de nit ion, t he root does not have a parent . T he spanning t ree consist s of all t he processes and t he edges connect ing t hem wit h t heir parent s. By de nit ion, a spanning t ree is acyclic. However, t ransient failures may corrupt t he value of P ( i ) from one or more process i , leading t o t he format ion of cycles in t he subgraph, or alt ering t he t ree t o anot her spanning t ree t hat is not DFS, making t he result ing con gurat ion illegal. T he individual processes will remain oblivious t o it . So, we will ent rust t he root node wit h t he t ask of sending out agent s t o det ect such irregularit ies. If required, t he agent will appropriat ely change t he parent s of cert ain processes t o rest ore t he spanning t ree. For t he convenience of present at ion, we will use t he following abbreviat ions: ch i l d ( i )  f j : P ( j ) = i g N (i )  f j : (i ; j )g f r i en d ( i )  f j : j 2 N ( i ) ^ j 6 = P (i ) ^ P (j ) 6 = i)

A node k 2 f r i en d ( i ) will also be called a non-t ree neighbor of node i . One of t he key issues here is t hat of graph t raversal. Assume t hat each process has a boolean flag f . Init ially, f = f al se. T his flag is set whenever t he process is visit ed by t he agent . T hen, t he following two rules will help an agent t raverse t he graph down t he spanning t ree edges, and event ually ret urn t o t he root . Not e t hat t he set of briefcase variables is empty.

Agent s, Dist ribut ed Algorit hms, and St abilizat ion

247

( DFS1) 9j 2 ch i l d ( i ) : : f ( j ) ! n ex t := j (Not e: Aft er reaching j , t he agent will set f ( j ) t o t r u e) ( DFS2) 8j 2 N ( i ) : f ( j ) !

n ex t := P ( i )

T his will also maint ain closure of t he legal con gurat ion. T he boolean flag f ( j ) has t o be reset before a subsequent t raversal begins. Unfort unat ely, t his t raversal may be a ect ed when t he DFS spanning t ree is corrupt ed. For example, if t he parent links form a cycle, t hen no t ree edge will connect t his cycle t o t he rest of t he graph. Accordingly, using DFS1, t he nodes in t he cycle will be unreachable for t he agent , and t he t raversal will remain incomplet e. As anot her possibility, if t he agent reaches one of t hese nodes cont ained in a cycle before t he cycle is formed, t hen t he agent is t rapped, and cannot ret urn t o t he root using DFS2. To address t he rst problem, we add t he following rule t o \ force open" a pat h t o t he unreachable nodes. ( DFS3) 8j 2 ch i l d ( i ) : f ( j ) ^ 9k 2 f r i en d ( i ) : : f ( k ) ! n ex t := k (Not e: Aft er reaching k , t he agent will set f ( k ) t o t rue, and P ( k ) t o i , i.e., i will adopt k as a child).

If t he unreachable nodes form a cycle, t hen t his rule will break it . T his rule will also help rest ore t he legal con gurat ion, when t he spanning t ree is acyclic, but not a DFS t ree. To address t he second problem, we ask t he agent t o keep t rack of t he number of nodes visit ed while ret urning t o t he root via t he parent link. For t his purpose, t he briefcase of t he agent will include a non-negat ive int eger count er C . Whenever t he agent moves from a parent t o a child using DFS1 or DFS3, C is reset t o 0, and and when t he agent moves from a node t o it s parent using DFS2, C is increment ed by 1. (Not e: T his will modify rules DFS1 and DFS2). When C exceeds a predet ermined value bigger t han t he size N of t he network, a new parent has t o be chosen, and t he count er has t o be reset . ( DFS4) ( C > N ) ^ 9k 2 f r i en d ( i ) !

P ( i ) := k ; C := 0; n ex t := k

T his will break t he cycle t hat t rapped t he agent . T he only remaining concern is about t he flag f being corrupt ed, and appropriat ely init ializing t hem before a new t raversal begins. For t his purpose, we include a boolean flag R t o t he briefcase t o designat e t he round number of t he t raversal. Before a new t raversal begins, t he root complement s t his flag. When f (i ) 6 = R , t he node i is considered unvisit ed, and t o indicat e t hat node i has been visit ed, f ( i ) is set t o R . T his leads us t o t he overall agent program for st abilizing a DFS spanning t ree. T he program adds a ext ra variable pr e t o t he briefcase of t he agent . It st ores t he ident ity of t he previous node t hat it is coming from. A slight ly folded version of t he program is shown below.

248

Sukumar Ghosh

P r o g r a m f o r t h e a g e n t w h ile v is it in g n o d e i

i f f (i ) 6 = R ! f ( i ) := R ; i f pr e 2 f r i en d ( i ) ! P ( i ) := pr e ; if ( DFS1) 9j 2 ch i l d ( i ) : f ( j ) 6 = R ! n ex t := j ; C := 0 ( DFS2) 8j 2 N ( i ) : f ( j ) = R ^ ( C < N _ f r i en d ( i ) = ; ) ! n ex t := P ( i ); C := C + 1 ( DFS3) 8j 2 ch i l d ( i ) : f ( j ) = R ^ 9k 2 N ( i ) : f ( k ) 6 = R ! n ex t := k ; C := 0 ( DFS4) ( C > N ) ^ 9k 2 f r i en d ( i ) ! n ex t := k ; P ( i ) := k ; C

:= 0

; pr e := i

4 .2

C o rre c t n e s s P ro o f

De ne j t o be a d e s c e n d a n t of node i , if j 2 ch i l d ( i ), or j is a descendant of ch i l d ( i ). In a legal con gurat ion, t he following t hree condit ions must hold: 1. 8i 2 V ( i 6 = r oot ), t he edges joining i wit h P ( i ) form a t ree. 2. j 2 f r i en d ( i ) ) j is a descendant of node i . 3. 8i ; j 2 V , f ( i ) = f ( j ) When t he rst condit ion does not hold, t he t ree edges form more t han one disconnect ed subgraph or segment . T he segment cont aining t he root will be called t he r o o t s e g m e n t . When t he agent ret urns t o t he root , 8i 2 V : f ( i ) = R . During t he subsequent t raversal, t he root complement s R , and 8i 2 V : f ( i ) 6 = R holds. If for some node j t his is not t rue, t hen we say t hat node j has an incorrect flag. Not e t hat if only t he rst two condit ions hold but not t he t hird one, t hen any applicat ion using t he DFS t ree will remain una ect ed. In a DFS t ree, when t he agent ret urns t o a node aft er visit ing all it s children, every non-t ree neighbor is also visit ed.

Lem m a 1.

P r o o f.

Follows from t he de nit ion of DFS t raversal.

Lemma 1 shows t hat D F S 1 and D F S 2 maint ain t he closure of t he legal con gurat ion. Lem m a 2.

St art ing from an arbit rary con gurat ion, t he agent always ret urns

t o t he root . If t he agent is in t he root segment , and C does not exceed N during t his t rip when t he agent moves t owards t he root , t hen D F S 2 guarant ees t hat t he st at ement holds. If C exceeds N , t hen eit her (1) C is corrupt ed, or (2) t he agent is t rapped int o a loop. In Case 1, t he number of disconnect ed segment s possibly increases (using DFS3), and t he agent moves t o a segment away from t he root segment .

P r o o f.

Agent s, Dist ribut ed Algorit hms, and St abilizat ion

249

However, t his event ually t riggers D F S 4. T he execut ion of D F S 4 breaks t he loop, connect s it wit h anot her segment , and rout es t he agent t o t hat segment . At t he same t ime, C is re-init ialized. In a bounded number of st eps, t he number of segment s is reduced t o one, which becomes t he root segment . Using D F S 2, t he agent ret urns t o t he root . If no node i has an incorrect flag f ( i ), t hen t he DFS t ree is rest ored in at most one t raversal of t he graph.

Lem m a 3.

P r o o f.

We consider t hree cases here.

C a s e 1 . Assume t hat t he root segment consist ing of all t he nodes in V and t heir parent s form a spanning t ree, but it is not a DFS t ree. T his allows for unvisit ed non-t ree neighbors even aft er all t he children have been visit ed. T his t riggers D F S 3, t he repeat ed applicat ion of which t ransforms t he given spanning t ree int o a DFS t ree.

Assume t hat t he agent is in t he root segment , and t here is no t ree edge connect ing it t o t he rest of t he graph. In t his case, event ually D F S 3 will be execut ed, and t hat will est ablish a new t ree edge connect ing t he root segment wit h t he rest of t he graph. T his will augment t he size of t he root segment , and t he number of segment s will be reduced by one. Repeat ed applicat ion of t his argument leads t o t he fact t hat t he root segment will include all t he nodes before t he agent complet es it s t raversal.

C ase 2.

C a s e 3 Assume t hat t he agent is in a segment away from t he root segment , and in t hat segment , t he edges connect ing nodes wit h t heir parent s form a cycle. In t his case, wit hin a bounded number of st eps, D F S 4 will be execut ed, causing t he agent t o move away from t he current segment by following t he newly updat ed parent link, and re-init ializing C . T his will also reduce t he number of segment s by one. In a nit e number of st eps, t he agent s will ret urn t o t he root segment , and event ually t he DFS t ree will be rest ored. Lem m a 4.

If t here are nodes wit h incorrect flags, t hen aft er each t raversal by t he agent , t he number of nodes wit h incorrect flags is decrement ed by at least one.

Assume t hat t here are some nodes wit h incorrect flags when t he agent begins it s t raversal. T his means t hat t here are some nodes t hat have not been visit ed by t he agent , but t heir flags incorrect ly show t hat t hey have been visit ed. We will demonst rat e t hat t he flag of at least one such node is set correct ly, before t he current t raversal ends and t he next t raversal begins. Using D F S 2, t he agent moves from a node t o it s parent , when every neighbor has been visit ed. T his may include a neighbor k t hat has not yet been visit ed by t he agent , but it s flag has been incorrect ly set as visit ed (i.e., f ( k ) = R ). However, during t he next t raversal, R is complement ed, and so f ( k ) 6 = R holds - t his corresponds t o k being unvisit ed, and t he flag is now correct . An unpleasant consequence of Lemma 4 is t hat t he agent may need upt o N − 1 t raversals t o set all t he flags correct ly. When it encount ers as lit t le as one P r o o f.

250

Sukumar Ghosh

incorrect flag, it can pot ent ially abandon t he t ask of st abilizing t he rest of t he graph during t hat t raversal, and post pone it t o t he next round. T h e o r e m 2 . In at most N t raversals by t he agent , t he DFS t ree ret urns t o a legal con gurat ion. P r o o f. From Lemma 4, it may t ake at most ( N − 1) t raversals t o set all t he flags correct ly. From Lemma 3, it follows t hat wit hin t he next t raversal, t he DFS t ree is reconst ruct ed. 4 .3

C o m p le x it y Is s u e s

T he agent model is st ronger t han t he classical message passing or shared memory models. Not e t hat we are measuring t he st abilizat ion t ime in t erms of t he number of t raversals made by t he agent , where a t raversal begins when t he agent leaves t he root , and ends when it ret urns t o t he root . It is possible for t he agent t o be corrupt ed in t he middle of a t raversal, or t he st at e variables of t he processes t o be corrupt ed while t he agent is in t ransit . In such cases, t he st abilizat ion t ime will be measured aft er t he failure has occurred, and t he agent has ret urned t o t he root , which is guarant eed by Lemma 2. It is feasible t o cut down t he st abilizat ion t ime t o one t raversal wit h a high probability by using signat ures. T he agent , while visit ing a process i for t he rst t ime during a t raversal, will append it s signat ure t o f ( i ). A failure at t hat node will make t hat signat ure unrecognizable wit h a high probability. If t he agent cannot recognize it s own signat ure at any node, t hen it will consider t hat node t o be unvisit ed. We make anot her observat ion while comparing t he space complexity of t his solut ion wit h t hose of t he more t radit ional st abilizing spanning t ree algorit hms like [3]. In [3], each process has t o keep t rack of t he size of t he network, t hat requires l og2 N bit s per process. In our solut ion, t he space complexity of each process is const ant - only t he agent needs t o know t he value of N , and will need l og2 N bit s in it s briefcase. It appears t hat t he N copies of l og2 N bit s has been t raded by just one copy of l og2 N , which is a favorable t rade, and cont ribut es t o t he scalability. T he addit ional space complexity for t he briefcase variable pr e should not exceed l og2  bit s (where  is t he maximum degree of a node), since t he choice of a parent is limit ed t o only t he immediat e neighbors of a node.

5

C o n c lu s io n

Agent s can be a powerful t ool in t he design of dist ribut ed algorit hms on syst ems wit h a het erogeneous administ rat ive st ruct ure. In cont rast wit h s e lf - s t a b i li z a t i o n where processes execut e t he st abilizing version of t he program, here processes execut e t he original program, but are ready t o accommodat e correct ive act ions by one or more visit ing agent s. Since t he t ask of inconsist ency det ect ion and consist ency rest orat ion is delegat ed t o a separat e ent ity, agent -based st abilizat ion is concept ually simpler t hat self-st abilizat ion. However, in some cases, it can cause new and t ricky problems,

Agent s, Dist ribut ed Algorit hms, and St abilizat ion

251

like t he t rapping of an agent in t he DFS spanning t ree algorit hm. On t he ot her hand, we believe t hat algorit hms for cont rolled recovery, like fault -cont ainment algorit hms, can be painlessly built int o an exist ing dist ribut ed syst em by using agent s. To send and receive agent s, t he privileged process relies on a t imeout mechanism. In case an agent does not ret urn wit hin t he t imeout period, it is assumed t o be lost , and a new agent is generat ed. A side eect is t he pos sibility of mult iple agent s pat roling t he network simult aneously. For some prot ocols (like t he mut ual exclusion prot ocol), t his does not pose a problem, except t hat it wast es network resources. In ot hers, t he agent management syst em has t o t ake t he responsibility of event ually reducing t he number of agent s t o one. A present at ion of such a prot ocol is out side t he scope of t his paper. Since t he agent s are invoked periodically, a possible crit icism is t hat t he illegal con gurat ion may persist for a \ long period." However, in t he classical asynchronous self-st abilizing syst ems also, we do not put an upper bound on t he real t ime t hat a process will t ake t o det ect or correct an illegal con gurat ion. T he frequency of invocat ion of t he agent will be det ermined by t he failure probability, t he maximum durat ion for which a faulty behavior can be t olerat ed, and t he failure hist ory of t he syst em. One of our fut ure goals is t o demonst rat e t hat besides being viable, agent s make it easier t o design st abilizing algorit hms for dist ribut ed syst em when compared wit h t he classical approach. In non-react ive syst ems, t he agent basically walks t hrough a dist ribut ed dat a st ruct ure, and modi es it as and when necessary. In react ive syst ems, t he crit ical issues are t aking a dist ribut ed snapshot of a m e a n i n g f u l p a r t of t he syst em, and making appropriat e alt erat ions t o t he st at es of some processes on-t he-fly (i.e., a t ot al or part ial dist ribut ed reset ) such t hat legit imacy is rest ored.

R e fe re n c e s 1. Arora, A., Gouda, M.G.: Closure and Convergence: A Foundat ion of Fault -t olerant Comput ing. IEEE Transact ions on Software Engineering, Volume 19 (1993) 10151027. 2. Chandy K.M., Lamp ort L.: Dist ribut ed Snapshot s: Det ermining Global St at es of a Dist ribut ed Syst em. ACM Trans. Comput er Syst ems, Volume 3, No.1 (1985) 63-75. 3. N. S. Chen, H. P. Yu, S. T . Huang.: A Self-St abilizing Algorit hm for Const ruct ing a Spanning Tree. Informat ion P rocessing Let t ers, Volume 39 (1991) 147-151. 4. Dijkst ra, E.W .: Self-St abilizing Syst ems In Spit e of Dist ribut ed Cont rol. Communicat ions of t he ACM, Volume 17 (1974) 643-644. 5. Gouda M.G., Haddix F .: T he St abilizing Token Ring in T hree Bit s. J ournal of P arallel and Dist ribut ed Comput ing, Volume 35 (1996) 43-48. 6. Kat z, S., P erry K.: Self-St abilizing Ext ensions for Message-passing Syst ems. P roc. 9t h Annual Symp osium on P rinciples of Dist ribut ed Comput ing (1990) 91-101. 7. Gray Rob ert , Kot z D., Nog S., Rus D., Cyb enko G.: Mobile Agent s for Mobile Comput ing. P roceedings of t he Second Aizu Int ernat ional Symp osium on P arallel Algorit hms/ Archit ect ures Synt hesis, Fukushima, J apan (1997).

A Fa s t S o rt in g A lg o rit h m a n d It s G e n e ra liz a t io n o n B ro a d c a s t C o m m u n ic a t io n s ⋆ Shyue-Horng Shiau and Chang-Biau Yang? ? Depart ment of Comput er Science and Engineering, Nat ional Sun Yat -Sen University, Kaohsiung, Taiwan 804, R.O.C., f shi aush, cbyangg@cse. nsysu. edu. t w, ht t p: / / par . cse. nsysu. edu. t w/  cbyang

In t his pap er, we shall prop ose a fast algorit hm t o solve t he sort ing problem under t he b r o a d c a s t c o m m u n i c a t i o n m o d e l (BCM). T he key p oint of our sort ing algorit hm is t o use successful broadcast s t o build broadcast ing layers logically and t hen t o dist ribut e t he dat a element s int o t hose logic layers prop erly. T hus, t he numb er of b r o a d c a s t c o n fl i c t s is reduced. Supp ose t hat t here are n input dat a element s and n processors under BCM are available. We show t hat t he average t ime complexity of our sort ing algorit hm is  ( n ). In addit ion, we expand t his result t o t he generalized sort ing, t hat is, nding t he rst k largest element s wit h a sort ed sequence among n element s. T he analysis of t he generalizat ion builds a connect ion b etween t he two sp ecial cases which are maximum nding and sort ing. We prove t hat t he average t ime complexit y for nding t he rst k largest numb ers is  ( k + log ( n − k )). A b st r a c t .

1

In t ro d u c t io n

One of t he simplest parallel comput at ion models is t he b r o a d c a s t c o m m u n i c a t i o n m o d e l (BCM)[1,2,5,6,14,13,4,9,7,11,12,15]. T his model consist s of some processors sharing one common channel for communicat ions. Each processor in t his model can communicat e wit h ot hers only t hrough t his shared channel. Whenever a processor broadcast messages, any ot her processor can hear t he broadcast message via t he shared channel. If more t han one processor want s t o broadcast messages simult aneously, a b r o a d c a s t c o n fl i c t occurs. When a conflict occurs, a conflict resolut ion scheme should be invoked t o resolve t he conflict . T his resolut ion scheme will enable one of t he broadcast ing processors t o broadcast successfully. T he Et hernet , one of t he famous local area networks, is an implement at ion of such a model. T he t ime required for an algorit hm t o solve a problem under BCM includes t hree part s: (1) resolut ion t ime: spent t o resolve conflict s, (2) t ransmission t ime: ⋆

⋆⋆

T his research work was part ially supp ort ed by t he Nat ional Science Council of t he Republic of China under NSC89-2213-E110-005. To whom all corresp ondence should b e sent .

D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 2 5 2 { 2 6 1 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

A Fast Sort ing Algorit hm and It s Generalizat ion

253

spent t o t ransmit dat a, (3) comput at ion t ime: spent t o solve t he problem. For t he sort ing problem, it does not seem t hat t ransmission t ime and comput at ion t ime can be reduced. T herefore, t o minimize resolut ion t ime is t he key point t o improve t he t ime complexity. T he probability concept , proposed by Mart el [7], is t o est imat e a proper broadcast ing probability, which can reduce conflict resolut ion t ime. Anot her idea t o reduce conflict resolut ion t ime is t he layer concept proposed by Yang [13]. To apply t he layer concept for nding t he maximum among a set of n numbers [11], we can improve t he t ime complexity from  (log2 n ) t o  (log n ) [12]. As some research has also been done on t he BCM when processors have a known order, our paper is t he case t hat processors have a unkown order. Some researchers [8,2,4,5,15,10] have solved t he sort ing algorit hm under BCM. T he select ion sort can be simulat ed as a st raight forward met hod for sort ing under BCM. T he met hod is t o have all processors broadcast t heir element s and t o nd t he maximum element repeat edly. In ot her words, t he maximum element s which are found sequent ially form t he sort ed sequence. Levit an and Fost er [5,6] proposed a maximum nding algorit hm, which is nondet erminist ic and requires O (log n ) successful broadcast s in average. Mart el [7], and Shiau and Yang [11] also proposed maximum nding algorit hms, which require O (log n ) and  (log n ) t ime slot s (including resolut ion t ime slot s) in average respect ively. T hus, t he t ime required for t he st raight forward sort ing met hod based on t he repeat ed maximum nding is O ( n log n ) : Mart el e t a l. [8] showed t he sort ing problem can be solved in O ( n ). T hey also proved t hat t he expect ed t ime for nding t he rst k largest numbers is O ( k + log n ). T hey used a modi ed version of select ion sort , i.e., sort by repeat edly nding maximum based on t he result s from previous it erat ions. It can be viewed as a modi ed Quicksort . Unt il now, Mart el’s algorit hm is t he fast est one for solving t he sort ing problem under BCM. However, t he const ant s associat ed wit h O ( n ) and O ( k + log n ) bounds proved by Mart el e t a l. [8] are not very t ight . T his paper can be divided int o two main part s. In t he rst part , we shall propose a sort ing algorit hm under BCM. In t he algorit hm, we make use of t he maximum nding met hod [11] t o build layers and reduce conflict s. Aft er t he process of maximum nding t erminat es, we can use t hese successful broadcast s t o build broadcast ing layers logically and t hen t o dist ribut e t he dat a element s int o t hose logic layers properly. T hus, conflict resolut ion t ime can be reduced. And we shall give t he t ime complexity analysis of our algorit hm. T he average number of t ime slot s (including conflict slot s, empty slot s, and slot s for successful broadcast ) required for sort ing n element s is T n , where 72 n − 12  T n  263 n − 67 . Here, it is assumed t hat each t ime slot requires const ant t ime. As we can see t hat t he bound of our t ime complexity is very t ight . In t he second part , we shall generalize t he result of t he rst part . We prove t hat t he average number of t ime slot s required for nding t he rst k largest num bers wit h a sort ed sequence is T kn , where 72 k + 4 ln ( n − ( k − 2)) − 21 + 4 ln 2  7 23 k + 5 ln ( n − ( k − 1)) − 6 . T he t ime complexity is also very t ight . By t he T kn  6

254

Shyue-Horng Shiau and Chang-Biau Yang

analysis of t he generalizat ion, we gure out t he connect ion between maximum nding and sort ing, which are two special cases of our generalizat ion. On t he high level view, our sort ing algorit hm and generalizat ion algorit hm have a similar approach as t hat proposed by Mart el e t a l. [8]. On t he low level view, our algorit hms are based on t he layer concept , t hus t hey can be analyzed easily and a t ight er bound can be obt ained. And Lemma 1 of t his paper can be regarded as a generalizat ion for t he work which has t he same high level approach. If t here is anot her maximum nding algorit hm under BCM whose bound can be analyzed , not only it can be applied int o our sort ing and generalized sort ing approaches, but also t he approaches based on it can be analyzed immediat ely by our lemmas in t his paper. T his paper is organized as follows. In Sect ion 2, we review t he previous result s for our maximum nding[11]. Based on t he maximum nding, we present t he sort ing algorit hm and it s analysis in Sect ion 3 and 4. In Sect ion 5, we present t he generalizat ion of t he sort ing. In Sect ion 6, we provide t he analysis of t he generalizat ion. Finally, Sect ion 7 concludes t he paper.

2

T h e P re v io u s R e s u lt s fo r M a x im u m F in d in g

We shall rst briefly review t he maximum nding algorit hm under BCM, which is proposed and analyzed by Shiau and Yang [11]. In t he maximum nding algorit hm, each processor holds one dat a element init ially. T he key point of t he maximum nding algorit hm is t o use broadcast conflict s t o build broadcast ing layers and t hen t o dist ribut e t he dat a element s int o t hose layers. For short ening t he descript ion in our algorit hm, we use t he t erm "dat a element " t o represent "t he processor st oring t he dat a element " and t o represent t he dat a element it self at di erent t imes if t here is no ambiguity. When a broadcast conflict occurs, a new upper layer is built up. Each dat a element which joins t he conflict flips a coin wit h equal probabilit ies. T hat is, t he probability of get t ing a head is 21 . All which get heads cont inue t o broadcast in t he next t ime slot , and bring t hemselves up t o t he new upper layer. T his new layer becomes t he act ive layer. T he ot hers which get t ails abandon broadcast ing, and st ill st ay on t he current layer. At any t ime, only t he processors which are alive and on t he act ive layer may broadcast . In t his paper, we shall use t he not at ion hx 0 ; x 1 ; x 2 ;   ; x t i t o denot e a linked list , where x t is t he head of t he list . Suppose L 1 = hx 0 ; x 1 ; x 2 ;   ; x t i and ; y t ′ i , t hen hL 1 ; L 2 i represent s t he concat enat ion of L 1 and L 2 = hy 0 ; y 1 ; y 2 ;   ; x t ; y0; y1; y2; ; yt ′i . L 2 , which is hx 0 ; x 1 ; x 2 ;   T he maximum nding algorit hm can be represent ed as a recursive funct ion: M a x f i n d ( C ; L m ), where C is a set of dat a element s (processors). Init ially, each processor holds one alive dat a element and set s an init ial linked list L m = hx 0 i , where x 0 = − 1 . A l g o r i t h m M a x i m u m - F i n d i n g : M a x f i n d (C ; L m ) S t e p 1 : Each alive dat a element in C broadcast s it s value. Not e t hat a dat a

element is alive if it s value is great er t han t he head of L m . Each element smaller t han or equal t o t he head drops out (becomes dead).

A Fast Sort ing Algorit hm and It s Generalizat ion

255

S t e p 2 : T here are t hree possible cases: C a s e 2 a If a broadcast conflict occurs, t hen do t he following. S t e p 2 a . 1 : Each alive dat a element in C flips a coin. All which get heads

form C 0 and bring t hemselves t o t he upper layer, and t he ot hers form C " and st ay on t he current layer. S t e p 2 a . 2 : P erform L m = M a x f i n d ( C 0; L m ). S t e p 2 a . 3 : P erform L m = M a x f i n d ( C " ; L m ). S t e p 2 a . 4 : Ret urn L m . C a s e 2 b : If exact ly one dat a element successfully broadcast s it s value y , t hen ret urn hL m ; y i . C a s e 2 c : If no dat a element broadcast s, t hen ret urn L m . ( C is empty or all dat a element s of C are dead.) In t he above algorit hm, we can get a sequence of successful broadcast s, which ; x t − 1 ; x t i , where x i − 1 < x i , is represent ed by t he linked list L m = hx 0 ; x 1 ; x 2 ;   1  i  t and x 0 = − 1 . Not e t hat L m is held by each processor and t he head x t is t he maximum. A new upper layer is built up when t he recursive funct ion M a x f i n d is called and t he current layer is revisit ed aft er we ret urn from M a x f i n d . In Case 2c, t here are two possible sit uat ions. One is t hat no element goes up t o t he upper layer. T he ot her is t hat no alive element remains on t he current layer aft er t he current layer is revisit ed because all element s go up t o t he upper layer, or some element s broadcast successfully on upper layers and t hey kill all element s on t he current layer. Shiau and Yang [11] proved t hat t he t ot al number of t ime slot s, including conflict slot s, empty slot s and slot s for successful broadcast s, is M n in average, where 4 ln n − 4 < M n < 5 ln n + 52 . Grabner e t a l. [3] gave a precise asympt ot ic 2 formula t hat M n  ( 3  ln 2 ) ln n  (4: 74627644 : : : ) ln n . Here we use t he lemma 4 n



M

n



M

n

−1



5 n

;

which was proved by Yang e t a l. [11], rat her t han t he precise asympt ot ic formula 2  M n  ( 3 ln 2 ) ln n  (4: 74627644 : : : ) ln n . T his is done because it is hard t o apply t he precise asympt ot ic formula and it s fluct uat ion int o t he proof direct ly.

3

T h e S o rt in g A lg o rit h m

In our sort ing algorit hm, each processor holds one dat a element init ially. T he key point of our algorit hm is t o use successful broadcast s which occur wit hin t he progress of maximum nding t o build broadcast ing layers and t hen t o dist ribut e t he dat a element s int o t hose layers properly. When a series of successful broadcast s occur wit hin t he progress of maximum nding, some correspondent layers are built up. All processors which part icipat ed in t he maximum nding are divided int o t hose layers. Each layer performs t he sort ing algorit hm unt il t he layer is empty or cont ains exact ly one dat a element .

256

Shyue-Horng Shiau and Chang-Biau Yang

Our algorit hm can be represent ed as a recursive funct ion: S or t i n g ( M ), where is a set of dat a element s (processors). In t he algorit hm, each processor holds one dat a element and maint ains a linked list L s . Our sort ing algorit hm is as follows: M

A l g o r i t h m S o r t i n g : S or t i n g ( M ) S t e p 1 : Each dat a element in M broadcast s it s value. S t e p 2 : T here are t hree possible cases: C a s e 2 a : If exact ly one dat a element successfully broadcast s it s value y ,

t hen ret urn hy i . C a s e 2 b : If no dat a element broadcast s, t hen ret urn N U L L . C a s e 2 c : If a broadcast conflict occurs, t hen perform ; x t − 1 ; x t i is a L m = M a x f i n d ( M ; hx 0 i ), where L m = hx 0 ; x 1 ; x 2 ;   series of successful broadcast s and x i − 1 < x i , 1  i  t and x 0 = − 1 . S t e p 2 c . 1 : Set L s = N U L L . S t e p 2 c . 2 : For i = t down t o 1 Set L s = hx i ; L s i . do L s = hS or t i n g ( M i ) ; L s i , where M i = f x j x i − 1 < x < x i g. S t e p 2 c . 3 : Ret urn L s .

In t he above algorit hm, x 1 is t he element of t he rst successful broadcast , and x t is t he element of t he last successful broadcast and also t he largest element in M . For example, suppose t hat M has 2 dat a element s f 1; 2g. We can get a series of successful broadcast s L m aft er M a x f i n d ( M ; hx 0 i ) is performed. T he rst successful broadcast may be one of t he two element s randomly, each case having probability 12 . If t he rst successful broadcast is 2, t hen L m = hx 0 ; 2i , and t he nal sort ed linked list is hx 0 ; S or t i n g ( M 1 ) ; 2i , where M 1 = f x j x 0 < x < x 1 g = f x j − 1 < x < 2g = f 1g. If t he rst successful broadcast is 1, t hen L m = hx 0 ; 1; 2i , and t he nal sort ed linked list is hx 0 ; S or t i n g ( M 1 ) ; 1; S or t i n g ( M 2 ) ; 2i , where M 1 = f x j x 0 < x < x 1 g = f x j − 1 < x < 1g = N U L L , M 2 = f x j x 1 < x < x 2 g = f x j 1 < x < 2g = N U L L . Mart el e t a l. [8] showed t he sort ing problem can be solved in O ( n ). T hey also proved t hat t he expect ed t ime for nding rst k largest numbers is O ( k + log n ). However, t he const ant s associat ed wit h O ( n ) and O ( k + log n ) bounds proved by Mart el e t a l. [8] are not very t ight . On t he high level view, our sort ing algorit hm has a similar approach as t hat proposed by Mart el e t a l. [8]. On t he low level view, our algorit hm is based on t he layer concept , t hus it can be analyzed easily and a t ight er bound can be obt ained. And t he analysis can be applied t o ot her sort ing algorit hms which have t he same high level approach under BCM.

4

A n a ly s is o f t h e S o rt in g A lg o rit h m

In t his sect ion, we shall prove t hat t he average t ime complexity of our sort ing algorit hm is  ( n ), where n is t he number of input dat a element s. Suppose t hat

A Fast Sort ing Algorit hm and It s Generalizat ion

257

t here are n dat a element s held by at least n processors in which each processor holds at most one dat a element . Let T n denot e t he average number of t ime slot s, including conflict slot s, empty slot s and slot s for successful broadcast s, required when t he algorit hm is execut ed. When t here is zero or one input dat a element for t he algorit hm, one empty slot or one slot for successful broadcast is needed. T hus T 0 = 1 and T 1 = 1. If n = 2, we have t he following recursive formula: 

T2

=

M 2

+

R 2,

where

R2

=

+

1 [ 2 1 [T 0 2



T1]

+ T0]

.

(1)

We shall explain t he above two equat ions. In t he rst equat ion, t he rst t erm M 2 is t he average number of t ime slot s required for t he maximum nding algorit hm while n = 2. T he second t erm R 2 is t he average number of t ime slot s required for nishing t he sort ing aft er t he maximum nding ends. In t he equat ion for R 2 , t he rst successful broadcast may be eit her one of t he 2 element s randomly, each case having probability 12 . T he subt erm of rst t erm, T 1 , arises when t he rst successful broadcast is t he largest element . T hus, t he layer between x 0 = − 1 and t he largest element cont ains one element , which is t he second largest element , and needs T 1 t ime slot s. In second t erm, t he subt erm, [T 0 + T 0 ], arises when t he rst successful broadcast is t he second largest element and t he second successful broadcast is t he largest element . T hus, t he layers between x 0 = − 1 , t he second and t he largest element are bot h empty and needs T 0 t ime slot s in bot h layers. Shiau and Yang [11] have proved t hat M 2 = 5, t hen we have T2

If

n

1 1 13 = 5 + f [1] + [1 + 1]g = : 2 2 2

= 3, we also have t he following recursive formula: 8
> > > > > > >
> > > > > > > :

1

[ + n1 [T 0 + n1 [R 2 +  + n1 [R k − 1 +  + n1 [ R n − 1 n

9

T n − 1 ] >> > + T n − 2 ] >>>

+ Tn − 3]

> > =

.

(3)

>

+ T n − k ] >>> + T0]

> > > > ;

In t he above equat ions, M n represent s t he average number of t ime slot s required for nding t he maximum among n dat a element s, and R n represent s t he average number of t ime slot s required for nishing sort ing aft er t he maximum is found. In t he equat ion for R n , t he rst successful broadcast may be any one of t he n element s randomly, each case having probability n1 . T he subt erm T n − 1 of t he second t erm arises when t he rst successful broadcast is t he largest element . T hus, t he layer between x 0 = − 1 and t he largest element cont ains n − 1 element s and needs T n − 1 t ime slot s for sort ing. In t he second t erm, t he subt erm, T 0 + T n − 2 , arises when t he rst successful broadcast is t he second largest element and t he second successful broadcast is t he largest element . T hus, t he layer between t he second and t he largest element is empty and needs T 0 t ime slot s. And t he layer between x 0 = − 1 and t he second largest element cont ains n − 2 element s and needs T n − 2 t ime slot s for sort ing. In t he k t h t erm, t he subt erm, R k − 1 + T n − k , arises when t he rst successful broadcast is t he k t h largest element . T hus, R k − 1 is t he number of t ime slot s required for nishing t he sort ing on t he k − 1 element s aft er t he maximum is found. And t he layer between x 0 = − 1 and t he rst successful broadcast element cont ains n − k dat a element s and needs T n − k t ime slot s for sort ing n − k dat a element s.

A Fast Sort ing Algorit hm and It s Generalizat ion

Subst it ut ing

=

Rk



Tk

M

k

, 2

8

=

M

n

n

− 1 int o Eq.(3), we have 9

1

[ + n1 [T 0 + n1 [( T 2 − M 2 ) +  + n1 [( T k − 1 − M k − 1 ) +  + n1 [( T n − 1 − M n − 1 )

> > > > > > > >
> > + T n − 2 ] >>>

n

+ > > > > > > > > :

259

+ Tn − 3]

> > =

.

(4)

>

+ T n − k ] >>> > > > > ;

+ T0]

Lem m a 1.

1 1 Tn − T2 = + 1 3

n

X

3

k



k n

1 (M + 1

k



M



5(

− 1 ):

k

Lem m a 2.

4(

1 − 3

n

1 ) + 1

X

3

k



k n

1 (M + 1

k



M

k

− 1)

1 − 3

n

1 ): + 1

T h e o re m 1 .

1 7 n −  2 2

5 Tn

Tn



7 23 n − : 6 6

A n a ly s is o f t h e G e n e ra liz a t io n in Eq.(4) can be regarded as 8

n

Tk

=

M

n

+

1 n

> > > > > > > > > > > > > > > < > > > > > > > > > > > > > > > :

T nn

. T herefore generalizing Eq.(4), we obt ain

[ + [T 00 + [( T 22 − M 2 ) +  + [( T kk −− 33 − M k − 3 ) + [( T kk −− 22 − M k − 2 ) + [( T kk −− 11 − M k − 1 ) + [( T kk − M k ) +  + [( T kn − 1 − M n − 1 )

n

−1

] + T kn −−22 ] + T kn −−33 ] Tk − 1

n

− (k − 2)

9 > > > > > > > > > > > > > > > =

+ T2 ] . n − (k − 1) + T1 ] >>> > > + 0] > > > > > + 0] > + 0]

> > > > ;

In t he above equat ions, t he rst t erm, M n , is t he average number of t ime slot s required for t he maximum nding algorit hm on n dat a element s. T he second t erm, n1 , is one of t he cases t hat each dat a element in M n successfully broadcast s it s value. T hen, t he rst successful broadcast may be one of t he n element s randomly, each case having probability n1 .

260

Shyue-Horng Shiau and Chang-Biau Yang 



T he t hird t erm T kn −−11 is t hat t he rst successful broadcast is t he largest dat a element in t he progress of t he maximum nding algorit hm. Since we have t he largest dat a element , we need t o nd t he k − 1 largest dat a element s among t he n − 1 dat a element s, which is present ed by T kn −−11 .   T he fourt h t erm T 00 + T kn −−22 is t hat t he rst successful broadcast is t he second largest dat a element . Obviously t he second successful broadcast is t he largest dat a element . T 00 represent s a N U L L layer because it is empty between t he largest and second largest dat a element s. And t he subt erm T kn −−22 represent s t hat we need t o nd t he k − 2 largest dat a element s among n − 2 dat a element s aft er t he largest and second largest dat a element s broadcast ing.   T he ( k + 3)t h t erm ( T kk −− 11 − M k − 1 ) + 0 is t hat t he rst successful broadcast is t he k t h largest dat a element . T hus, ( T kk −− 11 − M k − 1 ) is t he number of t ime slot s required for nishing t he sort ing on t he k − 1 element s aft er t he maximum is found. And since t he rst k , k  1, largest element s was found in t he layers upper t han t he rst successful broadcast element , t hus it dose not need any t ime slot s for sort ing dat a element s in t he lower layer. We omit t he explanat ion of t he rest of t he equat ion, since it is quit e similar t o t he above cases. Lem m a 3. L et L n

Tk



n

Tk

−1

=

=

n

L

n

+

M

1 n

n



L

n

M

−1

n

+

− 1, then

n

1 L n − 2 +  − 1

+

1 n

− ( k − 2)

L

n

− (k − 1) :

Lem m a 4. k

Tk

n

+ 4 [ln ( n − ( k − 2)) − ln 2] 

k



Tk

Tk

+ 5 ln ( n − ( k − 1)) :

T h e o re m 2 .

7 k + 4 ln ( n − ( k − 2)) − 2



1 + 4 ln 2 2





n

Tk



7 23 k + 5 ln ( n − ( k − 1)) − : 6 6

Mart el e t a l. [8] showed t hat t he expect ed t ime for nding t he rst k largest numbers is O ( k + log n ). However, t he const ant s associat ed wit h O ( k + log n ) bounds proved by Mart el e t a l. [8] are not very t ight . And t hey did not point out t he relat ionship between t he two special cases maximum nding and sort ing. By T heorem 2, we prove t hat t he average t ime complexity of nding t he rst k numbers is  ( k + log ( n − k )). And t he connect ion between t he two special cases, maximum nding and sort ing, is built by t he analysis of our generalizat ion.

6

C o n c lu s io n

T he layer concept [13] can help us t o reduce conflict resolut ion when an algorit hm is not conflict -free under BCM. In t his paper, we apply t he layer concept t o solve

A Fast Sort ing Algorit hm and It s Generalizat ion

261

t he sort ing problem and get a t ight er bound. T he t ot al average number of t ime slot s, including conflict slot s, empty slot s and slot s for successful broadcast s, is  ( n ). And t he generalizat ion of our sort ing algorit hm can be analyzed t hat t he average t ime complexity for select ing k largest numbers is  ( k + log ( n − k )). On t he high level view, our sort ing algorit hm has a similar approach as t hat proposed by Mart el e t a l. [8]. On t he low level view, our algorit hm is based on t he layer concept , t hus it can be analyzed easily and a t ight er bound can be obt ained. We are int erest ed in nding ot her maximum nding algorit hms which can be applied int o our sort ing approach and can get bet t er performance. T hat is one of our fut ure works. And t he ot her fut ure work is t o nd t he nat ive bound of t he sort ing approach under BCM.

R e fe re n c e s 1. Cap et anakis, J .I.: Tree algorit hms for packet broadcast channels. IEEE Transact ions on Informat ion T heory, 2 5 ( 5 ) (May 1997) 505{515 2. Decht er, R., Kleinrock, L.: Broadcast communicat ions and dist ribut ed algorit hms. IEEE Transact ions on Comput ers, 3 5 ( 3 ) (Mar. 1986) 210{219 3. Grabner, P.J ., P rodinger, H.: An asympt ot ic st udy of a recursion occurring in t he analysis of an algorit hm on broadcast communicat ion. Informat ion P rocessing Let t ers, 6 5 (1998) 89{93 4. Huang, J .H., Kleinrock, L.: Dist ribut ed select sort sort ing algorit hm on broadcast communicat ion. P arallel Comput ing, 1 6 (1990) 183{190 5. Levit an, S.: Algorit hms for broadcast prot ocol mult iprocessor. P roc. of 3rd Int ernat ional Conference on Dist ribut ed Comput ing Syst ems, (1982) 666{671 6. Levit an, S.P., Fost er C.C.: F inding an ext remum in a network. P roc. of 1982 Int ernat ional Symp osium on Comput er Archit echure, (1982) 321{325 7. Mart el, C.U.: Maximum nding on a mult i access broadcast n etwork. Informat ion P rocessing Let t ers, 5 2 (1994) 7{13 8. Mart el, C.U., Moh, M.: Opt imal priorit ized conflict resolut ion on a mult iple access channel. IEEE Transact ions on Comput ers, 4 0 ( 1 0 ) (Oct . 1991) 1102{1108 9. Mart el, C.U., Moh W .M., Moh T .S.: Dynamic priorit ized conflict resolut ion on mult iple access broadcast networks. IEEE Transact ions on Comput ers, 4 5 ( 9 ) (1996) 1074{1079 10. Ramarao, K.V.S.: Dist ribut ed sort ing on local area network. IEEE Transact ions on Comput ers, C - 3 7 ( 2 ) (Feb. 1988) 239{243 11. Shiau, S.H., Yang, C.B.: A fast maximum nding algorit hm on broadcast communicat ion. Informat ion P rocessing Let t ers, 6 0 (1996) 81{96 12. Shiau, S.H., Yang, C.B.: T he layer concept and conflict s on broadcast communicat ion. J ournal of Chang J ung Christ ian University, 2 ( 1 ) (J une 1998) 37{46 13. Yang, C.B.: Reducing conflict resolut ion t ime for solving graph problems in broadcast communicat ions. Informat ion P rocessing Let t ers, 4 0 (1991) 295{302 14. Yang, C.B.,Lee, R.C.T ., Chen, W .T .: P arallel graph algorit hms based up on broadcast communicat ions. IEEE Transact ions on Comput ers, 3 9 ( 1 2 ) (Dec. 1990) 1468{ 1472 15. Yang, C.B., Lee, R.C.T ., Chen, W .T .: Conflict -free sort ing algorit hm broadcast under single-channel and mult i-channel broadcast communicat ion models. P roc. of Int ernat ional Conference on Comput ing and Informat ion, (1991) 350{359

E c ie n t L is t R a n k in g A lg o rit h m s o n R e c o n g u ra b le M e s h ? Sung-Ryul Kim and Kunsoo P ark School of Comput er Science and Engineering, Seoul Nat ional University, Seoul 151-742, Korea f ki msr , kpar k g@t heor y. snu. ac. kr

A b s t r a c t . List ranking is one of t he fundament al t echniques in parallel algorit hm design. Hayashi, Nakano, and Olariu prop osed a det erminist ic list ranking algorit hm t hat runs in O (log ∗ n ) t ime and a randomized one t hat runs in O (1) exp ect ed t ime, b ot h on a recon gurable mesh of size n  n . In t his pap er we show t hat t he same det erminist ic and randomized t ime complexit ies can b e achieved using only O ( n 1+  ) processors, where  is an arbit rary p osit ive const ant < 1. To reduce t he numb er of processors, we adopt a recon gurable mesh of high dimensions and develop a new t echnique called path embeddi ng.

1

In t ro d u c t io n

T he recon gu rable m esh [11] or R M E S H combines t he advant ages of t he mesh wit h t he power and flexibility of a dynamically recon gurable bus st ruct ure. Recent ly, e cient algorit hms for t he RMESH have been developed for graph problems [2,3,15,12], image problems [8,12], geomet ric problems [6,11,12], and some ot her fundament al problems in comput er science [2,4,7,? ]. T he problem of list ran kin g is t o det ermine t he ran k of every node in a given linked list of n nodes. T he ran k of a node is de ned t o be t he number of nodes following it in t he list . In weight ed list ranking every node of a linked list has a weight . T he problem of weight ed list ranking is t o comput e, for every node in t he list , t he sum of weight s of t he nodes following it in t he list . Since t he unweight ed version is a special case of t he weight ed version of t he list ranking problem, we will solve t he weight ed version. T he list ranking problem has been st udied on RMESH. On an RMESH of size n  n , an O (log n ) t ime algorit hm for t he list ranking problem using a t echnique called poin t er ju m pin g [16] is implicit in [11,14]. Using a complicat ed algorit hm, Olariu, Schwing, and J hang [14] showed t hat t he problem can be  solved in O lologg mn t ime on an RMESH of size m n  n where m  n . Hayashi, Nakano, and Olariu proposed a det erminist ic list ranking algorit hm [5] running in  O (log n ) t ime and a randomized one running in O (1) t ime, bot h on an RMESH of size n  n . ?

T his work was supp ort ed by t he Brain Korea 21 P roject .

D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 2 6 2 { 2 7 1 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

E cient List Ranking Algorit hms on Recon gurable Mesh

263

In t his paper we generalize t he result in [5] t o d -dimensional RMESH for 3. As a result , we show t hat t he same det erminist ic and randomized t ime complexit ies as in [5] can be achieved using only O ( n 1 +  ) processors, where 0 <  < 1. In [5], a t echnique called bu s em beddin g is used. Bus embedding is easy on a 2-dimensional RMESH but it does not seem t o be easy on a d dimensional RMESH for d  3. We develop a new t echnique, which we call pat h em beddin g , t hat can be used t o implement t he bus embedding on an RMESH of high dimensions. d 

2

R M ESH

An RMESH of size n  n consist s of an n  n array of processors arranged as a 2-D grid and connect ed by a recon gurable bus syst em. See Fig. 1 for an example. P rocessors of t he n  n array are denot ed by P i ; j , 1  i ; j  n . Each processor has four port s, denot ed by N, S, E, and W. P ort s E and W are built along dimension x and port s N and S are built along dimension y . T hrough t hese port s processors are connect ed t o t he recon gurable bus. x 1

2

3

4

y 1 Processor 2 Switch 3

Reconfigurable Bus

4

F ig . 1 . T he RMESH archit ect ure

Di erent con gurat ions of t he recon gurable bus syst em can be est ablished by set t ing di erent local connect ions among port s wit hin each processor. For example, if each processor connect s E and W (N and S) port s t oget her, row buses (column buses) are est ablished. In a bus con gurat ion, maximal connect ed component s of t he con gurat ion are called su bbu se s of t he con gurat ion. In one t ime st ep a processor may perform a single operat ion on words of size O (log n ), set any of it s swit ches, or writ e dat a t o or read dat a from t he subbus. We assume t hat in each subbus at most one processor is allowed t o writ e t o t he subbus at one t ime. As in [9,10,11], we assume t hat dat a placed on a subbus reaches all processors connect ed t o t he subbus in unit t ime. We assume t hat each processor knows it s row and column indices. In addit ion, we also want processors t o know t heir ranks in some t ot al ordering on t he mesh. Of t he widely used orderings we describe t he row -m ajor ordering and t he sn a kelike ordering. In t he row-ma jor ordering, we number processors left t o right in

264

Sung-Ryul Kim and Kunsoo P ark x z

y

1

2 6

3 5

7 18

4 8

17

9 16 N

13

14 12

19

11

23 25

W 10

E D

S

21

20 24

F ig . 2 . A 3 

15

U

22 26

27

3  3 RMESH indexed in t he snake-like ordering

each row, beginning wit h t he t op row and ending wit h t he bot t om row. In t he snake-like ordering, we simply reverse every ot her row, so t hat processors wit h consecut ive indices are adjacent . We can assume t hat a processor init ially knows it s posit ions in t he row-ma jor ordering and t he snake-like ordering because t hey can be comput ed from it s indices in const ant t ime. Recon gurable meshes of high dimensions can be const ruct ed in a similar way. For example, in a 3-D RMESH, processors are denot ed by P i ; j ; k and each processor has six port s, denot ed by U, D, N, S, E, and W, where t he new port s U and D are built along dimension z . Also, t he row-ma jor and t he snake-like orderings can be generalized t o high dimensions. An example 3  3  3 RMESH indexed in t he snake-like ordering is shown in Fig. 2. In our algorit hms we will make use of t he algorit hm in [1] t hat sort s n element s in const ant t ime on an RMESH of size n 1 +  where  is an arbit rary posit ive const ant less t han or equal t o 1. Also in our algorit hms we will solve t he following version of t he packing problem: Given an n -element set X = f x 1 ; x 2 ; : : : ; x n g and a collect ion of predicat es P 1 ; P 2 ; : : : ; P m , where each x i sat is es exact ly one of t he predicat es and t he predicat e t hat each x i sat is es is already known, permut e t he element s of X in such way t hat for every 1  j  m t he element s of X sat isfying P j occur consecut ively. It is clear t hat t his version of t he packing problem is easier t han sort ing and can be solved using t he sort ing algorit hm.

3

P re v io u s A lg o rit h m s

In t his sect ion we describe t he det erminist ic and randomized algorit hms by Hayashi, Nakano, and Olariu [5]. Lat er, we will use t hese algorit hms as subrout ines, so we describe only t he part s of t he algorit hms relevant t o t his paper. In [5], t he input list L is given by t he pairs ( i ; l ( i )) at P 1 ; i , 1  i  n , where l ( i ) is t he node following node i in L . T he pair ( t ; t ) is given for t he last node t in L . In t he weight ed list ranking problem t he weight w i associat ed wit h each

E cient List Ranking Algorit hms on Recon gurable Mesh 2

5

4

1

6

3

1

2

3

4

5

6

265

1

2

3

4

5

6

F ig . 3 . An example bus embedding

node i is also given t o P 1 ; i . For a given linked list L = f ( i ; l ( i )) : 1  i  n g, t he corresponding bus con gurat ion can be obt ained by assigning node i t o t he diagonal processor P i ; i . See Fig. 3. T he fact t hat l ( i ) follows i in t he list is capt ured by a subbus connect ing P i ; i and P l ( i ) ; l ( i ) . T he subbus is formed by connect ing P i ; i and P i ; l ( i ) by a row bus and t hen connect ing P i ; l ( i ) and P l ( i ) ; l ( i ) by a column bus. T he bus con gurat ion formed in t his way is called t he bu s em beddin g of L . A bus embedding for L can be easily formed wit h two parallel broadcast st eps. Consider a subset S of L . T he S -shor t cu t of L is t he linked list obt ained from L by ret aining t he nodes in S only. Speci cally, an ordered pair ( p; q) belongs t o t he S -short cut if bot h p and q belong t o S and no nodes of L between p and q belong t o S . If ( p; q) belongs t o t he S -short cut , t he q-su blist is t he sublist of L st art ing at l ( p) and ending at q. A subset S of L is called a good r u lin g set if it sat is es t he following condit ions: 1. S includes t he last node of L , 2. S cont ains at most n 2 = 3 nodes, and 3. No p-sublist for p 2 S cont ains more t han n 1 = 2 nodes. It is shown in [5] t hat if a good ruling set of L is available, t hen t he list ranking problem can be solved in const ant t ime. Next , we describe how a good ruling set can be obt ained. 3 .1

T h e D e t e rm in is t ic G o o d R u lin g S e t A lg o rit h m

In [5], an algorit hm for ranking an n -node list on an RMESH of size 2n  2n is given and t he const ant fact or in t he number of processors can be removed by reducing t he input size using point er jumping. For convenience, we will describe t he algorit hm on an RMESH of size 2n  2n . T he algorit hm consist s of O (log n )

266

Sung-Ryul Kim and Kunsoo P ark

st ages and each st age obt ains a smaller short cut using t he short cut of t he previous st age. If we allocat e k  k processors for each node in t he list , we can have k parallel buses between two nodes (which are called a bu n d le of k buses). T he idea is t hat as t he short cut s get smaller, larger bundles of buses are available. And when a larger bundle is available, a much smaller short cut can be obt ained in t he next st age. Init ially, a bundle consist ing of 2 buses are available. We need a few de nit ions here. A k -sam ple of a linked list L is a set of nodes obt ained by ret aining every k -t h node in L , t hat is, nodes whose unweight ed  ranks are 0, k , 2k , : : : , n −k 1 k . Let L =k denot e t he short cut consist ing of a k -sample. linked list

bus configuration

F ig . 4 . Illust rat ing t he concept of bundle of buses wit h cyclic shift

We describe how L =k can be obt ained from L using a bundle of k buses. Assume t hat a bundle of k buses are available. See Fig. 4 for a concept ual descript ion. T he k buses are shift ed cyclically as t he buses pass each node, as illust rat ed in Fig. 4. If a signal is sent from t he t opmost bus in t he last node of L , t he signal passes t hrough t he t opmost bus of every k -t h subsequent node. T he desired k -sample consist s of such nodes. Assume t hat a bundle of k buses is available for each node in a sublist . We use t he following parallel p re x rem a in der t echnique. Let p 1 (= 2) ; p2 (= 3) ; p3 (= 5) ; : : : ; pq be t he rst q prime numbers such t hat p 1 + p2 +   + pq  k < p 1 + p 2 +   + p q + p q + 1 . Since k buses are available, we can form q separat e bundles of p1 ; p2 ; : : : ; and pq buses. Hence, for a list L , q linked list s L =p1 ; L =p2 ; : : : ; L =pq can be comput ed in const ant t ime. Having done t hat , we ret ain in t he sample only t he nodes common t o all t he q linked list s L =p1 ; L =p2 ; : : : ; L =pq . In ot her words, we select node p only if it s rank r ( p) in L sat is es: r ( p ) mod p 1 = r ( p ) mod p 2 =  

= r ( p) mod pq = 0:

For such node p, r ( p) mod p 1 p2   pq = 0. Hence, using t he bundle of k buses, we can obt ain L =( p1 p2   pq ) from L in const ant t ime, where p1 + p2 +   + pq  + pq + pq + 1 . k < p1 + p2 +   p Now, [5] est imat es t hat p1 p2  

p q = 2

(

k

lo g

k

)

. Let K ( t ) be p an int eger such K ( t + 1 ) lo g ( k + 1 ) )  ( t hat L =K ( t ) is comput ed in t he t -t h it erat ion. T hen K ( t + 2) = 2

E cient List Ranking Algorit hms on Recon gurable Mesh (K (t ))

and K (1) = 2 holds. Since K ( t )  it erat ions is bounded by O (log n ). > 2

3.2

p

n is su

267

cient , t he number of

T h e R a n d o m iz e d G o o d R u lin g S e t A lg o rit h m

T he randomized good ruling set algorit hm in [5] is t he following. S t e p 1 . Each P i ; i randomly select s node i as a sample in S wit h probability n − 5= 12 . S t e p 2 . Check whet her S is a good ruling set . If S is a good ruling set , t he

algorit hm t erminat es; ot herwise repeat St ep 1. It is easy t o see t hat St ep 2 of t he algorit hm can be implement ed t o work in const ant t ime using t he bus embedding and packing. It is proven in [5] t hat t he expect ed number of select ions before t he algorit hm t erminat es is O (1).

4

R e d u c in g t h e N u m b e r o f P ro c e s s o rs

In t his sect ion we show how we can reduce t he number of processors t o O ( n 1 +  ) by adopt ing an RMESH of high dimensions. First , x a const ant d , which is a nat ural number larger t han 1. We will implement t he det erminist ic and randomcn 1 = d ized algorit hms on a ( d + 1)-dimensional RMESH of size cn 1 = d  cn 1 = d     d+ 1 1+ 1= d for some const ant c, which consist s of c n processors. We rst enhance each processor in RMESH so t hat t here are C port s in each direct ion where C is a const ant . We will call a processor enhanced in such a way a su per processor . For example, in 2-D, a processor has C port s in each direct ion named E (1) ; E (2) ; : : : ; E ( C ) ; W (1) ; : : : ; S ( C ). It should be not ed t hat t his is not a drast ic diversion from t he de nit ion of RMESH since a const ant number of regular processors can simulat e a superprocessor if C is a const ant . We will call an RMESH consist ing of superprocessors a su per -R M E S H . We denot e by S P i ; j ; : : : ; k t he superprocessor at locat ion ( i ; j ; : : : ; k ) in a super-RMESH. Also, we denot e by S P ( i ) t he superprocessor whose index is i in t he snake-like ordering in a super-RMESH. We assume t hat t he input is given in t he rst n superprocessors, indexed in n 1 = d , which t he snake-like ordering, of a super-RMESH of size n 1 = d  n 1 = d    1= d 1= d 1= d  cn    cn for some can be simulat ed by an RMESH of size cn const ant c. Given a list L , a subset S of L is a d -good ruling set of L if 1. S includes t he last node of L , 2. S cont ains at most n 3 = 2 d nodes, and 3. no p-sublist for p 2 S cont ains more t han 2( d − 1 ) = d nodes. Each of our two algorit hms consist s of two part s. In t he rst part , we obt ain t he d -good ruling set of L using t he bus embedding. In t he second part , we rank L recursively, using t he d -good ruling set obt ained in t he rst part . We will describe t he second part rst .

268

Sung-Ryul Kim and Kunsoo P ark

To use recursion in t he second part , we ext end t he list ranking problem slight ly so t hat a number of list s L 1 ; L 2 ; : : : ; L m are t o be individually ranked, where t he t ot al number of nodes do not exceed n . On RMESH, t he nodes are given one node per processor in processors P (1) t hrough P ( n ) so t hat t he nodes in each list appear consecut ively in t he snake-like ordering wit h t he boundaries between t he list s marked. We assume, for simplicity, t hat exact ly n nodes are given in t he ext ended list ranking problem. Let s j and t j be t he rst and t he last node in each L j , respect ively. To reduce t he problem t o normal list ranking, we connect t j wit h s j + 1 for each 1  j < m . T hen we rank t he result ing list by a normal list ranking algorit hm. To obt ain ranks in each list , we subt ract t he rank of t j from t he rank of each node in L j . T he det ails are omit t ed. 4.1

T h e S e c o n d P a rt

Since t he second part s of t he det erminist ic and t he randomized algorit hms are analogous, we describe t he second part of t he det erminist ic algorit hm only. Assume we have a short cut S of L . We rst show t hat if we can rank all p -sublist s for p 2 S in t ime T and rank t he short cut S in t ime T 0, t hen we can rank L in t ime T + T 0 + D , where D is a const ant independent of L . First , rank t he p-sublist s for p 2 S in t ime T . Let s p be t he rst node in a p-sublist . Let r p ( s p ) be t he weight ed rank of s p in t he p -sublist and let W p be r p ( s p ) + w , where w is t he weight of s p . Rank S using W p as t he weight of p in S . Let R p be t he comput ed rank of p. Now, use packing t o move t he nodes in a sublist t o adjacent superprocessors and broadcast R p among t he superprocessors holding t he nodes in t he p-sublist . Now, t he rank of node i in t he p-sublist is r p ( i ) + R p , where r p ( i ) is t he rank of node i in t he p-sublist . Assume t hat d = 2. We have n nodes on a super-RMESH of size n 1 = 2  n 1 = 2  n 1 = 2 . Assume t hat we have obt ained a 2-good ruling set S in t he rst part . Now, S cont ains at most n 3 = 4 nodes and each p-sublist for p 2 S cont ains at most n 1 = 2 nodes. All t he p-sublist s can be ranked simult aneously in O (log n ) t ime by dist ribut ing t he sublist s t o n 1 = 2 submeshes of size n 1 = 2  n 1 = 2 using t he det erminist ic algorit hm in [5]. All we have t o do now is t o rank S . We apply t he d -good ruling set algorit hm t o S and obt ain a 2-good ruling set S 0 of S . Now, t he p0-sublist s for p0 2 S 0 can be ranked as before using t he det erminist ic algorit hm in [5]. S 0 cont ains at most n 9 = 1 6 nodes. To rank S 0, we apply t he d -good ruling set algorit hm once again t o S 0 and obt ain a 2-good ruling set S 00 of S 0. Now, S 00 cont ains at most n 2 7 = 6 4 < n 1 = 2 nodes and S 00 and t he sublist s of S 0 and S 00 can be ranked using t he det erminist ic algorit hm in [5]. T he t ime for t he second part is O (log n ). Assume t hat d > 2. Assume t hat we have obt ained t he d -good ruling set S in t he rst part . Each p -sublist for p 2 S cont ains at most n ( d − 1 ) = d nodes and hence all t he sublist s can be recursively ranked simult aneously in O (log n ) t ime by dist ribut ing t he sublist s t o a d -dimensional super-RMESH of size n 1 = d  n 1 = d . Also, S has at most n 3 = 2 d < n ( d − 1 ) = d nodes and can be ranked n 1= d    recursively. T he t ime for t he second part is O (log n ).

E cient List Ranking Algorit hms on Recon gurable Mesh 4.2

269

B u s E m b e d d in g

T he main di culty in generalizing t he list ranking algorit hms is t hat t he bus embedding it self is not easy in high dimensions. To const ruct a bus embedding, we develop a new t echnique called pat h em beddin g , which can be used along wit h any dat a m ovem en t algorit hm. By a dat a movement algorit hm we mean an algorit hm where a dat a it em is t reat ed as one ob ject and not hing is assumed about it s int ernal represent at ion. T he number of processors increases slight ly wit h pat h embedding but t he t echnique int roduces only const ant fact or in t he number of processors if t he dat a movement algorit hm works in const ant t ime. A lg o rit h m P a t h - E m b e d S t a g e 1 . Let C be t he number of st eps of t he dat a movement algorit hm. Run t he dat a movement algorit hm while using t he j -t h port s in each direct ion of a superprocessor in t he j -t h st ep of t he dat a movement algorit hm. Each superprocessor ret ains t he bus con gurat ion and remembers every bus operat ion it performs. S t a g e 2 . If a superprocessor read an it em in t he j -t h st ep and wrot e t he it em in t he k -t h st ep, j < k , t he superprocessor connect s it s X ( j ) and Y ( k ) port s t oget her, where X ( j ) is t he direct ion it read t he node in t he j -t h st ep and Y ( k ) is t he direct ion it wrot e t he node in t he k -t h st ep. Repeat for all possible values of j and k .

Now we can implement t he bus embedding in const ant t ime as follows. We assume t hat t here are C port s in each direct ion of a superprocessor, where C is t he number of st eps of t he sort ing algorit hm. A lg o rit h m E m b e d S t e p 1 . Ident ify t he rst node in t he list by sort ing t he nodes ( i ; l ( i )) by l ( i ) and checking for t he unique int eger between 1 and n t hat is not present among t he l ( i )’s. Let ( s; l ( s )) be t he rst node. S t e p 2 . Temporarily replace t he last node ( t ; t ) by ( t ; s ), t hat is l ( t ) = s . Run algorit hm P a t h - E m b e d wit h t he sort ing algorit hm t hat sort s t he nodes ( i ; l ( i )) by l ( i ) (int o t he snake-like ordering). S t e p 3 . For each i t hat is not t he rst or t he last node in t he list , S P ( i ) connect s it s X (1) port and Y ( C ) port , where X (1) is t he direct ion where it wrot e it s node, ( i ; l ( i )), in t he rst st ep of t he sort and Y ( C ) is t he direct ion it read i in t he nal st ep of t he sort .

4 .3

T h e D e t e rm in is t ic

d

- G o o d R u lin g S e t A lg o rit h m

In t his subsect ion, we assume t hat n nodes are given on a ( d + 1)-dimensional (2n ) 1 = d . We rst show t hat we super-RMESH of size (2n ) 1 = d  (2n ) 1 = d   

270

Sung-Ryul Kim and Kunsoo P ark SPE( ki-k +1)

SPE( ki-k +2)

F

X(1)

SPE( ki)

B

F

B

F’ B’

F’

B’

Y(C)

X(1)

Y(C)

X(1)

Y(C)

F ig . 5 . Implement ing t he cyclic shift modulo k wit h superprocessors

can obt ain a d -good ruling set in O (log n ) t ime on a ( d + 1)-dimensional super(2n ) 1 = d . First we use sort ing t o allocat e RMESH of size (2n ) 1 = d  (2n ) 1 = d     two superprocessors S P (2i − 1) and S P (2i ) for each node i . Assume t hat we have k superprocessors S P ( k i − k + 1) t hrough S P ( k i ) allocat ed for each node (init ially k = 2). S P ( k i ) will be called t he t opmost superprocessor for node i . Now, a bundle of k buses and a cyclic shift modulo k can be const ruct ed by modifying Algorit hm Embed. To implement t he cyclic shift modulo k we add four more port s F ; F 0; B ; and B 0 t o each superprocessor such t hat for S P ( i ), F and F 0 connect s S P ( i ) wit h S P ( i + 1) and B and B 0 connect s S P ( i ) wit h S P ( i − 1). See Fig. 5 for an illust rat ion of t he cyclic shift . Now we can implement t he parallel pre x remainder t echnique described in sect ion 3 using t he cyclic shift . We can obt ain a d -good ruling set in O (log n ) t ime on a ( d + 1)-dimensional super-RMESH of size (2n ) 1 = d  (2n ) 1 = d    (2n ) 1 = d . 

T h e o re m 1 . A d -good r u lin g set can be com pu t ed in O (log n ) t im e on a ( d + 1) (2n ) 1 = d , w here d is dim en sion al su per -R M E S H of size (2n ) 1 = d  (2n ) 1 = d    a con st an t . 

T h e o re m 2 . T he list ran kin g can be per for m ed in O (log n ) t im e on a ( d + 1) cn 1 = d , w here c an d d are dim en sion al R M E S H of size cn 1 = d  cn 1 = d    con st an t s.

4.4

T h e R a n d o m iz e d

d

- G o o d R u lin g S e t A lg o rit h m

Our randomized d -good ruling set algorit hm on a ( d + 1)-dimensional superRMESH is t he following. Not e t hat St ep 2 can be performed in const ant t ime using t he bus embedding and packing. S t e p 1 . Each S P ( i ) randomly select s node i as a sample in S wit h probability n (5− 4d )= 4d . S t e p 2 . Check whet her S is a d -good ruling set . If S is a d -good ruling set ,

t he algorit hm t erminat es; ot herwise repeat St ep 1. T he proofs of t he following t heorems are omit t ed.

E cient List Ranking Algorit hms on Recon gurable Mesh

271

T h e o re m 3 . A d -good r u lin g set can be com pu t ed in con st an t ex pect ed t im e on n 1 = d , w here d is a ( d + 1) -dim en sion al su per -R M E S H of size n 1 = d  n 1 = d     a con st an t . T h e o re m 4 . T h e list ra n kin g can be per fo r m ed in con st an t ex pect ed t im e on a cn 1 = d    cn 1 = d , w here c an d d are con st an t s.

( d + 1) -dim en sion al R M E S H of size cn 1 = d 

R e fe re n c e s 1. Chen, Y. C. and Chen, W . T .: Const ant T ime Sort ing on Recon gurable Meshes. IEEE Transact ions on Comput ers. Vol. 43, No. 6 (1994) 749{751 2. Chen, G. H. and Wang, B. F .: Sort ing and Comput ing Convex Hull on P rocessor Arrays wit h Recon gurable Bus Syst em. Informat ion Science . 72 (1993) 191{206 3. Chen, G. H., Wang, B. F ., and Lu, C. J .: On P arallel Comput at ion of t he Algebraic P at h P roblem. IEEE Transact ions on P arallel and Dist ribut ed Syst ems. Vol. 3, No. 2, Mar. (1992) 251{256 4. Hao, E., MacKenzie, P. D., and St out , Q. F .: Select ion on t he Recon gurable Mesh. P roc. of fourt h Symp osium on t he Front iers of Massively P arallel Comput at ion. (1992) 38{45 5. Hayashi, T ., Nakano, K., and Olariu, S.: E cient List Ranking on t he Recon gurable Mesh, wit h Applicat ions. P roc. of 7t h Int ernat ional Simp osium on Algorit hms and Comput at ion, ISAAC’96. (1996) 326-335 6. J ang, J . and P rasanna, V. K.: E cient P arallel Algorit hms for Geomet ric P roblems on Recon gurable Mesh. P roc. of Int ernat ional Conference on P arall el P rocessing. 3 (1992) 127{130 7. J ang, J . and P rasanna, V. K.: An Opt imal Sort ing Algorit hm on Recon gurable Mesh. Int ernat ional P arallel P rocessing Symp osium. (1992) 130{137 8. J enq, J . F . and Sahni, S.: Recon gurable Mesh Algorit hms f or t he Hough Transform. P roc. of Int ernat ional Conference on P arallel P rocessing. 3 (1991) 34{41 9. Li, H. and Maresca, M.: P olymorphic-t orus Network. IEEE Transact ions on Comput ers. 38 (1989) 1345{1351 10. Maresca, M.: P olymorphic P rocessor Arrays. IEEE Transact ions on P arallel and Dist ribut ed Syst ems. 4 (1993) 490{506 11. Miller, R., P rasanna Kumar, V. K., Reisis, D. I., and St out , Q. F .: P arallel Comput at ions on Recon gurable Mesh. Technical Rep ort # 229. US C, Mar. (1922) 12. Miller, R. and St out , Q. F .: E cient P arallel Convex Hull Algorit hms. IEEE Transact ions on Comput er. Vol 37, No. 12, Dec. (1988) 1605{1618 13. Niven, I., Zuckerman, H. S., and Mont gomery, H. L.: An Int roduct ion t o t he T heory of Numb ers, F ift h Edit ion. (1991) J ohn W iley & Sons 14. Olariu, S., Schwing, J . L., and J hang, J .: Fundament al Algorit hms on Recon gurable Meshes. P roc. of 29t h Annual Allert on Conference on Communicat ion, Cont rol, and Comput ing. (1991) 811{820 15. Wang, B. F . and Chen, G. H.: Const ant T ime Algorit hms for t he Transit ive Closure and Some Relat ed Graph P roblems on P rocessor Arrays wit h Recon gurable Bus Syst em. IEEE Transact ions on P arallel and Dist ribut ed Syst ems. Vol. 1, No. 4, Oct . (1990) 500{507 16. W ylie, J . C.: T he Complexity of P arallel Comput at ion. Doct oral T hesis, Cornell University. (1979)

T rip o d s D o N o t P a ck D e n s e ly Alexandre T iskin Depart ment of Comput er Science, University of Warwick, Covent ry CV4 7AL, Unit ed Kingdom t i ski n@dcs. war wi ck. ac. uk

In 1994, S. K. St ein and S. Szabo p osed a problem concerning simple t hree-dimensional shap es, known as semicrosses, or t rip ods. By denit ion, a t rip od is formed by a corner and t he t hree adjace nt edges of an int eger cub e. How densely can one ll t he space wit h non-ov erlapping t rip ods of a given size? In part icular, is it p ossible t o ll a const ant fract ion of t he space as t he t rip od size t ends t o in nity? In t his pap er, we set t le t he second quest ion in t he negat ive: t he fract ion of t he space t hat can b e lled wit h t rip ods of a growing size must b e in nit ely small.

A b st r a c t .

1

In t ro d u c t io n

In [SS94, St e95], S. K. St ein and S. Szabo posed a problem concerning simple t hree-dimensional polyominoes, called \ semicrosses" in [SS94], and \ t ripods" in [St e95]. A t r ipod of size n is formed by a corner and t he t hree adjacent edges of an int eger n  n  n cube (see F igure 1). How densely can one ll t he space wit h non-overlapping t ripods of size n ? In part icular, is it possible t o keep a const ant fract ion of t he space lled as n ! 1 ? Despit e t heir simple formulat ion, t hese two quest ions appear t o be yet unsolved. In t his paper, we set t le t he second quest ion in t he negat ive: t he density of t ripod packing has t o approach zero as t ripod size t ends t o in nity. It is easy t o prove (see [SS94]) t hat t his result implies similar result s in dimensions higher t han t hree. Inst ead of dealing wit h t he problem of packing t ripods in space direct ly, we address an equivalent problem, also int roduced in [SS94, St e95]. In t his alt ernat ive set t ing, t ripods of size n are t o be packed wit hout overlap, so t hat t heir corner cubes coincide wit h one of t he unit cells of an n  n  n cube. We may also assume t hat all t ripods have t he same orient at ion. If we denot e by f ( n ) t he maximum number of non-overlapping t ripods in such a packing, t hen t he maximum fract ion of space t hat can be lled wit h arbit rary non-overlapping t ripods is proport ional t o f ( n ) =n 2 (see [SS94] for a proof). T he only known values of funct ion f are f (1) up t o f (5): 1, 2, 5, 8, 11. It is easy t o see t hat for all n , n  f ( n )  n 2 . St ein and Szabo’s quest ions are concerned wit h t he upper bound of t his inequality. T hey can now be rest at ed as follows: what is t he asympt ot ic behaviour of f ( n ) =n 2 as n ! 1 ? In part icular, is f ( n ) = o( n 2 ), or is f ( n ) bounded away from 0? D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 2 7 2 { 2 8 0 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

Trip ods Do Not P ack Densely

F ig . 1 .

273

A t ripod of size n = 4

In t his paper we show t hat , in fact , f ( n ) = o( n 2 ), so t he fract ion of t he space t hat can be lled wit h t ripods of a growing size is in nit ely small. Our proof met hods are t aken from t he domain of ext remal graph t heory. Our main t ools are two powerful, widely applicable graph-t heoret ic result s: Szemeredi’s Regularity Lemma, and t he Blow-up Lemma.

2

P re lim in a rie s

T hroughout t his paper we use t he st andard language of graph t heory, slight ly adapt ed for our convenience. A graph G is de ned by it s set of nodes V ( G ), and it s set of edges E ( G ). All considered graphs are simple and undirect ed. T h e s iz e of a graph G is t he number of it s nodes j V ( G ) j ; t he ed ge co u n t is t he number of it s edges j E ( G ) j . A graph H is a s u bgra p h of G , denot ed H  G , i V ( H )  V ( G ), E ( H )  E ( G ). Subgraph H  G is a s pa n n in g s u bgra p h of G , denot ed H v G , i V ( H ) = V ( G ). A complet e graph on r nodes is denot ed K r . T he t erm k -pa r t it e gra p h is synonymous wit h \ k -coloured" . We writ e bipa r t it e for \ 2-part it e" , and t r ipa r t it e for \ 3-part it e" . Complet e bipart it e and t ripart it e graphs are denot ed K r s and K r s t , where r , s , t are sizes of t he colour classes. Graph K 2 = K 1 1 (short for K 1 ; 1 ) is a single edge; we call it s complement K 2 (an empty graph on two nodes) a n o n ed ge . Graph K 3 = K 1 1 1 is called a t r ia n gle ; graph K 1 2 1 is called a d ia m o n d (see F igure 2). We call a k -part it e graph equ i- k - pa r t it e , if all it s colour classes are of equal size. T h e d e n s it y of a graph is t he rat io of it s edge count t o t he edge count of a complet e graph of t he same size: if G v K n , t hen

 dens( G ) = j E ( G ) j =j E ( K n ) j = j E ( G ) j =

n

2

 :

274

Alexandre T iskin b

b

b

b

F ig . 2 .

T he diamond graph K 1 2 1

T he bipa r t it e d e n sit y of a bipart it e graph G v K m

n

is

dens2 ( G ) = j E ( G ) j =j E ( K m n ) j = j E ( G ) j =( m n ) : Similarly, t he t r ipa r t it e d e n s it y of a t ripart it e graph G v K m dens3 ( G ) = j E ( G ) j =j E ( K m

n p

n p

is

) j = j E ( G ) j =( m n + n p + pm ) :

Let H be an arbit rary graph. Graph G is called H -co v e red , if every edge of G belongs t o a subgraph isomorphic t o H . Graph G is called H -free , if G does not cont ain any subgraph isomorphic t o H . In part icular, we will be int erest ed in t riangle-covered diamond-free graphs. Let us now est ablish an upper bound on t he density of an equit ripart it e diamond-free graph. L e m m a 1 . T h e t r ipa r t it e d en s it y o f a n equ it r ipa r t it e d ia m o n d -free gra p h G is a t m o s t 3 =4 .

P roo f. Denot e j V ( G ) j = 3n . By Dirac’s generalisat ion of Turan’s t heorem (see e.g. [Gou88, p. 300]), we have j E ( G ) j  (3n ) 2 =4. Since j E ( K n n n ) j = 3n 2 , t he

tu

t heorem follows t rivially.

T he upper bound of 3=4 given by Lemma 1 is not t he best possible. However, t hat bound will be su cient t o obt ain t he result s of t his paper. In fact , any const ant upper bound st rict ly less t han 1 would be enough.

3

T h e R e g u la rit y Le m m a a n d t h e B lo w -U p Le m m a

In most de nit ions and t heorem st at ement s below, we follow [KS96, Kom99, Die00]. For a graph G , and node set s X ; Y  V ( G ), X \ Y = ; , we denot e by G ( X ; Y )  G t he bipart it e subgraph obt ained by removing from G all nodes except t hose in X [ Y , and all edges adjacent t o removed nodes. Let F be a bipart it e graph wit h colour classes A , B . Given some  > 0, graph F is called  regu la r , if for any X  A of size j X j   j A j , and any Y  B of size j Y j   j B j , we have

j dens2 ( F ( X ; Y )) − dens2 ( F ) j 

 :

Trip ods Do Not P ack Densely

275

Let G denot e an arbit rary graph. We say t hat G admit s a n  - pa r t it io n in g o f o rd e r m , if V ( G ) can be part it ioned int o m disjoint subset s of equal size, called s u pe r n od e s , such t hat for all pairs of supernodes A , B , t he bipart it e subgraph G ( A ; B ) is  -regular. T he  -regular subgraphs G ( A ; B ) will be called su pe r pa ir s . For dierent choices of supernodes A , B , t he density of t he superpair G ( A ; B ) may dier. We will dist inguish between superpairs of \ low" a nd \ high" density, det ermined by a carefully chosen t hreshold. For a xed d , 0  d  1, we call a superpair G ( A ; B ) a s u pe red ge , if dens2 ( G ( A ; B ))  d , and a s u pe r -n o n ed ge , if dens2 ( G ( A ; B )) < d . Now, given a graph G , and it s  -part it ioning of order m , we can build a high-level represent at ion of G by a graph of size m , which we will call a d -m a p of G . T he d -map M cont ains a node for every supernode of G . T wo nodes of M are connect ed by an edge, if and only if t he corresponding supernodes of G are connect ed by a superedge. T hus, edges and nonedges in M represent , respect ively, superedges and super-nonedges of G . For a node pair (edge or nonedge) e in G , we denot e by  ( e) t he corresponding pair in t he d -map M . We call  : E ( G ) ! E ( M ) t h e m a p p in g fu n c t io n . T he union of all superedges  − 1 ( E ( M ))  E ( G ) will be called t h e s u pe red ge s u bgra p h o f G . Similarly, t he union of all super-nonedges in G will be called t h e s u pe r -n o n ed ge s u bgra p h o f G . We rely on t he following fact , which is a rest rict ed version of t he Blow-up Lemma (see [Kom99]). T h e o re m 1 ( B lo w -u p L e m m a ) .

L e t d >  > 0. L e t G be a gra p h w it h a n  -pa r t it io n in g, a n d le t M be it s d -m a p . L e t H be a s u bgra p h o f M w it h m a x im u m d egree  > 0. I f   ( d −  )  =(2 +  ) , t h e n G co n t a in s a s u bgra p h is o m o r p h ic t o H . P roo f. See [Kom99].

tu

Since we are int erest ed in diamond-free graphs, we t ake H t o be a diamond. We simplify t he condit ion on d and  , and apply t he Blow-up Lemma in t he following form: if   ( d −  ) 3 =5, and G is diamond-free, t hen it s d -map M is also diamond-free. Our main t ool is Szemeredi’s Regularity Lemma. Informally, it st at es t hat any graph can be t ransformed int o a graph wit h an  -part it ioning by removing a small number of nodes and edges. It s precise st at ement , slight ly adapt ed from [KS96], is as follows. T h e o re m 2 ( R e g u la rit y L e m m a ) .

L e t G be a n a r bit ra r y gra p h . Fo r e v e r y  > 0 t h e re is a n m = m (  ) s u c h t h a t fo r s o m e G 0  G w it h j E ( G ) n E ( G 0 ) j    j V ( G ) j 2 , gra p h G 0 a d m it s a n  -pa r t it io n in g o f o rd e r a t m o s t m . P roo f. See e.g. [KS96, Die00].

tu

T he given form of t he Regularity Lemma is slight ly weaker t han t he st andard one. In part icular, we allow t o remove a \ small" number of nodes and edges from t he graph G , whereas t he st andard version only allows t o remove a \ small"

276

Alexandre T iskin

F ig . 3 .

An axial collision

number of nodes (wit h adjacent edges), and t hen a \ small" number of superpairs. In our cont ext , t he dierence between two versions is insig ni cant . Not e t hat if j E ( G ) j = o( j V ( G ) j 2 ), t he st at ement of t he Regularity Lemma becomes t rivial. In ot her words, t he Regularity Lemma is only useful for dense graphs.

4

P a ck in g T rip o d s

Consider a packing of t ripods of size n in an n  n  n cube, of t he type described in t he Int roduct ion (no overlaps, similar orient at ion, corner cubes coinciding wit h n  n  n cube cells). A t ripod in such a packing is uniquely de ned by t he coordinat es of it s corner cube ( i ; j ; k ), 0  i ; j ; k < n . Moreover, if two of t he t hree coordinat es ( i ; j ; k ) are xed, t hen t he packing may cont ain at most one t ripod wit h such coordinat es | ot herwise, t he two t ripods wit h an equal pair of coordinat es would form an a x ia l co llis io n , depict ed in F igure 3. We represent a t ripod packing by an equit ripart it e t riangle-covered graph G v K n n n as follows. T hree color classes U = f u i g, V = f v j g, W = f w k g, 0  i ; j ; k < n , correspond t o t he t hree dimensions of t he cube. A t ripod ( i ; j ; k ) is represent ed by a t riangle f ( u i ; v j ) ; ( v j ; w k ) ; ( w k ; u i ) g. To prevent axial collisions, t riangles represent ing di erent t ripods must be edge-disjoint . Hence, if m is t he number of t ripods in t he packing, t hen t he represent ing graph G cont ains 3m edges. We now prove t hat t he graph G is diamond-free. In general, G might cont ain a t riangle wit h t hree edges coming from t hree di erent t ripods; such a t riangle would give rise t o t hree diamonds. To prove t hat such a sit uat ion is impossible, we must consider, apart from axial collisions, also s im p le co llis io n s , depict ed in F igure 4. L e m m a 2 . A t r ipod pa c k in g gra p h is d ia m o n d -free .

P roo f. It is su

cient t o show t hat t he t ripod packing graph does not cont ain any t riangles apart from t hose represent ing t ripods. Suppose t he cont rary: t here is a t riangle f ( u i ; v j ) ; ( v j ; w k ) ; ( w k ; u i ) g, which does not represent any t ripod. T hen

Trip ods Do Not P ack Densely

F ig . 4 .

277

A simple collision

it s t hree edges must come from t riangles represent ing t hree dierent t ripods; = i 0, j 6 = j 0, k 6 = k 0. denot e t hese t ripods ( i ; j ; k 0), ( i ; j 0; k ), ( i 0; j ; k ), where i 6 0 0 0 Consider t he dierences i − i , j − j , k − k , all of which are non-zero. At least two of t hese t hree dierences must have t he same sign; wit hou t loss of generality assume t hat i 0− i , j 0− j are of t he same sign. T hus, we have eit her i 0 < i , j 0 < j , or i 0 > i , j 0 > j . In bot h cases, t he t ripods ( i ; j 0; k ), ( i 0; j ; k ) collide. Hence, our assumpt ion must be false, and t he t riangle f ( u i ; v j ) ; ( v j ; w k ) ; ( w k ; u i ) g not represent ing any t ripod cannot exist . T herefore, no t riangles in G can share an edge | in ot her words, G is diamond-free. tu T hus, t ripod packing graphs are equit ripart it e, t riangle-covered and diamondfree. Not e t hat t hese graph propert ies are invariant under any permut at ion of graph nodes wit hin colour classes, whereas t he property of a t ripod packing being overlap-free is not invariant under permut at ion of indices wit hin each dimension. Hence, t he converse of Lemma 2 does not hold. However, even t he loose charact erisat ion of t ripod packing graphs by Lemma 2 is su cient t o obt ain our result s. T he following t heorem is a special case of an observat ion at t ribut ed t o Szemeredi by Erd}os (see [Erd87], [CG98, p. 48]). Since Szemeredi’s proof is apparent ly unpublished, we give an independent proof of our special case. T h e o r e m 3 . C o n s id e r a n equ it r ipa r t it e , t r ia n gle -co v e red , d ia m o n d -free gra p h o f s iz e n . T h e m a x im u m d e n s it y o f s u c h a gra p h t e n d s t o 0 a s n ! 1 .

P roo f. Suppose t he cont rary: for some const ant d > 0, and for an arbit rarily large n (i.e. for some n  n 0 for any n 0 ), t here is a t ripart it e, t riangle-covered, diamond-free graph G of size n , such t hat dens3 ( G )  d > 0. T he main idea of t he proof is t o apply t he Regularity Lemma and t he Blow-up Lemma t o t he graph G . T his will allow us t o \ dist il" from G a new graph, also t riangle-covered and diamond-free, wit h t ripart it e density higher t han dens3 ( G ) by a const ant fact or . Repeat ing t his process, we can raise t he density t o 2 d , 3 d , et c., unt il t he density becomes higher t han 1, which is an obvious cont radict ion.

278

Alexandre T iskin

Let us now ll in t he det ails of t he \ dist illing" process. We st art wit h a const ant γ , 0 < γ < 1; it s precise numerical value will be det ermined lat er. Select a const ant > 0, such t hat  ( γ d − ) 3 =5, as required by t he Blow-up Lemma. By t he Regularity Lemma, graph G admit s an -regular part it ioning, t he order of which is const ant and independent of t he size of G . Denot e by M t he γ d -map of t his part it ioning, and let  : G ! M be t he mapping funct ion. Consider t he superedge subgraph  − 1 ( E ( M )). Let G 4 v  − 1 ( E ( M )) v G be a spanning subgraph of G , consist ing of all t riangles co m p le t e ly co n t a in ed in  − 1 ( M ); in ot her words, each t riangle in G 4 is complet ely cont ained in some supert riangle of G . We claim t hat G 4 cont ains a signi cant fract ion of all t riangles (and, hence, of all edges) in G . Indeed, t he bipart it e density of a super-nonedge is by de nit ion at most γ d , hence t he super-nonedge subgraph has at most 3γ d  n 2 edges. Every t riangle not complet ely cont ained in  − 1 ( E ( M )) must have at least one edge in t he super-nonedge subgraph; since t riangles in G are edge-disjoint , t he t ot al number of such t riangles cannot exceed 3γ d  n 2 . By init ial assumpt ion, t he t ot al number of t riangles in G is at least d  n 2 , t herefore t he number of t riangles in G 4 must be at least (1 − 3γ ) d  n 2 . By select ing a su cient ly small γ , we can make t he number of t riangles in G 4 arbit rarily close t o d  n 2 . For t he rest t he proof, let us x t he const ant γ wit hin t he range 0 < γ < 1=12, e.g. γ = 1=24. As a corresponding we can t ake e.g. = ( γ d=2) 3 =5 = d 3 =(5  483 ). It only remains t o observe t hat , since graph G is diamond-free, it s γ d -map M is diamond-free by t he Blow-up Lemma. By Lemma 1, dens( M )  3=4. T his means t hat among all superpairs of G , t he fract ion of superedges is at most 3=4. All edges of G 4 are cont ained in superedges of G , t herefore t he average density of a superedge in G 4 is at least 4=3  dens( G 4 ). In part icular, t here must be some superpair in G 4 wit h at least such density. Since G 4 consist s of edge-disjoint supert riangles, t his superpair is cont ained in a unique supert riple F  G 4 , wit h dens3 ( F ) 

4=3  dens3 ( G 4 ) 

4=3  (1 − 3γ ) d = 4=3  (1 − 3  1=24) d = 7=6  d:

In our previous not at ion, we have = 7=6 > 1. We de ne t he supert riple F t o be our new \ dist illed" equit ripart it e t rianglecovered diamond-free graph. Graph size has only been reduced by a const ant fact or, equal t o t he size of t he  -part it ioning. By t aking t he original graph G large enough, t he \ dist illed" graph F can be made arbit rarily large. It s density d = 7=6  d > d . By repeat ing t he whole process, we can increase dens3 ( F )  t he graph density t o (7=6) 2  d , (7=6) 3  d , : : : , and event ually t o values higher t han 1, which cont radict s t he de nit ion of density (in fact , values higher t han 3=4 will already cont radict Lemma 1). Hence, t he init ial assumpt ion of exist ence of arbit rarily large equit ripart it e t riangle-covered diamond-free graphs wit h const ant posit ive density must be false. Negat ing t his assumpt ion, we obt ain our t heorem. tu T he solut ion of St ein and Szabo’s problem is now an easy corollary of Lemma 2 and T heorem 3.

Trip ods Do Not P ack Densely

279

C o r o l l a r y 1 . C o n s id e r a t r ipod pa c k in g o f s iz e n . T h e m a x im u m d e n s it y o f s u c h a pa c k in g t e n d s t o 0 a s n ! 1 .

5

C o n c lu s io n

We have proved t hat t he density of a t ripod packing must be in nit ely small as it s size t ends t o in nity. Since t he Regularity Lemma only works for dense graphs, t he quest ion of det ermining t he precise asympt ot ic growt h of a maximum t ripod packing size remains open. Nevert heless, we can obt ain an upper bound on t his growt h. Let d be t he maximum density of t ripod packing of size n . In our proof of T heorem 3, it is est ablished t hat t he maximum density of t ripod packing of size m ( d 3 =(5  483 ))  n is at most 6=7  d , where m (  ) is t he funct ion de ned by t he Regularity Lemma. −5 In [ADL+ 94, DLR95] it is shown t hat for t ripart it e graphs, m ( t )  4t . T hese two bounds t oget her yield a desired upper bound on d as a funct ion of n , which t urns out t o be a rat her slow-growing funct ion. By applying t he \ descending" t echnique from [SS94], we can also obt ain an upper bound on t he size of a maximal r -pod, which can t ile (wit hout any gaps) an r -dimensional space. T he result ing bound is a fast -growing funct ion of r . In [SS94] it is conject ured t hat t his bound can be reduced t o r − 2 for any r  4. T he conject ure remains open.

6

A ck n o w le d g e m e n t

T he aut hor t hanks Sherman St ein, Chris Morgan and Mike P at erson for fruit ful discussion.

R e fe re n c e s [ADL + 94] N. Alon, R. A. Duke, H. Lefmann, V. R¨odl, and R. Yust er. T he algorit hmic asp ect s of t he regularity lemma. J our nal of A lgor i thm s, 16(1):80{109, J anuary 1994. [CG98] F . Chung and R. Graham. E rd}os on G raphs: H i s L egacy of U nsolved P roblem s. A K P et ers, 1998. [Die00] R. Diest el. G raph T heor y . Numb er 173 in Graduat e Text s in Mat hemat ics. Springer, second edit ion, 2000. [DLR95] R. A. Duke, H. Lefmann, and V. R¨odl. A fast approximat ion algorit hm for comput ing t he frequencies of subgraphs in a given graph. SI A M J our nal on C om put i ng, 24(3):598{620, 1995. [Erd87] P. Erd}os. Some problems on nit e and in nit e graphs. In L ogi c and C om bi nator i cs. P roceedi ngs of the A M S-I M S-SI A M J oi nt Sum m er Research C onference, 1985 , volume 65 of C ont em porar y M at hem at i cs, pages 223{228,

[Gal98] [Gou88]

1987. D. Gale. T racki ng t he A ut om at i c A nt , and O t her M at hem at i cal E xplorati ons. Springer, 1998. R. Gould. G raph T heor y . T he Benjamin/ Cummings P ublishing Company, 1988.

280

Alexandre T iskin

[Kom99] [KS96]

[SS94]

[St e95]

J . Komlos. T he Blow-up Lemma. C om bi nat or i cs, P robabi li ty and C om put i ng, 8:161{176, 1999. J . Komlos and M. Simonovit s. Szemeredi’s Regularity Lemma and it s applicat ions in graph t heory. In D. Miklos, V. T . Sos, and T . Sz}onyi, edit ors, C om bi nat or i cs: P aul E rd}os i s E i ght y ( P ar t I I ) , volume 2 of B olyai Soci et y M at hem at i cal St udi es. 1996. S. K. St ein and S. Szabo. A lgebra and T i li ng: H om om or phi sm s i n the Ser vi ce of G eom et r y . Numb er 25 in T he Carus Mat hemat ical Monographs. T he Mat hemat ical Associat ion of America, 1994. S. K. St ein. P acking t rip ods. T he M at hem at i cal I nt el li gencer , 17(2):37{39, 1995. Also app ears in [Gal98].

c ie n t k N e a re s t N e ig h b o r S e a rc h in g A lg o rit h m fo r a Q u e ry L in e

An E

Subhas C. Nandy ? Indian St at ist ical Inst it ut e, Calcut t a - 700 035, India

In t his pap er, we present an algorit hm for nding k nearest neighb ors of a given query line among a set of p oint s dist ribut ed arbit rarily on a two dimensional plane. Our algorit hm requires O ( n 2 ) t ime and space t o preprocess t he given set of p oint s, and it answers t he query for a given line in O ( k + log n ) t ime, where k may also b e an input at t he query t ime. Almost a similar t echnique is applicable for nding t he k fart hest neighb ors of a query line, keeping t he t ime and space complexit ies invariant . We also discuss some const rained version of t he problems where t he preprocessing t ime and space complexit ies can b e reduced keeping t he query t imes unchanged.

A b st r a c t .

K e y w o rd s : nearest - and fart hest -neighb or, query line, arrangement , dualit y.

1

I n t ro d u c t io n

G iven a set P = f p 1 ; p 2 ; : : : ; p n g of n p oint s arbit rarily dist ribut ed on a plane, we st udy t he problem of nding t he k nearest neighb ors of a query line ‘ (in t he sense of p erp endicular dist ance). T he problem of nding t he nearest neighb or of a query line was init ially addressed in [3]. An algorit hm of preprocessing t ime and space O ( n 2 ) was prop osed in t hat pap er which can answer t he query in O (log n ) t ime. Lat er, t he same problem was solved using geomet ric dualit y in [8], wit h t he same t ime and space complexit ies. T he space complexit y of t he problem has recent ly b een im proved t o O ( n ) [11]. T he preprocessing t ime of t hat algorit hm is O ( n log n ), but t he query t ime is O ( n : 6 9 5 ). In t he same pap er, it is shown t hat if t he query line passes t hrough a sp eci ed p oint , t hat informat ion can b e used t o const ruct a dat a st ruct ure in O ( n log n ) t ime and space, so t hat t he nearest neighb or query can b e answered in O (log 2 n ) t ime. Apart from a variat ion of t he proximit y problems in comput at ional geomet ry, t his problem is observed t o b e imp ort ant in t he area of pat t ern classi cat ion and dat a clust ering [11], Ast rophysical dat abase maint enance and query [2], linear facilit y locat ion, t o name a few. ⋆

T he work was done when t he aut hor was visit ing School of Informat ion Science, J apan Advanced Inst it ut e of Science and Technology, Ishikawa 923-1292, J apan

D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 2 8 1 { 2 9 0 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

282

Subhas C. Nandy

In t his pap er, we address a nat ural generalizat ion of t he ab ove problem where t he ob ject ive is t o rep ort t he k nearest neighb ors of a query line in t he same environment . We shall use geomet ric dualit y for solving t his problem. T he preprocessing t ime and space required for creat ing t he necessary dat a st ruct ure is O ( n 2 ), which maint ains t he levels of t he arrangement of lines corresp onding t o t he duals of t he p oint s in P [1,4,6]. T he query t ime complexit y is O ( k + log n ), where k is an input at t he query t ime. Almost a similar t echnique works for nding t he k fart hest neighb ors of a query line keeping t he t ime and space complexit ies invariant . T he fart hest neighb or query is also useful in St at ist ics, where t he ob ject ive is t o remove t he out liers from a dat a set . We also show t hat in t he following t wo const rained cases, t he preprocessing t ime can b e reduced keeping t he query t im es invariant . ( i) If k is a xed const ant , t he k fart hest neighb ors of a query line can b e rep ort ed in O ( k + log n ) t ime on a preprocessed dat a st ruct ure of size O ( k n ), which can b e const ruct ed in O ( k n + n log n ) t ime. ( ii) W hen t he query line is known t o pass t hrough a xed p oint q and k is known prior t o t he preprocessing, we use a randomized t echnique t o const ruct a dat a st ruct ure of size O ( k n ) in O ( k n + min( n log 2 n ; k n logn )) t ime, which rep ort s k nearest neighb ors of such a query line in O ( k + log n ) t ime. T hus, for t he nearest neighb or problem (i.e., k = 1), our algorit hm is sup erior in t erms of b ot h space required and query t ime, compared t o t he algorit hm prop osed in [11] for t his const rained case, keeping t he preprocessing t ime invariant .

2

G e o m e t ric P re lim in a rie s

F irst we ment ion t hat if t he query line is vert ical, we maint ain an array wit h t he p oint s in P , sort ed wit h resp ect t o t heir x coordinat es. T his requires O ( n ) space and can b e const ruct ed in O ( n log n ) t ime. Now, given a vert ical query line we p osit ion it on t he x -axis by p erforming a binary search. To nd t he k -nearest neighb ors, a pair of scans (t owards left and right ) are required in addit ion. So, t he query t ime complexit y is O ( k + log n ). It is easy t o underst and t hat t he k fart hest neighb ors can b e obt ained in O ( k ) t ime by scanning t he array from it s left and right ends. In t his pap er, we shall consider t he non-vert ical query line. We use geomet ric dualit y for solving t hese problem s. It maps (i) a p oint p = ( a ; b) of t he primal plane t o t he line p  : y = a x − b in t he dual plane, and (ii) a non-vert ical line ‘ : y = m x − c of t he primal plane t o t he p oint ‘  = ( m ; c ) in t he dual plane. Needless t o say, a p oint p is b elow (resp., on, ab ove) a line ‘ in t he primal plane if and only if p  is ab ove (resp., on, b elow) ‘  in t he dual plane. Let H b e t he set of dual lines corresp onding t o t he p oint s in P . Let A ( H ) denot e t he arrangement of t he set of lines H . T he numb er of vert ices, edges and faces in A ( H ) are all O ( n 2 ) [4]. G iven a query line ‘ , t he problem of nding it s nearest or fart hest p oint can b e solved as follows:

An E cient

k

Nearest Neighb or Searching Algorit hm for a Query Line

283

N e a re s t n e ig hb o r a lg o rit h m : [8] Consider t he p oint ‘  which is t he dual of t he line ‘ . Next use t he p oint locat ion algorit hm of [5] t o locat e t he cell of A ( H ) cont aining ‘  in O (log n ) t ime. As t he cells of t he arrangement A ( H ) are split int o t rap ezoids, t he line p i and p j lying vert ically ab ove and b elow ‘  , can b e found in const ant t ime. T he dist ance of a p oint p and t he line ‘ in t he primal plane can b e obt ained from t he dual plane as follows :

Let x ( ‘  ) b e t he x -coordinat e of t he p oint ‘  in t he dual plane which corresp onds t o t he slop e of t he line ‘ in t he primal plane. We draw a vert ical line from t he p oint ‘  which meet s t he line p  at a p oint ( ‘  ; p  ) in t he dual plane. Now, t he p erp endicular dist ance of t he p oint p and t he line ‘ in t he primal    d (‘ ; (‘ ;p )) plane is equal t o , where d ( :; : ) denot es t he dist ance b et ween t wo x (‘  ) p oint s. T hus, t he p oint nearest t o ‘ in t he primal plane will b e any one of p i or p j dep ending on whet her d ( ‘  ; ( ‘  ; p i )) < or > d ( ‘  ; ( ‘  ; p j )), and it can b e comput ed in const ant t ime. In order t o rep ort t he nearest neighb or from any arbit rary query line, one needs t o maint ain t he arrangement A ( H ), which can b e creat ed in O ( n 2 ) t ime and space [5]. Fa rt h e s t n e ig hb o r a lg o rit h m : Here we const ruct t he lower and upp er envelop e of t he lines in H corresp onding t o t he duals of t he p oint s in P , and st ore t hem in t wo di erent arrays, say L L and L U . T his requires O ( n log n ) t ime [7]. Now, given t he line ‘ , or equivalent ly t he dual p oint ‘  , we draw a vert ical line at x ( ‘  ) which hit s t he line segment s 1 2 L L and 2 2 L U , and t hey can b e locat ed in O (log n ) t ime. If 1 and 2 are resp ect ively p ort ions of p i and p j , t hen t he fart hest neighb or of ‘ is eit her of p i and p j which can b e ident i ed easily. T hus for t he fart hest neighb or problem, t he preprocessing t ime and space required are O ( n log n ) and O ( n ) resp ect ively, and t he query can b e answered in O (log n ) t ime.

In t his pap er, we consider t he problem of locat ing t he k nearest neighb ors of a query line. As a preprocessing, we const ruct t he following dat a st ruct ure which st ores t he arrangement of t he dual lines in H . It is de ned using t he concept of le v e ls as st at ed b elow. T he same dat a st ruct ure can answer t he k fart hest neighb ors query also wit h t he sam e e ciency. D e n it io n 1 . [4] A p oint in t he dual plane is at level (0   n ) if t here are exact ly lines in H t hat lie st rict ly b elow . T he -level of A ( H ) is t he closure of a set of p oint s on t he lines of H whose levels are exact ly in A ( H ), and is denot ed as L ( H ). See F igure 1 for an illust rat ion.

Clearly, L ( H ) is a p oly-chain from x = − 1 t o x = 1 , and is monot one increasing wit h resp ect t o t he x -axis. In F igure 1, a demonst rat ion of levels in t he arrangement A ( H ) is shown. Here t he t hick chain represent s L 1 ( H ). Among t he vert ices of L 1 ( H ), t hose marked wit h empt y (black) circles are app earing in level 0 (2) also. E ach vert ex of t he arrangement A ( H ) app ears in t wo consecut ive levels, and each edge of A ( H ) app ears in exact ly one level. We shall st ore L ( H ), 0  n in a dat a st ruct ure as describ ed in t he next sect ion.

284

Subhas C. Nandy

level-2 level-1 level-0 F ig . 1 . Demonst rat ion of levels in an arrangement of lines

3

A lg o rit h m

Below we describ e t he dat a st ruct ure, called le v e l-st ruct ure, and briefly explain our algorit hm. 3.1

L e v e l -S t ru c t u re

It is a balanced binary search t ree T , called t he p r im a r y s t r u c t u re , whose nodes corresp ond t o t he le v e l- id of t he arrangement A ( H ). To avoid confusion, we shall use t he t erm la y e r t o represent (di erent dept h) levels of t he t ree T . T he root of T corresp onds t o t he la y e r - 0 and t he la y e r - id increases as we proceed t owards t he leaf level. Init ially, for each node of T (represent ing a level, say  , of A ( H )) we creat e a s eco n d a r y s t r u c t u re T (  ) which is an array cont aining edges of L ( H ) in left t o right order. Next , t o facilit at e our search process, we augment t he secondary st ruct ures for all t he non-leaf nodes as follows : Consider an edge e 2 A ( H ) at a cert ain level, say  . Let  0 b e t he level which app ears as t he left child of level  in T , and V e0 ( 2 A ( H )) b e t he set of vert ices whose project ions on t he x -axis are com plet ely covered by t he project ion of e on x -axis. If j V e0 j > 1 t hen we leave t he left m ost vert ex of V e0 and vert ically project t he next vert ex on e , and do t he sam e for every alt ernat e vert ex of V e0 as shown in F igure 2. T he same act ion is t aken for all t he edges of level  and t he edges in it s left successor level  0. All t he project ions creat e new vert ices at level  , and as a result , t he numb er of edges in level  is also increased. T his augment at ion yields t he following lemma : Le m m a 1 . A ft e r t h e a u gm e n t a t io n s t e p , t h e p ro jec t io n o f a n ed ge o f t h e pa re n t le v e l ca n o v e r la p o n t h e p ro jec t io n s o f a t m o s t t w o ed ge s a t it s le ft c h ild le v e l. P ro o f : T he following t hree sit uat ions may arise.

j V e0 j = 0 . Here edge e is com plet ely covered by an edge at level  0 (F igure 2a). j V e0 j = 1 . Here edge e overlaps wit h exact ly t wo edges at level  0 (F igure 2b). j V e0 j > 1 . In t his case t he t rut h of t he lem m a follows as we have project ed every tu alt ernat e vert ex of V e0 on e (F igure 2c).

An Efficient 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

P ro o f : Consider only t he set of vert ices of A  ( H ) which app ear in t hose levels which b elong t o t he leaf layer of T . O nly half of t hese vert ices (in t ot al) are propagat ed t o t he nodes in di erent levels at t he predecesso r layer of t he leaves of T . Among t he set of vert ices, which has b een propagat ed from t he leaves of T t o t he current layer, at most half of t hem may furt her b e propagat ed t o t heir predecessor layer in T . T his process may cont inue unt il t he root (layer) is reached. But if k b e t he t ot al numb er of vert ices at all t he leaves, t heir cont ribut ion t o all t he layers of t he t ree is at most k + k2 + k4 + : : : , which may b e at most 2 k in t he worst case. T he same is t rue for t he original vert ices of A ( H ) app earing in t he di erent levels at t he non-leaf layers of T also. T hus it is clear t hat , t his t yp e of propagat ion does not cause t he numb er of vert ices of A  ( H ) more t han t wice t he original numb er of vert ices of A ( H ). tu

Next , for each edge of a level, say  , app earing in a non-leaf layer of T in t he enhanced st ruct ure A  ( H ), we keep four p oint ers. A pair of p oint ers L 1 and L 2 p oint t o t wo edges in t he level  0 which app ear as left child of  in T and t he ot her pair R 1 and R 2 p oint t o a pair of edges in t he level  00 app earing in t he right child of  . By Lem m a 1 and subsequent discussions, an edge app earing in a level, which corresp onds t o a non-leaf node in T , can not overlap on more t han t wo edges of it s left (resp. right ) child level (in T ) wit h resp ect t o t he vert ical project ions. If t he x -range of an edge e (app earing at level  ) is com plet ely covered by t hat of an edge e 0 of it s left (resp. right ) child level  0 (  00) of A  ( H ), b ot h t he p oint ers L 1 and L 2 (resp. R 1 and R 2 ) at t ached t o e p oint t o e 0. O t herwise, L 1 and L 2 (resp. R 1 and R 2 ) of t he edge e p oint t o t wo adjacent edges e 1 and e 2 in t he level  0 (  00), such t hat t he common vert ex of e 1 and e 2 lies in t he x -int erval of t he edge e .

3 .2

S ke t ch o f t h e A lg o rit h m s

G iven a query line ‘ , we comput e it s dual p oint ‘  . In order t o A  ( H ) cont aining ‘  , we proceed as follows :

nd t he cell of

We choose t he level  r o o t of A  ( H ) at t ached t o t he root of T , and do a binary search on t he secondary st ruct ure T (  r o o t ) at t ached t o it t o locat e t he edge e which spans horizont ally on ‘  . Now, compare ‘  and e t o decide whet her t o proceed t owards t he left or t he right child of  r o o t in t he next layer. W it hout loss of generalit y, let us assum e t hat search proceeds t owards t he left child and  l e f t b e t he level at t ached t o it . Not e t hat , L 1 and L 2 p oint ers uniquely det erm ine t he edge e 0 2 T (  l e f t ) by doing at m ost 2 com parisons. If search proceeds t owards t he right of t he root , we may need t o use t he p oint ers R 1 and R 2 at t ached t o e . Sim ilarly proceeding, t he cell of A  ( H ) cont aining ‘  may b e easily reached in O (log n ) st eps. R e p o rt in g o f k n e a re s t n e ig hb o rs

Aft er locat ing ‘  in t he appropriat e cell of A  ( H ), let e a 2 T (  ) and e b 2 T (  − 1) b e t he t wo edges of A  ( H ) which are vert ically ab ove and b elow ‘  resp ect ively.

An E cient

k

Nearest Neighb or Searching Algorit hm for a Query Line

287

We comput e t he vert ical dist ances of e a and e b from ‘  , and rep ort t he nearest one. W it hout loss of generalit y, let e a b e t he nearest neighb or of ‘  . Next , we need t o reach an edge at level  + 1 (t he inorder successor of level  in T ) whose horizont al int erval spans ‘  . If e b is closer t o ‘  t hen we need t o locat e t he edge in level  − 2 (t he inorder predecessor of level  − 1 in T ) which horizont ally spans ‘  . In order t o reach an appropriat e edge in t he inorder predecessor or successor of t he current level during rep ort ing, we maint ain t wo st acks, namely DN and UP. T hey cont ain t he edges (along wit h t he level-id) of A  ( H ) in di erent layers from t he root t o t he relevant level (  − 1 and  ) whose x -int erval span ‘  . T he init ial con gurat ion of t he st acks is as follows : Bot h t he st acks will have same set of element s from t he root layer up t o cert ain layer corresp onding t o t he level, say   (=  or  − 1) dep ending on which one app ear in a non-leaf layer. T hen one of t hese st acks will cont ain few more elem ent s from level   t o eit her of  and  − 1 which app ear in t he leaf layer. T hese will help while m oving from one level t o t he next level (ab ove or b elow) in A  ( H ), as describ ed in t he following lemma. Le m m a 3 . A ft e r loca t in g a pa ir o f ed ge s in t w o co n s ec u t iv e le v e ls , s a y  − 1 a n d  , o f A  ( H ) , w h o s e x - in t e r v a l co n t a in s ‘  , t h e ed ge s in t h e k le v e ls v e r t ica lly be lo w ( a bo v e )  − 1 (  ) ca n be re po r t ed in O ( k + log n ) t im e . P ro o f : W it hout loss of generalit y, we shall consider t he visit ing of t he edges in k consecut ive levels ab ove t he level  whose x -int erval cont ains ‘  .

If t he level  + 1, which is t he inorder successor of level  in T , is in it s right subt ree, t hen we t raverse all t he levels t hat app ear along t he pat h from  t o  + 1 in T . In each move t o t he next level, we can reach an appropriat e edge whose x -int erval is spanning ‘  , using eit her of ( L 1 and L 2 ) and ( R 1 and R 2 ) in const ant t ime. We need t o st ore all t hese edges in t he st ack UP, for backt racking, if necessary. in som e predecessor layer, t hen we may need t o backt rack along t he pat h t hrough which we reached from  + 1 t o  during forward t raversal. If  b e t he di erence in t he layer-id of t he levels  and  + 1 in T , t hen t he numb er of elem ent s p opp ed from t he UP st ack is  . Not e t hat , if it needs t o proceed t o t he level  + 2, we may again move  layers t owards leaf. Needless t o say, t he edges on t hat pat h will b e pushed in t he UP st ack. But such a forward movement may again b e required aft er visit ing all t he levels in t he right subt ree root ed at level  + 1. T hus apart from rep ort ing, t his ext ra t raversal in T may b e required at most t wice, and t he lengt h of t he pat h may at most b e O (log n ). Hence t he proof of t he lemma.

288

Subhas C. Nandy

In order t o visit t he edges in k consecut ive levels b elow  − 1, whose x -int erval tu cont ains ‘  , we need t o use t he DN st ack. T hus Lemmas 2 and 3 lead t o t he following result st at ing t he t ime and space complexit ies of our algorit hm. T h e o re m 1 . G iv e n a s e t o f po in t s o n a p la n e , t h e y ca n be p re p roce s s ed in O ( n 2 ) t im e a n d s pa ce s u c h t h a t t h e p ro ble m o f loca t in g k n ea re s t n e igh bo r s fo r a giv e n qu e r y lin e ca n be s o lv ed in O ( k + log n ) t im e . tu

R e p o rt in g o f k fa rt h e s t n e ig hb o rs

For t he fart hest neighb or problem, one needs t o t raverse from t he root t o t he t opmost and t he b ot t om-most layers along t he t ree T . T his also requires maint aining t he t wo st acks UP and DN, whose role is same as t hat of t he earlier problem. Here also, for t he root layer only, a binary search is required in t he secondary st ruct ure t o locat e an edge e which spans horizont ally ‘  . From t he next layer onwards, t he p oint ers maint ained wit h each edge will locat e t he appropriat e edge in t he corresp onding level. F inally, eit her (i) an edge from t he t op-most layer or (ii) an edge from t he b ot t om-most layer will b e rep ort ed as t he fart hest edge from ‘  . In order t o get t he next fart hest neighb or, one may consult it s inorder successor or predecessor dep ending on t he case (i) or (ii). T his t raversal can b e made in amort ized const ant t ime using our prop osed le v e l-st ruct ure A  ( H ). T he process cont inues unt il t he k fart hest neighb ors are rep ort ed. T hus we have t he following t heorem. T h e o re m 2 . G iv e n a s e t o f po in t s o n a p la n e , t h e y ca n be p re p roce s s ed in O ( n 2 ) t im e a n d s pa ce s u c h t h a t t h e p ro ble m o f loca t in g k fa r t h e s t n e igh bo r s fo r a giv e n qu e r y lin e ca n be s o lv ed in O ( k + log n ) t im e .

4

C o n s t ra in e d Q u e ry

In t his sect ion, we shall discuss t he complexit y of t he k nearest neighb ors and t he k fart hest neighb ors problems, if k is known in advance (i.e., k is not an input at t he query t ime).

4 .1

Fa rt h e s t k N e ig hb o rs P ro b le m

In t his case, we need t o maint ain only (i) k levels from b ot t om st art ing from level-1 up t o t he level-k , denot ed by L  k ( H ), and (ii) k levels at t he t op st art ing from level-( n − k + 1) up t o level-n , denot ed by L  ( n − k + 1 ) ( H ), of t he arrangement A ( H ). Here level-1 and level-n corresp ond t o t he lower and upp er envelop e of t he lines in H resp ect ively. Le m m a 4 . T h e n u m be r o f ed ge s in t h e L  k ( H ) o f a n a r ra n ge m e n t A ( H ) o f n lin e s in t h e p la n e is O ( n k ) , a n d it ca n be co m p u t ed in O ( n k + n log n ) t im e .

An E cient

k

Nearest Neighb or Searching Algorit hm for a Query Line

289

P ro o f : T he count ing part of t he lemma follows from Corrolary 5.17 of [12]. T he t ime complexit y of t he const ruct ion follows from [6]. tu

Next , we project t he edges of level-k on t he edges of level-( k − 1) as describ ed in Subsect ion 3.1. As t he horizont al int erval of an edge in level ( k − 1) may b e spanned by at most t wo edges of level-k (see Lem m a 1), wit h each edge of level ( k − 1), we at t ach t wo p oint ers Q 1 and Q 2 t o p oint t o a pair of appropriat e edges of level-k as describ ed in Subsect ion 3.1. T he enhanced set of edges in level-( k − 1) is t hen project ed on t he edges of level-( k − 2). T his process is rep eat ed t ill we reach level-1. T he same t echnique is adopt ed for const ruct ing L  ( n − k + 1 ) ( H ). T he project ion of edges from one level on t he edges of it s next higher level is cont inued from level-( n − k + 1) upwards t ill we reach t he upp er envelop e (i.e., t he level-n ) of t he arrangement A ( H ). As st at ed in Lemma 2, t he numb er of edges in t he enhanced arrangement will remain O ( n k ). Next , during t he k fart hest neighb ors query for a given line ‘ , t he edges of level-1 and level-n of t he augment ed A ( H ) spanning t he x -coordinat e of ‘  can b e found using binary search. But , one can reach an edge from level-i t o t he edge at level-( i + 1) (level-( i − 1)) in L  k ( H ) ( L  ( n − k + 1 ) ( H )) spanning t he x -coordinat e of ‘  using t he t wo p oint ers Q 1 , Q 2 at t ached wit h t he edge at level-i , in const ant t ime. T hus by Lemma 4, and t he ab ove discussions, we have t he following t heorem : T h e o re m 3 . I f k is k n o w n in a d v a n ce , a d a t a s t r u c t u re w it h a giv e n s e t P o f n po in t s ca n be m a d e in O ( n k + n log n ) t im e a n d O ( n k ) s pa ce , s u c h t h a t fo r a n y qu e r y lin e , it s k fa r t h e s t n e igh bo r s ca n be a n s w e red in O ( k + log n ) t im e . tu

4.2

N e a re s t k N e ig hb o rs P ro b le m w h e n Q u e ry Lin e P a s s e s t h ro u g h a S p e c i e d P o int

If t he query line ‘ passes t hrough a sp eci ed p oint q , t hen t he dual p oint ‘  of t he line ‘ will always lie on t he line h = q  , dual of t he p oint q . Now consider t he set H = f h 1 ; h 2 ; : : : ; h n g of lines in t he dual plane, where 0 0 0 h i = p i . Let H 0 = f h 0 1 ; h 2 ; : : : ; h n g denot e t he set of half lines, where h i is t he 00 00 00 00 p ort ion of h i ab ove h . Similarly, H = f h 1 ; h 2 ; : : : ; h n g is de ned b elow t he line h . We denot e t he (  k ) − le v e l ab ove (resp. b elow) h by L  k ( H 0; h + ) (resp. L  k ( H 00; h − )). In [10], t he z o n e t h eo re m for line arrangement [9] is used t o show t hat for t he set of half lines H 0 ( H 00) t he complexit y of L  k ( H 0; h + ) ( L  k ( H 00; h − ) is O ( n k ). A randomized algorit hm is prop osed in [10] which comput es L  k ( H 0; h + ) ( L  k ( H 00; h − ) in O ( k n + min( n log 2 n ; k n logn )) t ime. Not e t hat , here also, we need t o enhance L  k ( H 0; h + ) ( L  k ( H 00; h − )) by project ing t he accumulat ed set of edges of it s one level t o t he next lower level, and

290

Subhas C. Nandy

maint aining t wo p oint ers for each edge of t he enhanced arrangement as st at ed in t he earlier subsect ion. In order t o answer t he k nearest neighb or query for a line ‘ where ‘  2 h , we rst rep ort t he nearest neighb or of ‘ by locat ing t he edges e 1 and e 2 , spanning t he x -coordinat e of ‘  , by using binary search on t he level-1 of L  k ( H 0; h + ) and L  k ( H 00; h − ) resp ect ively. To rep ort t he next nearest neighb or, we move t o t he next level of eit her L  k ( H 0; h + ) or L  k ( H 00; h − ) using t he p oint ers at t ached wit h e 1 or e 2 . T his process is rep eat ed t o rep ort k nearest neighb ors. T h e o re m 4 . I f t h e qu e r y lin e is k n o w n t o pa s s t h ro u gh a s pec i ed po in t q , a n d k is k n o w n in a d v a n ce , t h e n fo r a giv e n s e t o f n po in t s w e ca n co n s t r u c t a d a t a 2

s t r u c t u re o f s iz e O ( n k ) in O ( n k + min( n log n ; k n log n )) t im e , w h ic h ca n re po r t t h e k n ea re s t n e igh bo r s o f a n a r bit ra r y qu e r y lin e in O ( k + log n ) t im e .

A ck n ow le d g m e nt : T he aut hor wishes t o acknowledge P rof. T . Asano and T . Harayama for helpful discussions.

R e fe re n c e s 1. P. K. Agarwal, M. de Berg, J . Mat ousek and O. Schwarzkopf, C on st r uct i n g levels i n ar r an gem en t s an d hi gher or der V or on oi di agr am , SIAM J . on Comput ing, vol. 27, pp. 654-667, 1998. 2. B. Chazelle, C om put at i on al G eom et r y : C hal len ges fr om t he A ppli cat i on s, C G I m p a c t T a sk F o r c e R ep o r t , 1994. 3. R. Cole and C. K. Yap, G eom et r i c r et r i eval pr oblem s, P roc. 24t h. IEEE Symp. on Foundat ion of Comp. Sc., pp. 112-121, 1983. 4. H. Edelsbrunner, A lgor i t hm s i n C om bi n at or i al G eom et r y , Springer, Berlin, 1987. 5. H. Edelsbrunner, L. J . Guibas and J . St ol , O pt i m al poi n t locat i on i n m on ot on e subdi vi si on , SIAM J . on Comput ing, vol. 15, pp. 317-340, 1986. 6. H. Everet t , J . -M. Rob ert and M. van Kreveld, A n opt i m al algor i t hm for t he (≤ k ) levels, wi t h appli cat i on s t o separ at i on an d t r an sver sal pr oblem s, Int . J . Comput . Geom. wit h Appl., vol. 6, pp. 247-261, 1996. 7. J . Hershb erger, F i n di n g t he upper en velope of n li n e segm en t s i n O ( n log n ) t i m e, Informat ion P rocessing Let t ers, vol. 33, pp. 169-174, 1989. 8. D. T . Lee and Y. T . Ching, T he power of geom et r i c duali t y r evi si t ed , Informat ion P rocessing Let t ers, vol. 21, pp. 117-122, 1985. 9. K. Mulmuley, C om put at i on al G eom et r y : A n I n t r oduct i on T hr ough Ran dom i zed A lgor i t hm s, P rent ice Hall, Englewood Cli s, NJ . 10. C. -S. Shin, S. Y. Shin and K. -Y. Chwa, T he wi dest k -den se cor r i dor pr oblem s, Informat ion P rocessing Let t ers, vol. 68, pp. 25-31, 1998. 11. P. Mit ra and B. B. Chaudhuri, E  ci en t ly com put i n g t he closest poi n t t o a quer y li n e, P at t ern Recognit ion Let t ers, vol. 19, pp. 1027-1035, 1998. 12. M. Sharir and P. K. Agarwal, D aven por t -Schi n zel Sequen ce an d T hei r G eom et r i c A ppli cat i on s, Cambridge University P ress, 1995.

T e t ra h e d ra liz a t io n o f T w o N e s t e d C o n v e x P o ly h e d r a Cao An Wang and Bot ing Yang Depart ment of Comput er Science, Memorial University of Newfoundland, St .J ohn’s, NF , Canada A1B 3X5 wang@cs. mun. ca

In t his pap er, we present an algorit hm t o t et rahedralize t he region b etween two nest ed convex p olyhedra wit hout int roducing St einer p oint s. T he result ing t et rahedralizat ion consist s of linear numb er of t et rahedra. T hus, we answer t he op en problem raised by Chazelle and Shourab oura [6]: \ whet her or not one can t et rahedralize t he region b etween two nest ed convex p olyhedra int o linear numb er of t et rahedra, avoiding St einer p oint s?" . Our algorit hm runs in O (( n + m ) 3 log( n + m )) t ime and produces 2( m + n − 3) t et rahedra, where n and m are t he numb ers of t he vert ices in t he two given p olyhedra, resp ect ively. A b st r a c t .

1

I n t r o d u c t io n

T he t et rahedralizat ion in 3D is a fundament al problem in comput at ional geomet ry [1], [3], [7], [9], [10]. Unlike it s 2D count erpart , where a simple polygon wit h n vert ices is always t riangulat able and each t riangulat ion cont ains exact ly n − 2 t riangles, a simple polyhedron wit h n vert ices may not be t et rahedralizable [11] and t he number of t et rahedra in it s t et rahedralizat ions may vary from O ( n ) t o O ( n 2 ) [4] even if it is t et rahedralizable. Nat urally, one will invest igat e t he following two problems: t o ident ify some classes of polyhedra which are t et rahedralizable and t o nd t et rahedralizat ion met hods for t hese polyhedra which will produce a linear number of t et rahedra or even opt imal number of t et rahedra. So far, very few non-t rivial classes of simple polyhedra are known t o be t et rahedralizable (wit hout int roducing St einer point s). One is so-called two ‘side-byside’ convex polyhedra and t he ot her is so-called two ‘nest ed’ convex polyhedra [8], [2], [6]. For t he second class, Bern showed t hat t he number of t et rahedra in t he area between two nest ed convex polyhedra is bounded by O ( n log n ), where n is t he number of vert ices in t he polyhedra. Chazelle and Shouraboura [6] present ed an algorit hm which produces O ( n ) t et rahedra by int roducing St einer point s. T hey raised an open quest ion t hat \ whet her or not one can t et rahedralize t he region between two nest ed convex polyhedra int o linear number of t et rahedra, avoiding St einer point s?". D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 2 9 1 { 2 9 8 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

292

Cao An Wang and Bot ing Yang

In t his paper, we present an algorit hm t o t et rahedralize t he region between two nest ed convex polyhedra int o linear number of t et rahedra, wit hout int roducing any St einer point s. T he basic idea comes from t he following analysis. T he ‘dome removal’ met hod invent ed by Chazelle [5] and Bern [2] has been pushed int o it s limit in t he ‘two nest ed convex polyhedra’ case. In more det ail, a ‘dome’ wit h t ip v of P is t he dierence space between P and t he convex hull of ( P − f v g) [ Q . Aft er a dome is removed, some vert ices S Q0 will lie on C H (( P − f v g) [ Q ), t hus t he subsequent dome removal process shall avoid t o choose a t ip vert ex belonging t o S Q0 . For simplicity, Bern uses P − Q t o denot e t he remainder of P and Q as well as t he remainder aft er t he subsequent removals of t hese domes. T he met hod is t o remove one dome at a t ime wit h t he t ip vert ices in t he port ion of P of P − Q unt il P − Q cont ains only t he vert ices of Q . Not e t hat a dome can be decomposed int o k t et rahedra if it cont ains k t riangle facet s in it s bot t om. T hus, t he number of t et rahedra produced by t he met hod depends on t he number of vert ices in t he domes. While t his met hod t akes only n remove st eps for n = j P j + j Q j , it may result in O ( n log n ) t et rahedra even by removing t hese domes whose t ips have t he smallest degree in t he surface of P − Q . T he reason t hat t he above bound is di cult t o improve is as follows. In t he worst case, t he vert ices wit h smaller degrees in t he surface of P − Q may lie on t he Q of P − Q and which forces t he met hod t o choose t he vert ices of P of P − Q wit h larger degrees. Bern showed t hat if t he number of P − Q vert ices is i , t hen t he degree of t he minimum-degree vert ex can be 6in . Overall t he bound will be n (2 + 6H n ), where H n is t he n -t h Harmonic number (less t han ln n ). Our observat ion is t hat Bern’s met hod t ot ally depends on t he degree of t he t ip vert ices of t he domes. We shall avoid t his. Not e t hat t he well-known one-vert ex emission t et rahedralizat ion of a convex polyhedron always yields a linear number of t et rahedra, more precisely 2n − degr ee( v ) − 4, where n is t he number of vert ices of t he polyhedron and v is t he emission vert ex. In t he nest ed polyhedra case, t he one-vert ex emission t et rahedralizat ion must cope wit h t he visibility of t he vert ex due t he presence of obst acle polyhedron. We shall combine t he dome removal met hod wit h t he one-vert ex emission met hod, i.e., each t ime we obt ain a ‘maximum dome’ which cont ains all visible vert ices of P from t he t ip v and some vert ices of Q visible from v . T he t et rahedra formed by t his met hod will consist of two types: one is det ermined by v and a t riangle facet of P − Q visible t o v and t he ot her is det ermined by v and a br i dge t riangle (which is a inner t riangle facet spans on P and Q of P − Q ). We shall prove t hat t he t ot al number of bridge t riangle faces is bounded by t he size of P and Q . T hus, while t he maximum dome removal met hod remains O ( n ) st eps t he number of t et rahedra produced by t his met hod is linearly proport ional t o t he sizes of P and Q .

2

P r e lim in a r y

Let P and Q be two convex polyhedra. Q is n est ed in P if Q is ent irely cont ained inside P , where t hey may share some common t riangle facet s, edges, or vert ices.

Tet rahedralizat ion of T wo Nest ed Convex P olyhedra

293

Let f P and f Q be t he number of facet s in P and Q , respect ively, where f P = n and j f Q j = m . Let G P and G Q denot e t he corresponding surface graphs. A vert ex vP is vi si bl e t o a vert ex w P [ Q if and only if t he int erior of t he line segment vw does not int ersect Q (as point set ). Let P v denot e t he vert ex set of P visible t o v in t he presence of Q , and let P bv denot e t he subset of P v such t hat each element in P bv has at least one incident facet in G P not being ent irely visible t o v . Let Q v denot e t he vert ex set of Q visible from v , and Q 0v be t he subset of Q v which lies on t he C H ( P bv [ Q v ) (= C H (( P − P v ) [ P bv [ Q v )). Let Q vb denot e t he subset of Q 0v such t hat each element in Q vb has at least one adjacent vert ex in G Q which does not belong t o C H ( P bv [ Q v ). v

MD v P

v Q

Qv b

Pv b P-Q

F i g. 1 . For t he de nit ions.

D e n i t i on : A m a x im u m d o m e wit h t ip vert ex v (denot ed by M D v ) is t he closed area between convex hulls C H ( P v ) and C H ( P bv [ Q v ) such t hat C H ( P bv [ Q v ) cont ain at least one vert ex of Q v as inner vert ex or at least one facet of Q v . Let P − Q represent t he remainder of P and Q as well as t he remainder aft er t he subsequent removal of a maximum dome.

294

Cao An Wang and Bot ing Yang

D e n i t i on : A t et rahedralizat ion T v of P is v e r t e x v e m i s s i o n if T v is obt ained by connect ing v t o every vert ex in P − f v g by an edge. In t he nest ed polyhedra P and Q , t he t et rahedra obt ained by connect ing v t o every vert ex in P v [ Q 0v form a maximum dome. T he lemma below follows from t he de nit ion of MD and one-vert ex emission t et rahedralizat ion. L em m a 1 . L e t M D v be a m a x im u m d o m e in n e s t ed P a n d Q . T h e n , t h e n u m be r o f t e t ra h ed ra p rod u ced by v - e m is s io n m e t h od in M D v is

f Pv + f Qv − degr ee( v )+ j P bv [ Q vb j ; w h e re f

v P

is t h e n u m be r o f fa ce t s in P o f P

− Q , ea c h o f t h e m is e n t ire ly v is ible − Q , ea c h o f t h e m is e n t ire ly

t o v , a n d f Qv is t h e n u m be r o f fa ce t s in Q o f P v i s i ble t o v a n d be lo n gs t o C H ( P bv [ Q v ) .

v p

d

a

b

C

c a

c

b

C’

Q C’’ d

P

F i g. 2 . For t he proof of t he lemma.

L em m a 2 . L e t P − Q be t h e re m a i n d e r a f t e r t h e re m o v a l o f a ll t h e s e d o m e s w h ic h h a v e t h e t ip - v e r t e x o f d egree le s s t h a n s ix . T h e re e x is t s a t lea s t o n e m a x im u m d o m e in P − Q w it h t ip - v e r t e x be lo n gin g t o Q , w h e re t h e bo t t o m s u r fa ce o f t h e d o m e e it h e r co n s is t s o f s o m e fa ce t s o f Q in P − Q o r t h e in t e r io r o f t h e bo t t o m s u r fa ce co n t a in s s o m e v e r t ice s o f Q in P

− Q.

P roo f. (Sket ched) It is easy t o see t hat t here always exist s a vert ex of P wit h degree of ve or less when P and Q do not share any vert ices and faces. (T his can be proved using Euler’s formula for P wit h more t han 30 vert ices.) By t he assumpt ion of t he lemma, t here must exist at least one shared vert ex in P − Q because ot herwise we can cont inue t o remove t hese domes wit h t he t ip-vert ices of degree less t han six in P unt il eit her P − Q becomes t he desired case or P has

Tet rahedralizat ion of T wo Nest ed Convex P olyhedra

295

at most 30 vert ices and P and Q st ill do not share any vert ex. T he lat er case will easily result in a linear-number of t et rahedra in P − Q . For t he former case, we shall only discuss t he case t hat P and Q share exact ly one vert ex, say p. For t he ot her cases, t he following analysis can be applied wit h a more det ail analysis. Due t o t he blockage of Q , t he visible area and t he non-visible area in P from vert ex p must form a closed chain, say C 0. C 0 crosses a sequence of edges in P so t hat t he vert ices of t hese edges visible from p form a chain C and t he vert ices of t hese edges not visible from p form a chain C 00. (Refer t o t he right -hand side of Figure 2.) All vert ices of C are connect ed t o p by edges in P − Q due t o our removal process. In such a P − Q , t here must eit her exist t hree vert ices in C , say a; b; and c, such t hat b is visible t o bot h a and c, and ac crosses Q or no such t hree vert ices so t hat ac crosses Q . In t he lat t er case, t he convex hull of P in P − Q would not cross Q . T hen, by choosing a vert ex in C , say b, as t ip-vert ex, t he corresponding maximum dome will be t he desired dome. In t he former case, let C 000 denot e t he chain consist ing of all t hese vert ices in P of P − Q such t hat every vert ex in C 000 is visible t o b and one of it s neighboring vert ices is not visible t o b. T hen, t he convex hull of t he vert ices in C 000 must cross Q since at least one edge of t he convex hull, say ac crosses Q . T hen, b as t he t ip-vert ex det ermines t he desired maximum dome. T he lemma below follows t he fact t hat P bv and Q vb are subset s of P v and Q v , respect ively. L em m a 3 . j P bv [ Q vb j is bo u n d ed by j P v [ Q v j .

3

I n v a r ia n t o f N e s t C o n v e x it y

Let P and Q be two nest ed convex polyhedra wit h t riangle faces. Aft er a M D v process, t he remainder P − Q is st ill two nest ed convex polyhedra. T hey share t he faces (or edges or vert ices) formed by Q 0v . T he out er surface of P − Q is t he convex hull of Q and ( P − P v ) [ P bv which includes t he bridge faces, and t he inner surface is st ill Q . However, t he visible part of t he inner surface must exclude t he faces of Q on t he convex hull C H ( Q [ (( P − P v ) [ P bv ). T he following gures show how a maximum dome wit h t ip vert ex v is removed from convex polyhedron P . It is easy t o see t hat aft er t he removal, t he remainder P − Q is st ill a nest ed convex polyhedra case. T he property of nest convexity invariant wit h respect t o t he maximum domeremoval operat ion ensures t he correct ness of our decomposit ion. Lemma 1, Lemma 2, and Lemma 3 ensure t he number of t et rahedra produced by our maximum dome-removal decomposit ion is linear.

4

T h e A lg o r it h m

M ax D - R E M O V E ( P; Q ) I n p u t : T wo nest ed convex polyhedra P and Q (a st raight -line planar

graph in DCEL and vert ex-edge incident list ).

296

Cao An Wang and Bot ing Yang v

P Q

Q P-Q

bridge

bridge

P

F i g. 3 . T he maximum dome wit h t ip v .

O u t p u t : T = ( t 1 ; t 2 ; :::; t k ) (a sequence of t et rahedra), [

i k

ti = P − Q.

1. While P − Q 6 = ; Do (a) v sel ect ( P − Q ); (* t he bot t om of M D v cont ains at least one vert ex of Q or a facet of Q . T his can be done due t o Lemma 2 *) (b) Find M ax D om e( v; P − Q ) (c) Updat e P − Q ; 2. EndDo. M ax D om e( v; P − Q )

1. Find P v and Q v in P − Q ; 2. Find t he maximum-dome M D v (i.e., nd C H ( P bv [ Q ): t he bot t om and C H ( P v ): t he t op); 3. T v -emission t et rahedralizat ion of t he maximum-dome; E n d -M ax D -R E M O V E . L em m a 4 . T h e n u m be r o f br id ge - fa ce s c rea t ed in t h e p roce s s o f m a x im u m d o m e re m o v a l is bo u n d ed by O ( m + n ) .

T he number of bridge-faces creat ed in an MD removal is bounded by t he number of edges in t he chains formed by P bv and Q vb . T hus, we only need show t hat each edge in (chains of) P bv and Q vb creat ed by an M D v cannot appear in (chains of) P bu and Q ub creat ed by a lat er M D u . T hat is, such an edge is removed in only one MD. We shall consider t he following two cases as well as P roo f.

Tet rahedralizat ion of T wo Nest ed Convex P olyhedra eQ eP p’

q’

bridge

Q

bridge

p’

q’

q’’

297

Q

e’Q

P

P

u

u

(1)

(2)

F i g. 4 . For t he proof of t he lemma.

some subcases. (1) If and edge eQ of Q vb is visible t o u of P , t hen by t he nest convexity invariant of P − Q t riangle facet 4 eQ q0 for q0 of Q and t riangle facet 4 eQ p0 for p0 of P in P − Q are visible t o u . T hen, t et rahedra u p0eQ and u q0eQ will belong t o t he maximum dome M D u . T hen, eQ is not on t he new Q ub and eQ will not appear in t he lat er MD-removal. (2) If eP of P bv is visible t o u , t hen by t he nest -convexity invariant of P − Q vert ex p0 of port ion P is visible t o u . Furt hermore (i) if u is also visible t o q0, t hen bot h t et rahedra u p0eP and u q0eP are belong t o t he M D u and eP will not belong t o t he new P bu ; (ii) if u is not visible t o q0, t hen eP must form a new bridge face wit h ot her vert ex of port ion Q in P − Q , say q00. But , bot h t riangle facet s 4 eP p0 and 4 eP q00 are visible t o u and t hey will be removed. T he chain formed by t he new P bu will not cont ain eP . In any case, t he edges in P bv and Q vb cannot appear in P bu and Q ub . T his implies t hat t he number of bridge-facet s creat ed and removed in t he process corresponds t he number of surface facet s in P − Q . T h eor em 1 . A lgo r it h m M ax D − R E M O V E p rod u ce s 2 ( m + n − 3) t e t ra h ed ra fo r t h e regio n be t w ee n t w o n e s t ed co n v e x po ly h ed ra w it h m a n d n v e r t ice s a n d t h e a lgo r it h m r u n s O (( m

5

+ n ) 3 log( m + n )) t im e .

R e m a rk s

We have shown a met hod, called ‘maximum-dome removal’, t o t et rahedralize t he region between two nest ed convex polyhedra int o a linear number of t et rahedra. T he met hod is simple and we are implement ing t he algorit hm. T he t ime complexity of our algorit hm can be furt her improved int o O(( m + n ) 2 ) by more det ail analysis, which is t oo long t o included in t his conference version.

298

Cao An Wang and Bot ing Yang

A c k n o w le d g m e n t s T his work is part ially support ed by NSERC grant OP G0041629 and ERA grant in Memorial University of NFLD.

R e fe r e n c e s 1. D.Avis and H.ElGindy, Triangulat ing p oint set s in space, D i scr et e an d C om pu t at i on al G eom et r y , 2(1987)99{111. 2. M.Bern, Compat ible t et rahedralizat ions, In P r oc. 9t h A C M Sy m p. C om pu t at i on al G eom et r y 281{288, 1993. 3. M.Bern and D.Eppst ein, Mesh generat ion and opt imal t riangulat ion, In C om pu t i n g i n E u cl i dean G eom et r y , (D. Du and F . Hwang eds.), World Scient ic P ublishing Co. 1992. 4. B.Chazelle, Convex part it ions of p olyhedra: a lower b ound and worst -case opt imal algorit hm, SI A M J . C om pu t i n g , 13(1984)488{507. 5. B.Chazelle and L.P alios, Triangulat ing a nonconvex p olyt op e, D i scr et e an d com pu t at i on al geom et r y , 5(1990)505{526. 6. B.Chazelle and N.Shourab oura, Bounds on t he size of t et rahedralizat ions, In P r oc. 10t h A C M Sy m p. C om pu t at i on al G eom et r y , 231{239, 1994. 7. H.Edelsbrunner, F .P reparat a, and D.West , Tet rahedralizing p oint set s in t hree dimensions, J ou r n al of Sy m bol i c C om pu t at i on , 10(1990)335{347. 8. J .Goodman and J .P ach, Cell Decomp osit ion of P olyt op es by Bending, I sr ael J . of M at h , 64(1988)129{138. 9. J .Goodman and J .O’Rourke, H an dbook of D i scr et e an d C om pu t at i on al G eom et r y , CRC P ress, New York, 1997. 10. J .Rup ert and R.Seidel, On t he di culty of t et rahedralizing 3-dimensional nonconvex p olyhedra, D i scr et e an d C om pu t at i on al G eom et r y , 7(1992)227{253. 11. E.Schonhardt , Ub er die Zerlegung von Dreiecksp olyedern in Tet raeder, M at h. A n n al en 98(1928)309{312.

E

c ie n t A lg o rit h m s fo r T w o - C e n t e r P ro b le m s fo r a C o n v e x P o ly g o n ( E x t e n d e d A b s t ra c t ) Sung Kwon Kim 1 and Chan-Su Shin 2

1

Dept . of Comput er Engineering, Chung-Ang University, Seoul 156{756, Korea. skki m@cau. ac. kr 2

Dept . of Comput er Science, HKUST , Clear Wat er Bay, Hong Kong. cssi n@cs. ust . hk

A b s t r a c t . Let P b e a convex p olygon wit h n vert ices. We want t o nd two congruent disks whose union covers P and whose radius is minimized. We also consider it s discret e version wit h cent ers rest rict ed t o b e at vert ices of P . St andard and discret e two-cent er problems are resp ect ively solved in O ( n log 3 n log log n ) and O ( n log 2 n ) t ime. Furt hermore, we can solve b ot h of t he st andard and discret e two-cent er problems for a set of p oint s in convex p osit ions in O ( n log 2 n ) t ime.

1

I n t ro d u c t io n

Let A be a set of n point s in t he plane. T he s t a n d a rd t w o - ce n t e r p ro ble m for A is t o cover A by a union of two congruent closed disks whose radius is as small as possible. T he st andard two-cent er problem has been st udied ext ensively. Sharir [14] rst ly present ed a near-linear algorit hm running in O ( n log9 n ) t ime, and Eppst ein [8] subsequent ly proposed a randomized algorit hm wit h expect ed 2 O ( n log n ) running t ime. Chan [3] recent ly gave a randomized algorit hm t hat runs in O ( n log2 n ) t ime wit h high probability, as well as a det erminist ic algorit hm t hat runs in O ( n log2 n (log log n ) 2 ) t ime. As a variant , we consider t he d is c re t e t w o - ce n t e r p ro ble m for A t hat nds two congruent closed disks whose union covers A and whose cent ers are at point s of A . Recent ly, t his problem was solved in O ( n 4 = 3 log5 n ) t ime by Agarwal et al. [1]. In t his paper, we consider some variant s of t he two-cent er problems. Let P be a convex polygon wit h n vert ices in t he plane. We wan t o nd two congruent closed disks whose union covers P (it s boundary and int erior) and whose radius is minimized. We also consider it s d is c re t e version wit h cent ers rest rict ed t o be at some vert ices of P . See F igure 1. Compared wit h t he two-cent er problems for point s, di erences are t hat (1) point s t o be covered by two disks are t he vert ices of P in convex posit ions (not in arbit rary posit ions) and (2) two disks should cover t he edges of P as well as it s vert ices. By point s in co n v e x po s it io n s , we mean t hat t he point s form t he vert ices of a convex polygon. (1) suggest s our problems are most likely easier t han t he point -set two-cent er problems, but (2) t ells us t hat t hey could be more di cult . D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 2 9 9 { 3 0 9 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

300

Sung Kwon Kim and Chan-Su Shin

(a )

(b )

F i g . 1 . T wo cent er problems for a convex polygon. (a) St andard problem. (b)

Discret e problem. We assume in t his paper t hat t he vert ices of P are in ge n e ra l c irc u la r po s it io n , meaning t hat no four or more vert ices are co-circular. Our result s are summarized in Table 1. (Some improve t he aut hors’ previous work of [15].)

Convex p olygon P oint s in convex p osit ions P oint s in arbit rary p osit ions

St andard 2-cent er ( n log 3 n log log n ) T hm. 3 2 O ( n log n ) T hm. 7 2 2 O ( n log n (log log n ) ) [3] O

Discret e 2-cent er ( n log 2 n ) T hm. 5 2 O ( n log n ) T hm. 6 4 3 O (n log 5 n ) [1] O

=

T a b l e 1 . T he summary of t he result s.

Most of our algorit hms present ed in t his paper are based on paramet ric search t echnique proposed by Megiddo [13]. To apply t he t echnique, we need t o design e cient sequent ial and parallel algorit hms, A s and A p , for t he corresponding decision problem: for a minimum paramet er r  , decide whet her a given paramet er r  r  or r < r  . If A s t akes O ( T s ) t ime, and A p t akes O ( T p ) t ime using O ( P ) processors, paramet ric search result s in a sequent ial algorit hm for t he opt imizat ion problem wit h running t ime O ( P T p + T s T p log P ). Cole [7] described an improvement t echnique t hat achieves O ( P T p + T s ( T p + log P )) t ime, assuming t hat t he parallel algorit hm sat is es a \ bounded fan-in/ out " requirement .

2

A lg o rit h m fo r S t a n d a rd T w o - C e n t e r P ro b le m fo r a C o n v e x P o ly g o n

Let P be a convex polygon wit h n vert ices. T he vert ices are numbered 0; 1; : : : ; n − 11 count erclockwise and an edge is denot ed by specifying it s two end point s, e.g., ( i ; i + 1). Let ha ; bi be t he count erclockwise sequence of vert ices a ; a + 1; : : : ; b, if a  b, and a ; a + 1; : : : ; n − 1; 0; : : : ; b, ot herwise. Let r  be t he minimum value such t hat two disks of radius r  cover P . Since paramet ric search t echnique will be employed, we will give a sequent ial algorit hm 1

All vert ex indices are t aken modulo n .

E cient Algorit hms for T wo-Cent er P roblems for a Convex P olygon

301

and a parallel algorit hm t hat decides, given a value r > 0, whet her r  r  , i.e., whet her two disks of radius r can be drawn so t hat t heir union covers P . 2 .1

S e q u e n t ia l D e c is io n A lg o rit h m

Our decision algorit hm st art s wit h drawing for each i a disk D i of radius r wit h cent er at vert ex i . De ne b \ Di: I ( ha ; bi ) = i

= a

= ; and I ( hi ; m i + 1i ) = ; . T he De ne m i t o be t he index such t hat I ( hi ; m i i ) 6 index m i is t he \ count erclockwise fart hest " vert ex from i so t hat a disk of radius r can include t he vert ices in hi ; m i i . Not e t hat t he m i ’s are monot one increasing, i.e., t here is no pair of hi ; m i i and hj ; m j i such t hat hi ; m i i h j ; m j i . Let J i = I ( hi ; m i i ). T hen any point in J i can be t he cent er of a disk of radius r t hat covers hi ; m i i . We check each of t he following cases. (i) If t here are two vert ices i and j such t hat i ; m i 2 hj ; m j i and j ; m j 2 hi ; m i i , t hen any two disks of radius r , one wit h cent er in J i and t he ot her wit h cent er in J j , can cover P , and t he decision algorit hm ret urns \ yes" . To check for a xed i whet her t here is an index j such t hat i ; m i 2 hj ; m j i and j ; m j 2 hi ; m i i , it is su cient t o consider t he case of j = m i only, due t o t he monot onicity of m -values. (ii) If t here are i and j such t hat m j + 1 = i and j 2 hi ; m i i , t hen hi ; m j i is guarant eed t o be covered by two disks of radius r wit h cent ers in J i and in J j and t he edge ( m j ; i ) of P is \ missing" . So, we need check whet her it can be covered by two disks of radius r wit h cent ers in J i and in J j . To do t his, nd a disk C of radius r wit h cent er on t he edge ( m j ; i ) and t ouching J i at a point p and checks whet her C int ersect s J j . One disk of radius r wit h cent er p and t he ot her wit h cent er at any point in C \ J j t oget her cover t he edge ( m j ; i ) as = ;, well as t he ot her boundary of P . If such point p can be found and C \ J j 6 t hen t he decision algorit hm ret urns \ yes" . Again, for a xed i , it does not need t o consider all j ’s such t hat m j = i − 1 and j 2 hi ; m i i . It is easy t o see t hat considering t he case of j = m i is su cient . (iii) F inally, if t here are i and j such t hat m i + 1 = j and m j + 1 = i , t hen two edges ( m i ; j ) and ( m j ; i ) are \ missing" . To decide whet her t hese two edges can simult aneously be covered by two disks of radius r wit h cent ers in J i and in J j , nd as above a disk C 1 of radius r wit h cent er on ( m j ; i ) and t ouching J j , and a disk C 2 of radius r wit h cent er on ( m j ; i ) and t ouching J i . Similarly, nd two disk C 10; C 20 of radius r wit h cent ers on ( m i ; j ) t ouching J j and J i , respect ively. Now, check whet her bot h C 1 \ C 10 \ J j and C 2 \ C 20 \ J i are nonempty. If bot h are nonempty, two disks of radius r , one wit h cent er in C 1 \ C 10 \ J j and t he ot her wit h cent er in C 2 \ C 20 \ J i , can cover bot h edges as well as t he ot her boundary of P , and t hus t he decision algorit hm ret urns \ yes" . T he decision ret urns \ no" if none of t he t hree cases above ret urns \ yes" . I m p l e m e n t a t i o n . Comput e m 0 and J 0 , and t hen J m 0 and J m 0 + 1 . For i > 0, J i , J m i , and J m i + 1 can be obt ained from J i − 1 , J m i − 1 and J m i − 1 + 1 , by adapt ing t he

302

Sung Kwon Kim and Chan-Su Shin

algorit hm in [9] for maint aining convex hulls of a simple chain while point s are dynamically insert ed int o and delet ed from t he ends of t he chain. An int ermixed sequence of O ( ‘ ) insert ions and delet ions on chains wit h a t ot al of O ( ‘ ) vert ices can be processed in t ime O ( ‘ log ‘ ) [9]. Whenever J i , J m i , and J m i + 1 are obt ained, we check whet her any of t hree cases (i), (ii) and (iii) ret urns \ yes" . Each of t hese checks can be done in O (log n ) t ime, provided t hat J i , J m i , and J m i + 1 are given. For t his we need a const ant number of t he following operat ions. (O1) F ind a t ouching point between t he int ersect ion of O ( n ) congruent disks and anot her congruent disk wit h cent er on a speci c edge of P . (O2) Decide whet her a congruent disk wit h cent er on a speci c edge of P int ersect s an int ersect ion of O ( n ) congruent disks. If yes, nd t he int ersect ion point s on t he boundary. Bot h (O1) and (O2) can be done in O (log n ) t ime by simply performing binary searches on t he boundary of t he int ersect ion of O ( n ) congruent disks. We assume here t hat t he boundaries of t he int ersect ions are st ored in arrays or balanced t rees for binary searches t o be applicable. As a whole, we have t he following t heorem. T h e o r e m 1 . G iv e n a co n v e x po ly go n P w it h n v e r t ice s a n d a v a lu e r > ca n d ec id e in O ( n log n ) t im e w h e t h e r t w o d is k s o f ra d iu s r ca n co v e r P .

2 .2

0, w e

P a ra lle l D e c is io n A lg o rit h m

Our parallel algorit hm builds a segment t ree on t he sequence, D 0 ; : : : ; D n − 1 , of radius r disks cent ered at vert ices. Each int ernal node2 of t he t ree corresponds t o a ca n o n ica l s u bs equ e n ce of t he vert ices t hat are assigned t o t he leaves of t he subt ree root ed at t he node. For each canonical subsequence S , comput e t he int ersect ion of t he disks, I ( S ) = \ i 2 S D i . T he boundary of I ( S ) is divided int o two (upper and lower) chains by it s left most and right most point s, and t hese two chains are st ored int o two arrays of arcs3 sort ed according t o t heir x -coordinat es. Const ruct ing t he segment t ree, comput ing I ( S ) for each canonical subsequence S , and st oring t heir chains int o arrays can be carried out in O (log n ) t ime using O ( n log n ) processors, as explained in [3]. Comput ing m i for each i can be done in divide-and-conquer manner. Com= ; and I ( hbn = 2c; ‘ + put e m bn = 2 c by not ing m bn = 2 c = ‘ such t hat I ( hbn = 2c; ‘ i ) 6 1i ) = ; . T hen due t o t he monot onicity of t he m -values, m i 2 h0; m bn = 2 c i for i 2 h0; bn = 2c − 1i , and m i 2 hm bn = 2 c ; n − 1i for i 2 hbn = 2c + 1; n − 1i . T hus, t hey can be recursively obt ained. Our parallel algorit hm for t his st ep performs O (log n ) recursions each consist ing of O ( n ) decisions on t he empt iness of I ( ha ; bi ) for di erent a and b. Since, given a and b, whet her I ( ha ; bi ) = ; can be decided 2 3

To avoid confusion, n odes inst ead of vert ices will b e used in t rees. Inst ead of edges, we use ar cs t o denot e sides of an int ersect ion of disks.

E cient Algorit hms for T wo-Cent er P roblems for a Convex P olygon

303

in O (log n log log n ) t ime using O (log n ) processors [3], t he whole of t his st ep t akes O (log2 n log log n ) t ime using O ( n log n ) processors. Checking t he rst case (i) in parallel is easy. For each i , decide whet her m m i 2 hi ; m i i . T he algorit hm ret urns \ yes" if any one of t hese n decisions is t rue. For case (ii), collect all i ’s such t hat m m i = i − 1, and for each such i decide whet her edge ( i − 1; i ) can be covered by two disks of radius r wit h cent ers in J i and in J m i . For case (iii), collect all i ’s such t hat m m i + 1 = i − 1, and for each such i decide whet her bot h edges ( m i ; m i + 1) and ( i − 1; i ) can be simult aneously covered by two disks of radius r wit h cent ers in J i and in J m i + 1 . For any of cases (ii) and (iii), as in t he sequent ial algorit hm, our parallel algorit hm also needs t o comput e J i for each i . Comput ing all J i ’s and st oring t hem explicit ly requires Ω ( n 2 ) work and space, which is far from t he bounds of our parallel algorit hm. Inst ead, whenever a J i is needed, we comput e it from t he canonical subsequences of hi ; m i i wit h t he help of t he segment t ree. Assume t hat hi ; m i i is a union of k = O (log n ) canonical subsequences S 1 ; : : : ; S k , and also assume t hat S 1 ; : : : ; S k are indexed count erclockwise so t hat i 2 S 1 ; m i 2 S k , and S ‘ and S ‘ + 1 for 1  ‘  k − 1 appear consecut ively on t he boundary of P . T hen, J i = I ( S 1 ) \ : : : \ I ( S k ). If i > m i , t hen hi ; m i i is divided int o hi ; n − 1i and h0; m i i . hi ; m i i is a union of t he canonical subsequences for hi ; n − 1i and t he canonical subsequences for h0; m i i . Let ( J i ) be t he upper chain of J i and U j be t he upper chain of I ( S j ) for 1  j  k . We show how ( J i ) is const ruct ed from t he U j . T he comput at ion of it s lower chain is complet ely symmet ric. Build a minimum-height binary t ree whose leaves correspond t o U 1 ; : : : ; U k in a left -t o-right order. Let v be a node of t he t ree and it s canonical subsequence be ha ; bi . Let I v = I ( S a ) \ : : : \ I ( S b ) and ( I v ) be it s upper chain. T hen, ( I v ) consist s of some subchains of U a ; U a + 1 ; : : : ; U b 4 and t hus can be represent ed by a set of t uples, where each t uple says which subchain of which U j cont ribut es t o ( I v ). In a bot t om-up fashion, comput e ( I v ) for each node v of t he minimumheight binary t ree. For each leaf v corresponding t o U j , ( I v ) = f ( j ; 1; x − ; x + ; 1; j U j j ) g, where x − (resp., x + ) is t he x -coordinat e of t he left most (resp., right most ) point of U j . For each int ernal node v , ( I v ) = f ( j 1 ; p 1 ; x −1 ; x +1 ; r 1− ; r 1+ ) ; : : : ; ( j t ; p t ; x −t ; x +t ; r t− ; r t+ ) g, where t is t he number of subchains of U j ’s t hat consist of ( I v ). Each t uple represent s a subchain { which U j it originally comes from, t he rank of it s left most arc in it s original U j , it s x -range, and t he ranks of it s left most and right most arcs in ( I v ). For example, t he rst t uple ( I v ) means t he following t hree t hings: 1. t he subchain of U j 1 in t he x -range [x −1 ; x +1 ] appears in ( I v ); 2. it s left most (resp., right most ) arc is bounded by a vert ical line x = x −1 (resp., + x = x 1 ) and it s left most arc is a part of t he p 1 -t h arc in U j 1 ; and 4

A sub chain of

U

j

is a part of

U

j

b etween any two p oint s on it .

304

Sung Kwon Kim and Chan-Su Shin

3. it s left most (resp., right most ) arc becomes t he r 1− -t h (resp., r 1+ -t h) arc in ( I v ). L e m m a 1 . A s s u m e t h a t v h a s t w o c h ild re n w a n d z . G iv e n ( I w ) a n d ( I z ) , ( I v ) ca n be o bt a in ed in O (log n  ( j ( I w ) j + j ( I z ) j + log n )) s equ e n t ia l t im e .

Let f = ( I w ) and g = ( I z ). Let S w and S z be t he canonical subsequences of w and z , respect ively. In ot her words, I w = \ i 2 S w D i and I z = \ i 2 S z D i . Let j S w j and j S z j be t he number of vert ices in S w and S z . Let [x − ; x + ] be t he common x -range of f and g . T he int ersect ion point s, if any, of f and g must be in t he vert ical st rip bounded by two lines x = x − and x = x + . So, we may assume t hat f and g are funct ions over [x − ; x + ]. Not e t hat f and g consist of several arcs of radius r . Lemma 1 will be proved t hrough a series of lemmas whose proofs are given in t he full paper [11]. P roo f.

L e m m a 2 . f a n d g in t e r s ec t a t m o s t t w ice .

Since bot h f and g are upper chains of t he int ersect ion of congruent disks, t hey are upward convex wit h one highest point . De ne h ( x ) = f ( x ) − g ( x ) over [x − ; x + ]. L e m m a 3 . I f bo t h f a n d g a re e it h e r in c rea s in g o r d ec rea s in g o v e r [x − ; x + ], f ( x − ) > g ( x − ) , a n d j S w j  3 a n d j S z j  3, t h e n h o v e r [x − ; x + ] is a d o w n w a rd co n v e x fu n c t io n w it h o n e lo w e s t po in t .

Using Lemma 3, we can prove t he following lemma. L e m m a 4 . I f ea c h o f f a n d g is e it h e r in c rea s in g o r d ec rea s in g o v e r [x − ; x + ], t h e n t h e ir in t e r s ec t io n s , if a n y , ca n be fo u n d in O (log n  ( j ( I w ) j + j ( I z ) j + log n )) s equ e n t ia l t im e .

To comput e t he int ersect ion point s between f and g , nd x f and x g , t he x -coordinat es of t he highest point s of f and g , respect ively. Such point s, x f and x g , can be comput ed in t ime O ( j ( I w ) j  log n ) and O ( j ( I z ) j  log n ), respect ively. Wlog, assume t hat x f < x g . T hen, [x − ; x + ] is divided int o t hree subranges − [x ; x f ], [x f ; x g ], and [x g ; x + ]. In each subrange, f is eit her increasing or decreasing and t he same is t rue for g . T hen Lemma 4 applies t o comput e int ersect ions of f and g over each subrange. For det ails, see [11]. Aft er locat ing t he int ersect ion point s between f and g , it is easy t o det ermine which t uples from ( I w ) and ( I z ) are eligible t o be in ( I v ). T hus, t he t uples of ( I v ) can be comput ed in addit ional O ( j ( I w ) j + j ( I z ) j ) t ime. T his complet es t he proof of Lemma 1. Given all ( I w ) for t he nodes w of some level of t he minimum-height t ree, if processors are available, t hen all ( I v ) for t he nodes v of t he next level (t oward t he root ) can be obt ained in O (log n  ( j ( I w ) j + log n )) = O (( k + log n ) log n ) t ime by Lemma 1. Not e t hat j ( I w ) j = O ( k ) for any node w . j ( I w ) j is t he number of t uples, not t he number of arcs in it . T he minimum-height t ree wit h k leaves has O (log k ) levels. k

E cient Algorit hms for T wo-Cent er P roblems for a Convex P olygon

305

L e m m a 5 . F o r a n y i , ( J i ) , in t h e fo r m o f a s e t o f t u p le s , ca n be co n s t r u c t ed in O (( k + log n ) log k log n ) t im e u s in g O ( k ) p roce s s o r s .

Back t o checking case (ii) or case (iii), assign k = O (log n ) processors t o each i sat isfying t he condit ion of (ii) or (iii), and const ruct J i , in t he form of two set s of t uples, one for it s upper chain and t he ot her for it s lower chain, in 2 O (log n log log n ) t ime by Lemma 5. Since t here are at most n such i ’s, we need a t ot al of O ( n log n ) processors. T he remaining part of (ii) or (iii) can be done using a const ant number of operat ions (O1) and (O2) on J i . Each of (O1) and (O2), using t he two set s of t uples, can now be execut ed in O (log2 n ) sequent ial t ime. As a result , we have t he t heorem. T h e o r e m 2 . G iv e n a co n v e x po ly go n P w it h n v e r t ice s a n d a v a lu e r > 0, w e 2 ca n d ec id e in O (log n log log n ) t im e u s in g O ( n log n ) p roce s s o r s w h e t h e r t w o d is k s o f ra d iu s r co v e r P .

Combining T heorems 1 and 2, we have proved t he t heorem. T h e o r e m 3 . G iv e n a co n v e x po ly go n P w it h n v e r t ice s , w e ca n co m p u t e t h e 3 m in im u m ra d iu s r  in O ( n log n log log n ) t im e s u c h t h a t t w o d is k s o f ra d iu s r  co v e r P . P roo f. By 4 O ( n log n

paramet ric search t echnique, we immediat ely have an log log n ) t ime algorit hm. Our parallel algorit hm can easily be made t o sat isfy t he Cole’s requirement [7]. T he t ime complexity is now reduced t o O ( n log3 n log log n ).

3

A lg o rit h m fo r D is c re t e T w o - C e n t e r P ro b le m fo r a C o n v e x P o ly g o n

Let P be a convex polygon wit h n vert ices. We want t o nd t he minimum value and two vert ices i ; j such t hat two disks of radius r  wit h cent ers i and j cover P . Since again paramet ric search t echnique will be employed, we will give a sequent ial algorit hm and a parallel algorit hm t hat decides, given a value r > 0, whet her r  r  . r

3 .1

S e q u e n t ia l D e c is io n A lg o rit h m

Let @P denot e t he boundary of P . For two point s a ; b on @P , hha ; bii denot es t he subchain of @P t hat walks count erclockwise st art ing at a and ending at b. Given r > 0, draw a disk D i of radius r wit h cent er at vert ex i for each i . T hen, D i \ @P may be disconnect ed and t hus may consist of several subchains of P . One of t hem cont ains i , which will be denot ed by @i = hha i ; bi ii . Lem m a 6. r 

r

i

t h e re e x is t t w o v e r t ice s i a n d j s u c h t h a t @P

= @i [ @j .

306

Sung Kwon Kim and Chan-Su Shin

Comput ing t he end point s a i ; bi of @i for each i can be done by simulat ing sequent ially our parallel algorit hm in Sect ion 3.2. T he simulat ion t akes O ( n log n ) t ime for preprocessing and for a query i answers a i and bi in O (log n ) t ime. Alt ernat ively, t he algorit hm in [6] can be used. It , given r > 0, preprocesses P in O ( n log n ) t ime, and, for a query point c , one can nd in O (log n ) t he rst (clockwise and count erclockwise) hit point on @P when a circle of radius r wit h cent er at c is drawn. Aft er having @i for all i , by Lemma 6 we need t o decide whet her t here exist two vert ices i and j such t hat @P = @i [ @j . T his is an applicat ion of m in im u m c irc le co v e r algorit hm in [2,10,12] t hat runs in O ( n log n ) t ime. In t he minimum circle cover problem, we are given a set arcs of a circle and want t o nd t he minimum number of arcs t hat covers t he circles (i.e., whose union is t he circle). T h e o r e m 4 . G iv e n a co n v e x po ly go n P w it h n v e r t ice s a n d a v a lu e r > 0, w e ca n d ec id e in O ( n log n ) t im e w h e t h e r t w o d is k s o f ra d iu s r w it h ce n t e r s a t v e r t ice s o f P ca n co v e r P .

3 .2

P a ra lle l D e c is io n A lg o rit h m

Our parallel algorit hm rst comput es @i for each i by locat ing a i and bi . Build a segment t ree on t he sequence of radius r disks cent ered at vert ices, D 0 ; : : : ; D n − 1 ; D 0 ; : : : ; D n − 2 . For each node v wit h canonical subsequence S , comput e t he int ersect ion of t he disks, I v = \ i 2 S D i . T he boundary of I v is divided int o two (upper and lower) chains by it s left most and right most point s, and t he upper and lower chains are st ored int o two arrays, + ( I v ) and − ( I v ), respect ively, of arcs sort ed according t o t heir x -coordinat es. Given a point q , whet her q 2 I v can be decided by doing binary searches on + ( I v ) and on − ( I v ). To comput e hha i ; bi ii , it is su cient t o nd t he minimal hhc i ; d i ii  hh a i ; bi ii , where c i and d i are vert ices of P . For a given vert ex i , d i can be searched using t he segment t ree as follows: Choose t he left one from t he two D i ’s at t he leaves of t he t ree. We go upward along t he leaf-t o-root pat h st art ing at t he chosen D i , and locat e t he rst node on t he pat h wit h a right child z 0 sat isfying i 2= I z 0 . St art ing at z 0, we now search downward. At a node wit h left child w and right child z , search under t he following rule: Go t o z if i 2 I w , and go t o w , ot herwise. It is easy t o verify t hat when search is over at a leaf v , we have d i = v . Searching c i is complet ely symmet ric. +

( I v ) and ( I v ) for each v can be carried out in O (log n ) t ime using O ( n log n ) processors [3] as in Sect ion 2.2. For a xed i , c i and d i can be found in O (log2 n ) sequent ial t ime as we visit O (log n ) nodes and at each node v we spend O (log n ) t ime doing binary search t o decide whet her i 2 I v . T his type of search (i.e., searching t he same value in several sort ed list s along a pat h of a binary t ree) can be improved by an applicat ion of fract ional cascading [4,5], saving a logarit hmic t ime t o achieve O (log n ) search t ime. I m p l e m e n t a t i o n . Const ruct ing t he segment t ree and comput ing −

E cient Algorit hms for T wo-Cent er P roblems for a Convex P olygon

307

From c i and d i , we comput e @i = hha i ; bi ii by comput ing t he int ersect ion point s between a circle of radius r wit h cent er i and two edges ( c i ; c i + 1) ; ( d i − 1; d i ). Wit h @i for all i , an applicat ion of parallel minimum circle cover algorit hms in [2,10] runs in O (log n ) t ime using O ( n ) processors. T h e o r e m 5 . G iv e n a co n v e x po ly go n P w it h n v e r t ice s , w e ca n co m p u t e t h e 2 m in im u m ra d iu s r  in O ( n log n ) t im e s u c h t h a t t w o d is k s o f ra d iu s r  w it h ce n t e r s a t v e r t ice s o f P co v e r P .

By T heorem 4, our sequent ial decision algorit hm t akes O ( n log n ) t ime. Aft er const ruct ing t he segment t ree and comput ing + ( I v ) and − ( I v ) for each v in our parallel algorit hm, sort t he vert ices of P and t he vert ices of + ( I v ) [ − ( I v ) for all nodes v by t heir x -coordinat es. T his makes t he applicat ion of fract ional cascading and comput at ion of c i and d i no longer depend on r , by using ranks rat her t han x -coordinat es. So, t hese st eps can be done sequent ially. Since t he Cole’s improvement [7] again can be applied t o t he parallel st eps (i.e., const ruct ing t he segment t ree, sort ing, and applying parallel circle cover algorit hm, t hat t ake O (log n ) t ime using O ( n log n ) processors), t he t ime bound can be achieved. P roo f.

Our idea for T heorem 5 can be easily ext ended t o t he discret e two-cent er problem for point s when t he point s are t he vert ices of a convex polygon. T h e o r e m 6 . G iv e n a s e t A o f n po in t s t h a t a re v e r t ice s o f a co n v e x po ly go n , 2 w e ca n co m p u t e t h e m in im u m ra d iu s r  in O ( n log n ) t im e s u c h t h a t t w o d is k s  o f ra d iu s r w it h ce n t e r s a t po in t s o f A co v e r A .

4

A lg o rit h m fo r S t a n d a rd T w o - C e n t e r P ro b le m fo r a S e t o f P o in t s in C o n v e x P o s it io n

Suppose t hat a set A of n point s in convex posit ions are given. We assume t hat as input a convex polygon wit h vert ices at t he point s of A is given, so t he point s are sort ed count erclockwise. We want t o nd two disks of radius r  whose union covers A . As usual, t he point s are numbered 0; : : : ; n − 1 count erclockwise. For any i ; j 2 A = h0; n − 1i , let r i1j be t he radius of t he smallest disk cont aining hi ; j − 1i and let r i2j be t he radius of t he smallest disk cont aining hj ; i − 1i . T hen, r  = min i ; j 2 A maxf r i1j ; r i2j g. Let r 0 = min j 2 A max f r 01 ; j ; r 02 ; j g. Let k be t he index such t hat r 0 = max f r 01 ; k ; r 02 ; k g. T hen, A is separat ed int o h0; k − 1i and hk ; n − 1i . L e m m a 7 . For an y i ; j

su ch that i ; j

2 h0; k − 1i o r

i;j

2 hk ; n − 1i ,

max f r i1j ; r i2j g > r 0 . By Lemma 7 we need t o consider pairs of i ; j such t hat i 2 h0; k − 1i and 2 hk ; n − 1i . We now apply divide-and-conquer wit h A 1 = h0; k − 1i and A 2 = hk ; n − 1i . (i) P ick t he medium-index vert ex bk = 2c from A 1 and (ii) nd t he vert ex j

308

Sung Kwon Kim and Chan-Su Shin

k0

such t hat maxf r b1k = 2 c; k 0 ; r b2k = 2 c; k 0 g = min j 2 hk ; n − 1 i maxf r b1k = 2 c; j ; r b2k = 2 c; j g. A 1 is separat ed int o A 1 1 = h0; bk = 2c − 1i and A 1 2 = hbk = 2c; k − 1i , and A 2 is separat ed int o A 2 1 = hk ; k 0 − 1i and A 2 2 = hk 0; n − 1i . By Lemma 7, we consider pairs of point s between A 1 1 and A 2 1 , and between A 1 2 and A 2 2 . (iii) Repeat recursively (i){(ii) wit h A 1 = A 1 1 and A 2 = A 2 1 , and wit h A 1 = A 1 2 and A 2 = A 2 2 . Recursion st ops when A 1 consist s of a single point ‘ , and at t hat t ime min j 2 A 2 max f r ‘1; j ; r ‘2; j g can be found as in (ii). Since a smallest disk cont aining a convex chain can be found in linear t ime, maxf r i1j ; r i2j g for any i ; j can be comput ed in linear t ime. Since r 01 ; 1 ; : : : ; r 01 ; n − 1 is increasing and r 02 ; 1 ; : : : ; r 02 ; n − 1 is decreasing, max f r 01 ; 1 ; r 02 ; 1 g; : : : ; max f r 01 ; n − 1 ; r 02 ; n − 1 g is decreasing and t hen increasing. So, r  and k can be found in O ( n log n ) t ime by binary search, in which each decision t akes O ( n ) t ime. Similarly, (ii) t akes O ( n log n ) t ime. Since our algorit hm invokes at most O (log n ) recursions, and aft er recursion st ops a single point ‘ 2 A 1 requires addit ional O ( j A 2 j log j A 2 j ) t ime, we can conclude t he following t heorem. T h e o r e m 7 . G iv e n a s e t A o f n po in t s t h a t a re v e r t ice s o f a co n v e x po ly go n , 2 w e ca n co m p u t e t h e m in im u m ra d iu s r  in O ( n log n ) t im e s u c h t h a t t w o d is k s  o f ra d iu s r co v e r A .

R e fe re n c e s 1. P. K. Agarwal and M. Sharir and E. Welzl, T he discret e 2-cent er problem, P r oc. 13t h A n n . A C M Sym p. C om put . G eom . , pp. 147{155, 1997. 2. L. Boxer and R. Miller, A parallel circle-cover minimizat ion algorit hm, I n for m . P r ocess. L et t . , 32, pp. 57{60, 1989. 3. T . M. Chan, More planar two-cent er algorit hms, C om put at i on al G eom et r y: T heor y an d A ppli cat i on s, 13, pp. 189-198, 1999 4. B. Chazelle, and L. J . Guibas, Fract ional cascading: I. A dat a st ruct uring t echnique, A lgor i t hm i ca , 1, pp. 133{162, 1986. 5. B. Chazelle, and L. J . Guibas, Fract ional cascading: II. Applicat ions, A lgor i t hm i ca , 1, pp. 163{191, 1986. 6. S.-W . Cheng, O. Cheong, H. Everet t , and R. van Oost rum, Hierarchical vert ical decomp osit ions, ray shoot ing, and circular arc queries in simple p olygons, P r oc. 15t h A n n . A C M Sym p. C om put . G eom . , pp. 227{236, 1999. 7. R. Cole, Slowing down sort ing networks t o obt ain fast er sort ing algorit hms, J . A C M , 34, pp. 200{208, 1987. 8. D. Eppst ein, Fast er const ruct ion of planar two-cent ers, P r oc. 8t h A C M -SI A M Sym p. D i scr et e A lgor i t hm s, pp. 131{138, 1997. 9. J . Friedman, J . Hershb erger, and J . Snoeyink, Compliant mot ion in a simple p olygon, P r oc. 5t h A n n . A C M Sym p. C om put . G eom ., pp. 175{186, 1989. 10. S. K. Kim, P arallel algorit hms for geomet ric int ersect ion graphs, P h.D. T hesis, Dept . of Comput . Sci. Eng., U. of Washingt on, 1990. 11. S. K. Kim, and C.-S. Shin, E cient algorit hms for two-cent er problems for a convex p olygon, H K U ST -T C SC -1999-16 , Dept . of Comp. Sci., HKUST , 1999. 12. C. C. Lee and D. T . Lee, On a circle-cover minimizat ion problem, I n for m . P r ocess. L et t . , 18, pp. 109{115, 1984.

E cient Algorit hms for T wo-Cent er P roblems for a Convex P olygon

309

13. N. Megiddo, Applying parallel comput at ion algorit hms in t he design of serial algorit hms, J . A C M , 30, pp. 852{865, 1983. 14. M. Sharir, A Near-Linear Algorit hm for t he P lanar 2-Cent er P roblem, P r oc. 12t h A n n . A C M Sym p. C om put . G eom . , pp. 106{112, 1996. 15. C.-S. Shin, J .-H. Kim, S. K. Kim, and K.-Y. Chwa, T wo-cent er problems for a convex p olygon, P r oc. 6t h E ur o. Sym p. on A lgo. , Vol. 1461, pp. 199{210, 1998.

O n C o m p u t a t io n o f A rb it ra g e fo r M a rke t s w it h Fric t io n Xiaot ie Deng1 ; ? , Zhongfei Li2 ; ? ? , and Shouyang Wang3 ; ? 1

? ?

Depart ment of Comput er Science City University of Hong Kong Hong Kong, P. R. China Deng@cs. ci t yu. edu. hk 2

Inst it ut e of Syst ems Science Chinese Academy of Sciences, Beijing, P.R. China zf l i @i ss02. i ss. ac. cn 3

Academy of Mat hemat ical and Syst ems Science Chinese Academy of Sciences, Beijing, P.R. China swang@i ss04. i ss. ac. cn

We are int erest ed in comput at ion of locat ing arbit rage in nancial market s wit h frict ions. We consider a model wit h a n it e numb er of nancial asset s and a nit e numb er of p ossible st at es of na t ure. We derive a negat ive result on comput at ional complexity of arbit rage in t he case when securit ies are t raded in int eger numb ers of shares and wit h a maximum amount of shares t hat can b e b ought for a xed price ( as in reality). W hen t hese condit ions are relaxed, we show t hat p olynomial t ime algorit hms can b e obt ained by applying linear programming t echniques. We also est ablish t he equivalence for no-arbit rage condit ion & opt imal consumpt ion p ort folio. A b st r a c t .

1

In t ro d u c t io n

T he funct ion of arbit rage in an economy is most vividly described as an inv isib le h an d t hat led economic st at es move t o equilibrium (Adam Smit h in 1776 [30]). Arbit rage is commonly de ned as a pro t -making opport unity at no risk. In ot her words, it is an opport unity for an invest or t o const ruct a port folio modi cat ion at non-posit ive cost s t hat is guarant eed t o generat e a non-negat ive ret urn lat er. Economic st at es wit h arbit rage are believed not t o exist (at least not for any signi cant durat ion of t ime) in a normal sit uat ion. Accordingly, arbit rage-free assumpt ion has been a fundament al principle in t he st udies of mat hemat ical economics and nance [3,4,19,24,32]. Nat ually, charact erizing arbit rage (or noarbit rage) st at es for a set of economic paramet er would be import ant here. T he exact form would depend on t he speci c economic models we would consider. But ⋆

⋆⋆ ⋆⋆⋆

Research part ially supp ort ed by a CERG grant of Hong Kong UGC and an SRG grant of City University of Hong Kong Research part ially supp ort ed by Nat ural Science Foundat ion of China Research part ially supp ort ed by Nat ural Science Foundat ion of China

D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 3 1 0 { 3 1 9 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

On Comput at ion of Arbit rage for Market s wit h Frict ion

311

luckily, in most cases, it has been quit e st raight forward t o do so, especially under usual assumpt ions of frict ionless and complet e market condit ions [24,13,23,31]. Going int o a dierent direct ion, t he purpose of our st udy is t o underst and t he comput at ional complexity involving in charact erizat ion of arbit rage st at es (see [11,17,25] for t he import ance of comput at ion in nance or economics). To deal wit h t his issue, we follow a model of t he market in [31] wit h a nit e number of nancial asset s, 1; 2;   ; n , wit h a nit e number of possible st at es of nat ure, s 1 ; s 2 ; : : : ; s m . Asset s are t raded at dat e 0 and ret urns are realized at dat e 1. Let R = ( r i j ) be an n  m mat rix where r i j is t he payo t o nancial asset i if st at e s j occurs. Let P = ( p 1 ; p 2 ; : : : ; p m ) T be t he price vect or, where p i be t he price of asset i ( i = 1; 2; : : : ; m ) and T denot es t he t ransposit ion. A port folio is a vect or x = ( x 1 ; x 2 ; : : : ; x m ) T , where x i is t he number of shares invest ed in asset i , i = 1; 2; : : : ; m . Under perfect market condit ions, an arbit rage opport unity is a solut ion x such t hat x T P  0, x T R  0, and − x T P + x T R e > 0, where e is t he vect or of all ones. In a frict ionless market , t he problem is solvable by linear programming (see, e.g., [8]). Since linear programming is known t o be solvable in polynomial t ime, copmut at ionally t his just i es t he general belief t hat any arbit rage possibility will be short lived since it will be ident i ed very quickly, and be t aken advant age of, and subsequent ly bring economic st at es t o a no-arbit rage one. In real life, however, t here are various forms of frict ion condit ions imposed on t rading rules. Some assumpt ions in t he previous analysis may not always hold. For example, ask-bid prices of t he same st ock are oft en di erent (ask-bid spread). At st ock exchange list ings, one o ers or bids for a st ock at a cert ain price at a cert ain volume; and one can only buy or sell a st ock at an int eger amount . We want t o know whet her t hese rules, inst it ut ionalized by human, creat e di cult ies for arbit rage, and t hus creat e di cult ies for general equilibrium t o hold. If t his is t he case, underst anding t he rat ionals behind t he mot ives of making arbit rage di cult may provide us wit h new insight s in underst anding t he role of t he nancial market in t he economy. Indeed, we show t hat under t he above requirement s (int egrality of shares t raded and t he capacity const raint s in t he number of shares asked/ bid), t he problem t o nd out an arbit rage port folio (under a given price vect or) is comput at ionally hard. We present t his result in Sect ion 2. One may not ice t hat removing any one of t he two const raint s will result in a polynomial t ime solut ion via linear programming t echniques. Obviously, t he ask/ bid amount and t he corresponding price by invest ors cannot be changed. However, t he int egrality condit ion may be removed in principle, or at least be weakened by redividing shares so t hat t he gain of arbit rage will be insigni cant . We should consider t he case wit hout int egrality condit ions in t he subsequent sect ions. In Sect ion 3, we consider t ransact ion cost s, anot her import ant fact or in deviat ion from frict ionless market . Frict ion complicat es any t heory one is t o develop. P art ially because of t his, frict ion is generally ignored in asset pricing models alt hough it is oft en brought up in informal discussion and debat es. Recent ly, a few aut hors have st art ed t o incorporat e t ransact ion cost s int o nancial market models [2,7,12,21]. In [21], P ham and Touzi est ablished t he equivalence between

312

Xiaot ie Deng, Zhongfei Li, and Shouyang Wang

t he no local arbit rage condit ion and t he exist ence of an equivalent probability measure sat isfying a generat ion of t he mart ingale property as well as t he equivalence of t he no local free lunch and t he no local arbit rage condit ions. However, T heir work is a complicat ed mat hemat ical condit ion t hat may not always lead t o an e cient algorit hm t o solve it . In Sect ion 3, we est ablish a necessary and sufcient condit ion for arbit rage-free asset prices, in presence of t ransact ion cost s, for a nancial market wit h nit e asset s and nit e st at es of nat ure. In comparison, our result is of t he classic type: t he exist ence of posit ive implicit st at e-claim prices t hat sat isfy a linear inequality syst em, which can be easily solved by linear program t echniques. In Sect ion 4, we st udy a opt imal consumpt ion-port folio select ion problem in nancial market s wit h frict ion under uncert ainty. T he absence of arbit rage is employed t o charact erize t he exist ence or a necessary and su cient condit ion of opt imal consumpt ion-port folio policies when t he nancial asset s and t he st at e of nat ure are nit e and when t he frict ion is sub ject t o proport ional t ransact ion cost s. Hist orically opt imal consumpt ion and port folio select ion problems have been invest igat ed by a number of aut hors [14,18,6,15,16,29,8,28,27,26]. Typically, cont inuous t ime problem is st udied using t he approach of st ochast ic dynamic programming, and under t he assumpt ion of frict ionless market . T he non-di erent iability of t ransact ion cost funct ions makes analysis of our problem complicat ed. We are able t o est ablish a necessary and su cient condit ion for a posit ive consumpt ion bundle t o be consumer opt imal for some invest or is t hat a t ransformed market exhibit s no arbit rage. Sect ion 5 cont ains a few concluding remarks and suggest ions for possible fut ure ext ensions.

2

N P -C o m p le t e n e s s o f A rb it ra g e u n d e r In t e g ra l C o n d it io n s

T h e o r e m 1 I n gen eral, it is st ron gly N P -hard t o n d an ar bit rage por t folio.

T he reduct ion is from 3SAT , a well known NP -hard problem [11]. Consider an inst ance of 3SAT : t he variables are X = f x 1 ; x 2 ;   ; x n g, and t he clauses are C j = f l j 1 ; l j 2 ; l j 3 g  X , j = 1; 2; : : : ; m . We creat e two asset s a i (ask) and ; n , and anot her asset a 0 . T he event s are bi (bid) for each variable, i = 1; 2;   relat ed t o t he variables and t he clauses. 1. At event e0 , t he payo of a 0 is n + 1 and t he payo s t o all ot her asset s are − 1 (so t hat a 0 must be bought ); 2. at event f i ( i = 1; 2;   ; n ), t he payo of a 0 is − 1, t he payo of a i is 1 t he payo of bi is − 1 and t he payo s t o all ot her asset s are zero (eit her a i is bought or bi is sold); 3. at event gi ( i = 1; 2;   ; n ), t he payo of a 0 is 1 t he payo of a i is − 1, t he payo of bi is 1, and t he payo s t o all ot her asset s are zero (not bot h a i is bought and bi is sold);

On Comput at ion of Arbit rage for Market s wit h Frict ion

313

4. at event h j ( j = 1; 2;   ; m ), t he payo of a 0 is − 1 if x i 2 C j , t he payo t o a i is 1, if x i 2 C j , t he payo t o bi is − 1 (at least one asset corresponding t o C j is t raded). Wit h more careful analysis we can show t hat , for event e0 , we may choose t he payo t o be one for a 0 , and zero for all ot her asset s.

3

A N e c e s s a ry a n d S u c ie n t C o n d it io n fo r N o -A rb it ra g e P ric in g o f A s s e t s w it h T ra n s a c t io n C o s t s

In addit ion t o t he not at ions we int roduced above, we use  i and i respect ively for t he t ransact ion cost rat es for purchasing and selling one share of asset i ( i = 1; 2; : : : ; n ), where 0  i ; i < 1. T he asset market is now complet ely described by t he quadraple f P ; R ; ; g, where P is t he price vect or, R t he payo mat rix, = ( 1 ; 2 ; : : : ; n ) T t he vect or of t ransact ion cost s for purchasing, and = ( 1 ; 2 ; : : : ; n ) T t he vect or of t ransact ion cost s for selling. Wit hout loss of generality, we ignore any redundant asset s, omit any st at es wit h zero probability, and assume t hat R has rank n  m . Market s are said t o be complet e if n = m . A port folio modi cat ion is a vect or x = ( x 1 ; x 2 ; : : : ; x n ) T 2 R n , where x i is t he number of shares of security i modi ed by a invest or. If x i > 0, addit ional asset i is bought for t he amount of x i ; and if x i < 0, addit ional asset i is sold for t he amount of − x i . We int roduce t he funct ions de ned on R by  i (z ) =

and t he funct ion

(1 + (1 −

) z ; if z > 0 ; i = 1; 2; : : : ; n : ) z ; ot herwise:

i i

mapping R n int o R by X

n

(x ) =

pi i

i

( x i ) ; 8x 2 R n

(1)

= 1

T he t ot al cost including t he proport ional t ransact ion cost of t he port folio modi cat ion x = ( x 1 ; x 2 ; : : : ; x n ) T is t hen ( x ) and t he vect or of st at e-dependent payo s on t he modi cat ion is R T x . If ( x ) = 0, t hen t he modi cat ion is cost less, while if ( x ) < 0, t hen t he modi cat ion generat es a posit ive dat e-0 cash flow. For simplicity, we also de ne, for any y = ( y 1 ; y 2 ; : : : ; y k ) T ; z = ( z 1 ; z 2 ; : : : ; z k ) T 2 R k (where k  2), y  z if and only if y i  z i ( i = 1; 2; : : : ; k ) ; y > z if and only if y  z and y 6 = z; y  z if and only if y i > z i ( i = 1; 2; : : : ; k ) ;

314

Xiaot ie Deng, Zhongfei Li, and Shouyang Wang

and denot e k

R+

= f y 2 R k : y > 0g; R +k + = f y 2 R k : y 

0g:

T he m ar ket f P ; R ;  ; g has an ar bit rage oppor t u n it y if t here ex ist s a por t folio m odi cat ion x = ( x 1 ; x 2 ; : : : ; x n ) T su ch t hat t he follow in g t hree con dit ion s hold

D e n it io n 1

T



0; 0;

(2) (3)

= 0 or ( x ) 6 6 = 0:

(4)

R x

(x )  T

R x

I n ot her w ords, t he m ar ket ex hibit s n o-ar bit rage if t here ex ist s n o por t folio m odi cat ion x = ( x 1 ; x 2 ; : : : ; x n ) T su ch t hat

− (x ); x T R



T

>

0:

(5)

To charact erize t he no-arbit rage condit ion, we need some lemmas. A funct ion : R k ! R is sublinear if, for any x ; y 2 R k and 2 R + , (x + y ) 

(x ) +

( y ) and

(x ) =

(x ):

It can be easily verify t hat L e m m a 1 T he cost fu n ct ion s

;

i

;i

= 1; 2; : : : ; n are su blin ear an d hen ce con -

vex .

For any t opological vect or space Y , denot e by Y  t he t opological dual space of Y . A set C Y is said t o be a cone if c 2 C for any c 2 C and 0 and a convex cone if in addit ion C + C C . A cone C is said t o be point ed if C \ (− C ) = f 0g. For a set C Y , it s t opological closure is denot ed by cl C , it s generat ed cone is t he set cone C := f c :

0; c 2 C g;

it s dual cone is de ned as C

+

:= f f 2 Y  : f ( c)

0; 8c 2 C g;

and t he quasi-int erior of C + is t he set C

+

i

:= f f 2 Y  : f ( c)

0; 8c 2 C n f 0gg:

Recall t hat a base of a cone C is a convex subset B of C such t hat 06 2 cl B and C = cone B : We will make reference t o t he following cone separat ion t heorem [5].

On Comput at ion of Arbit rage for Market s wit h Frict ion

315

L e m m a 2 L et Q an d C be t w o closed con vex con es in a locally con vex vect or space an d let C be poin t ed an d have a com pact base. I f Q \ (− C ) = f 0g, t hen t here ex ist s h 2 C + i su ch t hat h 2 Q + . + 1

De ne t he subset of R m K

=



y

= (y 0 ; y 1 ; : : : ; y m )T : y 0  −  (x ); (y 1 ; : : : ; y m ) = x T R ; x 2 R n



:

T hen, we have a property of K and a element ary equivalent de nit ion of t he no arbit rage as follows. L e m m a 3 K is a closed con vex con e.

P roof. By t he sublinearity of funct ional  , it is clear t hat K is a convex cone. By t he cont inuity of  and t he full row rank of R , it can be veri ed t hat K is

closed. f P ; R ;  ; g ex hibit s n o-ar bit rage if an d on ly if

L e m m a 4 T he m ar ket

\ R +m

K

+ 1

= f 0g:

P roof. K

\ R +m

+ 1

= f 0g 6 m

,

90 6 = y 2 K \ R+ + 1

, 9y 2 R m ,

;x

(6)

+ 1

2 R n s.t . 0 < y  − (x ); x T R t here exist s arbit rage.

(7) 

T

(8) (9)

Now we st at e and prove our main result . f P ; R ; ; g ex hibit s n o-ar bit rage if an d on ly if t here ex ist s q = ( q1 ; q2 ; : : : ; qm ) T 2 R +m + su ch t hat

T h e o r e m 2 T he m ar ket

Xm



i pi



r i j qj j

− pi 

i

pi ; i

= 1; 2; : : : ; n :

(10)

= 1

P roof. Su ciency: Assume t hat t here exist s q = ( q1 ; q2 ; : : : ; qm ) T 2 R +m + such t hat (10) holds. If t he market f P ; R ; ; g had a arbit rage opport unity, t hen t here would exist a port folio x such t hat expressions (2){(4) hold. Hence,

− ( x ) + x T R q > 0:

(11)

On t he ot her hand, mult iplying t he rst inequality of (10) by x i > 0 and t he second by x i  0 yields 

Xm

r i j qj

xi j

= 1

− x i pj 

i



x i pi ; i x i pi ;

if x i > 0; ot herwise:

316

Xiaot ie Deng, Zhongfei Li, and Shouyang Wang

T hat is, 

m

X

j

(1 +  i ) x i p i ; if x i > 0 = pi i (x i ): (1 − i ) x i p i ; ot herwise



r i j qj

xi = 1

Hence, X

n

X

(x ) =

pi i

i

= 1

m

m

n

(x i )  i

= 1

r i j qj j

X

X

X

xi

=

= 1

n

xi rij

qj j

= 1

i

= ( x T R ) q;

= 1

i.e, − (x ) + x T R q 

0

which cont radict s expression (11). T herefore, t he market f P ; R ; ; g exhibit s no-arbit rage. Necessity: Assume t hat t he market f P ; R ; ; g exhibit s no-arbit rage. T hen, by Lemma 4, (− K ) \ (− R +m + 1 ) = f 0g; where K is a closed convex cone by Lemma 3. Since R +m + 1 is a closed convex point ed cone and has a compact base, by Lemma 2, t here exist s q = ( q0 ; q) = ( q0 ; q1 ; : : : ; qm ) T 2 ( R +m + 1 ) + i = R +m ++ 1 such t hat qT y  0 for all y 2 K . Hence, − q0 ( x ) + x T R q 

0; 8x 2 R n

because (− ( x ) ; x T R ) T 2 K for all x 2 R n . Wit hout loss of generality, we assume t hat q0 = 1. T hen, X

m

n

− i

= 1

X

X

pi

i

(x i ) +

n

rij xi

qj j

= 1

i



0; 8x 2 R n :

(12)

= 1

= i in (12) yields t he desired result (10). Taking x i =  1; x j = 0; j 6 A vect or q 2 R m is said t o be a st at e-pr ice vect or if it sat is es t he ex pression ( 10 ) . D e n it io n 2

Wit h t his t erminology we can re-st at e T heorem 2 as: t here is no-arbit rage if and only if t here is a st rict ly posit ive st at e-price vect or. In addit ion, from t he proof of t heorem 2 we have C o r o lla r y 1 If q

2 R m is a st at e-pr ice vect or , t hen , for an y por t folio m odi ca-

t ion x , T

x Rq



(x ):

T hat is, a discou n t valu e of t he ex pect ed pay o of an y m odi ca t ion u n der a specially chosen \ r isk-n eu t ral" probabilit y w or ld is n ot m ore t han it s t ot al cost .

On Comput at ion of Arbit rage for Market s wit h Frict ion D e n i t i o n 3 A por t folio m odi cat ion ret u r n in each st at e, i. e. T

x R

317

x is said t o be r iskless if it has t he sam e

= r (1; 1; : : : ; 1) for some r 2 R :

C o r o l l a r y 2 I f t here ex ist s a r iskless asset or por t folio, t hen t he su m of com -

pon en t s of an y st at e-pr ice vect or is n ot m ore t han t he discou n t on r iskless bor row in g. P roof. Let x be a riskless port folio wit h x T R = (1; 1; : : : ; 1). T hen t he cost  ( x ) of t he port folio is t he discount on riskless borrowing. Let q be a st at e-price

vect or. T hen, by Corollary 1, one has X



(x ) 

qi : i

4

n

( x T R ) q = (1; 1; : : : ; 1) q = = 1

O p t im a l C o n s u m p t io n P o rt fo lio

Consider now t he following opt imal consumpt ion-port folio select ion problem 8 > >
> :

max x U ( c1 ; c2 ; : : : ; cm ) P n sub ject t o: i = 1Pp i  i ( x i )  W n r i j x i + e j ; j = 1; 2; : : : ; m cj = i= 1 c j  0; j = 1; 2; : : : ; m

where W > 0 is t he invest or’s init ial wealt h, e = ( e1 ; e2 ; : : : ; em ) T 2 R +m is t he T vect or of his or her endowment in every st at e at dat e 1, c = ( c 1 ; c2 ; : : : ; cm ) is m a vect or of his or her consumpt ion in every st at e at dat e 1, and U : R + ! R is his or her ut ility funct ion which is assumed t hroughout t he paper t o be concave and st rict ly increasing. T he invest or’s budget -feasible set (i.e., t he set of feasible solut ions t o ( C P )) is m n T B = f ( c; x ) : c 2 R + ; x 2 R ; c = e + R x ;  ( x )  W g: We est ablish t hat (t he proof is omit t ed here and will be given in t he full paper): problem ( C P ) has an opt im al solu t ion , t hen t he m ar ket f R ; P ;  ; g ex hibit s n o-ar bit rage. C on ver sely , if U is con t in u ou s an d t he m ar ket f R ; P ; ; g has n o-ar bit rage, t hen t here ex ist s an opt im al solu t ion t o problem ( C P ) .

T h e o r e m 3 If

We comment t hat t he rest rict ions we imposed in t he beginning of t he sect ion can be removed t o by making a t ransformat ion procedure t o change t he st at es and t hus t he payo mat rix R . We can obt ain a similar necessary and su cient condit ion as st at ed below and det ails will be given in t he full paper.

318

Xiaot ie Deng, Zhongfei Li, and Shouyang Wang

allocat ion c  = ( c1 ; c2 ; : : : ; cm ) > 0 w ill be an opt im al con su m pt ion for som e in vest or w it h di eren t iable, st r ict ly con cave, st at ein depen den t , vN M u t ilit y fu n ct ion in t he m ar ket f R ; P ;  ; g if an d on ly if t he m ar ket f R ; P ; ; g ex hibit s n o-ar bit rage. T h e o re m 4 A n

5

T

C o n c lu s io n

In t his paper, we rst est ablish a negat ive comput at ional complexity result for arbit rage under realist ic nancial market sit uat ions. T hen, we move on by dropping t he int egrality const raint s (just i able up t o a cert ain ext ent wit h t he bounded rat ionality principle) t o derive a necessary and su cient condit ion for t he noarbit rage market wit h t ransact ion cost s. T he condit ion can be comput ed in polynomial t ime using linear programming. Anot her dimension in t he analysis of economic t heory is t he ut ility preferences of t he part icipant s. T his det ermines, among all t he no-arbit rage condit ions, one t hat is a general equilibrium st at e under which no part icipant has t he incent ive t o shift t o a di erent allocat ion of it s invest ment , under t he frict ionless assumpt ion. Assuming risk aversion of part icipant s, Green and Srivast ava [13] showed t hat t he equilibrium st at e of t he market is equivalent t o no-arbit rage. We st udied an opt imal consumpt ion and port folio select ion problem in a nit est at e nancial market wit h t ransact ion cost s. We charact erized t he exist ence or a necessary and su cient condit ion of an opt imal consumpt ion-port folio policy by no-arbit rage of t he original market as well as a t ransformed market .

R e fe re n c e s 1. Allingham, M., 1991. Arbit rage, St . Mart in’s P ress, New York. 2. Ardalan, K., T he no-arbit rage condit ion and nancial mar ket s wit h t ransact ion cost s and het erogeneous informat ion: t he bid-ask spread, Global F i nance Jour nal , 1999, 10(1): 83. 3. Arrow, K. J ., Debreu, G., Exist ence of an equilibrium for a comp et it ive economy, Econometr i ca, 1954, 22: 265. 4. Black, F ., Sholes, M., T he pricing of opt ions and corp orat e liabilit ies, Jour nal of Poli ti cal Economy , 1973, 81: 637. 5. Borwein, J .M., 1977. P rop er E cient P oint s for Maximizat ions wit h Resp ect t o Cones. SI A M Jour nal on Control and Opti mi zati on 15, 1977, pp.57{63. 6. J . C. Cox and C. F . Huang, Opti mal consumpti on and por tfoli o poli ci es when asset pr i ces fol low a di usi on process , J ournal of Economic T heory 4 9 (1989), 33{83. 7. Dermody, J . C., P risman, E. Z., No arbit rage and valuat ion in market wit h realist ic t ransact ion cost s, Jour nal of F i nanci al and Quanti tati ve A nalysi s 1993, 28(1): 65. 8. J . B. Det emple and F . Zapat ero, Opti mal consumpti on-por tfoli o poli ci es wi th habi t for mati on , Mat hemat ical F inance 2 (1992), no. 4, 251{274. 9. Du e, D., D ynami c asset pr i ci ng theor y, 2nd ed., P rincet on University P ress, New J ersey, 1996. 10. P. Dybvig and S. Ross, Arbit rage, in T he New P algrave: A Dict ionary of Economics, 1, J . Eatwell, M. Milgat e and P. Newman, eds., London: McMillan, 1987,, pp. 100{ 106.

On Comput at ion of Arbit rage for Market s wit h Frict ion

319

11. Garey, M. R., J ohnson, D. S., Computer s and I ntractabi li ty: a Gui de to the T heor y of NP-completeness, New York : W .H. Freeman, 1979. 12. Garman, M. B., Ohlson, J . A., Valuat ion of risky asset s in arbit rage-free economies wit h t ransact ions cost s, Jour nal of F i nanci al Economi cs, 1981, 9: 271. 13. R. C. Green, and S. Srivast ava, \ Risk Aversion and Arbit rage" , T he Jour nal of F i nance, Vol. 40, pp. 257{268, 1985. 14. N. H. Hakansson, Opti mal i nvestment and consumpti on strategi es under r i sk for a class of uti li ty functi ons, Economet rica 3 8 (1970), no. 5, 587{607. 15. H. He and N. D. P earson, Consumpti on and por tfoli o poli ci es wi th i ncomplete mar kets and shor t-sale constrai ns: the i n ni te di mensi onal case , J ournal of Economic T heory 5 4 (1991), 259{304. 16. H. He and N. D. P earson, Consumpti on and por tfoli o poli ci es wi th i ncomplete mar kets and shor t-sale constrai ns: the ni te di mensi onal case , Mat hemat ical F inance 1 (1991), no. 3, 1{10. 17. Hirsch, M. D. , P apadimit riou, C. H., Vavasis, S. A., Exp onent ial lower b ounds for nding brouwer xed p oint s, Jour nal of Complexi ty, 1979, 5: 379. 18. I. Karat zas, J . P. Lehoczky, and S. E. Shreve, Opti mal por tfoli o and consumpti on deci si ons for a \ smal l i nvestor " on a ni te hor i zon , SIAM J ournal on Cont rol and Opt imizat ion 2 5 (1987), no. 6, 1557{1586. 19. Mert on, R. C., 1973. T heory of Rat ional Opt ion P ricing. Bell J ournal of Economics and Management Science 4, 141{183. 20. R. C. Mert on, Opti mum consumpti on and por tfoli o r ules i n a conti nuous-ti me model , J ournal of Economic T heory 3 (1971), 373{413. 21. H. P ham and N. Touzi, T he fundament al t heorem of asset pricing wit h cone const raint s, J ournal of Mat hemat ical Economics, 31, 265{279, 1999. 22. R. T . Rockafellar, Convex A nalysi s, P rincet on, New J ersey, P rincet on University P ress, 1970. 23. Ross, S. A., T he arbit rage t heory of capit al asset pricing, Jour nal of Economi c T heor y , 1976, 13: 341. 24. S. A. Ross, \ Ret urn, Risk and Arbit rage" , Ri sk and Retur n i n F i nance, Friend and Bicksler (eds.), Cambridge, Mass., Ballinger, pp. 189{218, 1977. 25. Scarf, H., T he Computati on of Economi c Equi li br i a, New Haven: Yale University P ress, 1973. 26. S. P. Set hi, Opti mal consumpti on and i nvestment wi th bankr uptcy , Kluwer, Bost on, 1997. 27. H. Shirakawa, Opti mal consumpti on and por tfoli o selecti on wi th i ncomplete mar kets and upper and lower bound constai nts, Mat hemat ical F inance 4 (1994), no. 1, 1{24. 28. H. Shirakawa and H. Kassai, Opti mal consumpti on and ar bi trage i n i ncomplete, ni te state secur i ty mar kets , J ournal of Op erat ions Research 4 5 (1993), 349{372. 29. S. E. Shreve, H. M. Soner, and G.-L. Xu, Opti mal i nvestment and consumpti on wi th two bounds and transacti on costs, Mat hemat ical F inance 1 (1991), no. 3, 53{84. 30. Smit h, A., A n I nqui r y i nto the Nature and Causes of the W ealth of Nati ons, Modern Library, 1937. 31. Spremann, K., T he simple analyt ics of arbit rage, Capi tal M ar ket Equi li br i a (ed. Bamb erg, G., Spremann, K.), New York: Springer-Verlag, 1986, pp.189{207. 32. W ilhelm, J ., A r bi trage T heor y , Berlin: Springer-Verlag, 1985.

O n S om e O p t im izat ion P rob lem s in O b n ox iou s Facility Lo cat ion ⋆ Zhongping Qin 1 , Yinfeng Xu 2 , and Binhai Zhu 3 1

3

Dept . of Mat hemat ics, Huazhong University of Science and Technology, China 2 School of Management , Xi’an J iaot ong University, Xi’an, China Dept . of Comput er Science, City University of Hong Kong, Kowloon, Hong Kong. bhz@cs. ci t yu. edu. hk

In t his pap er we st udy t he following general MaxMinopt imizat ion problem concerning undesirable (obnoxious) facility locat ion: Given a set of n sit es S inside a convex region P , const ruct m garbage dep osit sit es V such t hat t he minimum dist ance b etween t hese sit es V and t he union of S and V , V ∪ S , is maximized. We present a general met hod using Voronoi diagrams t o approximat ely solve two such problems when t he sit es S ’s are p oint s and weight ed convex p olygons (corresp ondingly, V ’s are p oint s and weight ed p oint s and t he dist ances are L 2 and weight ed resp ect ively). In t he lat t er case we generalize t he Voronoi diagrams for disjoint weight ed convex p olygons in t he plane. Our algorit hms run in p olynomial t ime and approximat e t he opt imal solut ions of t he ab ove two problems by a fact or of 2. A b st r a c t .

m

m

m

m

m

1

Int ro d u ct ion

In t he area of environment al operat ions management we usually face t he problem of locat ing sit es t o deposit (nuclear and/ or convent ional) wast es. Because of t he radiat ion and pollut ion eect we do not want t o locat e such a sit e t oo close t o a city. Moreover, we cannot even locat e two sit es t oo close t o each ot her (even if t hey are far from cit ies where human beings reside) | t his is especially t he case when t he sit es are used t o deposit nuclear wast es as t he collect ive radiat ion becomes st ronger. Anot her relat ed applicat ion is somet hing t o do wit h sat ellit e placement . In t he sky we already have quit e a lot of sat ellit es and cert ainly t he number is increasing year by year. When we launch a new sat ellit e, we cert ainly need t o place it at such a locat ion which is far from t he exist ing ones as long as t here is no ot her const raint s | put t ing t hem t oo close would a ect t he communicat ion quality. T his problem arises in many ot her applicat ions in pract ice. However, how t o nd e cient solut ions for t hese kinds of problems is not an easy t ask and t his ?

T he aut hors would like t o acknowledge t he supp ort of research grant s from NSF of China, Research Grant s Council of Hong Kong SAR, China (CERG P roject No. CityU1103/ 99E) and City University of Hong Kong

D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 3 2 0 { 3 2 9 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

On Some Opt imizat ion P roblems in Obnoxious Facility Locat ion

321

present s a new challenge for comput at ional geomet ers. In t his paper we st udy several versions of t his problem. We call t his general problem t he Undesirable Facility Locat ion P roblem (UFL, for short ) and formulat e two versions of t he problem as follows. I. U n d e sirab le P o int P lace m e nt P ro b le m ( U P P ) . Given a convex polygonal domain P and a set of point sit es S in P , nd t he locat ion of m undesirable or obnoxious facilit ies in P , which consist of a point set V m , so as t o Maxi mi ze f d^( V m ; V m [ S )g

where t he maximum is over all t he possible posit ions of t he point s in V m and [ S ) de ned as

d^( V m ; V m

d^( V m ; V m

[ S) =

min

fx6 = q g^ f x 2 V m g^ f q 2 V m [ S g

f d ( x ; q )g

wit h d ( x ; q ) being t he Euclidean dist ance between x and q . Not e t hat t he Undesirable P oint P lacement problem (UP P ) is evident ly a MaxMin-opt imizat ion problem. We can see t hat t he solut ion maximizes t he dist ances between t he undesirable facilit ies and t he dist ances between t he ordered pairs of point s from t he undesirable facilit ies and t he sit es. T herefore, t he damage or pollut ion t o t he sit es is low. In reality, we know t hat t he import ance, areas, or t he capacity of enduring damages of various cit ies are di erent . We t ake t his int o considerat ion and make t he problem more general and pract ical, we int roduce t he weight ed funct ion w ( q ) for point q , ext end t he point sit es t o disjoint weight ed convex polygons and permit t he met ric t o be eit her L 2 or L 1 . Our ob ject ive is t o dist inguish t he di erence of import ance of various sit es, capt ure t he real geographic condit ions and t o sat isfy various needs in pract ice. We t herefore formulat e t he following more general problem. I I. U n d e sirab le W e ig ht e d P o int P lace m e nt P ro b le m ( U W P P ) . Given a convex polygonal domain P and a set of disjoint convex polygonal sit es S in P where each point q in a polygon s 2 S has weight w ( q ) = w ( s ) ( w ( s )  1 is associat ed wit h t he polygon s ), nd t he locat ion of m undesirable facilit ies in P , which consist of a point set V m and have t he same weight 1  w 0  w ( s ) ; s 2 S , so as t o Maxi mi ze f d^w ( V m ; V m [ S )g where t he maximum is over all t he possible posit ions of t he point s in V m and [ S ) is de ned as

d^w ( V m ; V m

d^w ( V m ; V m

[ S) =

min

fx6 = q g^ f x 2 V m g^ f q 2 V m [ S g

f d w ( x ; q )g

wit h d w ( x ; q ) = w (1q ) d ( x ; q ), d ( x ; q ) being t he Euclidean dist ance in between x and q . We remark t hat t he Undesirable Weight ed P oint P lacement P roblem (UWP P ) is a much more complex MaxMin-opt imizat ion problem. If set V m is chosen such

322

Zhongping Qin, Yinfeng Xu, and Binhai Zhu

t hat t he ob ject ive funct ion of UWP P reaches it s opt imal value (which is called t he m -opt imal value of UWP P, denot ed as d m ) t hen we call t he t hus chosen set V m a m -ext reme set of UWP P, denot ed as V m . It is obvious t hat in a solut ion t o UWP P t he undesirable facilit ies are fart her away from t hose sit es wit h larger weight s. Hence t he sit es wit h larger weight s can get more prot ect against t he undesirable facilit ies. Alt hough we formulat e t he problem as t he Undesirable Weight ed P oint P lacement P roblem in t he plane, it can be formulat ed as problem in ot her elds like packing sat ellit es in t he sky or packing t ransmit t ers on t he eart h. It should be not ed t hat nding t he opt imal solut ions, V m , for eit her UP P or UWP P is not an easy t ask. T he exhaust ive search met hod is not possible as t he spaces of t he solut ions t o t he problems are cont inuous regions in R 2 m and t he minimizing st ep of t he ob ject ive funct ion concerns some cont inuous regions in R 2 . So far we have not been able t o obt ain an algorit hm t o nd an opt imal solut ion for eit her of t he two problems even if it is of exponent ial t ime complexity. T he di culty of t he problem can also be seen from t he following. It is not yet known how t o pack as many as possible unit circles in a given special polygon P , like a square. In t his set t ing, S is empty and we want t o det ermine t he maximum set V m such t hat t he dist ance d^( V m ; V m ) is at least two [13]. Alt hough t he problem is hard t o solve, in pract ice, usually an approximat e solut ion is accept able as long as t he solut ion is e cient . In t his paper we present a general increment al Voronoi diagram algorit hm which approximat e t he opt imal solut ion of t he two problems by a fact or of 2.

2

T h e In crem ent al Voron oi D iagram A lgorit h m for U P P

In t his sect ion we present an increment al Voronoi diagram algorit hm for approximat ing t he Undesirable P oint P lacement P roblem (UP P ). T he basic ideas of t he algorit hm are as follows: (1). We successively choose t he point s of V m from a discret e set . At i -t h st ep we choose t he point which is t he fart hest away from t he point s in V i − 1 chosen previously and all sit es in S . (2). T he point in V i − V i − 1 which is t he fart hest from V i − 1 [ S is always among t he Voronoi vert ices of V or ( V i − 1 [ S ), vert ices of polygon P and t he int ersect ion point s of t he Voronoi edges of V or ( V i − 1 [ S ) and P . Basically, t he algorit hm uses a st rat egy of comput ing point s in V m from a nit e discret e eld rat her t han from a cont inuous eld. T he algorit hm and analysis is as follows. A lg o rit h m U P P In p u t : A convex polygon P , a set of point s S in P . O u t p u t : T he set of point s V m in P . P ro ce d u re :

1. Init ialize V := ; . 2. Comput e t he Voronoi diagram of ( V [ S ), V or ( V [ S ).

On Some Opt imizat ion P roblems in Obnoxious Facility Locat ion

323

3. Find t he set B consist ing of t he Voronoi vert ices of ( V [ S ), t he vert ices of P and t he int ersect ion point s between Voronoi edges and t he edges of P . Among t he point s in B , choose t he point v which maximizes d ( v ; qv ) ; v 2 B , where qv 2 V [ S and V or region ( qv ) cont ains point v . 4. Updat e V := V [ f v g and ret urn t o St ep 2 when j V j  m . We have t he following t heorem regarding t he above algorit hm. T h e o re m 1 . T he ou tpu t V m gen erated by A lgorithm U P P presen ts a 2-approxim ation to the optim al solu tion for the U n desirable P oin t P lacem en t P roblem (UP P ).

T he proof of T heorem 1 is based on t he following lemma, which is similar t o t he met hods used in [6,8]. Le m m a 2 . G iven an y con vex polygon P an d an y set S of poin t sites in P , for d



t+ 1 , an y set V t of t poin ts in P there exists a poin t p 2 P su ch that d ( p; V t [ S )  2  where d t + 1 is the ( t + 1) -optim al valu e of the U P P , where d ( p; V t [ S ) den otes the E u clidean distan ce between poin t p an d set V t [ S .

P ro o f. Suppose t hat t he lemma is not t rue. T hen t here exist s a point set V t in P such t hat for any p 2 P , max d ( p; V t [ S )
d ( p; q ) which cont radict s t he de nit ion of p . Hence for point m ) chosen point for set V m by st ep 3 of Algorit hm UP P, v k , t he k -t h ( k  d ( v k ; V k − 1 [ S ) = maxf x 2 P g f d ( x ; V k − 1 [ S )g (recall t hat d ( v k ; V k − 1 [ S ) denot es t he dist ance between point v i and set V i − 1 [ S ).

P ro o f fo r T h e o re m 1 . For any k 

S ); x

324

Zhongping Qin, Yinfeng Xu, and Binhai Zhu

Also, we have t he relat ion d ( v k ; Vk − 1

[ S) 

d ( v k − 1 ; Vk − 2

[ S ) ; k = 2; 3;  

;m:

= v k ; which belong t o V or ( V k [ S ) \ P will T he reason is t hat all V or region ( q ) ; q 6 not grow relat ive t o V or region ( q ) 2 V or ( V k − 1 [ S ) \ P aft er point v k is insert ed. In addit ion, t he point on t he boundary of V or region ( v k ) 2 V or ( V k [ S ) \ P which is t he fart hest t o v k is always on t he boundary of V or region ( q ) 2 V or ( V k [ S ) \ P ; q 2 V k − 1 [ S , which is adjacent t o V or region ( v k ) 2 V or ( V k [ S )\ P . So from t his relat ion by induct ion we can obt ain t he result t hat d ( v k ; V k − 1 [ S ) = d ( V k ; V k [ S ). Hence by t he above assert ion and Lemma 2 d^( V m ; V m [ S ) = d ( v m ; V m − 1 [ S ) =  dm . T his shows t hat V m , t he out put of Algorit hm max f x 2 P g f d ( x ; V m − 1 [ S )g  2 UP P, is a 2-approximat ion of V m (t he m -ext reme set of UP P ). tu T im e co m p le x ity. T he algorit hm runs in O ( m N log N ) t ime, where N = j S j + j P j + m . At each of t he m it erat ions, St ep 2 t akes O ( N log N ) t ime, St ep 3 involves nding t he nearest neighbor of each vert ex v hence t akes O ( N log N ) t ime | we need t o perform O ( N ) point locat ions each t aking logarit hmic t ime. It is possible t o improve St ep 2 by using t he dynamic Voronoi diagram (Delaunay t riangulat ion) algorit hm of [3,4] so t hat over all of t he m it erat ions 1 , St ep 2 t akes O ( N log N + m log N ) t ime inst ead of O ( m N log N ) t ime. But t his will not change t he overall t ime complexity of t he algorit hm as St ep 3 t akes O ( N log N ) t ime at each of t he m it erat ions.

3

A G eneralizat ion t o t he W eight ed P lane

In t his sect ion, we consider yet anot her generalizat ion of t he problem t o t he weight ed ( L 2 or L 1 ) plane. We make some necessary adjust ment t o Algorit hm UP P so as t o approximat ely solve t he Undesirable Weight ed P oint P lacement P roblem (UWP P ). T he basic idea is t he same as Algorit hm UP P. But t he set B in st ep 3 should be change t o t he set B 0 consist ing of t he Voronoi vert ices and dividing point s of V or ( V t [ S ), vert ices of P , t he int ersect ion point s between Voronoi segment s of V or ( V [ S ) and t he edges of P . 3 .1

T h e W e ig ht e d Vo ro n o i D iag ram o f C o nve x P o ly g o n s in t h e P lan e

We generalize t he concept of Voronoi diagram of point s in t he plane in t hree aspect s: (1) change point sit es t o disjoint convex polygons, (2) each sit e has a posit ive weight which is at least one, (3) under bot h met ric L 2 and L 1 (we will focus on L 2 ). To t he best knowledge of t he aut hors, in met ric L 2 t he Voronoi diagram of weight ed point s in t he plane is well st udied [1], but t he Voronoi diagram of weight ed convex polygon ob ject s is seldomly st udied. In met ric L 1 1

In pract ice, we advocat e t he use of [7] t o up dat e t he Voronoi diagram when a new p oint is added and t he p oint locat ion algorit hm of [5,12].

On Some Opt imizat ion P roblems in Obnoxious Facility Locat ion

325

t here are only result s on t he Voronoi diagram of point s in t he plane [10,11] before t his work. Let S be a set of disjoint convex polygons in t he plane which are associat ed wit h weight s w ( s )  1; s 2 S . T he weighted V oron oi diagram of S (for short WVD( S )) is a subdivision of t he plane consist ing of Voronoi regions, Voronoi faces, Voronoi edges, Voronoi segment s, Voronoi vert ices and Voronoi dividing point s. V or region ( s ) is de ned as V or region ( s ) = f x j

1 d (x ; s)  w (s)

1 d ( x ; t ) ; t 2 S g: w (t )

A V oron oi face of t he WVD( S ) is a connect ed component of a t hus de ned Voronoi region. A V oron oi edge is t he int ersect ion of two Voronoi faces. A V oron oi segm en t is t he maximal port ion of a Voronoi edge which can be described by a curve equat ion. A V oron oi dividin g poin t is an endpoint of a Voronoi segment and a V oron oi vertex is t he int ersect ion of t hree Voronoi edges. We now focus on L 2 and present t he necessary det ails. In Figure 1, we show an example of t hree convex polygons wit h weight s 1, 2 and 3 (for convenience, we use 1, 2 and 3 t o represent t hem as well). Not e t hat t he Voronoi edge between 2 and 3 which is inside P is composed a set of Voronoi segment s.

2

1

v

3

P F ig . 1 . A weight ed Voronoi diagram of t hree convex polygons.

Le m m a 3 . S u ppose S = f s 1 ; s 2 g con sist of two weighted disjoin t con vex polygon s in the plan e an d 1  w ( s 1 ) < w ( s 2 ) , then V or region ( s 1 ) is a lim itary con n ected region . T he bou n dary of V or region ( s 1 ) ( which is a V oron oi edge) con sists of som e V oron oi segm en ts which are parts of con ic cu rves, respectively, i.e.

326

Zhongping Qin, Yinfeng Xu, and Binhai Zhu 1. A V oron oi segm en t is a part of a circle determ in ed by equ ation

1 1 d (x ; p) = d ( x ; q) w (p) w ( q) where x is a poin t of the V oron oi segm en t an d p; q are a pair of vertices of two con vex polygon s s 1 an d s 2 . 2. A V oron oi segm en t is a part of a hyperbola, parabola or ellipse determ in ed by equ ation

1 1 d (x ; p) = d ( x ; e) w (p) w ( e) where x is a poin t of the V oron oi segm en t an d p ( e) is vertex ( edge) con vex polygon s 1 ( s 2 ) . T he segm en t is a part of a hyperbola, parabola or ellipse when the weight of the vertex p is bigger than , equ al to or less than the weight of the edge e. 3. A V oron oi segm en t is a straight lin e segm en t determ in ed by equ ation

1 w ( e1 )

d ( x ; e1 )

=

1 w ( e2 )

d ( x ; e2 )

where x is a poin t of the V oron oi segm en t an d e1 ; e2 are a pair of edges of two con vex polygon s s 1 an d s 2 .

T here are some dierence between t he WVD( S ) and t he classic Voronoi diagram of point s (for short VD( P )) or t he weight ed Voronoi diagram of point s (for short WVD( P )): an Voronoi edge in VD( P ) or WVD( P ) has just one Voronoi segment which is a part of a st raight line (in VD( P )) or a part of circle (in WVD( P )), but a Voronoi edge in WVD( S ) cont ains some Voronoi segment s which are of dierent conic curves. T herefore, in WVD( S ) Voronoi dividing point s are dierent from Voronoi vert ices. Similar t o [2], we make t he following de nit ion. D e n it io n 1 . G iven two weighted disjoin t con vex polygon s s 1 ; s 2 in the plan e an d 1  w ( s 1 ) < w ( s 2 ) , V or r egi on ( s 1 ) is de n ed as the dom in an ce of s 1 over s 2 , for short dom ( s 1 ; s 2 ) , an d the closu re of the com plem en t of V or region ( s 1 ) is called the dom in an ce of s 2 over s 1 , for short dom ( s 2 ; s 1 ) .

T he following lemma follows from t he de nit ion of Voronoi diagrams and is t he basis for const ruct ing WVD( S ). Le m m a 4 . Let S be a n ite set of weighted con vex polygon s in the plan e an d 2 S. \ dom ( s; t ) : V or region ( s ) =

s

t2S−

f sg

In general, V or region ( s ) in WVD( S ) may have O (j S j) Voronoi faces, i.e., t he region does not need t o be connect ed and it s connect ed part s do not need t o be simply connect ed. Overall, t he WVD( S ) can be comput ed in O (j S j 3 ) t ime and O (j S j 2 ) space, using st andard t echniques in comput at ional geomet ry [14].

On Some Opt imizat ion P roblems in Obnoxious Facility Locat ion

3 .2

327

A lg o rit h m

We now present t he approximat ion algorit hm for UWP P. A lg o rit h m U W P P P

In p u t : A convex polygon P , a set S of disjoint weight ed convex polygons in and each polygon s 2 S has a weight w ( s )  1. O u t p u t : T he set of point s V m , all wit h weight 1  w 0  w ( s ) ; s 2 S . P ro ce d u re :

1. Init ialize V := ; . 2. Comput e t he weight ed Voronoi diagram of ( V [ S ), WVD( V [ S ). 3. Find t he set B 0 consist ing of t he Voronoi vert ices and dividing point s of W V D ( V [ S ), t he vert ices of P and t he int ersect ion point s between Voronoi segment s of W V D ( V [ S ) and t he edges of P . Among t he point s in B 0, choose t he point v which maximizes w (1q v ) d ( v ; qv ), where v 2 B 0, qv 2 V [ S and v 2 V or region ( qv ). 4. Updat e V := V [ f v g and ret urn t o St ep 2 when j V j  m . In Figure 1, if we only add one obnoxious facility t hen it would be placed at t he low-left corner of P . We have t he following t heorem. T h e o re m 5 . T he ou tpu t V m of A lgorithm U W P P is a 2-approxim ation to the U n desirable W eighted P oin t P lacem en t P roblem .

First we need t o generalize Lemma 2, which is import ant t o t he proof of T heorem 1, t o t he following Lemma 6. Le m m a 6 . Let P an d S be as in the de n ition of U W P P . For an y set V t of t poin ts in P with weight 1  w 0  w ( s ) ; s 2 S there exists a poin t x 2 P such that  max

1 d ( x ; qx )  w ( qx )

dt +

2

1

;x

2 P;

where qx 2 V t [ S; x 2 V or region ( qx ) an d d t + 1 is the ( t + 1) -optim al valu e of UW P P .

P ro o f. Suppose t he lemma is not t rue, t hen t here exist s a point set V t in P (not e t hat point s in V t have t he same weight 1  w 0  w ( s ) ; s 2 S ) such t hat max

d t + 1 1 d ( x ; qx ) < ;x 2 P w ( qx ) 2

where qx 2 V t [ S and x is cont ained in V or region ( qx ). Let r be t he value of  d t he left -hand side, so we have r < t 2+ 1 . For q 2 V t [ S ( V t [ S is eit her a point ains all t he in V t or a convex polygon in S ), we expand q t o q such t hat q cont S point s wit hin w ( q ) r dist ance (in L 2 ) t o q . By t he opt imality of r , q 2 V t [ S f qg

328

Zhongping Qin, Yinfeng Xu, and Binhai Zhu

cont ains all t he point s in P . So t here are two point s of V t  + 1 [ S ( V t  + 1 is t he ( t + 1)-ext reme set of UWP P ) cont ained in some q ( q 2 V t ). T his implies t hat  d t he ( t + 1)-opt imal value of t he UWP P d t + 1  2r , a cont radict ion wit h r < t 2+ 1 . tu P ro o f fo r T h e o re m 5 . Let v k be t he k -t h chosen point for set V m by st ep 3 of

Algorit hm UWP P. Similar t o t he proof of T heorem 1 we also have t he result t hat v k maximizes w (1q ) L ( x ; qx ) ; x 2 P where qx 2 V k − 1 [ S and x 2 V or region ( qx ). x 1 d ( v k ; qv ) = d^w ( V k ; V k [ S ). In fact , we have We assert t hat w ( qv k )

k

d^w ( v k − 1 ; qv k −

1

)

d^w ( v k ; qv k ) ; k

= 1; 2;  

;m:

= v k ; which belong T he reason is t hat as w 0  w ( s ) ; s 2 S , all V or region ( q ) ; q 6 t o V or ( V k [ S ) will not grow relat ive t o V or region ( q ) 2 V or ( V k − 1 [ S ) aft er point v k is insert ed. Also, t he point on t he boundary of V or region ( v k ) 2 V or ( V k [ S ) which is t he fart hest t o v k is always on t he boundary of V or region ( q ) 2 V or ( V k [ S ) ; q 2 V k − 1 [ S , which is adjacent t o V or region ( v k ) 2 V or ( V k [ S ). Based on t his fact we can easily prove t he above assert ion by induct ion. T herefore, following Lemma 6 d^w ( V m ; V m

[ S ) = w ( q1v ) d ( v m ; qv m ) m = maxf x 2 P g f w (1q x ) d ( x ; qx )g; where qx 2 V m − 1 [ S an d x 2 V or region ( qx )  dm :  2

tu T im e co m p le x ity. T he algorit hm runs in O ( m N 3 ) t ime, where N = j S j + j P j + m.

At each of t he m it erat ions, St eps 2 and 3 t ake O ( N 3 ) t ime and O ( N 2 ) space.

We comment t hat t he WVD( S ) can be generalized t o L 1 met ric. Moreover, t he facilit ies can have dierent weight s (but we t hen should rst place t he facility wit h t he largest weight , among t hose unplaced ones). T he det ails are omit t ed. Finally, we comment t hat it might be possible for us t o t rade t he running t ime of t his algorit hm wit h t he approximat ion fact or. We can use t he geomet ric Voronoi diagram of S in L 2 , which is planar and can be const ruct ed in O ( N log N ) t ime and O ( N ) space [9,15,16].

4

C oncluding R em arks

In t his paper we present a met hod t o solve a MaxMin-opt imizat ion problem in obnoxious facility locat ion. T he met hod is general and can be generalized t o many int erest ing cases when t he sit es are not necessary point s. It is an open quest ion whet her we can obt ain an opt imal solut ion for t he problem (even it is of exponent ial t ime complexity). Anot her quest ion is whet her t he O ( N 3 ) t ime

On Some Opt imizat ion P roblems in Obnoxious Facility Locat ion

329

for comput ing WVD( S ) in Sect ion 3 can be furt her improved. Finally, all t he facilit ies we consider are point s (or weight ed point s); however, in pract ice somet imes t he facilit ies might be of some size as well. It is not know whet her our met hod can be generalized t o t hese sit uat ions. For example, what if t he facilit ies are unit circles? R e fe re n ce s [1] F . Aurenhammer, Voronoi diagrams: a survey of a fundament al geomet ric dat a st ruct ures, A C M C om put . Sur veys, 23(3), pp. 343-405, 1991. [2] F . Aurenhammer and H. Edelsbrunner, An opt imal algorit hm for const ruct ing t he weight ed Voronoi diagram in t he plane, P at t er n R ecogn i t i on , 17, pp. 251-257, 1984. [3] J . Boissonnat , O. Devillers, R. Schot t , M. Teillaud and M. Yvinec, Applicat ions of random sampling t o on-line algorit hms in comput at ional geomet ry, D i sc. C om p. G eom . 8, pp. 51-71, 1992. [4] O. Devillers, S. Meiser and M. Teillaud, Fully dynamic Delaunay t riangulat ion in logarit hmic exp ect ed t ime p er op erat ion, C om p. G eom . T heor y an d A ppl. 2, pp. 55-80, 1992. [5] L. Devroye, E. M¨u cke and B. Zhu, A not e on p oint locat ion in Delaunay t riangulat ions of random p oint s, A lgor i t hm i ca , sp ecial issue on Average Case Analysis of Algorit hms, 22( 4) , pp. 477-482, Dec, 1998. [6] T . Feder and D. Greene, Opt imal algorit hms for approximat e clust ering, P r oc. 20t h ST O C , pp. 434-444, 1988. [7] L. Guibas, D. Knut h and M. Sharir, Randomized increment al const ruct ion of Delaunay and Voronoi diagrams, A lgor i t hm i ca , 7, pp. 381-413, 1992. [8] T . Gonzalez, Clust ering t o minimize t he maximum int erclust er dist ance, T heo. C om pu t . Sci . , 38, pp. 293-306, 1985. [9] R. Klein, K. Mehlhorn and S. Meiser, Randomized increment al const ruct ion of abst ract Voronoi diagrams, C om p. G eom . T heor y an d A ppl. 3, pp. 157-184, 1993. [10] D.T . Lee and C.K. Wong, Voronoi diagrams in t he L 1 ( L ∞ ) met ric wit h twodimensional st orage applicat ions, SI A M . J C om pu t . , 9, pp. 200-211, 1980. [11] D.T . Lee, T wo-dimensional Voronoi diagrams in t he L met ric, J . A C M , 27, pp. 604-618, 1980. [12] E. M¨u cke, I. Saias and B. Zhu, Fast Randomized P oint Locat ion W it hout P reprocessing in T wo and T hree-dimensional Delaunay Triangulat ions, C om p. G eom . T heor y an d A ppl , sp ecial issue for SoCG’96, 12( 1/ 2) , pp. 63-83, Feb, 1999. [13] K. Nurmela and P. Ost ergard, P acking up t o 50 equal circles in a square, D i sc. C om p. G eom . 18, pp. 111-120, 1997. [14] F . P reparat a and M. Shamos, Comput at ional Geomet ry, Springer-Verlag, 1985. [15] P. W idmayer, Y.F . Wu, and C.K. Wong, On some dist ance problems in xed orient at ions. SI A M J . C om pu t . , 16, pp. 728{746, 1987. [16] C.K. Yap, An O( n log n ) algorit hm for t he Voronoi diagram of a set of curve segment , D i sc. C om p. G eom . 2, pp. 365-393, 1987. p

G e n e r a t in g N e c k la c e s a n d S t r in g s w it h F o r b id d e n S u b s t r in g s Frank Ruskey and J oe Sawada University of Vict oria, Vict oria, B.C. V8W 3P 6, Canada, f f r uskey, j sawadag@csr . csc. uvi c. ca

A b s t r a c t . Given a lengt h m st ring f over a k -ary alphab et and a p osit ive int eger n , we develop e cient algorit hms t o generat e (a) all k -ary st rings of lengt h n t hat have no subst ring equal t o f , (b) all k -ary circular st rings of lengt h n t hat have no subst ring equal t o f , and (c) all k -ary necklaces of lengt h n t hat have no subst ring equal t o f , where f is an ap eriodic necklace. Each of t he algorit hms runs in amort ized t ime O (1) p er st ring generat ed, indep endent of k , m , and n .

1

I n t r o d u c t io n

T he problem of generat ing discret e st ruct ures wit h forbidden sub-st ruct ures is an area t hat has been st udied for many ob ject s including graphs (e.g., wit h forbidden minors), permut at ions (e.g., which avoid t he subsequence 312 of relat ive values), and t rees (e.g., of bounded degree). In t his paper we are concerned wit h generat ing st rings t hat avoid some part icular subst ring. For example, t he set of binary st rings t hat avoid t he pat t ern 11 are known as F ibon acci st rin gs , since t hey are count ed by t he F ibonacci numbers. T he set of circular binary st rings t hat avoid 11 are count ed by t he Lucas numbers. W it hin combinat orics, t he count ing of st rings which avoiding part icular subst rings can be handled wit h t he \ t ransfer mat rix met hod" as explained, for example, in St anley [5]. T he ordinary generat ing funct ion of t he number of such st rings is always rat ional, even in t he case of circular st rings. In spit e of t he import ance of t hese ob ject s wit hin combinat orics, we know of no papers t hat explicit ly address t he problem of e cient ly generat ing all st rings or necklaces avoiding a given subst ring. T he problem of generat ing st rings wit h forbidden subst rings is nat urally relat ed t o t he classic pat t ern mat ching problem, which t akes as input a pat t ern P of lengt h m and a t ext T of lengt h n , and nds all occurrences of t he pat t ern in t he t ext . Several algorit hms perform t his t ask in linear t ime, O ( n + m ), including t he Boyer-Moore algorit hm, t he Knut h-Morris-P rat t (KMP ) algorit hm and an aut omat a-based algorit hm (which requires non-linear init ializat ion) [2]. T he Boyer-Moore algorit hm is not suit able for our purposes since it does not operat e in real-t ime. On t he ot her hand, t he aut omat a-based algorit hm operat es in real-t ime and t he KMP algorit hm can be adapt ed t o do so [2]. D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 3 3 0 { 3 3 9 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

Generat ing Necklaces and St rings wit h Forbidden Subst rings

331

Our algorit hms are recursive, generat ing t he st ring from left -t o-right and applying t he pat t ern mat ching as each charact er is generat ed. It is st raight forward t o generat e unrest rict ed st rings in such a recursive manner and adding t he pat t ern mat ching is easy as well. However, when t he pat t ern is t aken circularly, t he algorit hm and it s analysis become considerably more complicat ed. T he algorit hm for generat ing t he necklaces uses t he recursive scheme int roduced in [4]. T his scheme has been used t o generat e ot her rest rict ed classes of necklaces, such as unlabelled necklaces [4], xed-density necklaces [3], and bracelet s (necklaces t hat can be t urned over), and is ideally suit ed for t he present problem. W it hin t he cont ext of generat ing combinat orial ob ject s, usually t he primary goal is t o generat e each ob ject so t hat t he amount of comput at ion is O (1) per ob ject in an amort ized sense. Such algorit hms are said t o be CAT (for Const ant Amort ized T ime). Clearly, no algorit hm can be asympt ot ically fast er. Not e t hat we do not t ake int o account t he t ime t o print or process each ob ject ; rat her we are count ing t he t ot al amount of dat a st ruct ure change t hat occurs. T he main result of t his paper is t he development of CAT algorit hms t o generat e: { all k -ary st rings of lengt h n t hat have no subst ring equal t o f , { all k -ary circular st rings of lengt h n t hat have no subst ring equal t o f , and { all k -ary necklaces of lengt h n t hat have no subst ring equal t o f , given t hat f

is Lyndon word.

Each algorit hm has an embedded aut omat a-based pat t ern mat ching algorit hm. In principle we could use t he same approach t o generat e unlabelled necklaces, xed density necklaces, bracelet s, or ot her types of necklaces, all avoiding a forbidden necklace pat t ern. We expect t hat such algorit hms will also be CAT , but t he analysis will be more di cult . In t he following sect ion we provide background and de nit ions for t hese object s along wit h a brief descript ion of t he aut omat a-based pat t ern mat ching algorit hm. In Sect ion 3, we out line t he det ails of each algorit hm. We analyze t he algorit hms, proving t hat t hey run in const ant amort ized t ime, in Sect ion 4.

2

B a ck g ro u n d

We denot e t he set of all k -ary st rings of lengt h n wit h no subst ring equal t o f by I k ( n ; f ). T he cardinality of t his set is I k ( n ; f ). For t he remainder of t his paper we will assume t hat t he forbidden st ring f has lengt h m . Clearly if m > n , t hen I k ( n ; f ) = k n , and if m = n t hen I k ( n ; f ) = k n − 1. If m < n , t hen an exact formula will depend on t he forbidden subst ring f , but can be comput ed using t he t ransfer mat rix met hod. In Sect ion 4 we derive several bounds on t he value of I k ( n ; f ). We denot e t he set of all k -ary circular st rings of lengt h n wit h no subst ring equal t o f by C k ( n ; f ). T he cardinality of t his set is C k ( n ; f ). In t his case, we allow t he forbidden st ring t o make mult iple passes around t he circular st ring.

332

Frank Ruskey and J oe Sawada

T hus, if a st ring is in I k ( n ; f ) and m > n , t hen it is st ill possible for t he st ring t o cont ain t he forbidden st ring f . For example, if = 0110 and f = 11001100, t hen is n ot in t he set C k (4; f ). We prove t hat C k ( n ; f ) is proport ional t o I k ( n ; f ) in Sect ion 4.1. Under rot at ional equivalence, t he set of st rings of lengt h n breaks down int o equivalence classes of sizes t hat divide n . We de ne a n ecklace t o be t he lexicographically smallest st ring in such an equivalence class of st rings under rot at ion. An aperiodic necklace is called a L y n don word . A word is called a pren ecklace if it is t he pre x of some necklace. Background informat ion, including enumerat ion formulas, for t hese ob ject s can be found in [4]. T he set of all k -ary necklaces of lengt h n wit h no subst ring equal t o f is denot ed N k ( n ; f ) and has cardinality N k ( n ; f ). T he set of all k -ary Lyndon words of lengt h n wit h no subst ring equal t o f is denot ed L k ( n ; f ) and has cardinality L k ( n ; f ). Of course for N k and L k we consider t he st ring t o be circular when avoiding f . T he set of all k -ary pre-necklaces of lengt h n wit h no subst ring equal t o f is denot ed P k ( n ; f ) and has cardinality P k ( n ; f ). A st andard applicat ion of Burnside’s Lemma will yield t he following formula for N k ( n ; f ):

N k (n ; f

2.1

)=

1 n

X



( d ) C k ( n =d ; f ) :

(1)

dj n

T h e A u t o m a t a -B a s e d S t rin g M a t ch in g A lg o rit h m

One of t he best t ools for pat t ern recognit ion problems is t he nit e aut omat on. If f = f 1 f 2   f m is t he pat t ern we are t rying t o nd in a st ring , t hen a det erminist ic nit e aut omat on can be creat ed t o process t he st ring one charact er at a t ime, in const ant t ime per charact er. In ot her words, we can process t he st ring in real-t im e . T he preprocessing st eps required t o set up such an aut omat on can be done in t ime O ( k m ), where k denot es t he size of t he alphabet (see [1], pg. 334). T he aut omat on has m + 1 st at es, which we t ake t o be t he int egers 0; 1; : : : ; m . T he st at e represent s t he lengt h of t he current mat ch. Suppose we have processed a n and t he current st at e is s . T he t ransit ion t charact ers in t he st ring = a 1 a 2   funct ion  ( s ; j ) is de ned so t hat if j = a t + 1 mat ches f s+ 1 , t hen  ( s ; j ) = s + 1. Ot herwise,  ( s ; j ) is t he largest st at e q such t hat f 1   f q = a t − q+ 2   a t + 1 . If t he aut omat on reaches st at e m , t he only accept ing st at e, t hen t he st ring f has been found in . T he t ransit ion funct ion is e cient ly creat ed using an auxiliary funct ion fail. T he failure funct ion is de ned for 1  i  m such t hat fail ( i ) is t he lengt h of t he longest proper su x of f 1   f i equal t o a pre x of f . If t here is no such su x, t hen fail ( i ) = 0. T his fail funct ion is t he same as t he fail funct ion in t he classic KMP algorit hm.

3

A lg o r it h m s

In t his sect ion we describe an e cient algorit hm t o generat e necklaces wit h forbidden necklace subst rings. We st art by looking at t he simpler problem of

Generat ing Necklaces and St rings wit h Forbidden Subst rings

333

generat ing k -ary st rings wit h forbidden subst rings and t hen consider circular st rings, focusing on how t o handle t he wraparound. If n is t he lengt h of t he st rings being generat ed and m is t he lengt h of t he forbidden subst ring f , t hen t he following algorit hms apply for 2 < m  n . We prove t hat each algorit hm runs in const ant amort ized t ime in t he following sect ion. In t he cases where m = 1 or 2, t rivial algorit hms can be developed. For circular st rings and necklaces, if m > n , t hen t he forbidden subst ring can be t runcat ed t o a lengt h n st ring, as long as it repeat s in a circular manner aft er t he n t h charact er. 3 .1

G e n e ra t in g k-a ry S t rin g s

A na¨ ve algorit hm t o generat e all st rings in I k ( n ; f ) will generat e all k -ary st rings of lengt h n , and t hen upon generat ion of each st ring, perform a linear t ime t est t o det ermine whet her or not it cont ains t he forbidden subst ring. A simple and e cient approach for generat ing st rings is t o const ruct a lengt h n st ring by t aking a st ring of lengt h n − 1 and appending each of t he k charact ers in t he alphabet t o t he end of t he st ring. T his st rat egy suggest s a simple recursive scheme, requiring one paramet er for t he lengt h of t he current st ring. Since t his recursive algorit hm runs in const ant amort ized t ime, t he na¨ ve algorit hm will t ake linear t ime per st ring generat ed. A more advanced algorit hm will embed a real-t ime aut omat a-based st ring mat ching algorit hm int o t he st ring generat ion algorit hm. Since an aut omat abased st ring mat ching algorit hm t akes const ant t ime t o process each charact er, we can generat e each new charact er in const ant t ime. We st ore t he st ring being generat ed in = a 1 a 2   a n and at each st ep, we maint ain two paramet ers: t and s . T he paramet er t represent s t he next posit ion in t he st ring t o be lled, and t he paramet er s represent s t he st at e in t he nit e aut omat a produced for t he st ring f . Recall t hat each st at e s is an int eger value t hat represent s t he lengt h of t he current mat ch. T hus if we begin a recursive call wit h paramet ers t and f s = at− s  a t − 1 . We cont inue generat ing t he current st ring as s , t hen f 1   long as s 6 = m . W hen t > n , we print out t he st ring using t he funct ion P r i n t I t (). P seudocode for t his algorit hm is shown in F igure 1. T he t ransit ion funct ion  ( s ; j ) is used t o updat e t he st at e s as described in Sect ion 2.1. T he init ial call is G e n S t r (1,0). Following t his approach, each node in t he comput at ion t ree will correspond t o a unique st ring in I k ( j ; f ) where j ranges from 1 t o n . Since t he amount of comput at ion at each node is const ant , t he t ot al comput at ion is proport ional t o Xn

C om pT r ee k ( n ; f

I k (j ; f ):

)= j=1

We can show t hat t his sum is proport ional t o I k ( n ; f ), which proves t he following t heorem. (Recall t hat t he preprocessing required t o set up t he aut omat a for f t akes t ime O ( k m ). T his amount is negligible compared t o t he size of t he comput at ion t ree.)

334

Frank Ruskey and J oe Sawada p r o c e d u r e G en S t r lo c a l j ; q

( t,

s

: int eger );

: int eger;

b e g in i f t > n t h e n P r i n t I t () e ls e b e g in fo r j

2 f 0; 1; : : : ; k − 1g d o b e g i n a t := j ; q :=  ( s ; j ); if q 6 = m t h e n G en S t r ( t + 1; q );

end; end; end;

F ig . 1 . An algorit hm for generat ing k -ary st rings wit h no subst ring equal t o f .

T h e o re m 1 . T he algorit hm G e n S t r ( t ; s ) for gen erat in g k -ary st rin gs of len gt h n wit h n o su bst rin g equ al t o f is C A T .

3 .2

G e n e ra t in g k-a ry C irc u la r S t rin g s

We now focus on t he more complicat ed problem of generat ing circular st rings wit h forbidden subst ring f . To solve t his problem we use t he previous algorit hm, but now we must also check t hat t he wraparound of t he st ring does not yield t he forbidden subst ring. More precisely, if = a 1 a 2   a n is in I k ( n ; f ) t hen t he addit ional subst rings we must implicit ly t est against t he forbidden st ring f are an a1  a i for i = 1; 2; : : : ; m − 1. To perform t hese addit ional t est s, an− m + 1+ i   we could cont inue t he pat t ern mat ching algorit hm by appending t he rst m − 1 charact ers t o t he end of t he st ring. T his will result in m − 1 addit ional checks for each generat ed st ring, yielding an algorit hm t hat runs in t ime O ( m I k ( n ; f )). T his approach can be tweaked t o yield a CAT algorit hm for circular st rings, but leads t o di cult ies in t he analysis when applied in t he necklace cont ext . If we wish t o use t he algorit hm G e n S t r ( t ; s ), we need anot her way t o t est t he subst rings st art ing in t he last m − 1 posit ions of . We accomplish t his feat by maint aining a new boolean dat a st ruct ure m at ch ( i ; t ) and dividing t he work int o two separat e st eps. In t he rst st ep we compare t he subst ring a 1   a i against t he last i charact ers in f . If t hey mat ch, t hen t he boolean value m at ch ( i ; i ) is set t o T RUE; ot herwise it is set t o FALSE. In t he second st ep, we check t o see if a n − m + 1 + i   a n mat ches t he rst m − i charact ers in f . If t hey mat ch and m at ch ( i ; i ) is T RUE, t hen we reject t he st ring. If t here is no mat ch for all 1  i  m − 1, t hen is in C k ( n ; f ). To execut e t he rst st ep, we st art by init ializing m at ch ( i ; 0) t o T RUE for all i from 1 t o m − 1. We de ne m at ch ( i ; t ) for 1  i  m − 1 and i  t  m − 1 t o be T RUE if m at ch ( i ; j − 1) is T RUE and a t = f m − j + t . Ot herwise m at ch ( i ; t ) is FALSE. T his de nit ion implies t hat m at ch ( i ; i ) will be T RUE if a 1   a i mat ches t he last i charact ers of f . P seudocode for a rout ine t hat set s t hese values for each t is shown in F igure 2. T he procedure S e t M a t c h ( t ) is called aft er t he t -t h charact er in t he st ring has been assigned for t < m . T hus, if t < m , we must

Generat ing Necklaces and St rings wit h Forbidden Subst rings p r o c e d u r e S et M a t c h lo c a l i

(

t

335

: int eger );

: int eger;

b e g in fo r i

2 f t ; t + 1; : : : ; m − 1g d o b e g i n i f m a t ch ( i ; t − 1) a n d f m −i +t = a t e l s e m a t ch ( i ; t ) := FALSE;

t h e n m a t ch ( i ; t )

:= T RUE;

end; end;

F ig . 2 . P rocedure used t o set t he values of m at ch ( i ; t ).

(

f u n c t i o n C h ec k S u  x

s

: int eger )

re t u rn s b o o le a n ;

b e g in w h ile s >

0

d o b e g in

i f m a t ch ( m e ls e s

:=



s; m

− s)

t h e n re t u rn

(FALSE);

f a i l ( s );

end; re t u rn

(T RUE);

end;

F ig . 3 . Funct ion used t o t est t he wraparound of circular st rings.

perform addit ional work proport ional t o m − t for all st rings in I k ( t ; f ). We will prove lat er t hat t his ext ra work will not a ect t he asympt ot i c running t ime of t he algorit hm. To execut e t he second st ep, we observe t hat aft er t he n t h charact er has been generat ed ( t = n + 1), t he st ring a n − s+ 1   a n is t he longest su x of t o mat ch a pre x of f . Using t he array fail, as described in Sect ion 2.1, we can nd all ot her su xes t hat mat ch a pre x of f in const ant t ime per su x. T hen, for each su x wit h lengt h j found equal t o a pre x of f , we check m at ch ( m − j ; m − j ). If m at ch ( m − j ; m − j ) is T RUE, t hen is not in C k ( n ; f ). Not e t hat I k ( n − j ; f ) is an upper bound on t he number of st rings where a n − j + 1   a n mat ches a pre x of f . T hus, for each 1  j  m − 1 t he ext ra work done is proport ional t o I k ( n − j ; f ). P seudocode for t he t est s required by t his second st ep is shown in F igure 3. T he funct ion C h e c k S u  x ( s ) t akes as input t he paramet er s which represent s t he lengt h of t he longest su x of t o mat ch a pre x of f . It ret urns T RUE if is in C k ( n ; f ) and FALSE ot herwise. Following t his approach, we can generat e all circular st rings wit h forbidden subst rings by adding t he rout ines S e t M a t c h ( t ) and C h e c k S u  x ( s ) t o G e n S t r ( t ; s ). P seudocode for t he result ing algorit hm is shown in F igure 4. T he init ial call is G e n C i r c (1,0). Observe t hat t he size of t he comput at ion t ree will be t he same as before; however, in t his case, t he comput at ion at each node is not always const ant . T he ext ra work performed at t hese nodes is bounded by

336

Frank Ruskey and J oe Sawada p r o c e d u r e G en C i r c lo c a l j ; q

( t,

s

: int eger );

: int eger;

b e g in if t > n t h e n b e g in i f C h ec k S u  x ( s ) t h e n P r i n t I t (); e n d e ls e b e g in fo r j

2 f 0; 1; : : : ; k − 1g a t := j ; q :=  ( s ; j );

d o b e g in

i f t < m t h e n S et M a t c h ( t ); if q

= 6

m

t h e n G en C i r c ( t

+ 1; q );

end; end; end;

F ig . 4 . An algorit hm for generat ing k -ary circular st rings wit h no subst ring equal

to f .

m X− 1

m X− 1

E x t r a W or k k ( n ; f

(m − j )I k (j ; f ) +

) 

I k (n



j;f

)

j=1

j=1

T he rst sum represent s t he work done by S e t M a t c h and t he second t he work done by C h e c k S u  x . In Sect ion 4.1 we show t hat t his ext ra work is proport ional t o I k ( n ; f ). In addit ion, we also prove t hat C k ( n ; f ) is proport ional t o I k ( n ; f ). T hese result s prove t he following t heorem. T h e o re m 2 . T he algorit hm G e n C i r c ( t ; s ) for gen erat in g k -ary circu lar st rin gs of len gt h n wit h n o su bst rin g equ al t o f is C A T . 3 .3

G e n e ra t in g k-a ry N e ck la c e s

Using t he ideas from t he previous two algorit hms, we now out line an algorit hm t o generat e necklaces wit h forbidden necklace subst rings. F irst , we embed t he realt ime aut omat a based st ring mat ching algorit hm int o t he necklace generat ion algorit hm described in [4]. T hen, since we must also t est t he wraparound for necklaces, we add t he same t est s as out lined in t he circular st ring algorit hm. Applying t hese two simple st eps will yield an algorit hm for necklace generat ion wit h no subst ring equal t o t he forbidden necklace f . P seudocode for such an algorit hm is shown in F igure 5. T he addit ional paramet er p in G e n N e c k ( t ; p; s ), represent s t he lengt h of t he longest Lyndon pre x of t he st ring being generat ed. Lyndon words can be generat ed by replacing t he t est \ n mod p = 0" wit h t he t est \ n = p ." T he init ial call is G e n N e c k (1,1,0). To analyze t he running t ime of t his algorit hm, we again must show t hat t he number of necklaces generat ed, N k ( n ; f ), is proport ional t o t he amount of comput at ion done. In t his case t he size of t he comput at ion t ree is Xn

N eck C om pT r ee k ( n ; f

P k (j ; f

)= j=1

)

Generat ing Necklaces and St rings wit h Forbidden Subst rings (

p r o c e d u r e G en N ec k lo c a l j ; q

t; p; s

337

: int eger );

: int eger;

b e g in if t > n t h e n b e g in

mod

if n

p

= 0

a n d C h ec k S u  x ( s ) t h e n P r i n t I t ();

e n d e ls e b e g in at q

:= a t −p ; :=  ( s ; a t );

i f t < m t h e n S et M a t c h ( t ); if q

= 6

fo r j

m t h e n G en N ec k ( t + 1; p ; q ); 2 f a t −p + 1; : : : ; k − 1g d o b e g i n a t := j ; q :=  ( s ; j ); i f t < m t h e n S et M a t c h ( t ); if q 6 = m t h e n G en N ec k ( t + 1; t ; q );

end; end; end;

F ig . 5 . An algorit hm for generat ing k -ary necklaces wit h no subst ring equal t o f .

However, as wit h t he circular st ring case, not all nodes perform a const ant amount of work. T he ext ra work performed by t hese nodes is bounded by m X− 1

N eck E x t r a W or k k ( n ; f

)

m X− 1

(m − j )P k (j ; f ) + j=1

P k (n



j;f

)

j=1

Not e t hat t his expression is t he same as t he ext ra work in t he circular st ring case, except we have replaced I k ( n ; f ) wit h P k ( n ; f ). In Sect ion 4.2 we show t hat N eck C om pT r ee k ( n ; f ) and N eckE xt raW ork k ( n ; f ) are bot h proport ional t o n1 I k ( n ; f ). In addit ion, we also prove t hat 1 N k ( n ; f ) is proport ional t o n I k ( n ; f ). T hese result s prove t he following t heorem. T h e o re m 3 . T he algorit hm G e n N e c k ( t ; p; s ) for gen erat in g k -ary n ecklaces of len gt h n wit h n o su bst rin g equ al t o f is C A T , so lon g as f is a L y n don word.

We remark t hat t he algorit hm works correct ly even if f is not a Lyndon word and appears t o be CAT for most st rings f .

4

A n a ly s is o f t h e A lg o r it h m s

In t his sect ion we will st at e t he result s necessary t o prove t hat t he work done by each of t he forbidden subst ring algorit hms is proport ional t o t he number of st rings generat ed. T he const ant s in t he bounds derived in t his sect ion can be reduced wit h a more complicat ed analysis. T he algorit hms are very e cient in pract ice. Space limit at ions prevent us from giving proofs or analyzing t he rst algorit hm, which has t he simplest analysis. We do however, need one lemma from t hat analysis. L e m m a 1 . I f j f j > 2, t hen

P n

j = 1 I k (j ; f

)

3I k ( n ; f ) .

338 4 .1

Frank Ruskey and J oe Sawada C irc u la r S t rin g s

In t he circular st ring algorit hm, t he size of t he comput at ion t ree is t he same as t he previous algorit hm, where it was shown t o be proport ional t o I k ( n ; f ). In t his case, however, t here is some ext ra work required t o t est t he wrap-around of t he st ring. Recall t hat t his ext ra work is proport ional t o E x t r a W or k k ( n ; f ) which is bounded as follows. m X− 1

m X− 1

E x t r a W or k k ( n ; f

(m − j )I k (j ; f ) +

)

I k (n



j;f

)

j=1

j=1

Xn X j

Xn



I k (t ; f

I k (j ; f ):

)+

j = 1 t= 1

j=1

We now use Lemma 1 t o simplify t he above bound. Xn

Xn

E x t r a W or k k ( n ; f

)

I k (j ; f

3

) 

I k (j ; f

)+

12I k ( n ; f ) :

j=1

j=1

We have now shown t hat t he t ot al work done by t he circular st ring algorit hm is proport ional t o I k ( n ; f ). Since t he t ot al number of st rings generat ed is C k ( n ; f ), we must show t hat C k ( n ; f ) is proport ional t o I k ( n ; f ). T h e o re m 4 . I f j f j > 2, t hen 3C k ( n ; f ) 

I k (n ; f ).

T hese lemmas and T heorem 4 prove T heorem 2. 4 .2

N e ck la c e s

To prove T heorem 3, we must show t hat t he comput at ion t ree along wit h t he ext ra work done by t he necklace generat ion algorit hm is proport ional t o N k ( n ; f ). To get a good bound on N eck C om pT r ee k ( n ; f ) we need t hree addit ional lemmas; t he bound of t he rst lemma does not necessarily hold if f is not a Lyndon word. P n

L e m m a 2 . I f f is L y n don word where j f j > 2, t hen P k ( n ; f )  1

L e m m a 3 . I f j f j > 2, t hen L k ( n ; f )  L e m m a 4 . I f j f j > 2, t hen

P n

n C k (n ; f

1

j = 1 j I k (j ; f

).

).

8

)

j = 1 L k (j ; f

n I k (n ; f

).

Applying t he previous t hree lemmas, we show t hat t he comput at ion t ree is proport ional t o n1 I k ( n ; f ). Xn X j

Xn

N eck C om pT r ee k ( n ; f

P k (j ; f

)=

) 

L k (t ; f

Xn

Xj

1

 j = 1 t= 1 Xn

12

 j=1

)

j = 1 t= 1

j=1

j

t

Xn

C k (t ; f

I k (j ; f

Xj

)  j = 1 t= 1

) 

144 n

1 t

I k (t ; f

I k (n ; f ):

)

Generat ing Necklaces and St rings wit h Forbidden Subst rings

339

T his inequality is now used t o show t hat t he ext ra work done by t he necklace algorit hm is also proport ional t o n1 I k ( n ; f ). Recall t hat t he ext ra work is given by: m X− 1

m X− 1

N eck E x t r a W or k k ( n ; f

(m − j )P k (j ; f ) +

)

P k (n

Xn



j;f

)

j=1

j=1

Xj



Xn

P k (t ; f j = 1 t= 1

P k (j ; f ):

)+ j=1

Furt her simpli cat ion of t his bound follows from t he bound on N eckC om pT ree k ( n ; f ) along wit h Lemma 4. Xn

N eck E x t r a W or k k ( n ; f

)

144 j=1



1 j

I k (j ; f

123 + 122 n

)+

144 n

I k (n ; f

)

I k (n ; f ):

We have now shown t hat t he t ot al comput at ion performed by t he necklace generat ion algorit hm is proport ional t o n1 I k ( n ; f ). From equat ion (1), N k ( n ; f )  1 1 I ( n ; f ), T heorem 3 is proved. n C k ( n ; f ), and since C k ( n ; f )  3 k

R e fe r e n c e s 1. A. Aho, J . Hop croft , and J . Ullman, T h e D esi gn a n d A n a l y si s o f C o m p u t er A l go r i t h m s, Addisom-Wesley , 1974. 2. D. Guseld, A l go r i t h m s o n St r i n gs, T r ees, a n d Sequ en ces, Cambridge University P ress, 1997. 3. F . Ruskey, J . Sawada, An e cient algorit hm for generat ing necklaces of xed density, SIAM J ournal on Comput ing, 29 (1999) 671-684. 4. F . Ruskey, J . Sawada, A fast algorit hm t o generat e unlab eled necklaces, 11t h Annual ACM-SIGACT Symp osium on Discret e Algorit hms (SODA), 2000, 256-262. 5. R.P. St anley, E n u m er a t i ve C o m bi n a t o r i cs, V o l u m e I , Wadswort h & Brooks/ Cole, 1986.

O p t im a l La b e llin g o f P o in t Fe a t u re s in t h e S lid e r M o d e l ⋆ ( E x t e n d e d A b s t ra c t ) Gunnar W. Klau 1 and P et ra Mut zel2 1

MP I f¨u r Informat ik, Saarbr¨u cken, Germany. Current ly T U W ien, Aust ria. guwek@mpi - sb. mpg. de 2

T U W ien, Aust ria.

mut zel @apm. t uwi en. ac. at

We invest igat e t he lab el numb er maximisat ion problem (l n m): Given a set of lab els  , each of which b elongs t o a p oint feat ure in t he plane, t he t ask is t o nd a largest subset  of  so t hat each ∈ lab els t he corresp onding p oint feat ure and no two lab els from overlap. Our approach is based on two so-called const raint graphs, which code horizont al and vert ical p osit ioning relat ions. T he key idea is t o link t he two graphs by a set of addit ional const raint s, t hus charact erising all feasible solut ions of l n m. T his enables us t o formulat e a zero-one int eger linear program whose solut ion leads t o an opt imal lab elling. We can express l n m in b ot h t he discret e and t he slider lab elling model. T he slider model allows a cont inuous movement of a lab el around it s p oint feat ure, leading t o a signi cant ly higher numb er of lab els t hat can b e placed. To our knowledge, we present t he rst algorit hm t hat comput es provably opt imal solut ions in t he slider model. F irst exp eriment al result s on inst ances creat ed by a widely used b enchmark generat or indicat e t hat t he new approach is applicable in pract ice. A b st r a c t .

P

P

P

1

In t ro d u c t io n

Recent ly, map labelling has at t ract ed a lot of researchers in comput er science due t o it s numerous applicat ions, e.g. , in cart ography, geographic informat ion syst ems and graphical int erfaces. A ma jor problem in map labelling is t he point feat ure label placement , in which t he t ask is t o place labels adjacent t o point feat ures so t hat no two labels overlap. In general, t he labels are assumed t o be axis-parallel rect angles. Many papers have been published on t he label number maximisat ion problem (for an overview, see t he bibliography [9]). We st at e t he problem as follows: ?

T his work is part ially supp ort ed by t he Bundesminist erium f¨u r Bildung, W issenschaft , Forschung und Technologie (No. 03{MU7MP 1{4).

D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 3 4 0 { 3 5 0 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

Opt imal Lab elling of P oint Feat ures in t he Slider Model

341

P = f p1; : : : ; pk g point s in t he plane, a set  = f 1 ; : : : ; l g of l labels, two funct ions w ; h : ! Q and a funct ion a : ! P , nd a subset P of largest cardinality and an assignment r : P ! R , where R is t he set of axis-parallel rect angles in t he plane, so t hat t he following condit ions hold:

P roblem 1 ( Label N um ber M axim isation , l n m) . Given a set

of

k

(L1) Rect angle r ( ) has widt h w ( ) and height h ( ) for every 2 P . (L2) P oint a ( ) lies on t he boundary of r ( ) for all 2 P . (L3) T he open int ersect ion r ( ) \ r ( ) is empty for all dist inct ; 2

P

.

P ropert ies (L1) and (L2) make sure t hat each label is at t ached correct ly t o it s point feat ure and drawn wit h t he given size. P roperty (L3) forbids overlaps between t he labels. We allow, however, t hat two labels t ouch each ot her. So far, most previous work on map labelling has concent rat ed on t he discret e model, which allows only a nit e number of posit ions per label. T he most popular discret e model is t he four-posit ion model (see Fig. 1); t he two- and one-posit ion models have been int roduced rat her for t heoret ical purposes. Christ ensen, Marks and Shieber [2] have present ed a comprehensive t reat ment of l n m in t he four-posit ion model including complexity analysis, heurist ic met hods and a comput at ional st udy. T hey have int roduced a procedure for randomly creat ing labelling inst ances which has become a widely used benchmark generat or in t he map labelling lit erat ure. T he only pract ically e cient algorit hm for comput ing provably opt imal solut ions in t he discret e model has been suggest ed by Verweij and Aardal [8]. T hey t reat t he problem as an independent set problem and solve it using a branch-andcut algorit hm. T he algorit hm is able t o opt imally label up t o 800 point feat ures (using t he benchmark generat or from [2]) wit hin moderat e comput at ion t ime (about 20 minut es). More nat ural t han t he discret e model is t he slider model, which allows a cont inuous movement of a label around it s point feat ure. Alt hough Hirsch considered t his model already in 1982, it was not furt her invest igat ed unt il very recent ly. In [7], van Kreveld, St rijk and Wol int roduce several variat ions of t he slider model (see Fig. 1). T hey prove NP -hardness of l n m in t he four-slider model and suggest a polynomial t ime algorit hm which is able t o nd a solut ion t hat is at least half as good as an opt imal solut ion. Moreover, t heir comput at ional result s show t hat t he slider model is signi cant ly bet t er t han t he discret e model. T he four-slider model allows t o place up t o 15% more labels in real-world inst ances and up t o 92% more labels in pseudo-random inst ances. We will present an algorit hm for t he label number maximisat ion problem t hat works in any of t he above ment ioned labelling models. We allow several labels per point feat ure and labels of di erent sizes. Figure 2 shows a provably opt imal labelling for 700 point feat ures comput ed wit h a rst implement at ion of our new approach; 699 labels could be placed. In Sect . 2 we t ransform l n m int o t he combinat orial opt imisat ion problem c g f and show t hat bot h problems are equivalent . Sect ion 3 cont ains an int eger linear programming formulat ion for c g f . We show t hat we can use a feasible solut ion of t he int eger linear program t o const ruct a feasible labelling. In part icular, t his

342

Gunnar W . Klau and P et ra Mut zel

F o u r -s lid e r

T w o -s lid e r

O n e -s lid e r

F o u r -p o s it io n

T w o -p o s it io n

O n e -p o s it io n

Axis-parallel rect angular labelling models. A label can be placed in any of t he posit ions indicat ed by t he rect angles and slid in t he direct ions of t he arcs F ig . 1 .

enables us t o nd an opt imal labelling. We describe a rst implement at ion in Sect . 4 and discuss our observat ions of t est -runs on inst ances creat ed by t he benchmark generat or present ed in [2]. Not e t hat our formulat ion of l n m allows labels t o overlap unlabelled point feat ures (which is desirable in some applicat ions). We describe in Sect . 5 how we can exclude t hese overlaps and invest igat e in how far our algorit hm can sat isfy addit ional crit eria like preferable posit ions and labels of di erent import ance. Due t o space limit at ions, we will omit some proofs and which can be found in t he full version of t he paper.

2

LN M a s a C o m b in a t o ria l O p t im is a t io n P ro b le m

In t his sect ion we reformulat e t he label number maximisat ion problem as a problem of combinat orial nat ure. Our approach uses a pair of con strain t graphs . T hese graphs originat ed in t he area of v l si design and we have st udied t hem in previous work for two problems from graph drawing: T he two-dimensional compact ion problem [5] and a combined compact ion and labelling problem [4]. An import ant common feat ure of t hese problems| and also of l n m| is t he decomposit ion int o a horizont al and a vert ical problem component ; t his observat ion mot ivat es us t o t reat bot h direct ions separat ely. Nodes in t he horizon tal con strain t graph D x = ( V x ; A x ) correspond t o x -coordinat es of ob ject s in t he problem, weight ed direct ed edges t o horizont al dist ance relat ions between t he ob ject s corresponding t o t heir endpoint s. Similarly, t he direct ed graph D y codes t he vert ical relat ionships. A coordinat e assignment for a pair of con strain t graphs ( D x ; D y ) with D x = ( V x ; A x ) , D y = ( V y ; A y ) an d arc weights ! 2 Q j A [ A j is a fun ction c : V x [ V y ! Q . W e say c respect s an arc set A A x [ A y if c ( v j ) − c ( v i )  ! i j for all ( v i ; v j ) 2 A . D e n it io n 1 .

x

y

We will show lat er t hat we can use a pair of const raint graphs t oget her wit h a coordinat e assignment which respect s t his pair t o const ruct a feasible labelling|

Opt imal Lab elling of P oint Feat ures in t he Slider Model

343

Opt imal labelling of 700 point feat ures in t he four-slider model. Inst ance randomly generat ed wit h a st andardised procedure described in [2] F ig . 2 .

as long as t he graphs sat isfy cert ain condit ions. T he following t heorem expresses an import ant connect ion between const raint graphs and coordinat e assignment s. T h e o r e m 1 . Let D

!

2 Qj A j .

A

does n ot

= ( V ; A ) be a con strain t graph with arc weights

T here exists a coordin ate assign m en t c that respects con tain a directed cycle of positive weight.

A

if an d on ly if

P roof. For t he forward direct ion assume ot herwise. Wit hout loss of generality, let 

= ( v 1 ; v 2 ) ; ( v 2 ; v 3 ) ; : : : ; ( v j C j ; v 1 ) be a direct ed cycle of posit ive weight in A . Since c respect s A , it must respect in part icular t he arcs in C . It follows c ( v 2 ) − c ( v 1 )  ! ( 1 ; 2 ) , c ( v 3 ) − c ( v 2 )  ! ( 2 ; 3 ) , : : : , c ( v 1 ) − c ( v j C j )  ! ( j C j ; 1 ) . Summing up P t he left sides yields zero, summing up t he right sides yields a 2 C ! a . We get P ! a > 0, a cont radict ion. 0 a2C For t he backward direct ion of t he proof, let A c  ! be t he set of inequalit ies describing t he requirement s for a coordinat e assignment . By Farkas’ Lemma, t here is a feasible solut ion if and only if t here does not exist a vect or y  0 wit h y T A = 0 and y T ! > 0. Assume ot herwise, i.e. , t here is such a vect or y . T hen y corresponds t o a flow in A wit h posit ive weight . Since all supplies in t he corresponding network are zero, t his flow must be circular and t hus corresponds t o a direct ed cycle of posit ive weight . tu C

In t he following, we describe t he const ruct ion of t he pair ( D inst ance of t he label number maximisat ion problem.

x

;D

y

) for a given

344

Gunnar W . Klau and P et ra Mut zel

M odellin g poin t features. T he posit ions of t he k point feat ures are speci ed in t he

input set P . For each p i 2 P wit h coordinat es x ( p i ) and y ( p i ) we int roduce a node in V x and a node y i in V y ; one for it s x -, one for it s y -coordinat e. We x t he posit ions of t he point feat ures by insert ing four direct ed pat hs P x = ( x 1 ; : : : ; x k ), P − x = ( x k ; : : : ; x 1 ), P y = ( y 1 ; : : : ; y k ) and P − y = ( y k ; : : : ; y 1 ) wit h weight s ! x x + 1 = x ( p i + 1 ) − x ( p i ), ! x + 1 x = x ( p i ) − x ( p i + 1 ), ! y y + 1 = y ( p i + 1 ) − y ( p i ) and ! y + 1 y = y ( p i ) − y ( p i + 1 ) for i 2 f 1; : : : ; k − 1g. We call t he direct ed edges on t hese pat hs xed distan ce arcs and refer t o t hem as A F . Figure 3 shows a set of point feat ures and it s represent at ion in t he const raint graphs. xi

i

i

i

i

i

i

i

i

L e m m a 1 ( P r o o f o m i t t e d ) . A coordin ate assign m en t c that respects sults in a correct placem en t of poin t features ( up to tran slation ) .

A

F

re-

M odellin g labels. Each label 2 has t o be represent ed by a rect angle r ( ) of widt h w ( ) and height h ( ). Addit ionally, we have t o ensure t hat will be placed correct ly wit h respect t o it s point feat ure a ( ), i.e. , a ( ) must lie on t he boundary of r ( ). St raight forwardly, we model a label by two nodes in V x and two nodes in V y , represent ing t he coordinat es of r ( ). We call t hese nodes t he left , right , bot t om and t op lim it of and refer t o t hem as l , r , b and t , respect ively. We int roduce four label size arcs A L ( ) = f ( l ; r ) ; ( r ; l ) ; ( b ; t ) ; ( t ; b )g in order t o model t he size of r ( ). T he weight s of t hese 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 t o it s point feat ure a ( ). Let x and y be t he nodes represent ing point a ( ) in t he const raint graphs. We add four proxim ity arcs A P ( ) = f ( x ; r ), ( l ; x ), ( y ; t ), ( b ; y )g, as illust rat ed in Fig. 4(b). T hese arcs have zero weight and exclude t hat t he point feat ure a ( ) lies out side t he rect angle r ( ). T he point feat ure may st ill lie inside r ( ). We disallow t his by adding at least one of t he four boun dary arcs f ( r ; x ) ; ( x ; l ) ; ( t ; y ) ; ( y ; b )g, each of weight zero. Not e t hat t hese arcs are inverse t o t he proximity arcs for label . If, e.g. , ( r ; x ) is present in D x , it forces| t oget her wit h it s inverse proximity arc ( x ; r )| t he 











p4

p4 p2

p2

14

-8

-1 4

p3

13 20

11 -1 3

10

8

-7

9 -9

7

-1 1

-3

p5

p6

p1

p5

p6 3

23

Px

F ig . 3 .

and

P− x

-2 0

p3

-1 0 -2 3

p1





Py

and

P− y

Modelling t he placement of point feat ures wit h xed dist ance arcs

Opt imal Lab elling of P oint Feat ures in t he Slider Model t

t

t 0

0

h ( )

345

w ( )

l

l

r

−w

−h ( 

)

0

r 0

0

y

0 0

y

b

b x

F ig . 4 .

l

r 0

( )

b x

Modelling labels. (a) Label size arcs. (b) P roximity arcs. (c) Boundary

arcs

coordinat e of t he right side of r ( ) t o be equal t o t he coordinat e of x ; t he label has t o be placed at it s left most posit ion. See also Fig. 4(c). At t his point we can influence t he labelling model. We de ne a set A B ( ) cont aining t he boundary arcs for t he di erent models:

Labelling model Four-slider Slider T wo-slider model One-slider Four-posit ion Discret e T wo-posit ion model One-posit ion

Boundary arcs A B ( ) f ( r ; x ) ; ( x ; l ) ; ( t ; y ) ; ( y ; b )g f ( t ; y ) ; ( y ; b )g f ( y ; b )g f ( r ; x ) ; ( x ; l ) ; ( t ; y ) ; ( y ; b )g f ( y ; b ) ; ( r ; x ) ; ( x ; l )g f ( y ; b ) ; ( x ; l )g

For a slider model, at least one arc a 2 A B ( ) must be cont ained in t he const raint graph, for a discret e model at least two. E .g. , for t he four-slider model, t he set A B ( ) consist s of all four boundary arcs, one of which must be present in t he appropriat e const raint graph. Not e t hat we can express all six axis-parallel rect angular labelling models we have int roduced in Sect . 1 as addit ional requirement s on t he const raint graphs. L e m m a 2 ( P r o o f o m i t t e d ) . Let

be a label, c be a coordin ate assign m en t respectin g A L ( ) , A P ( ) an d at least d boun dary arcs from A B ( ) . T hen c results in a placem en t in which is represen ted by a rectan gle r ( ) of width w ( ) an d height h ( ) . T he label is placed so that poin t feature a ( ) lies on the boun dary of r ( ) if d = 1 an d on a corn er of r ( ) if d = 2. A voidin g label overlaps. Unt il now we have assured t hat each label is placed

correct ly wit h respect t o it s point feat ure. It remains t o guarant ee t hat t he int ersect ion of rect angles is empty. A crucial observat ion is t hat it su ces t o consider only t he pairs of labels t hat can possibly int eract . If t here is any overlap, such a pair must be involved.

346

Gunnar W . Klau and P et ra Mut zel

Consider two dierent labels and and t heir corresponding rect angles ( ) and r ( ). We call t he pair vertically separated if r ( ) is placed eit her above or below r ( ). Similarly, and are horizon tally separated if one rect angle is placed left t o t he ot her. T wo labels overlap if t hey are neit her vert ically nor horizont ally separat ed, we can exclude t his by int roducing one of t he following four label separation arcs A S ( ; ) = f ( t ; b ) ; ( t ; b ) ; ( r ; l ) ; ( r ; l )g. Label separat ion arcs have weight zero. Let R be t he boundary of t he region in which label can be placed. Not e t hat R is de ned by lower left corner ( x ( a ( )) − w ( ) ; y ( a ( )) − h ( )) and upper right corner ( x ( a ( )) + w ( ) ; y ( a ( )) + h ( )). Likewise, we det ermine R for label . If t he int ersect ion of R and R is empty, and can never overlap, and we do not have t o add any label separat ion arcs for t his pair. In t his case we set ) = ;. AS(; Consider now t he case t hat t he int ersect ion of R and R is not empty, as depict ed in Fig. 5. Depending on t he posit ion of t he corresponding point feat ures ) cont ains t he following label separat ion arcs: a ( ) and a ( ), A S ( ; r

1. 2. 3. 4.

If If If If

))  x ( a ( ))  y ( a ( ))  y ( a ( ))  x (a (

x (a (

)) x ( a ( )) y ( a ( )) y ( a ( ))

we have ( r we have ( r we have ( t we have ( t

;l ;l ;b ;b

)2 )2 )2 )2

(; AS(; AS(; AS(; A

). ). ). ).

S

Not e t hat t he only case in which A S ( ; ) cont ains all four label separat ion arcs occurs if and label t he same point feat ure, i.e. , a ( ) = a ( ). L e m m a 3 ( P r o o f o m i t t e d ) . Let

an d be two labels that can possibly overlap an d let c be a coordin ate assign m en t respectin g A L ( ) , A L ( ) an d A  A S ( ; ) with j A j  1. T hen c results in a placem en t in which the two rectan gles r ( ) an d r ( ) do n ot overlap.

We refer t o St he boundary and label separat ion arcs as poten tial arcs A p o t = AS(; ) and st at e t he label number maximisat ion ; 2 ; 6 = 2 AB ( ) [ problem in a combinat orial way. T he t ask is t o choose addit ional arcs from A p o t for a maximum number of labels wit hout creat ing posit ive direct ed cycles.

S

r b a( ) R

t 

l

a(

)

R

F ig . 5 .

Label separat ion arcs between two labels

and

Opt imal Lab elling of P oint Feat ures in t he Slider Model

347

P roblem 2 ( C on strain t G raph Ful lm en t problem , c g f ) . Given an inst ance of l n m, let ( D x , D y ) be t he pair of const raint graphs including only xed dist ance arcs, label size arcs and proximity arcs. Let d = 1 if in t he slider model and d = 2 if in t he discret e model and let A x and A y be t he arc set s of D x and D y ,  of great est cardinality and an arc set A A p ot respect ively. Find a set  P wit h t he propert ies:

(F1) j A \ (F2) j A \ (F3) A \

( )j  d for all 2 P . ( ; )j  1 for all ; 2 P , 6 = ,R \ R 6 = ;. S A x and A \ A y do not cont ain a posit ive cycle. A

B

A

T h e o r e m 2 . P roblem s

l n m an d c g f are polyn om ially equivalen t.

P roof. Let A be a solut ion of c g f . We ext end ( D x ; D y ) by adding A t o t he arc set s. Because of (F3) and T heorem 1, t here is a coordinat e assignment t hat respect s bot h t he horizont al and vert ical arc set . Lemmas 1, 2 and 3 ensure t hat propert ies (L1), (L2) and (L3) are ful lled, t hus we have a solut ion for l n m. For t he ot her direct ion, we st art wit h t he given coordinat e assignment c result ing from t he placement of labels. We creat e t he set A of addit ional arcs as follows: For each label we add one or two boundary arcs, depending on how r ( ) is placed wit h respect t o point feat ure a ( ). Similarly, we add appropriat e arcs from A ( ; ) for pairs of labels and , depending on t he relat ive posit ion of and in t he labelling. Not e t hat we have chosen t he addit ional arcs so t hat t hey are respect ed by c . P ropert ies (F1) and (F2) follow by const ruct ion, property (F3) follows by T heorem 1. tu

3

In t e g e r Lin e a r P ro g ra m m in g Fo rm u la t io n

In t he previous sect ion we have shown how t o t ransform t he label number maximisat ion problem int o t he combinat orial opt imisat ion problem c g f . We propose a zero-one int eger linear programming formulat ion and a branch-and-cut algorit hm for solving c g f . T he goal is t o nd t he set of addit ional boundary and label separat ion arcs A and t o det ermine which labels are t o be placed. We int roduce two types of binary variables for t his t ask: For each label t here is a variable y 2 f 0; 1g, indicat ing whet her will be placed or not . Addit ionally, t here are variables x a 2 f 0; 1g for pot ent ial addit ional arcs a 2 A p o t . We get (

(

y

=

1 0

2 2

P

n

and P

xa

=

1 0

a a

2 2

A A p ot

nA

:

We present t he zero-one int eger linear program (ILP ) and show t hat it corresponds t o c g f . We de ne C p = A p o t \ C .

348

Gunnar W . Klau and P et ra Mut zel X

max

(ILP )

y 2 X

sub ject t o

− 2y 

xa a2A

B

d

− 2

y



8 2

(ILP .1)

= 6

(ILP .2)

( )

X

xa a2A

S

( ;



y



−1

8;

2

;

)

X

xa a2C

y xa



jC p j − 1

8 posit ive cycles

C

(ILP .3)

8 2 8a 2 A p o t

(ILP .4) (ILP .5)

p

2 f 0; 1g 2 f 0; 1g

We refer t o (ILP .1) as boun dary in equalities , t o (ILP .2) as label separation in equalities and t o (ILP .3) as positive cycle in equalities . T h e o r e m 3 ( P r o o f o m i t t e d ) . E ach feasible solution ( y ; x ) to ( IL P ) correspon ds to a feasible solution of c g f an d vice versa. T he value of the objective fun ction equals the cardin ality of P .

C o r o l l a r y 1 . A n optim al solution of ( IL P ) correspon ds to an optim al labellin g.

Corollary 1 and T heorem 1 suggest an algorit hm for at t acking pract ical inst ances of t he label number maximisat ion problem: In a rst st ep, we solve (ILP ) using int eger programming t echniques. T he solut ion t ells us which boundary and label separat ion arcs should be added t o t he arc set s of t he const raint graphs ( D x ; D y ). We use t his informat ion in a second st ep for comput ing t he corresponding coordinat e assignment via minimum cost flow (see proof of T heorem 1).

4

F irs t E x p e rim e n t s

We have implement ed a simple st rat egy t o solve t he int eger linear program based on LEDA [6] and t he ILP -solver in CP LEX [3]. Due t o t he fact t hat t he ILP may have an exponent ial number of posit ive cycle inequalit ies, we solve it it erat ively, using a cut t ing plane approach: We st art wit h an int eger linear program cont aining inequalit ies (ILP .1), (ILP .2), (ILP .4), (ILP .5) and a set of local cycle in equalities of type (ILP .3). We det ermine t hese inequalit ies by looking at possible posit ive cycles involving up t o two labels. Let x be a solut ion of an ILP in t he it erat ion. If t he corresponding const raint graphs do not cont ain any posit ive cycles, x is an opt imal solut ion for c g f . Ot herwise, we nd a posit ive cycle and add t he corresponding inequality t o t he new int eger linear program. Our separat ion procedure uses t he Bellman-Ford algorit hm for det ect ing negat ive cycles applied t o t he const raint graphs aft er mult iplying t he arc weight s ! 2 Q j A [ A j by − 1. Our implement at ion is based on t he one given in [1]. x

y

Opt imal Lab elling of P oint Feat ures in t he Slider Model

349

We have t est ed t he implement at ion on a widely used benchmark generat or for randomly creat ing inst ances of l n m, following t he rules described in [2]: First , we const ruct a set of n point s wit h random coordinat es in t he range f 0; : : : ; 792g for t he x - and f 0; : : : ; 612g for t he y -coordinat es. To each point feat ure belongs a label of widt h 30 and height 7. We have run t he algorit hm wit h bot h t he slider and t he discret e labelling models for rect ilinear map labelling. Figure 2 in Sect . 1 shows an opt imal solut ion for an inst ance wit h n = 700. In t he opt imal solut ion for t he four-slider model, 699 labels can be placed, whereas at most 691 can be placed in t he four-posit ion model. Evident ly, more freedom in t he labelling model result s in a higher number of labels t hat can be placed. T wo main fact ors influence t he running t ime of our implement at ion for inst ances of t he same size: On t he one hand, t his is t he number of labels t hat cannot be placed in an opt imal solut ion, i.e. , t he dierence j  j − j  P j: To our surprise, we had t he longest running t imes in t he one-posit ion model. On t he ot her hand, t he t ight ness of t he inequalit ies seems t o have an impact on t he running t ime; t he more rest rict ions on t he variables, t he fast er t he algorit hms. Bot h fact ors, however, int errelat e: In t he more rest rict ed models we can also place fewer labels.

5

E x t e n s io n s

As ment ioned in Sect . 1, our formulat ion of l n m allows labels t o overlap ot her, unlabelled point feat ures. In several applicat ions, t his may not be allowed. In t his case, we t ake t he point feat ures int o considerat ion when int roducing t he label separat ion arcs (which t hen should be called general separat ion arcs). We t hen have t o check t he overlap condit ions also for point feat ure/ label pairs; it is wort h not ing t hat t he boundary arcs arise as a special case of general separat ion arcs when considering a pair ( ; a ( )), i.e. , a label and t he point feat ure it should be at t ached t o. In many applicat ions, t here are labels of dierent import ance. I t is easy t o int egrat e t his int o our approach: T he ob ject ive funct ion of t he int eger linear P program changes t o 2 z , where z denot es t he import ance of label . T he algorit hm will t hen prefer more import ant labels and remove less import ant ones more easily. Anot her pract ically mot ivat ed ext ension is t o model preferable posit ions of labels: Oft en, a label should be placed rat her at it s right most and upmost posit ion t han at ot her possible posit ions. We suggest t o de ne a weight vect or for t he boundary arcs and incorporat e it int o t he ob ject ive funct ion. A ckn ow ledgem en ts. T he aut hors t hank Alexander Wol for t he real-world dat a

and t he help wit h t he conversion in our dat a format , Michael J u¨ nger for spont aneously support ing t he development of t he negat ive cycle separat or and Andrew V. Goldberg for his negat ive cycle det ect ion code.

350

Gunnar W . Klau and P et ra Mut zel

R e fe re n c e s [1] B. V. Cherkassky and A. V. Goldb erg, N egat i ve-cycle det ect i on algor i t hm s, Mat hemat ical P rogramming 8 5 (1999), no. 2, 277{311. [2] J . Christ ensen, J . Marks, and S. Shieb er, A n em pi r i cal st udy of algor i t hm s for poi n t -feat ure label placem en t , ACM Transact ions on Graphics 1 4 (1995), no. 3, 203{232. [3] ILOG, C P L E X 6.5 R eferen ce M an ual , 1999. [4] G. W . Klau and P. Mut zel, C om bi n i n g graph labeli n g an d com pact i on , P roc. 8t h Int ernat . Symp. on Graph Drawing (GD ’99) ( St ir n Cast le, Czech Republic) (J . Krat ochv l, ed.), LNCS, no. 1731, Springer{Verlag, 1999, pp. 27{37. [5] G. W . Klau and P. Mut zel, O pt i m al com pact i on of or t hogon al gr i d drawi n gs, Int eger P rogramming and Combinat orial Opt imizat ion (IP CO ’99) (Graz, Aust ria) (G. P. Cornuejols, R. E. Burkard, and G. J . Woeginger, eds.), LNCS, no. 1610, Springer{ Verlag, 1999, pp. 304{319. [6] K. Mehlhorn and S. N¨a her, L E D A . A plat for m for com bi n at or i al an d geom et r i c com put i n g, Cambridge University P ress, 1999. [7] M. van Kreveld, T . St rijk, and A. Wol , P oi n t labeli n g wi t h sli di n g labels, Comput at ional Geomet ry: T heory and Applicat ions 1 3 (1999), 21{47. [8] B. Verweij and K. Aardal, A n opt i m i sat i on algor i t hm for m axi m um i n depen den t set wi t h appli cat i on s i n m ap label li n g, P roc. 7t h Europ. Symp. on Algorit hms (ESA ’99) (P rague, Czech Republic), LNCS, vol. 1643, Springer{Verlag, 1999, pp. 426{437. [9] A. Wol and T . St rijk, T he m ap labeli n g bi bli ography , ht t p: / / www. mat h- i nf . uni - gr ei f swal d. de/ map- l abel i ng/ bi bl i ogr aphy .

M a p p in g s fo r C o n fl ic t -Fre e A c c e s s o f P a t h s in E le m e n t a ry D a t a S t ru c t u re s ⋆ Alan A. Bert ossi1 and M. Crist ina P inot t i2 1

Depart ment of Mat hemat ics, University of Trent o, Trent o, It aly ber t ossi @sci ence. uni t n. i t

2

Ist it ut o di Elab orazione dell’ Informazione, CNR, P isa, ITALY pi not t i @i ei . pi . cnr . i t

A b s t r a c t . Since t he divergence b etween t he processor sp eed and t he memory access rat e is progressively increasing, an e cient part it ion of t he main memory int o mult ibanks is useful t o improve t he overall syst em p erformance. T he e ect iveness of t he mult ibank part it ion can b e degraded by m em or y con fl i ct s, t hat occur when t here are many references t o t he same memory bank while accessing t he same memory pat t ern. T herefore, mapping schemes are needed t o dist ribut e dat a in such a way t hat dat a can b e ret rieved via regular pat t erns wit hout conflict s. In t his pap er, t he problem of conflict -free access of ar bi t r ar y pat hs in bidimensional arrays, circular list s and complet e t rees is considered for t he rst t ime and reduced t o variant s of graph-coloring problems. Balanced and fast mappings are prop osed which require an opt imal numb er of colors (i.e., memory banks). T he solut ion for bidimensional arrays is based on a combinat orial ob ject similar t o a Lat in Square. T he funct ions t hat map an array node or a circular list node t o a memory bank can b e calculat ed in const ant t ime. As for complet e t rees, t he mapping of a t ree node t o a memory bank t akes t ime t hat grows logarit hmically wit h t he numb er of nodes of t he t ree.

1

In t ro d u c t io n

In recent years, t he t radit ional divergence between t he processor speed and t he memory access rat e is progressively increasing. T hus, an e cient organizat ion of t he main memory is import ant t o achieve high-speed comput at ions. For t his purpose, t he main memory can be equipped wit h ca c h e memories { which have about t he same cycle t ime as t he processors { or can be part it ioned int o m u lt iba n k s . Since t he cost of t he cache memory is high and it s size is limit ed, t he mult ibank part it ion has most ly been adopt ed, especially in shared-memory mult iprocessors [3]. However, t he e ect iveness of such a memory part it ion can be limit ed by m e m o r y co n fl ic t s , t hat occur when t here are many references t o t he same memory bank while accessing t he same memory pat t ern. To exploit t o t he fullest ext ent t he performance of t he mult ibank part it ion, mapping schemes ⋆

T his work has b een supp ort ed by t he " P rovincia Aut onoma di Trent o" under a research grant .

D . -Z . D u e t a l. ( E d s. ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 3 5 1 { 3 6 1 , 2 0 0 0 .

c S p r in g e r -Ve r la g B e r lin H e id e lb e r g 2 0 0 0

352

Alan A. Bert ossi and M. Crist ina P inot t i

can be employed t hat avoid or minimize t he memory conflict s [10]. Since it is hard t o nd universal mappings { mappings t hat minimize conflict s for arbit rary memory access pat t erns { several specialized mappings, designed for accessing regular pat t erns in speci c dat a st ruct ures, have been proposed in t he lit erat ure (see [7,2] for a complet e list of references). In part icular, mappings t hat provide conflict -free access t o complet e subt rees, root -t o-leaves pat hs, sublevels, and composit e pat t erns obt ained by t heir combinat ion, have been invest igat ed in [4,5,1,6,9]. In t he present paper, opt imal, balanced and fast mappings are designed for conflict -free access of pat hs in bidimensional arrays, circular list s, and complet e t rees. Wit h respect t o t he above ment ioned papers, pat hs in bidimensional arrays and circular list s are dealt wit h for t he rst t ime. Moreover, access t o any (not only t o root -t o-leaves) pat hs in complet e t rees is provided.

2

C o n fl ic t -Fre e A c c e s s

When st oring a dat a st ruct ure D , represent ed in general by a graph, on a memory syst em consist ing of N memory banks, a desirable issue is t o map any subset of N arbit rary nodes of D t o all t he N di erent banks. T his problem can be viewed as a co lo r in g problem where t he dist ribut ion of nodes of D among t he banks is done by coloring t he nodes wit h a color from t he set f 0; 1; 2; : : : ; N − 1g. Since it is hard t o solve t he problem in general, access of regular pat t erns, called t e m p la t e s , in special dat a st ruct ures { like bidimensional arrays, circular list s, and complet e t rees { are considered hereaft er. A t e m p la t e T is a subgraph of D . T he occurrences f T 1 ; T 2 ; : : : ; T m g of T in D are t he t e m p la t e in s t a n ce s . For example, if D is a complet e binary t ree, t hen a pat h of lengt h k can be a t emplat e, and all t he pat hs of lengt h k in D are t he t emplat e inst ances. Aft er coloring D , a co n fl ic t occurs if two nodes of a t emplat e inst ance are assigned t o t he same memory bank, i.e., t hey get t he same color. An access t o a t emplat e inst ance T i result s in c conflict s if c + 1 nodes of T i belong t o t he same memory bank. Given a memory syst em wit h N banks and a t emplat e T , t he goal is t o nd a m e m o r y m a p p in g U : D ! N t hat colors t he nodes of D in such a way t hat t he number of conflict s for accessing any inst ance of T is minimal. In fact , t he co s t for T i colored according t o U , C ost U ( D ; T i ; N ), is de ned as t he number of conflict s for accessing T i . T he t emplat e inst ance of T wit h t he highest cost det ermines t he overall cost of t he mapping U . T hat is, d ef

C ost U ( D ; T ; N ) = max C ost U ( D ; T i ; N ) : Ti 2 T

A mapping U is co n fl ic t - free for T if C ost U ( D ; T ; N ) = 0. Among desirable propert ies for a conflict -free mapping, a mapping should be balanced, fast , and opt imal. A mapping U is t ermed ba la n ced if it evenly dist ribut es t he nodes of t he dat a st ruct ure among t he N memory banks. For a balanced mapping, t he m e m o r y loa d is almost t he same in all t he banks. A

Mappings for Conflict -Free Access of P at hs in Element ary Dat a St ruct ures

353

mapping U will be called fa s t if t he color of each node can be comput ed quickly (possibly in const ant t ime) wit hout knowledge of t he coloring of t he ent ire dat a st ruct ure. Among all possible conflict -free mappings for a given t emplat e of a dat a st ruct ure, t he more int erest ing ones are t hose t hat use t he minimum possible number of memory banks. T hese mappings are called o p t im a l. It is wort h t o not e t hat not only t he t emplat e size but also t he overlapping of t emplat e inst ances in t he dat a st ruct ure det ermine a lower bound on t he number of memory banks necessary t o guarant ee a conflict -free access scheme. T his fact will be more convincing by t he argument below for accessing pat hs in D . Let G D = ( V; E ) be t he graph represent ing t he dat a st ruct ure D . T he t emplat e Pk is a pa t h of lengt h k in D . T he t emplat e inst ance P k [x ; y ] is t he pat h of lengt h k between two vert ices x and y in V , t hat is, t he sequence x = v1 ; v2 ; : : : ; vk + 1 = y of vert ices such t hat ( vh ; vh + 1 ) 2 E for h = 1; 2; : : : k . T he conflict s can be eliminat ed on P k [x ; y ] if v1 ; v2 ; : : : ; vk + 1 are assigned t o all dierent memory banks. T he conflict -free access t o P k can be reduced t o a classical coloring problem on t he associat ed graph G D P obt ained as follows. T he vert ex set of G D P is t he same as t he vert ex set of G D , while t he edge ( r ; s) belongs t o t he edge set of G D P i t he dist ance dr s between t he vert ices r k , where t he dist ance is t he lengt h of t he short est and s in G D sat is es dr s pat h between r and s. Now, colors must be assigned t o t he vert ices of G D P so t hat every pair of vert ices connect ed by an edge is assigned a couple of di erent colors and t he minimum number of colors is used. Hence, t he role of m a x im u m c liqu e in G D P is apparent for deriving lower bounds on t he conflict -free access on pat hs. A c liqu e K for G D P is a subset of t he vert ices of G D P such t hat for each pair of vert ices in K t here is an edge. By well-known graph t heoret ical result s, a clique of size n in t he associat ed graph G D P implies t hat at least n di erent colors are needed t o color G D P . In ot her words, t he size of t he largest clique in G D P is a lower bound for t he number of memory banks required t o access pat hs of lengt h k in D wit hout conflict s. On t he ot her hand, t he conflict -free access t o P k on G D is equivalent t o color t he nodes of G D in such a way t hat any two nodes which are at dist ance k or less apart have assigned di erent colors. Unfort unat ely, t his lat t er coloring problem is NP -complet e [8] for general graphs. In t he next t hree sect ions, opt imal mappings for bidimensional arrays, circular list s and complet e binary t rees will be derived for conflict -free accessing Pk . k

k

k

k

k

k

k

k

k

k

3

A c c e s s in g P a t h s in B id im e n s io n a l A rray s

Let a bidimensional array A be t he dat a st ruct ure D t o be mapped int o t he mult ibank memory syst em. An array r c has r rows and c columns, indexed respect ively from 0 t o r − 1 (from t op t o bot t om) and from 0 t o c − 1 (from left t o right ), wit h r and c bot h great er t han 1. T he graph G A = ( V; E ) represent ing A is a mesh, whose vert ices correspond t o t he element s of A and whose arcs correspond t o any pair of adjacent element s of A on t he same row or on t he same column. For t he sake of simplicity, A will

354

Alan A. Bert ossi and M. Crist ina P inot t i

be used inst ead of G A since t here is no ambiguity. T hus, a generic node x of A will be denot ed by x = ( i ; j ), where i is it s row index and j is it s column index.

y

x (a)

y

x (b)

F i g . 1 . A subset K A ( x ; k ) of nodes of A t hat forms a clique in G A P : (a) k = 3, (b) k = 4. k

Consider a generic node x = ( i ; j ) of A , and it s opposit e node at dist ance k on t he same column, i.e., y = ( i − k ; j ). All t he nodes of A at dist ance k or less from bot h x and y are mut ually at dist ance k or less, as shown in F igure 1. In t he associat ed graph G A P , t hey form a clique, and t hey must be assigned t o dierent colors. T herefore, k

l

L e m m a 1 . A t lea s t M

=

m

( k + 1) 2 2

m e m o r y ba n k s a re requ ired fo r co n fl ic t - free

a cce s s in g P k in A .

Below, a conflict -free mapping is given t o color all t he nodes of an array A using as few colors as in Lemma 1. T herefore, t he mapping is opt imal. From now on, t he color assigned t o node x is denot ed by γ ( x ).

A lg o rit h m A rray -C o lo rin g l

( A ; k ); 

m

k + 1 if k is even k if k is odd { Assign t o each node x = ( i ; j ) 2 A t he color γ ( x ) = ( i {

Set M =

( k + 1) 2 2

and

=

+ j ) mod M :

Mappings for Conflict -Free Access of P at hs in Element ary Dat a St ruct ures

355

T h e o r e m 1 . T h e A r ra y - C o lo r in g m a p p in g is o p t im a l, fa s t , a n d ba la n ced . P r o o f: Int uit ively, t he above algorit hm rst covers A wit h a t essellat ion of basic sub-arrays of size M  M . Each basic sub-array S is colored conflict -free in a Lat in Square fashion as follows:

t he colors in t he rst row of S appear from left -t o-right in t he sequence 0; 1; 2; : : : ; M − 1; { t he color sequence for a generic row is obt ained from t he sequence at t he previous row by a  left -cyclic shift .

{

M 

For k = 3, t he coloring of A , decomposed int o 6 basic sub-arrays of size M , is illust rat ed in F igure 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

An array A of size 16  24 wit h a t essellat ion of 6 sub-arrays of size 8 colored by t he Array-Coloring algorit hm t o conflict -free access P 3 .

F ig . 2 .

8

No conflict arises on t he borders of t he sub-arrays. In fact , it can be proved t hat any two nodes colored t he same are k + 1 apart and t heir relat ive posit ions are depict ed in F igure 3. So, t he Array-Coloring Algorit hm is conflict -free. Moreover, since it uses t he minimum number of colors, t he proposed mapping is opt imal. It is easy t o see t hat t he t ime required t o color all t he n = r c nodes of an array is O ( n ). Moreover, t o color only a single node x = ( i ; j ) of t he t ree requires only O (1) t ime, since γ ( x ) = ( i + j ) mod M , and hence t he mapping is fast . In order t o prove t hat t he mapping is balanced, observe t hat each color appears once in each sub-row of size M . Hence, t he number m of nodes wit h t he same color veri es r b Mc c m r d Mc e:

356

Alan A. Bert ossi and M. Crist ina P inot t i

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)

F i g . 3 . Relat ive posit ions in A of two nodes which are assigned t o t he same color: (a) k even, (b) k odd.

4

A c c e s s in g P a t h s in C irc u la r Lis t s

Let a circular list C be t he dat a st ruct ure D t o be mapped int o t he mult ibank memory syst em. A circular list of n nodes, indexed consecut ively from 0 t o n − 1, is a sequence of n nodes such t hat node i is connect ed t o bot h nodes ( i − 1) mod n and ( i + 1) mod n . T he graph G C = ( V; E ) represent ing C is a ring, whose vert ices correspond t o t he element s of C and whose arcs correspond t o any pair of adjacent element s of C . For t he sake of simplicity, C will be used inst ead of G C since t here is no ambiguity. 8
1, and i if a i = 1. A p olynom ial of t rees is regarded as a collect ion of t rees of dim ensions up t o k . We next de ne a p olynom ial queue. An r -nom ial queue is an r -ary p olynom ial of t rees wit h a lab el l a bel ( v ) at t ached t o each node v such t hat if u is a parent of v , l a bel ( u )  l a bel ( v ). A binom ial queue is a 2-nom ial queue. We use " lab el" and " key" int erchangeably. E x a m p le 1 .

A p olynom ial queue wit h an underlying p olynom ial of t rees P =

2  3 2 + 2  3 + 2 is given in F ig. 1.

T he m erging of t wo linear t rees r and s is t o m erge t he t wo list s by t heir lab els. T he result is denot ed by t he sum r + s . T he m erging of t wo t erm s a i r i and a 0i r i is t o m erge t he m ain t runks of t he t wo t rees by t heir lab els. W hen t he root s are m erged, t he t rees underneat h are m oved accordingly. If a i + a 0i < r , we have t he m erged t ree wit h coe cient a i + a 0i. O t herwise we have a carry t ree r i + 1 and t he rem aining t ree wit h t he m ain t runk of lengt h a i + a 0i − r . T he sum of t wo p olynom ial queues P and Q is m ade by m erging t wo p olynom ial queues in a very sim ilar way t o t he addit ion of t wo radix-r numb ers. We st art from

T heory of Trinomial Heaps

365

2 e ,@ 3 e@ ,4 e`@`@````````5 , 15,@e 19@e 6 e e 16 e , 7 e@ , @ , , , 8 e , 10 ,e 9,@e 13,e, 11,@e@ 20 e, 17,,e ,, 23 ,e 22 e, 21,e, 18,@e 26 e, 14 e , , 29,,e 25 , e 30 e , 31 e F i g . 1 . P olynom ial of t rees wit h r = 3

t he 0-t h t erm . T wo i -t h t erm s from b ot h queues are m erged, causing a p ossible carry t o t he ( i + 1)-t h t erm s. T hen we proceed t o t he ( i + 1)-t h t erm s wit h t he p ossible carry. An insert ion of a key int o a p olynom ial queue is t o m erge a single node wit h t he lab el of t he key int o t he 0-t h t erm , t aking O ( r log r n ) t im e for p ossible propagat ion of carries t o higher t erm s. T he t im e for n insert ions t o form a p olynom ial queue P looks like t aking O ( n r log r n ) t im e. Act ually t he t im e is O ( r n ), as shown b elow. Aft er t he heap is m ade, we can t ake n successive m inim a from t he queue by delet ing t he m inimum in som e t ree T , adding t he result ing p olynom ial queue Q t o P − T , and rep eat ing t his process. T his will sort t he n numb ers in O ( n r log r n ) t im e aft er t he queue is m ade. T hus t he t ot al t im e for sort ing is O ( n r log r n ). In t he sort ing process, we do not change key values. If t he lab els are up dat ed frequent ly, however, t his st ruct ure of p olynom ial queue is not flexible. A m o r t i z e d a n a l y s i s fo r i n s e r t : Let t he de cit funct ion i aft er t he i -t h insert b e de ned by r − 1 t im es t he numb er of t rees in t he heap. We use t he word de cit rat her t han p ot ent ial b ecause t he numb er of root s gives a negat ive asp ect of t he heap. Let t i and a i b e t he act ual t im e and t he am ort ized t im e for t he i -t h insert op erat ion. T hen we have a i = t i + i − i − 1 . W hen we insert a single node int o t he heap, we sp end r-1 com parisons by scanning t he m ain t runk, whenever we m ake a carry t o t he next p osit ion. We decrease t he numb er of t rees by one as a result . We t erm inat e t he carry propagat ion eit her by m aking a new com plet e t ree or insert ing a carry int o a m ain t runk. T hus we have a i  r − 1. Not e t hat a i = t i + n − 0, 0 = 0, and n = O (log n ).

3

T rin o m ia l H e a p s

We linked r t rees in heap order in form (1). We relax t his condit ion in t he following way. A node is said t o b e inconsist ent if it s key value is sm aller t han t hat of it s head node. O t herwise t he node is said t o b e consist ent . An act ive node is eit her an inconsist ent node or a node which was once inconsist ent . T he lat t er case occurs when a node b ecom es inconsist ent and t hen t he key value of

366

Tadao Takaoka

it s head node is decreased, and t he node b ecom es consist ent again. Since it is exp ensive t o check whet her t he descendant s of a node b ecom e consist ent when t he key value of t he node is decreased, we keep t he children int act . Not e t hat we need t o look at t he root s and act ive nodes t o nd t he m inimum key in t he heap. If t he numb er of act ive nodes in t he given r -nom ial queue is b ounded by t , t he queue is said t o b e an r -nom ial heap wit h t olerance t . We furt her require t hat t he nodes except for t he head node on each t runk are sort ed in non-decreasing order of t heir key values, and t hat t here are no act ive nodes in each m ain t runk, t hat is, m ain t runks are sort ed. Not e t hat an r -nom ial queue in t he previous sect ion is an r -nom ial heap wit h t olerance 0. W hen r = 3, we call it a t rinom ial heap. In a t rinom ial heap we refer t o t he t hree nodes on a t runk of dim ension i as t he head node, t he rst child and t he second child. Not e t hat each node of dim ension i ( > 0) is connect ed downwards wit h rst children of dim ension 1, ..., i − 1. It is furt her connect ed downward and/ or upward wit h t rees of dim ension i or higher. We refer t o t he t rees in (2) and t heir root s as t hose at t he t op level, as we oft en deal wit h subt rees at lower levels and need t o dist inguish t hem from t he t op level t rees. T he sum P + Q of t he t wo t rinom ial heaps P and Q is de ned sim ilarly t o t hat for p olynom ial queues. Not e t hat t hose sum op erat ions involve com put at ional process based on m erging. We set t = dlog 3 ( n + 1) e − 1 as t he default t olerance. E x a m p le 2 . A t rinom ial heap wit h t olerance 3 wit h an underlying p olynom ial of t rees P = 2 3 2 + 2 3 + 2 is given b elow. Act ive nodes are shown by black circles. We use t = 3 just for explanat ion purp oses, alt hough t he default is 2.

4 e ,@ 3 e@ ,6 e`@````````9 `e , 17@e 19@e 7 e 16 e , 2@u @ @ , , , , 8 e , 10 ,e 5@u 13 e, 11@e 20 e, 15 ,u , ,, 23 ,e , 22 e,, 21 e,,@18@e 26 e,, 14 e , , , 25 , e 30 e , 29,,e 31 e , F i g . 2 . Trinom ial heap wit h t = 3

We describ e delet e-m in, insert ion, and decrease-key op erat ions for a t rinom ial heap. If we m ake act ive nodes non-act ive by sp ending key com parisons, we say we clean t hem up. Let t he dim ension of node v b e i , t hat is, t he t runk of t he highest dim ension on which node v st ands is t he i -t h. Let t r ee i ( v ) b e t he com plet e t ree 3 i root ed at v . To prepare for delet e-m in, we rst de ne t he break-up op erat ion. A sim ilar break-up op erat ion for a binom ial queue is given in [6]

T heory of Trinomial Heaps

367

B r e a k - u p : T he break-up op erat ion caused by delet ing node v is de ned in t he

following way. Let v p , v p− 1 , ..., v 1 b e t he head nodes on t he pat h from t he root (= v p ) t o t he head node (= v 1 ) of v = ( v 0 ) in t he t ree a i 3 i in which v exist s. We cut o all subt rees t r ee j l ( v l ) where j l = d i m ( v l − 1 ) and t he corresp onding links t o t heir rst children of d i m ( v l − 1 ) + 1, ..., d i m ( v l ) for l = p ; p − 1 ; :::; 1 in t his order. T hen we delet e v , and cut t he links t o all t he rst children of v . T he t runks from which subt rees are rem oved are short ened. T his op erat ion will creat e i t rees of t he form 2 3 j for j = 0 ; :::; i − 1, and 3 i if a i = 2 . See E xam ple 3. D e l e t e - m i n : P erform break-up aft er delet ing t he node wit h t he m inimum key. Swap t he t wo subt rees on t he m ain t runk of each result ing t ree t o have sort ed order if necessary. T hen m erge t he t rees wit h t he rem aining t rees at t he t op level. T he t im e t aken is obviously O (log n ). T he nodes on t he m ain t runks of t he new t rees are all cleaned up, and t hus t he numb er of act ive nodes is decreased accordingly. R e o r d e r i n g : W hen we m ove a node v on a t runk of dim ension i in t he following, we m ean we m ove t r ee i − 1 ( v ). Let v and w b e t he rst and second children and act ive nodes on t he sam e t runk of dim ension i . T hen reordering is t o reorder t he p osit ions of u , v and w aft er com paring l a bel ( u ) wit h l a bel ( w ). If l a bel ( u )  l a bel ( w ), we m ake w non-act ive, and do no m ore. O t herwise we m ove u t o t he b ot t om . W hen we m ove u , we m ove t r ee i − 1 ( u ), alt hough d i m ( u ) m ay b e higher. See F ig. 3. We can decrease t he numb er of act ive nodes. Not e t hat t his op erat ion m ay cause an e ect equivalent t o decrease-key at dim ension i + 1. R e a r r a n g e m e n t : Let v and w b e act ive rst children of dim ension i on di erent t runks. Supp ose v 0 and w 0 are t he non-act ive second children on t he sam e t runks. Now we com pare keys of v 0 and w 0, and v and w , sp ending t wo com parisons. W it hout loss of generalit y assum e l a bel ( v 0)  l a bel ( w 0) and l a bel ( v )  l a bel ( w ). T hen arrange v 0 and w 0, and w and v resp ect ively t o b e t he rst and second children on each t runk. We call t his op erat ion rearrangem ent . Not e t hat t his op erat ion is done wit hin t he sam e dim ension of v . See F ig. 4. Since w and v are act ive on t he sam e t runk, we call reordering describ ed ab ove. D e c r e a s e - k e y : Supp ose we decreased t he key value of node v such t hat d i m ( v ) = i . Let it s head node and t he ot her child on t he sam e t runk b e u and w . If v is t he second child and l a bel ( w )  l a bel ( v ), do not hing. O t herwise swap w and v and go t o t he next st ep. If v is a rst child and l a bel ( u )  l a bel ( v ), clean v if v was act ive. We have sp ent one or t wo com parisons. If we did not increase act ive nodes, we can nish decrease-key. O t herwise go t o t he next st ep. Assum e at t his st age v is t he rst child, l a bel ( u ) > l a bel ( v ), and v has b een t urned act ive. We p erform rearrangem ent and/ or reordering a cert ain numb er of t im es t o keep t he numb er of act ive nodes under cont rol. T here are t wo cont rol m echanism s as shown lat er. I n s e r t : To insert one node, m erge a t ree of a single node wit h t he right m ost t ree of t he heap. A p ossible carry m ay propagat e t o t he left . T hus t he worst case t im e is O (log n ). Not e t hat m ain t runks are sort ed and t here are no act ive nodes on t hem , m eaning t hat t here is no subst ant ial di erence b et ween p olynom ial

368

Tadao Takaoka

queues wit h r = 3 and t rinom ial heaps. As shown in Sect ion 2, t he am ort ized t im e for insert is O (1) wit h r = 3.

@@e u ,,@@ v u , wu ,

@@u v or e ,@ , we , @ , u e

(Before)

(Aft er)

F i g . 3 . reordering

(Before)

e

,, v

, u,

v’ e

(Aft er)

,, wu w’ e ,,

e

,, v’ e w’ e ,,

e

e

,, wu v u ,,

F i g . 4 . R earrangem ent

Let us p erform delet e-m in on t he t rinom ial heap in F ig. 2. T hen t he biggest t ree is broken up as in F ig. 5. Aft er t he subt rees root ed at nodes wit h key 6 and 5 are swapp ed, t he result ing t rees and t he t rees at t he t op level will b e m erged.

E x a m p le 3 .

,6 e@

,@e

4

9 e 16 e ,, 17,@e ,@ ,, @@ 8 e , 10,e 5,@u 13,e, 11,@e 20 e, 15 ,u , 23 ,e 22 e, 21 e, @18@e 26 e,, 14 e , ,, 29 ,e , 25 , e 30 e , 31 e , 7

e

F i g . 5 . Trinom ial heap wit h k = 3

3

e

@ 19@e

T heory of Trinomial Heaps

369

We nam e a node wit h key x by n od e ( x ). Supp ose key 21 is decreased t o 1 in F ig. 2. We connect n od e (30) t o n od e (26), and n od e (15) t o n od e (1). T he result is shown in F ig. 6.

E x a m p le 4 .

4 e ,@ 3 e@ ,6 e`@`@````````9 , 17,@e 19@e 7 e e 16 e , 2,u@ , @ , , 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 , 29,,e 25 , e 15 e , 31 e F i g . 6 . Trinom ial heap wit h k = 3

T here are t wo ways t o keep t he numb er of act ive nodes wit hin t olerance. T he rst is t o allow at m ost one act ive node for each dim ension. If v b ecom es act ive aft er we p erform decrease-key on v , and t here is anot her act ive w of t he sam e dim ension, we can p erform rearrangem ent and/ or reordering. T he reordering m ay cause t wo act ive nodes at t he next higher dim ension, causing a p ossible chain e ect of adjust m ent s. T he second is t o keep a count er for t he numb er of act ive nodes. If t he count er exceeds t he t olerance b ound t , we can p erform rearrangem ent and/ or reordering on t wo act ive nodes of t he sam e dim ension, and decrease t he count er by one. Not e t hat if t he numb er of act ive nodes exceeds t he t olerance, t here must b e t wo act ive nodes of t he sam e dim ension by t he pigeon hole principle. T here is no chain e ect in t his case t hanks t o t he global inform at ion given by t he count er. We allow m ore t han one act ive nodes of t he sam e dim ension, even on t he sam e t runk.

4

O( 1 ) A m o rt iz e d T im e fo r D e c re a s e -K e y

We prepare an array, called a ct i v e , of size t (= k − 1), whose elem ent s are act ive nodes of dim ension i ( i = 1 ; :::; k − 1). T hat is, we have at m ost one act ive node for each dim ension great er t han 0. If t here is no act ive node of dim ension i , we denot e a ct i v e [i ] = . Supp ose we p erform decrease-key on node v of dim ension i , which is now act ive. If a ct i v e [i ] = , we set a ct i v e [i ] = v and nish. If a ct i v e [i ] = u , we p erform rearrangem ent and/ or reordering on u and v , and adjust a ct i v e accordingly. If we p erform reordering, rearrangem ent and/ or reordering will proceed t o higher dim ensions. T his is like carry propagat ion over array a ct i v e , so t he worst case t im e is O (log n ). Sim ilarly t o t he insert op erat ion, we can easily show t hat t he am ort ized t im e for decrease-key is O (1). As

370

Tadao Takaoka

m ent ioned in Int roduct ion, we can p erform m decrease-key op erat ions, and n insert and delet e-m in op erat ions in O ( m + n log n ) t im e. T his im plem ent at ion is m ore e cient for applicat ions t o short est pat hs, et c. t han t he im plem ent at ion in t he next sect ion, and can b e on a par wit h F ib onacci and 2-3 heaps. A m o r t i z e d a n a l y s i s : . Aft er t he key value of a node is decreased, several operat ions are p erform ed, including checking inconsist encies. T he t ot al m aximum numb er of key com parisons leading t o a reordering is ve. T hus if we de ne a de cit funct ion Ψ i aft er t he i -t h decrease-key by ve t im es t he numb er of act ive nodes, we can show t hat t he am ort ized t im e for one decrease-key is O (1). If we have insert s in a series of op erat ions, we need t o de ne t he de cit funct ion aft er t he i -t h op erat ion by i + Ψ i .

5

O( 1 ) W o rs t C a s e T im e fo r D e c re a s e -K e y

In t his sect ion, we im plem ent t rinom ial heaps wit h O (1) worst case t im e for decrease-key. We prepare a one-dim ensional array p oi n t of p oint ers t o t he list of act ive nodes for each dim ension, an array cou n t , and cou n t er . T he variable cou n t er is t o count t he t ot al numb er of act ive nodes. T he size of t he arrays is b ounded by t he numb er of dim ensions in t he heap. T he list of nodes for dim ension i cont ains t he current act ive nodes of dim ension i . T he elem ent cou n t [i ] shows t he size of t he i -t h list . To avoid scanning arrays p oi n t and cou n t , we prepare anot her linked list called ca n d i d a t es , which m aint ains a rst -in- rst -out st ruct ure for candidat e dim ensions for t he clean-up op erat ion. W it h t hese addit ional dat a st ruct ures, we can p erform decrease-key wit h a const ant numb er of op erat ions. Not e t hat we need t o m odify t hese dat a st ruct ures on delet e-m in as well, det ails of which are om it t ed. In t his exam ple, we have t = 7. If we creat e an act ive node of dim ension 1, we go b eyond t he t olerance b ound, and we p erform clean-up using nodes a and b. Supp ose t his is a rearrangem ent not followed by reordering. T hen a or b is rem oved from t he 3rd list and t he rst it em in ca n d i d a t es is rem oved. Next let us p erform reordering using e and f . F irst we rem ove e and f from t he 6-t h list . Supp ose l a bel ( e )  l a bel ( f ), and e b ecom es act ive in t he 7-t h dim ension. T hen we app end e t o t he 7-t h list , and rem ove 6 from and app end 7 t o t he list of ca n d i d a t es . See F ig. 7. T his is a sim pli ed pict ure. To rem ove an act ive node from a list of act ive nodes in O (1) t im e, t hose list s need t o b e doubly linked. E x a m p le 5 .

6

P ra c t ic a l C o n s id e ra t io n s

For t he dat a st ruct ure of a t rinom ial heap, we need t o im plem ent it by p oint ers. For t he t op level t rees, we prepare an array of p oint ers of size d = dlog 3 ( n + 1) e, each of which p oint s t o t he t ree of t he corresp onding t erm . Let t he dim ension of node v b e i . T he dat a st ruct ure for node v consist s of int eger variables k ey

T heory of Trinomial Heaps

count p oint

7

6

5

4

3

2

1

1

3

0

2

2

0

0

? e? h ?

f

? a? c ? b?

d

?

g

371

candidat es 3

?

4

?

6

F i g . 7 . Auxiliary dat a st ruct ure for O (1) worst case t im e

and d i m = i , a p oint er t o t he head node of t he i -t h t runk, and an array of size whose elem ent s are pairs ( f i r s t ; s econ d ). T he f i r s t of t he j -t h elem ent of t he array p oint s t o t he rst node on t he j -t h t runk of v . T he s econ d is t o t he second node. If we prepare t he xed size d for all t he nodes, we would need O ( n log n ) space. By im plem ent ing arrays by p oint ers, we can im plem ent our algorit hm wit h O ( n ) space, alt hough t his version will b e less t im e-e cient . d,

7

C o n c lu d in g R e m a rk s

Measuring t he com plexit y of n delet e-m in’s, n insert ’s, and m decrease-key’s by t he numb er of com parisons, we showed it t o b e O ( m + n log n ) in a t rinom ial heap by t wo im plem ent at ions. T he rst im plem ent at ion p erform s decrease-key in O (1) am ort ized t im e, whereas t he second achieves O (1) worst case t im e for decrease-key. Alt hough due t o less overhead t im e t he rst is m ore e cient for applicat ions such as short est pat hs where t he t ot al t im e is concerned, t he second has an advant age when t he dat a st ruct ure is used on-line t o resp ond t o up dat es and queries from out side, as it can give sm oot her resp onses. T he clean-up m echanism is not unique. For exam ple, we could m ake a node act ive wit hout key com parison aft er decrease-key. We will need exp erim ent s t o see if t his is b et t er.

R e fe re n c e s 1. Dijkst ra, E.W ., A not e on two problems in connexion wit h graphs, Numer. Mat h. 1 (1959) 269-271.

372

Tadao Takaoka

2. Driscoll, J .R., H.N. Gab ow, R. Shrairman, and R.E. Tarjan, An alt ernat ive t o F ib onacci heaps wit h applicat ion t o parallel comput at ion, Comm. ACM, 31(11) (1988) 1343-1345. 3. Fredman, M.L. and R,E, Tarjan, F ib onacci heaps and t heir uses in inproved net work opt imizat ion algorit hms, J our. ACM 34 (1987) 596-615 4. P rim, R.C., Short est connect ion networks and some generalizat ions, Bell Sys. Tech. J our. 36 (1957) 1389-1401. 5. Takaoka, T ., T heory of 2-3 Heaps, COCOON 99, Lect ure Not es of Comput er Science (1999) 41-50 6. Vuillemin, J ., A dat a st ruct ure for manipulat ing priority queues, Comm. ACM 21 (1978) 309-314.

 

      

                   

                !"#      $  %

  #&! '             

 )

  *         % )  )  ** 

)  %+ ,     % )         '  

 )  )  *)* %   Æ  ) - )   #&! '

)  )   ' .   )  * - /+

      

 ) %  *)

  * *  %     *) 

) *)%   *) )        *)  

) )  

      )       )

   *  )  )+     



   )  )  *)%)* 

  

                

              

          

      !" !               #                  $       #    %      #          & '      ( & ('      

       # 

#      $  )    

       *  )    

 !"   +   ,   -     *    ."  &/012℄' -  #              +          #      $    )     

     $  /!45℄ .  $   !"$        

                        & , '         &/0%16℄' 7        8!"          9  :     ) 7"    

  +  !"    - *  -        ;                 -          

   

            3 . T he special cases k -chimeric for k = 0 and k = 1 , t hat means t he row is eit her ident ical 0 or has only a single block of ’1’s, we will call also n o n c h i m e r i c . In t he following we will assume t hat t he binary mat rices considered do not have rows or columns t hat are ident ical 0 since such fragment s or probes do not provide any informat ion about t he relat ive order of t he ot hers. D e n i t i o n 3 For k 2 , row m i ; of a m at rix M is called po t e n t i a l l y k c h i m e r i c i t here ex ist s n on em pt y rows p 1 ; : : : ; p k 2 [1; ‘ 1 ]nf i g su ch t hat m i ; = m p 1 ; [_ : : : [_ m p k ; . I t is po t e n t i a l l y c h i m e r i c i t here ex ist s a k > 1 su ch t hat m i ; is pot en t ially k -chim er ic.

T he problem e x a c t c o v e r b y 3 - s e t s , which is known t o be N P -complet e [9], can be reduced t o t he quest ion whet her a row is pot ent ially k -chimeric. We t herefore get for t he case t hat k is part of t he input : L e m m a 1 I t is N P -com plet e t o decide whet her a speci c row of a m at rix is pot en t ially k -chim er ic.

For const ant k , however, t his quest ion can easily be solved in t ime polynomial in t he size of t he mat rix.

386

St ephan Weis and R u¨ diger Reischuk

M has t he ( st r i c t ) k - co n sec u t i v e o n e s p r o pe r t y i by perm u t in g it s colu m n s it can be reordered t o a m at rix M 0 t hat is in ( st rict ) k con secu t ive on es order.

D e n it io n 4

1 -consecut ive equals t he consecut ive ones property as de ned in [5, 4]. F igure 1 also shows t hat it is necessary t o know t he largest k , for which a row is pot ent ially k -chimeric, in order t o est imat e t he degree of chimerism for a st rict ordering: In t he example it does not su ce t o know t hat t he two highlight ed fragment s are pot ent ially 2-chimeric.

F i g . 1 . A 2-chimeric order for a mat rix t hat requires a 3-chimeric fragment t o obt ain a st rict ordering.

W hen conduct ing hybridizat ion experiment s one rst has no informat ion about t he relat ive order of probes, t hat means t he columns of t he result mat rix M are in an arbit rary order. T he ’1’s of a fragment may be spread all over. T he algorit hmic t ask now is t o nd a permut at ion such t hat t he ’1’s in each row generat e as few blocks as possible. D e n i t i o n 5 T he problem ( u |l ) { P h y si ca l - M a p p i n g w i t h st r i c t k - c h i m e r i c e r r o r s is t he followin g: G iven a hy bridizat ion m at rix M w it h m axim al fragm en t len gt h l an d m axim al degree of overlap u as in pu t , decide whet her M has t he st rict k -con secu t ive on es propert y . I f t here is n o bou n d on l we writ e ( u j− ) , an d for u n bou n ded u t he n ot at ion ( − j l ) will be u sed. T he opt im izat ion version of ( u |l ) { P h y si ca l - M a p p i n g w i t h st r i c t k - c h i m e r i c e r r o r s requ ires t o com pu t e a perm u t at ion M 0 of M t hat obey s t he st rict k -con secu t ive on es order an d t hat m in im izes t he n u m ber of rows rem ain in g in M 0 t hat are n ot n on -chim eric.

In t he following we will analyse t he complexity of PHYSI CAL - MAPPI NG for t he basic and in pract ice most import ant case of st rict 2-chimeric errors. Consider a clone library where some fragment s are missing and which t herefore does not overlap t he complet e st rand of DNA. T his means t hat t he st rand falls apart int o regions, which are complet ely overlapped by t he library, separat ed by gaps. Such cont iguous regions are called i s l a n d s or c o n t i g s . A formal de nit ion of t his concept focuses on t he two most import ant st ruct ural propert ies of islands in our cont ext , namely t he impossibility t o det ermine a relat ive order of t he islands, and a cert ain guarant ee t o obt ain a precise ordering inside each island.

T he Complexity of P hysical Mapping wit h St rict Chimerism

387

T his can be achieved t o some ext ent when we ignore t hose fragment s t hat might dest roy t he consecut ive ones property, i.e. t he pot ent ially chimeric fragment s. D e n i t i o n 6 T he o v e r la p gr a p h of a hy bridizat ion m at rix M is given by ( P ; E ) wit h E := f f p j ; p j ′ g j 9 f i ; f i ′ wit h p j 2 m f i ; ; p j ′ 2 m f i ′ ; an d \ m f i ′; 6 = ; g . L et M be a m at rix an d M 0 t he su bm at rix t hat con t ain s ex act ly t hose rows of M t hat are n ot pot en t ially chim eric. L et G = ( P ; E ) be t he overlap graph of M 0 an d G 1 = ( P 1 ; E 1 ) ; : : : ; G z = ( P z ; E z ) it s con n ect ed com pon en t s. T he vert ex set s P x are called i sl a n d s of M .

G = mfi;

3

T w o S im p le C ase s

T he ( − j 1) { PHYSI CAL - MAPPI NG problem is t rivial because any such clone library is in consecut ive ones order by de nit ion. be an in st an ce for (2j− ){ PHYSI CAL - MAPPI NG wit h st rict 2-chim eric errors. I f M has t he 2-con secu t ive on es propert y t hen it has t he 1con secu t ive on es propert y , t oo.

T h e o r e m 1 L et M

P roof: Assume t hat M does not have t he 1 -consecut ive ones property. Let M 0

be a permut at ion of M wit h minimum number of st rict 2-chimeric rows. A st rict 2 -chimeric row m 0i ; consist ing of 1-blocks A and B has t o be accompanied by rows m 0j 1 ; = A and m 0j 2 ; = B . Since t he overlap is at most 2 t here cannot be = ; . T hus, rearranging t he columns of M 0 any ot her row m x wit h m x ; \ m i ; 6 such t hat t he ones in A are followed direct ly by t he ones in B row i becomes non-chimeric wit hout breaking t he 1-block of any ot her row. (2j− ){ PHYSI CAL - MAPPI NG wit h st rict chim eric errors can be decided in lin ear t im e. T he correspon din g opt im izat ion problem is t rivial.

C o ro lla ry 1

4

T h e C o m p le x it y o f t h e D e cisio n P ro b le m

We will show t hat t he decision problem already becomes int ract able for sparse clone libraries. Compared t o t he result s about pot ent ial chimerism t he following result goes a st ep furt her and shows t hat in general t he st rict ness property does not help t o reduce t he complexity of PHYSI CAL - MAPPI NG (cf. [3]). T h e o re m 2

(11j 5){ PHYSI

CAL - MAPPI NG wit h st rict 2-chim eric errors is

NP-

com plet e. P roof: By reduct ion of t he following version of t he Hamilt onian pat h problem [10],[16]: Given an undirect ed graph G = ( f v 1 ; : : : ; v n g; E ) wit h two marked nodes v 1 and v n of degree 2 and all ot her nodes of degree 3, does t here exist a Hamilt onian pat h between v 1 and v n ? Not e t hat n has t o be even because of t he degree propert ies. Let m := j E j = 3n = 2 − 1 . We const ruct a mat rix M wit h n islands I 1 ; : : : ; I n . I 1 consist s of

388

St ephan Weis and R u¨ diger Reischuk

6 probes, I n of 4, and all ot hers of 5 probes. M has t he st rict 2-consecut ive ones property i G has a Hamilt onian pat h wit h endpoint s v 1 and v n . If so any 2-consecut ive ones order for M places t he islands such t hat t he sequence of t heir indices is t he sequence of node indices of a Hamilt onian pat h. Let   100011 ; M i = (11111) ; and M n = (1111) : M1 = 111110 T hese are t he building blocks of an ( n + 1) (5n ) -mat rix M I t hat forms a diagonal st ruct ure t o de ne t he n islands. As an example, gure 2 displays t he complet e mat rix M for a graph wit h 6 nodes. For every island I , t he rst column of submat rix m ; I of M t hat corresponds t o I will be called t he island’s pole , t he second column it s n u ll-colu m n . Out side t he above ment ioned diagonal st ruct ure t he null-columns do not cont ain any ’1’. T he const ruct ion of M will be such t hat t he following holds. P r o p e r t y 1 . Every row of M t hat is not in M I is eit her pot ent ially chimeric or cont ains only a single ’1’. T herefore t he set I 1 ; : : : ; I n will indeed be t he set of islands of M . T he t hree columns (resp. two columns) of m ; I for I 2 I 1 ; : : : ; I n − 1 (resp. I = I n ) t hat follow t he null-column are called t he island’s  -colu m n s . We proceed wit h t he row-wise const ruct ion of M by adding m rows wit h four ’1’s each as follows. Let G be an inst ance for t he Hamilt onian pat h problem described above wit h E = f e 1 ; : : : ; em g . Let e i = f v a ; v b g , i 2 [1; m ]. T he i -t h row get s a ’1’ each in t he pole of I a and t he pole of I b . T he row get s anot her ’1’ each in I a and I b which is placed in one of each island’s  -columns wit h t he following goal. Aft er adding all m rows every  -column has got n o m ore t han one new ’1’. Because of t he degree const raint s for G t his goal can indeed be achieved. We call t his submat rix M E . P r o p e r t y 2 . A Hamilt onian pat h between v 1 and v n de nes a sequence of t he islands t hat can be re ned t o a st rict 2-consecut ive ones order for M by local permut at ions of t he columns of each island such t hat t he following holds. 1.) T he pole becomes t he t hird column of t he rst island and t he second column in all ot her islands of t he sequence. 2.) A row in M E t hat corresponds t o an edge used in t he pat h falls apart int o two fragment s aft er permut at ion: One is a single pole-’1’ of one island and t he ot her has a  -’1’ in it s cent er surrounded by a pole-’1’ of t he ’next ’ island and a  -’1’ of t he ’previous’ island. Aft er permut at ion all ot her rows of M E fall apart int o two fragment s, each of lengt h 2. To conclude t he const ruct ion of M , we add anot her 23n = 2 − 7 rows wit h t he following propert ies: 3.) T hese rows generat e t he isolat ed fragment s for t he rows in M E and for t he chimeric rows t hat will occur wit hin t hemselves. 4.) T hey prevent M from having t he st rict 2-consecut ive ones property wit hout revealing a Hamilt onian pat h. T hese fragment s are de ned as follows by t he mat rices M 1 − 1 s t , M V − 1 s t , M E − 1 s t , M 1 − 2 n d and M E − 2 n d :

T he Complexity of P hysical Mapping wit h St rict Chimerism

I 1

I 2

I 3

I 4

I 5

I 6

I 1

M

F i g . 2 . On t he left : t he mat rix

I 2

I 3

I 5

I 4

389

I 6

I

v 2g v 3g v 3g v 4g v 5g v 5g v 6g v 6g

f f f f f f f f

v 1; v 1; v 2; v 2; v 3; v 4; v 4; v 5;

M

V

− 1s t

M

E

− 1s t

f f f f f f f f

v 1; v 1; v 2; v 2; v 3; v 4; v 4; v 5;

v 2g v 3g v 3g v 4g v 5g v 5g v 6g v 6g

M obt ained for a graph G (wit h 6 nodes and edges as list ed in t he middle) according t o t he reduct ion in t he proof of T heorem 2. Rows cont aining only a single ’1’ { t hat is, t he rows of M 1− 1 s t and M 1− 2 n d { are project ed t o a single row at t he b ot t om of t he diagram, i.e. every ’1’ t here means t hat M has a row which consist s of exact ly t his ’1’. On t he right : an opt imal p ermut at ion of M .

390

St ephan Weis and R u¨ diger Reischuk

and M 1 − 2 n d have rows of single ’1’s, one row for every pole- and -column, except for t he t hird  -column column of I 1 , for which no such row exist s. M V − 1 s t has { wit h t he same except ion { one row for every  -column wit h one ’1’ in t hat  -column and one ’1’ in t he pole of t he island of t hat  -column. It remains t o de ne M E − 1 s t and M E − 2 n d . Consider an arbit rary row m i ; in M E and let m i ; = f p 1 ;  1 ; p 2 ;  2 g such t hat p 1 and p 2 are t he poles where m i ; has a ’1’ each. Add t he two rows f p 1 ;  1 ;  2 g and f  1 ; p 2 ;  2 g t o M E − 1 s t and t he row f  1 ;  2 g t o M E − 2 n d . M 1− 1st



T his concludes t he const ruct ion of M . It remains t o show t he exist ence of a permut at ion t hat ful lls t he st rict ness property in case t hat a Hamilt onian pat h exist s in G . T his can be done using similar ideas as in [3]. T his nishes t he proof sket ch. A complet e elaborat ion is given in [16].

5

T h e C o m p le x it y o f t h e ( 4 |2 ) - an d ( 3 |3 ) -O p t im izat io n P ro b le m s

T he two cases (4j 2) and (3j 3) t urn out t o be t he front iers of int ract ability. T heir reduct ions are relat ed. T h e o r e m 3 T he opt im izat ion problem

(4j 2){ PHYSI

CAL - MAPPI NG wit h st rict 2-

chim eric errors is N P -hard. P roof: By reduct ion from t he following version of t he direct ed Hamilt onian pat h

problem, which has been est ablished as N P -complet e [17]: Given a direct ed graph G = ( f v 1 ; : : : ; v n g; E ) wit h two marked nodes v 1 and v n of indegree, resp. out degree  in ( v 1 ) =  o u t ( v n ) = 0 ,  o u t ( v 1 ) =  in ( v n ) = 2 and each ot her node eit her of indegree 2 and out degree 1 or vice versa, does t here exist a Hamilt onian pat h from v 1 t o v n ? T he mat rix M t o be const ruct ed consist s of n islands. Let E = f e1 ; : : : ; em g , wit h m := j E j = 3n = 2 − 1 . G has a Hamilt onian pat h from v 1 t o v n i M can be permut ed t o a st rict 2-consecut ive ones order t hat has no more t han m − n + 1 = n = 2 st rict chimeric rows. Let     110 100 and M i s o := : M d := 011 001 M is divided vert ically int o t hree part s. T he rst part is a (2n 3n ) -mat rix wit h n occurrences of M d on it s diagonal, all ot her ent ries are ’0’. T his st ruct ure de nes t he islands of M . T he second part is const ruct ed similarly, wit h t he diagonal submat rices M i s o . T he t hird part consist s of m = 3n = 2 − 1 rows, such t hat t he i -t h row has a ’1’ in t he rst column of t he a-t h island and one in t he t hird column of t he b-t h island i ei = ( v a ; v b ) . M has t he st rict 2-consecut ive

T he Complexity of P hysical Mapping wit h St rict Chimerism

391

ones property and is a valid inst ance for t he (4j 2)-problem. T he left of F ig. 3 shows M for a graph of 6 vert ices and edge set as list ed in t he middle. Any permut at ion of M has n − 1 t ransit ions between islands. Each such t ransit ion allows t o remove chimerism in no more t han one row, and only when t he two islands are in proper orient at ion t o form an edge in G . To obt ain a solut ion wit h n = 2 chimeric rows, t he islands associat ed t o v 1 and v n have t o be placed at t he borders of t he mat rix. Using t his observat ion, one can easily deduce t he correct ness of t he reduct ion.

(v 1; v 2) (v 1; v 3) (v 2; v 3) (v 2; v 4) (v 3; v 5) (v 5; v 4) (v 4; v 6) (v 5; v 6)

T he (4j 2)-mat rix and t he (3j 3)-mat rix for a 6-node graph wit h edge set as list ed. T he submat rix t hat is spread out by t he diagonal st ruct ure M i s o of isolat ed fragment s is project ed t o a single row in t he middle. F ig . 3 .

T h e o r e m 4 T he opt im izat ion problem

(3j 3){ PHYSI

CAL - MAPPI NG wit h st rict 2-

chim eric errors is N P -hard.

We modify t he const ruct ion wit h t he goal t hat t he t hird part of t he mat rix has no two ’1’s in t he same column. T his decreases t he degree of overlap in t he clone library, but we need fragment s of lengt h 3. Let 0 1   1000 1100 and M i s o := @0010A : M d := 0111 0001

P roof:

In t he t hird part , t he two ’1’s of a row corresponding t o edge e = ( v a ; v b ) are placed as follows. If v a (resp. v b ) is incident wit h anot her edge t hat has t he same direct ion as e relat ive t o it , place a ’1’ in one of t he two right columns of

392

St ephan Weis and R u¨ diger Reischuk

t he a-t h (resp. b-t h) island, t hereby select a column t hat does not yet have a ’1’ in t he t hird part of t he mat rix. Ot herwise put a ’1’ int o t he left column of t he a-t h (resp. b-t h) island. See t he right part of gure 3 for an example. T he correct ness follows similarly as in t he proof of T heorem 3.

6

A n E cie nt A lg o rit h m fo r ( 3 |2 ) -O p t im izat io n

In t his sect ion we consider t he only e cient ly solvable case where a skillful ordering of t he probes leads t o a subst ant ial reduct ion of chimerism. Usually t here exist s a large set of solut ions t o t he opt imizat ion problem. However, t hese are equally valid merely from a combinat orial point of view, whereas in t he underlying biological cont ext only very few of t hem might be meaningful. T herefore, it is desirable t o generat e all solut ions out of which t he biologicaly meaningful ones have t o be select ed wit h t he aid of ot her crit eria. Below we will develop a met hod t o describe t he complet e set of opt imal solut ions in a compact form. Given a hybridizat ion mat rix M, let G M := ( F [_P ; E ) be t he corresponding bipart it e graph wit h F = f f 1 ; : : : ; f r g , P = f p 1 ; : : : ; p c g , and f f i ; p j g 2 E i m i ; j = 1 . Let n denot e t he lengt h of a compact coding of t his sparse graph, and Γ (f ) P t he neighbors of f , and similarly Γ ( p ) F . T h e o r e m 5 T he opt im izat ion problem (3j 2){ PHYSI CAL - MAPPI NG wit h st rict 2chim eric errors can be solved in t im e O ( n log n ) .

P roof: For short , we call a permut at ion of M allowed if it t urns M int o st rict 2-consecut ive ones order. Let M 0 be t he submat rix of M wit hout t he pot ent ially chimeric rows. T hese rows can easily be ident i ed wit h t he help of G M , since t hey exact ly correspond t o all nodes f 2 F in G M wit h t he property (1) ( f ) = 2 ^ 8p 2 Γ ( f ) 9 f 0 2 Γ ( p ) : ( f 0) = 1 :

Of course, M 0 has t he consecut ive ones property. For M 0 we const ruct G M ′ , which can be derived from G M by delet ing all edges incident t o a fragment f having property (1). Let I M ′ be t he set of islands of M 0. Such an island corresponds t o a set of probes t hat form a connect ed component in t he graph GM ′ . Consider an island which consist s of more t han two probes. Because t he lengt h of a fragment is bounded by 2 (and by t he de nit ion of an island) no two probes overlap wit h exact ly t he same set of fragment s. T his forces a unique order of t he st art and end point s of all fragment s t hat belong t o t he island. T herefore, a consecut ive ones order of t he columns of an island in M 0 is unique except for inversion. It remains t o add t he pot ent ially chimeric rows. While doing so, we const ruct an ordering of t he islands t oget her wit h t he orient at ion of each island t hat leaves as few as possible rows 2 -chimeric. Let us now examine how an pot ent ially chimeric row m i ; added can dist ribut e it s two ’1’s t o t he islands. Since t he inner columns of a consecut ive ones ordering of an island in I M ′ have at least two ’1’s, t here can be no addit ional ’1’ forming a pot ent ially chimeric row. T hus, every pot ent ially chimeric row has

T he Complexity of P hysical Mapping wit h St rict Chimerism

393

it s ’1’s at t he coast s of t he islands in t he nal permut at ion. Let m i ; = f ’ 1 ; ’ 2 g and dist inguish four cases. For an illust rat ion see gure 4. C a s e 1 . m ; ’ 1 and m ; ’ 2 belong t o t he same island I . Observe t hat I consist s of at least t hree columns. Neit her m ; ’ 1 nor m ; ’ 2 overlap wit h a pot ent ially chimeric row di erent from m i ; . Any allowed permut at ion of M leaves m i ; chimeric. = I 2 , and bot h I j are more t han one C a s e 2 . m ; ’ 1 2 I 1 , m ; ’ 2 2 I 2 wit h I 1 6 column wide. Again, no ot her pot ent ially chimeric row can overlap wit h m ; ’ 1 or m ; ’ 2 . C a s e 3 . m ; ’ 1 = I 1 and m ; ’ 2 = I 2 . Similar t o case 2, except t hat t here might = i. exist an m i ′ ; = m i ; , i 0 6 C a s e 4 . Eit her I 1 or I 2 is one column wide, say I 1 = m ; ’ 1 . Only m ; ’ 1 might = i. overlap wit h anot her pot ent ially chimeric row m i ′ ; , i 0 6

11 11 11 11 11 1 1 1 1

Case 1

11 11

11 11 11 11

1 1

1

1

1 1

1 11

1 11 11

1 1 11

Case 2

Case 3

Case 4a

1

F ig . 4 .

11 11 1 11 1

1

Case 4b

Charact erist ic sit uat ions for t he four cases.

T he last t hree cases allow M 0 plus m i ; t o be t urned int o consecut ive ones order. We will now de ne a graph G p c t hat can be regarded as an implicit represent at ion of all opt imal solut ions. Let I M ′ = f I 1 ; : : : ; I z g , z := jI M ′ j . D e n i t i o n 7 L et G pc := ( V pc ; E pc ) be an u n direct ed weight ed m u lt i-graph wit h w ( f v i ; v j g) = g for f v i ; v j g 2 E p c i M con t ain s g iden t ical pot en t ially

chim eric rows whose associat ed t wo isolat ed fragm en t s dist ribu t e t o t he coast s of I i an d I j . I f i = j bot h fragm en t s are on opposit e coast s of on e islan d.

F igure 5 shows how a pot ent ially chimeric row de nes t he local st ruct ure of at t he edge corresponding t o t hat row. A dot t ed line means t hat t here can be one edge, depending on t he dist ribut ion of pot ent ially chimeric rows. Ot her edges are not allowed. Obviously G p c is degree-2 bounded. Each pot ent ially chimeric row appears as one unit in t he weight of one edge of G p c . One such row can be non-chimeric if it s isolat ed fragment s belong t o di erent islands I a and I b wit h f v a ; v b g 2 E p c . T wo di erent rows can bot h be non-chimeric if t he two corresponding edges G pc

394

St ephan Weis and R u¨ diger Reischuk (1) 1

1

(1) 2

1

(1)

Case 1

Cases 2 and 3

F ig . 5 .

1

1

Case 3

1

(1)

Cases 3 and 4a

Case 4b

Local st ruct ure of G p c .

do not form a circle. By induct ion, t dierent rows can be non-chimeric if t he corresponding edges do not form a circle. T herefore, in order t o achieve a consecut ive ones order for t he probes one has t o delet e at least as much rows as G p c has circles and self-loops. In ot her words, t he minimum number of rows t hat remain chimeric in an opt imal solut ion is equal t o t he number of circles and self-loops, because edges wit h weight 1 exist only t here. Hence, an opt imal solut ion can be obt ained by t he following procedure. t

1. Delet e one edge each from every self-loop and circle. 2. P ut every island of M 0 int o consecut ive ones order. 3. For each remaining edge e in G p c make t he corresponding row (resp. t he two rows, if w ( e) = 2 ) non-chimeric, but ret ain t he part ial order t hat has been obt ained up t o now; possibly one of t he ordered areas has t o be invert ed. 4. Arrange t he ordered areas in arbit rary sequence and orient at ion. (i.e. forward or reverse). Each of t he four st eps cont ains a nondet erminist ic choice. T he algorit hm t erminat es wit h all opt imal solut ions revealed. Using an e cient represent at ion it can be shown t hat t he whole procedure requires only O ( n log n ) st eps.

7

C o n clu sio n s

We have shown t hat t he st rict ness property for chimeric errors does not reduce t he complexity of PHYSI CAL - MAPPI NG { t his problem remains N P -hard in general. T his even holds for sparse clone libraries, for which pot ent ial chimerism can be det ect ed fast . A t ight complexity est imat e for comput ing an opt imal ordering has been obt ained based on t he sparseness paramet ers m axim u m fragm en t len gt h and m axim u m degree of probe over lap. For very sparse cases, t he problem can be solved in linear or almost linear t ime, where t he algorit hmically int erest ing case t urns out t o be overlap 3 and fragment lengt h 2 . Any relaxat ion of sparsity beyound t his point makes PHYSI CAL - MAPPI NG int ract able.

T he Complexity of P hysical Mapping wit h St rict Chimerism

395

R e fe re n ce s [1]

[2]

[3]

[4]

[5] [6] [7]

[8]

[9] [10] [11] [12] [13]

[14]

[15] [16]

[17]

F . Alizadeh, R. Karp, L. Newb erg, D. Weisser, P hysical mapping of chromosomes: a combinat orial problem in molecular biology, A lgor i thmi ca 13, 52{76, 1995. F . Alizadeh, R. Karp, D. Weisser, G. Zweig, P hysical mapping of chromosomes using unique prob es, Proc. 5th A nnual A CM -SI A M Symposi um on D i screte A lgor i thms SODA’94, 489{500, 1994. J . At kins, M. Middendorf, On physical mapping and t he consecut ive ones property for sparse mat rices, D A M AT H : D i screte A ppli ed M athemati cs and Combi nator i al Operati ons Research and Computer Sci ence 71, 1996. K. Boot h, G. Lueker, Test ing for t he consecut ive ones prop erty, int erval graphs, and graph planarity using P Q-t ree algorit hms, J. Computer and System Sci ences 13, 335{379, 1976. D. Fulkerson, O. Gross, Incidence mat rices and int erval graphs, Paci c Jour nal of M athemati cs 15, 835{856, 1965. P. Goldb erg, M. Golumbic, H. Kaplan, R. Shamir, Four st rikes against physical mapping of DNA, J. Computati onal B i ology 2, 139{152, 1995. D. Greenb erg, S. Ist rail, T he chimeric mapping problem: Algorit hmic st rat egies and p erformance evaluat ion on synt het ic genomic dat a, Computer s and Chemi str y 18, 207{220, 1994. D. Greenb erg, S. Ist rail, P hysical Mapping by ST S Hybridizat ion: Algorit hmic St rat egies and t he challenge of Software Evaluat ion, J. Comp. B i ology 2, 219-273, 1995. M. Garey, D. J ohnson, Computer s and I ntractabi li ty: A Gui de to N PCompleteness, Freeman, 1979. M. Garey, D. J ohnson, R. Tarjan, T he planar Hamilt onian circuit problem is NP -complet e, SI A M J. Computi ng 5, 704{714, 1976. T o K now Our selves. Human Genome P rogram, U.S. Depart ment of Energy, 1996. W . Hsu. A simple t est for t he consecut ive ones prop erty, Proc. 3rd I nt. Symposi um on A lgor i thms and Computati on ISAAC’92, LNCS 650, 459{468, 1992. W . Hsu, On physical mapping algorit hms: an error t olerant t est for t he consecut ive ones prop erty, Proc. 3rd I nt. Conf. Computi ng and Combi nator i cs, COCOON’97, LNCS 1267, 242{250, 1997. H. Kaplan, R. Shamir, R. Tarjan. Tract ability of paramet erized complet ion problems on chordal and int erval graphs: Minimum ll-in and physical mapping, Proc. 35th Symp. on Foundati ons of Computer Sci ence FOCS’94, 780{793, 1994. N. Kort e, R. M¨ohring. An increment al linear-t ime algorit hm for recognizing int erval graphs, SI A M J. Computi ng 18, 68{81, 1989. S. Weis, Das Ent scheidungsproblem P hysikalische Kart ierung mit st arkchimerischen Fehlern, Technical Rep ort A-99-05, Med. Uni. L¨u b eck, Inst it ut f¨u r T heoret ische Informat ik, 1999. S. Weis, Zur algorit hmischen Komplexit ¨a t des Opt imierungsproblems P hysikalische Kart ierung mit st arkchimerischen F ehlern, Technical Rep ort A-99-06, Med. Uni. L¨u b eck, Inst it ut f¨u r T heoret ische Informat ik, 1999.

Lo g ic a l A n a ly sis o f D a t a w it h D e c o m p o sa b le S t ru c t u re s Hirot aka Ono1 , Kazuhisa Makino2 , and Toshihide Ibaraki1 1

Depart ment of Applied Mat hemat ics and P hysics, Graduat e School of Informat ics, Kyot o University, Kyot o 606-8501, J apan. ( f ht ono, i bar aki g@amp. i . kyot o- u. ac. j p) 2 Depart ment of Syst ems and Human Science, Graduat e School of Engineering Science, Osaka University, Toyonaka, Osaka, 560-8531, J apan. ( maki no@sys. es. osaka- u. ac. j p)

In such areas as knowledge discovery, dat a mining and logical analysis of dat a, met hodologies t o nd relat ions among at t ribut es are considered imp ort ant . In t his pap er, given a dat a set ( T ; F ) of a phenomenon, where T f 0; 1gn denot es a set of p osit ive examples and F f 0; 1gn denot es a set of negat ive examples, we prop ose a met hod t o ident ify decomp osable st ruct ures among t he at t ribut es of t he dat a. Such informat ion will reveal hierarchical st ruct ure of t he phenomenon under considerat ion. We rst st udy comput at ional complexity of t he problem of nding decomp osable Boolean ext ensions. Since t he problem t urns out t o b e int ract able (i.e., NP -complet e), we prop ose a heurist ic algorit hm in t he second half of t he pap er. Our met hod searches a decomp osable part it ion of t he set of all at t ribut es, by using t he error sizes of almost - t decomp osable ext ensions as a guiding measure, and t hen nds st ruct ural relat ions among t he at t ribut es in t he obt ained part it ion. T he result s of numerical exp eriment on synt het ically generat ed dat a set s are also rep ort ed. A b st r a c t .

1

Int ro d u c t io n

Ext ract ing knowledge from given dat a set s has been int ensively st udied in such elds as knowledge discovery, knowledge engineering, dat a mining, logical analysis of dat a, art i cial int elligence and dat abase t heory (e.g., [4,3,5]). We assume in t his paper t hat t he dat a set is given by a pair of a set T of t rue vect ors (posit ive examples) and a set F of false vect ors (negat ive examples), where T ; F f 0; 1gn and T \ F = ; are assumed. We denot e by S = f 1; 2; : : : ; n g t he set of at t ribut es. We are int erest ed in nding a decomposable st ruct ure; i.e., given a family S = f S 0 ; S 1 ; : : : ; S k g of subset s of S , we want t o est ablish t he exist ence of Boolean ; h k , if any, so t hat f ( S ) = g ( S 0 ; h 1 ( S 1 ) ; : : : ; h k ( S k )) is t rue funct ions g; h 1 ; h 2 ; (resp., false) in every given t rue (resp., false) vect or in T (resp., F ). In t he above scheme, t he set s S i may represent int ermediat e groups of at t ribut es, and we ask whet her t hese groups de ne new \ met a-at t ribut es", which can complet ely specify t he posit ive or negat ive charact er of t he examples. T his D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 3 9 6 { 4 0 6 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

Logical Analysis of Dat a wit h Decomp osable St ruct ures

397

problem of st ruct ure ident i cat ion is in fact one form of knowledge discovery. As an example, assume t hat f ( x ) describes whet her t he species are primat es or not ; e.g., f ( x ) = 1 for x = (1100 ), denot es t hat t he chimpanzee (= x ), which has charact erist ics of viviparous ( x 1 = 1), vert ebrat e ( x 2 = 1), do not fly ( x 3 = 0), do not have claw ( x 4 = 0), and so on, is a primat e. In t he case of t he hawk, on t he ot her hand, we shall have f (0111 ) = 0. In t his example, we can group propert ies \ viviparity" and \ vert ebrat e" as t he property of t he mammals, and t he chimpanzee is a mammal. T hat is, f ( x ) can be represent ed as g ( S 0 ; h ( S 1 )), where S 1 = f x 1 ; x 2 g, S 0 = S n S 1 , and h describes whet her species are t he mammal or not . T his \ mammal" is a met a-at t ribut e, and we can recognize primat es by regarding S 1 = f x 1 ; x 2 g as one at t ribut e h ( S 1 ). In t his sense, nding a family of at t ribut e set s S = f S 0 ; S 1 ; : : : ; S k g, which sat isfy t he above decomposit ion property, can be underst ood as comput ing essent ial relat ions among t he original at t ribut es [2,7]. In t his paper, we concent rat e on nding a basic decomposit ion st ruct ure for a part it ion int o two set s ( S 0 ; S 1 (= S n S 0 )). We rst show t hat det ermining t he exist ence of such a part it ion ( S 0 ; S 1 ) is int ract able (i.e., NP -complet e). Since nding decomposable st ruct ures is a very import ant problem, we t hen propose a heurist ic algorit hm. Our met hod searches a decomposable part it ion ( S 0 ; S 1 ) of t he at t ribut e set S , by using t he error sizes of almost - t decomposable ext ensions as a guiding measure. In order t o comput e t he error size of an almost - t decomposable ext ension, in t he above algorit hm, we also propose a fast heurist ic algorit hm. We t hen apply our met hod t o synt het ically generat ed dat a set s. Experiment al result s show t hat our met hod has good performance t o ident ify such decomposable st ruct ures.

2 2.1

P re lim in a rie s E x t e n sion s an d B e st -F it E x t e n sion s

A B oo lea n f u n c t i o n , or a f u n c t i o n in short , is a mapping f : f 0; 1gn ! f 0; 1g, where x 2 f 0; 1gn is called a B oo lea n v ec t o r (a v ec t o r in short ). If f ( x ) = 1 (resp., 0), t hen x is called a t r u e (resp., f a ls e ) vect or of f . T he set of all t rue vect ors (false vect ors) is denot ed by T ( f ) ( F ( f )). Let , for a vect or v 2 f 0; 1gn , O N ( v ) = f j j v j = 1; j = 1; 2; : : : ; n g and O F F ( v ) = f j j v j = 0; j = 1; 2; : : : ; n g. For two set s A and B , we writ e A B if A is a subset of B , and A B if A is a proper subset of B . For two funct ions f and g on t he same set of at t ribut es, we writ e f g if f ( x ) = 1 implies g ( x ) = 1 for all x 2 f 0; 1gn , and we writ e f < g if f g and f 6 = g. y i for all i 2 f 1; 2; : : : ; n g) A funct ion f is po s i t i v e if x y (i.e., x i always implies f ( x ) f ( y ). T he at t ribut es x 1 ; x 2 ; : : : ; x n and t heir complement s x 1 ; x 2 ; : : : ; x n are called li t e ra ls . A t e r m is a conjunct ion of lit erals such t hat at most one of x i and x i appears in it for each i . A d i s j u n c t i v e n o r m a l f o r m ( D N F ) is a disjunct ion of t erms. Clearly, a DNF de nes a funct ion, and it is well-known

398

Hirot aka Ono, Kazuhisa Makino, and Toshihide Ibaraki

t hat every funct ion can be represent ed by a DNF (however, such a represent at ion may not be unique). A pa r t i a l ly d e n ed B oo lea n f u n c t i o n ( pd B f ) is de ned by a pair of set s ( T ; F ) of Boolean vect ors of n at t ribut es, where T denot es a set of t rue vect ors (or posit ive examples) and F denot es a set of false vect ors (or negat ive examples). A funct ion f is called an e x t e n s i o n of t he pdBf ( T ; F ) if T ( f ) T and F ( f ) F . Evident ly, t he disjoint ness of t he set s T and F is a necessary and su cient condit ion for t he exist ence of an ext ension, if it is considered in t he class of all Boolean funct ions. It may not be evident , however, t o nd out whet her a given pdBf has a ext ension in C, where C is a subclass of Boolean funct ions, such as t he class of posit ive funct ions. T herefore, we de ne t he following problem [3]: P r o b l e m E x t e n s io n ( C)

Input : A pdBf ( T ; F ), where T ; F f 0; 1gn . Quest ion: Is t here an ext ension f 2 C of ( T ; F ) ? Let us not e t hat t his problem is also called co n s i s t e n c y p ro ble m in comput at ional learning t heory [1]. For a set A , j A j denot es t he cardinarity of A , and we de ne t he e r ro r s i z e of a funct ion f wit h respect t o ( T ; F ) by e( f ; ( T ; F )) = jf a 2 T j f ( a ) = 0gj + jf b 2 F j f ( b) = 1gj. As EXT ENSION(C) may not always have answer \ yes", we int roduce t he following problem [3]: P r o b l e m B e s t -F it ( C) Input : A pdBf ( T ; F ), where T ; F f 0; 1gn . Out put : f 2 C t hat realizes min f 2 C e( f ; ( T ; F )).

Clearly, problem EXT ENSION is a special case of problem BEST -FIT , since EXT ENSION has a solut ion f if and only if BEST -FIT has a solut ion f wit h e( f ; ( T ; F )) = 0. For a pdBf ( T ; F ), an ext ension f is called a lm o s t - t if it has a s m a l l error size e( f ; ( T ; F )), while a best - t ext ension f gives t he smallest error size e( f ; ( T ; F )). T hus t he de nit ion of almost - t ext ension is not exact in t he mat hemat ical sense, since \ small" is only vaguely de ned. In t he cases where best - t ext ensions are di cult t o comput e, we use almost - t ext ensions inst ead. 2.2

D e com p osab le Fu n ct ion s

S , let a [S ] denot e t he p ro j ec t i o n of For a vect or a 2 f 0; 1gn and a subset S a on S , and let f 0; 1gS denot e t he vect or space de ned by an at t ribut e set S . For example, if a = (1011100), b = (0010011) and S = f 2; 3; 5g, t hen a [S ] = (011), b[S ] = (010), and a [S ]; b[S ] 2 f 0; 1gS . Furt hermore, for a subset of vect ors U f 0; 1gn , we use not at ion U [S ] = f a [S ] j a 2 U g. For a Boolean S , we writ e h ( S ) t o denot e h ( v [S ]) for funct ion h t hat depends only on S

Logical Analysis of Dat a wit h Decomp osable St ruct ures

399

v 2 f 0; 1gn . Given subset s S 0 ; S 1

S , a funct ion f is called F 0 ( S 0 ; F 1 ( S 1 )) [2,11] if t here exist Boolean funct ions h 1 , and g sat isfying t he following condit ions, where F i st ands for t he class of all Boolean funct ions:

d eco m po s a ble

(i) f ( v ) = g ( v [S 0 ]; h 1 ( v [S 1 ])), for all v 2 f 0; 1gn , (ii) h 1 : f 0; 1gS 1 ! f 0; 1g, 0 (iii) g : f 0; 1gS ! f 0; 1g, where S 0 = S 0 [ f h 1 g. We denot e by CF 0 ( S 0 ; F 1 ( S 1 ) ) t he class of F 0 ( S 0 ; F 1 ( S 1 )-decomposable funct ions. In some cases, we furt her assume t hat a pair ( S 0 ; S 1 ) is a pa r t i t i o n , i.e., S 0 \ S 1 = ; and S = S 0 [ S 1 . It is known t hat , given a pair of subset s ( S 0 ; S 1 ), problem EXT ENSION(C F 0 ( S 0 ; F 1 ( S 1 ) ) ) can be solved in polynomial t ime if one exist s [2] (see P roposit ion 1), while problem BEST -FIT (CF 0 ( S 0 ; F 1 ( S 1 ) ) ) is NP -hard [3]. Given a pdBf ( T ; F ) and a pair of set s of at t ribut es S 0 and S 1 , we de ne it s co n fl i c t gra p h G ( T ; F ) = ( V; E ) by V = f v [S 1 ] j v 2 T [ F g, E = f ( a [S 1 ]; b[S 1 ]) j a 2 T ; b 2 F ; a [S 0 ] = b[S 0 ]g. For example, ( T ; F ) in Fig. 1, and Consider t he pdBf given in t he t rut h t able of Fig.1, S 0 = f x 1 ; x 2 ; x 3 g and S 1 = f x 4 ; x 5 ; x 6 g have t he conflict graph G of Fig. 1. T his is not F 0 ( S 0 ; F 1 ( S 1 ))-decomposable by t he next proposit ion [2]. 101 S0

T

F

1 0 1 0 1

1 1 1 1 1

S1

0 1 0 1 0

1 1 0 0 1

0 0 1 1 1

1 1 0 0 0

110

010

F ig. 1. A pdBf ( T ; F ) and it s conflict graph. P rop osit ion 1. A pdBf ( T ; F ) has an ext ension f = g ( S 0 ; h 1 ( S 1 )) for a given pair of subset s ( S 0 ; S 1 ) (not necessarily a part it ion) if and only if it s conflict graph G ( T ; F ) is bipart it e (t his condit ion can be t est ed in polynomial t ime). tu

3 3.1

C o m p u t a t io n a l C o m p le x it y o f D e c o m p o sa b ilit y N P -H ard n e ss of F in d in g a ( P osit ive ) D e com p osab le S t ru ct u re

By P roposit ion 1, it can be decided in polynomial t ime whet her a pdBf ( T ; F ) has an F 0 ( S 0 ; F 1 ( S 1 ))-decomposable ext ension for a given ( S 0 ; S 1 ). However, we somet imes want t o know t he exist ence of subset s S 0 and S 1 such t hat a pdBf ( T ; F ) is F 0 ( S 0 ; F 1 ( S 1 ))-decomposable, where ( S 0 ; S 1 ) is rest rict ed t o be a part it ion.

400

Hirot aka Ono, Kazuhisa Makino, and Toshihide Ibaraki

P r o b l e m F 0 ( S 0 ; F 1 ( S 1 )) -D e c o mp o s a b il it y

Input : A pdBf ( T ; F ), where T ; F f 0; 1gn . Quest ion: Is t here a part it ion ( S 0 ; S 1 ) of S wit h j S 0 j 3 and j S 1 j such t hat pdBf ( T ; F ) is F 0 ( S 0 ; F 1 ( S 1 ))-decomposable?

2,

T h e ore m 1. P roblem F 0 ( S 0 ; F 1 ( S 1 ))-DECOMP OSABILIT Y is NP -complet e. tu

Moreover, even if F 0 and F 1 are posit ive funct ions, t his problem remains NP complet e. Since t hese t heorems can be proved similarly, we only out line t he proof of T heorem 1. O u t lin e of t h e p ro of of T h e ore m 1. We reduce t he following NP -complet e problem [8] t o F 0 ( S 0 ; F 1 ( S 1 ))-DECOMP OSABILIT Y. P r o b l e m O n e -I n -T h r e e 3 S AT

Set U of at t ribut es, collect ion C of clauses over U such t hat each clause C 2 C consist s of 3 posit ive lit erals. Quest ion: Is t here a t rut h assignment for U such t hat each clause in C has exact ly one lit eral assigned t o 1?

Input :

Given an inst ance of ONE-IN-T HREE 3SAT , let E p denot e t he set of at t ribut es corresponding t o a clause C p 2 C (e.g., if C p = x 1 _ x 2 _ x 3 , t hen E p = f x 1 ; x 2 ; x 3 g), and let E denot e t he family of all E p . T he inst ance has answer \ yes" if t here exist s a part it ion ( U 0 ; U 1 ) of U such t hat j U 0 \ E p j = 2 and j U 1 \ E p j = 1 hold for all E p 2 E. We assume wit hout t he loss of generality t hat j U 0 j 3 and j U 1 j 2. Corresponding t o t he above inst ance of ONE-IN-T HREE 3SAT , we now const ruct t he inst ance (i.e., pdBf ( T ; F )) of F 0 ( S 0 ; F 1 ( S 1 ))-DECOMP OSABILIT Y as follows: S = U; T = T 1 [ T 3 ; F = F 2 [ F 4 [ F 5 ; where T1 T3 F2 F4 F5

= = = = =

fv fv fv fv fv

2 2 2 2 2

f 0; 1gS f 0; 1gS f 0; 1gS f 0; 1gS f 0; 1gS

j j O N ( v )j = 1g; j O N ( v ) = E p and E p 2 Eg; j j O N ( v )j = 2 and O N ( v ) E p ; for some E p 2 Eg; j j O N ( v )j = 4 and O N ( v ) E p for some E p 2 Eg; j j O N ( v )j = 5 and O N ( v ) E p for some E p 2 Eg;

For example, if t here is a clause C = x 1 _ x 2 _ x 3 , we const ruct t he t rue vect ors f (100000 ) ; (010000 ) ; (001000 ) ; (111000 )g and t he false vect ors f (110000 ) ; (101000 ) ; (011000 ) ; (111100 ) ; (111010 ) ; (111001 ) ; : : : ; (111110 ) ; (111101 ) ; (111011 ) ; : : : g. T hen, using P roposit ion 1, we can show t hat t here is a part it ion ( S 0 ; S 1 ) wit h 3 and j S 1 j 2 such t hat pdBf ( T ; F ) is F 0 ( S 0 ; F 1 ( S 1 ))-decomposable if jS0 j and only if a given collect ion of clauses C has a part it ion ( U 0 ; U 1 ) wit h j U 0 j 3 and j U 1 j 2 such t hat j U 0 \ E p j = 2 and j U 1 \ E p j = 1 hold for all E p 2 E. We however omit t he det ails for t he sake of space. tu

Logical Analysis of Dat a wit h Decomp osable St ruct ures

4

401

H e u ris t ic A lg o rit h m t o F in d a D e c o m p o s a b le S t ru c t u re

By T heorem 1, it is in general di cult t o nd a decomposable st ruct ure of a given pdBf ( T ; F ). As t he problem of nding a decomposable st ruct ure is very import ant in applicat ions, however, we propose a heurist ic algorit hm DECOMP, which nds a part it ion ( S 0 ; S 1 ) for which t he given pdBf ( T ; F ) has an F 0 ( S 0 ; F 1 ( S 1 ))decomposable ext ension f wit h a small error size e( f ; ( T ; F )). Allowing errors is essent ial in pract ice because t he real-world dat a oft en cont ain errors, such as measurement and classi cat ion errors. Due t o t hese errors, t he given pdBf ( T ; F ) may not be F 0 ( S 1 ; F 1 ( S 1 ))-decomposable for any part it ion ( S 0 ; S 1 ), alt hough t he underlying phenomenon has a decomposable st ruct ure. By allowing errors of small size, it is expect ed t hat t his kind of misjudgement is prevent ed. Our algorit hm uses t he error size of each part it ion ( S 0 ; S 1 ) as a measure t o evaluat e t he dist ance from ( S 0 ; S 1 ) t o ( S 0 ; S 1 ), where pdBf ( T ; F ) is assumed t o be F 0 ( S 0 ; F 1 ( S 1 ))-decomposable. For t his purpose, we consider how t o evaluat e t he error size e cient ly in t he next subsect ion. 4.1

F in d in g A lm ost -F it D e com p osab le E x t e n sion s

Since t he problem of comput ing a best - t decomposable ext ension for a given ( S 0 ; S 1 ) is NP -hard [3], we propose two heurist ic algorit hms in t his subsect ion. T he rst one is t heoret ically int erest ing as it has a guarant eed approximat ion rat io, while t he lat t er is more pract ical. In our experiment in Sect ion 5, t he lat t er algorit hm is employed. Given a pdBf ( T ; F ) and a part it ion ( S 0 ; S 1 ), we const ruct an almost - t F 0 ( S 0 ; F 1 ( S 1 ))-decomposable ext ension f wit h error size e( f ; ( T ; F )). To make t he error size small, we int roduce an e x t e n d ed co n fl i c t gra p h G 0 such t hat t he error vect ors in t he ext ension f correspond one-t o-one t o t he vert ices in G 0, whose delet ion makes t he result ing G 0 bipart it e. Given a pdBf ( T ; F ) and a pair of set s of at t ribut es ( S 0 ; S 1 ) (not necessarily a part it ion), we de ne it s ext ended conflict graph G 0( T ; F ) = ( V; E ), where V = V1 [ V2 is given by V1 = f a j a 2 T g [ f b j b 2 F g, V2 = f a [S 1 ] j a 2 T [ F g and E = E 1 [ E 2 is given by E 1 = f ( a; a [S 1 ]) j a 2 T [ F g, E 2 = f ( a; b) j a 2 T ; b 2 F ; a [S 0 ] = b[S 0 ]g: T he vert ices in G 0 have posit ive weight s ! de ned by ! ( a ) = 1 if z = a 2 V1 ; + 1 ot herwise. Now let M V1 be a set of vert ices whose removal makes G 0( T ; F ) bipart it e. It can be proved t hat delet ing t he corresponding set s T 0 T and F 0 F from ( T ; F ) gives t he pdBf ( T n T 0; F n F 0) which has an F ( S 0 ; F 1 ( S 1 ))-decomposable ext ension. T he converse direct ion also holds. T herefore, we have t he next lemma. Le m m a 1. Let a pdBf ( T ; F ) and a pair of at t ribut e set s ( S 0 ; S 1 ) be given, and V be a minimum weight ed set of vert ices whose removal makes G 0( T ; F ) let V tu bipart it e. T hen we have min f 2 C ( 0 1 ( 1 ) ) e( f ; ( T ; F )) = j V j : F

S

; F

S

T he problem of minimizing t he number of vert ices in a given graph G = ( V; E ), whose delet ion make G bipart it e is called VERT EX-DELET ION-BIPART IZA-

402

Hirot aka Ono, Kazuhisa Makino, and Toshihide Ibaraki

T ION, or VDB for short . VDB is known t o be MAX SNP -hard, but has an approximat ion algorit hm wit h approximat ion rat io O (log j V j) [9,10,6]. T h e ore m 2. Given a pdBf ( T ; F ) and a pair of at t ribut e set s ( S 0 ; S 1 ), t here is an approximat e algorit hm for BEST -FIT (CF ( S 0 ; F 1 ( S 1 ) ) ), which at t ains t he approximat ion rat io of e( f ; ( T ; F )) e( f ; ( T ; F ))

where f

= O (log(j T j + j F j)) ;

(1)

is a best - t F ( S 0 ; F 1 ( S 1 ))-decomposable ext ension of ( T ; F ).

However, t he approximat ion algorit hm in [10] for VDB may require t oo much comput at ional t ime for pract ical purposes. Since our heurist ic algorit hm in Sect ion 4.2 uses t he error size as a guiding measure, it has t o be comput ed many t imes. T herefore, we propose a fast er algorit hm ALMOST -FIT even t hough it s approximat ion rat io is not guarant eed t heoret ically. ALMOST -FIT rst const ruct s t he conflict graph G = G ( T ; F ) . Next , it t raverses G in t he dept h- rst manner, and, whenever a cycle of odd lengt h is found, delet es a vect or in pdBf ( T ; F ) so t hat t he most recent ly visit ed edge in t he cycle is eliminat ed. T hen, aft er reconst ruct ing t he result ing conflict graph G , it resumes t he dept h- rst search in t he new G . In order t o eliminat e an edge in t he det ect ed cycle of odd lengt h, we only have t o delet e one of t he two vect ors in T [ F t hat correspond t o t he two end vert ices of t he edge. We now explain which vect or t o delet e. By t he property of dept h- rst search (in short , DFS), we nd a cycle only when we t raverse a so-called back edge [13]. Denot e t he back edge by ( v 1 ; v 2 ) , where DFS t raverses t his edge from v 1 t o v 2 , and let a 1 ; a 2 2 T [ F sat isfy v 1 = a [S 1 ] and v 2 = a [S 1 ], where one of t he a 1 and a 2 belongs t o T and t he ot her belongs t o F . In t his case, we say t hat a 1 (resp., a 2 ) corresponds t o v 1 (resp., v 2 ), and delet e a 1 . T his delet ion does not change t he set of ancest or vert ices of v 1 on t he current DFS t ree and hence DFS can be resumed from v 1 . (If we delet e a 2 , on t he ot her hand, t he st ruct ure of DFS t ree changes subst ant ially). A l g o r it h m A l mo s t -F it

Input :

A pdBf ( T ; F ) and a pair of at t ribut e set s ( S 0 ; S 1 ), where T ; F f 0; 1gS and S 0 ; S 1 S . Out put : T he error size e( f ; ( T ; F )), where f is an almost - t F 0 ( S 0 ; F 1 ( S 1 )) -decomposable ext ension for ( T ; F ).

Const ruct t he conflict graph G ∗ = G ∗( T ; F ) for p dBf ( T ; F ) and ( S 0 ; S 1 ). Set e := 0 ∗ S t e p 2 . Apply t he DF S t o t he conflict graph G . If a cycle of odd lengt h is found, t hen delet e one vect or from ( T ; F ) in t he ab ove manner, reconst ruct t he conflict graph G ∗ , set e := e + 1 and ret urn t o St ep 2. If t here is no odd cycle, out put e as e ( f ; ( T ; F )) and halt . ( f is an ext ension of t he result ing p dBf ( T ; F ).) tu

St ep 1.

Logical Analysis of Dat a wit h Decomp osable St ruct ures

4.2

403

F in d in g D e com p osab le S t ru ct u re s

In t his sect ion, we propose a local search algorit hm t o nd decomposable part it ions ( S 0 ; S 1 ), by making use of t he error size obt ained by t he heurist ic algorit hm ALMOST -FIT of sect ion 4.1. A local search algorit hm is de ned by specifying t he neighbourhood of t he current solut ion ( S 0 ; S 1 ). In our algorit hm, N ( S 0 ; S 1 ) = f ( S 0 [ f j g n f i g; S 1 [ f i g n f j g) j i 2 S 0 ; j 2 S 1 g. However, as all part it ions ( S 00; S 10) 2 N ( S 0 ; S 1 ) sat isfy j S 00j = j S 0 j and j S 10j = j S 1 j, we apply local search t o init ial solut ions ( S 0 ; S 1 ) wit h j S 0 j = k , separat ely, for k = 2; 3; : : : ; j S j − 1. A l g o r it h m D e c o mp

Input : A pdBf ( T ; F ), where T ; F f 0; 1gS and S is t he at t ribut e set . Out put : P art it ions ( S 0 ; S 1 ) wit h j S 1 j = k ; for k = 2; 3; : : : ; j S j − 1, having almost - t F 0 ( S 0 ; F 1 ( S 1 ))-decomposable ext ensions of small error sizes.

S t e p 0: k := 2. S t e p 1: Choose a part it ion ( S 0 ; S 1 ) wit h j S 1 j = k randomly, and comput e t he error size e^( S 0 ; S 1 )) of an almost - t F 0 ( S 0 ; F 1 ( S 1 ))-decomposable ext ension f by algorit hm ALMOST -FIT . Set := e ^( S 0 ; S 1 ). S t e p 2: For each ( S 00; S 10) 2 N ( S 0 ; S 1 ), apply ALMOST -FIT . If t here is a part it ion ( S 00; S 10) wit h a smaller error size t han , t hen set S 0 := S 00, S 1 := S 10, := e^( S 00; S 10), and ret urn t o St ep 2. Ot herwise, out put part it ion ( S 0 ; S 1 ) and it s error size for t he current k . S t e p 3: If k := j S j − 1, t hen halt . Ot herwise, let k := k + 1 and ret urn t o St ep 1. tu

5

N u m e ric a l E x p e rim e nt s

We apply algorit hm DECOMP described in Sect ion 4 t o synt het ically generat ed pdBfs ( T ; F ), in order t o evaluat e t heir power of nding decomposable st ruct ures. 5.1

G e n e rat ion of ( T

; F

)

For our experiment , we generat e random dat a set s ( T ; F ), T ; F f 0; 1gn , which are F 0 ( S 0 ; F 1 ( S 1 ))-decomposable. To ensure a decomposable st ruct ure, we rst specify a part it ion ( S~0 ; S~1 ) and t hen const ruct a funct ion f~ : f 0; 1gn ! f 0; 1g ~ ~ ~ such t hat f~ = g~( S~0 ; h~( S~1 )), h~ : f 0; 1gS 1 ! f 0; 1g, g~ : f 0; 1gS 0 [ f h g f 0; 1g ! f 0; 1g. T hen for a given rat e r , where 0 r 1, we randomly draw a set Q r of r 2n vect ors from f 0; 1gn as samples, and classify all u 2 Q r int o T (resp., F ) according t o whet her f~( u ) = 1 (resp., f~( u ) = 0) holds. Obviously T \ F = ; hold. In our experiment , we use n = 18, and t est r = 0: 01; 0: 02; : : : ; 0: 09; 0: 1; 0: 2; : : : ; 0: 5. T he original part it ions ( S~0 ; S~1 ) sat isfy j S~0 j = j S~1 j = 9. For t he hidden funct ion f~, we used t he following t hree types.

404

Hirot aka Ono, Kazuhisa Makino, and Toshihide Ibaraki

(i) Randomly assigned funct ions: f~ is const ruct ed by assigning t he value f~( a ) = 0 or 1 randomly wit h equal probability for each a 2 f 0; 1gn . Any Boolean funct ion can be generat ed in t his way. However, most of t he randomly assigned funct ions may not appear as funct ions in real-world. (ii) DNF funct ions: DNF of f~ is de ned by a set of t erms, as follows: A t erm is randomly generat ed by specifying each variable t o be a posit ive lit eral, a negat ive lit eral or not used wit h equal probability, and t aking t he conjunct ion of t he generat ed lit erals. We generat e j S~0 j + 1 t erms for g~ and j S~1 j t erms as h~. Any Boolean funct ion can be represent ed by a DNF, and t hose funct ions represent ing real-world phenomena are considered t o have short DNFs. ~ (iii) T hreshold funct ions: A t hreshold funct ion P f is de ned by weight s w i , i = ; 0 ot herwise [12]. We 1; 2; : : : ; n and a t hreshold , as f ( x ) = 1 if i w i x i generat e a t hreshold funct ion by choosing all weight s w i from (0; 1] randomly P w i =n . and by set t ing = i 5.2

C om p u t at ion al R e su lt s

We generat e 5 pdBfs for each type, and execut e DECOMP 10 t imes for each pdBf (i.e., 50 t imes in t ot al). Let t he success rat e denot e t he rat io wit h which DECOMP could nd decomposable part it ions and t he cpu t ime denot e t he average of t ot al cpu t ime of 10 t ime execut ions of DECOMP for one funct ion. We show t he result s of success rat e and cpu t ime for t he randomly assigned funct ions in Fig. 2. T he success rat es for DNF funct ions and t hreshold funct ions are given in Fig. 3. We omit t he result s of cpu t ime for ot her two types, since t hey have similar t endency wit h random assigned funct ions. 6000

cpu time (sec)

1

success rate

0.8

0.6

0.4

original delusive

0.2

5000 4000 3000 2000 1000 0

0 0

1

2

3

4

0

5

1

2

3

4

5

sampling rate r (%)

sampling rate (%)

F ig. 2. (i) Success rat e (left ) and (ii) average cpu t ime (right ) for randomly assigned funct ions 1

1

original delusive

0.8

success rate

success rate

0.8

0.6

0.4

0.6

0.4

original delusive

0.2

0.2

0

0 0

1

2

3

sampling rate r(%)

4

5

0

1

2

3

4

5

Sampling rate r(%)

F ig. 3. (i) Success rat e for DNF funct ions (left ) and (ii) for t hreshold funct ions (right )

Logical Analysis of Dat a wit h Decomp osable St ruct ures

405

Fig. 2 (i) and Fig. 3 show t he success rat e of nding t he original part it ion ( S~0 ; S~1 ) (solid curves) as well as t hat of nding delusive part it ions (broken curves), when sampling rat e r (%) is changed from 0: 01 t o 0: 5. T he result s for randomly assigned funct ions (Fig. 2) say t hat DECOMP can 0: 5%. almost always nd t he original ( S~0 ; S~1 ) if sampling rat e sat is es r For DNF funct ions and t hreshold funct ions (Fig. 3), similar t endency is also observed. If sampling rat e r is lower t han 0: 5%, each pdBf ( T ; F ) has only a small = (S0 ; S1 ) number of edges in it s conflict graph, and many part it ions ( S 0 ; S 1 ) 6 also t urn out t o be decomposable. T hese part it ions are called d e lu s i v e , and also depict ed in Fig. 2 (i) and Fig. 3. T hese indicat e t hat a sampling rat e larger t han a cert ain t hreshold value is necessary t o ensure t he discovery of t he original decomposable st ruct ure ( S~0 ; S~1 ).

6

C o n c lu sio n

In t his paper, we used t he concept of decomposability t o ext ract t he st ruct ural informat ion from t he given dat a ( T ; F ). Such informat ion can explain t he hierarchical relat ions t hat exist among t he at t ribut es. We rst clari ed t he comput at ional complexity of t he problem of nding a decomposable st ruct ure. Since it is NP -complet e, we proposed a heurist ic algorit hm, which is based on local search met hod. As a guiding measure in t his local search, we used t he error sizes of almost - t F 0 ( S 0 ; F 1 ( S 1 ))-decomposable ext ensions, for which a fast heurist ic algorit hm is developed. We t hen performed numerical experiment s on t hree types of synt het ically generat ed dat a set s. J udging from t he experiment al result s, our approach appears t o be able t o det ect decomposit ion st ruct ures reasonably e ect ively. However, it s performance crit ically depends on t he number of dat a vect ors in t he dat a set s; it appears essent ial t o have enough number of dat a vect ors for our met hod t o be e ect ive. T he number of necessary dat a vect ors depends on t he types of dat a set s, and t he sizes of t he variable set s. More t heoret ical and experiment al st udies appear necessary in order t o know t he e ect of t hese paramet ers more accurat ely.

A ckn ow le d g e m e nt T his work was part ially support ed by t he Scient i c Grant -in-Aid by t he Minist ry of Educat ion, Science, Sport s and Cult ure of J apan.

R e fe re n c e s 1. M. Ant hony and N. Biggs, C om put at i on al L ear n i n g T heor y (Cambridge University P ress, 1992). 2. E.Boros, V.Gurvich, P.L.Hammer, T .Ibaraki and A.Kogan, Decomp osit ions of part ially de ned Boolean funct ions, D i scret e A ppli ed M at hem at i cs, 62 (1995) 51-75.

406

Hirot aka Ono, Kazuhisa Makino, and Toshihide Ibaraki

3. E. Boros, T . Ibaraki and K. Makino, Error-free and b est - t ext ensions of a part ially de ned Boolean funct ion, I n for m at i on an d C om put at i on , 140 (1998) 254-283. 4. E. Boros, P. L. Hammer, T . Ibaraki, A. Kogan, E. Mayoraz and I. Muchnik, An implement at ion of logical analysis of dat a, RUT COR Research Rep ort RRR 22-96, Rut gers University, 1996; t o app ear in IEEE Trans. on Dat a Engineering. 5. Y. Crama, P. L. Hammer and T . Ibaraki, Cause-e ect relat ionships and part ially de ned Boolean funct ions, A n n als of O perat i on s Research , 16 (1988) 299-325. 6. P. Crescenzi and V. Kann, A comp endium of NP opt imizat ion problems, ht t p:/ / www.nada.kt h.se/ viggo/ index-en.ht ml. 7. U. M. Fayyad, G. P iat et sky-Shapiro, P. Smyt h, and R. Ut hurusamy(eds.), A dvan ces i n K n ow ledge D i scover y an d D at a M i n i n g, 1996, AAAI P ress. 8. M. R. Garey and D. S. J ohnson, C om put er s and I n t ract abi li t y , Freeman, New York, 1979. 9. N. Garg, V. V. Vazirani and M. Yannakakis, Approximat e max-flow min-(mult i)cut t heorems and t heir applicat ions, SI A M J . on C om put i n g, 25 (1996) 235-251. 10. N. Garg, V. V. Vazirani and M. Yannakakis, Mult iway cut s in direct ed and node weight ed graphs, I C A L P ’ 94 , LNCS 820 (1994) 487-498. 11. K. Makino, K. Yano and T . Ibaraki, P osit ive and Horn decomp osability of part ially de ned Boolean funct ions, D i scret e A ppli ed M at hem at i cs, 74 (1997) 251-274. 12. S. Muroga, T hreshold L ogi c an d I t s A ppli cat i on s, W iley-Int erscience, 1971. 13. R.C Read and R.E. Tarjan, Bounds on backt rack algorit hms for list ing cycles, pat hs, and spanning t ress, N et wor ks, 5 (1975) 237-252.

L e a r n in g fr o m A p p r o x im a t e D a t a Shirley Cheung H.C. Depart ment of Mat hemat ics, City University of Hong Kong 83 Tat Chee Avenue, Kowloon Tong, HONG KONG s5111127@mat h. ci t yu. edu. hk

A b s t r a c t . We give an algorit hm t o PAC-learn t he coe cient s of a mult ivariat e p olynomial from t he signs of it s values, over a sample of real p oint s which are only known approximat ely. W hile t here are several pap ers dealing wit h PAC-learning p olynomials (e.g. [3,11]), t hey mainly only consider variables over nit e elds or real variables wit h no roundo error. In part icular, t o t he b est of our knowledge, t he only ot her work considering rounded-o real dat a is t hat of Dennis Cheung [6]. T here, mult ivariat e p olynomials are learned under t he assumpt ion t hat t he coe cient s are indep endent , event ually leading t o a linear programming problem. In t his pap er we consider t he ot her ext reme: namely, we consider t he case where t he coe cient s of t he p olynomial are (p olynomial) funct ions of a single paramet er.

1

I n t r o d u c t io n

In t he PAC model of learning one oft en nds concept s paramet erized by (exact ) real numbers. Examples of such concept s appear in t he rst pages of well-kn own t ext books such as [9]. T he algorit hmics for learning such concept s follows t he same pat t ern as t hat for learning concept s paramet erized by Boolean values. One randomly select s some element s x ( 1 ) ; : : : ; x ( m ) in t he inst ance space X . T hen, wit h t he help of an oracle, one decides which of t hem sat isfy t he t arget concept h c . Finally, one comput es an hypot hesis c which is consist ent wit h t he sample, h i.e., a concept c which is sat ised by exact ly t hose x ( i ) which sat isfy c . A main result from Blumer et al. [5] provides a bound for t he sample size h m which guarant ees t hat t he error of c is less t han " wit h probability at least 1 − , namely m



C0

1 "

log

1

+

VCD(C) "

log

; "

(1)

where C 0 is a universal const ant and VCD(C) is t he Vapnik-Chervonenkis dimension of t he concept class at hand. T his result is especially useful when t he concept s are not discret e ent it ies (i.e., not represent able using words over a nit e alphabet ), since in t his case one can bound t he size of t he sample wit hout using t he VC dimension. A part icularly import ant case of concept s paramet erized by real numbers is where t he membership t est of an inst ance x 2 X t o a concept c in t he concept D . -Z . D u e t a l. ( E d s. ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 4 0 7 { 4 1 5 , 2 0 0 0 .

c S p r in g e r -Ve r la g B e r lin H e id e lb e r g 2 0 0 0

408

Shirley Cheung H.C.

class C can be expressed by a quant ier-free rst -order formula. In t his case, concept s in Cn ; N are paramet erized by element s in IR n , t he inst ance space X is t he Euclidean space IR N , and t he membership of x 2 X t o c 2 C is given by t he t rut h of Ψ n ; N ( x ; c ) where Ψ n ; N is a quant ier-free rst -order formula (over t he t heory of t he reals) wit h n + N free variables. In t his case, a result of Goldberg and J errum [8] bounds t he VC-dimension of Cn ; N by VCD(Cn ; N ) 

2n log(8ed s ) :

(2)

Here d is a bound for t he degrees of t he polynomials appearing in Ψ n ; N and s is a bound for t he number of dist inct at omic predicat es in Ψ n ; N . One may say t hat at t his st age t he problem of PAC learning a concept c 2 Cn ; N is solved. Given " ; > 0 we simply comput e m sat isfying (1) wit h t he VCdimension replaced by t he bound in (2). We t hen randomly draw x ( 1 ) ; : : : ; x ( m ) 2 h X and nally comput e a hypot hesis c 2 Cn ; N consist ent wit h t he membership (i ) t o c , i = 1; : : : ; m (which we obt ain from some oracle). To obt ain c h we of x may use any of t he algorit hms proposed recent ly t o solve t he rst -order t heory of t he reals (cf. [10,2]). It is at t his st age, however, t hat our research begins: from a pract ical viewpoint , we can not read t he element s x ( i ) exact ly. Inst ead, we typically obt ain rat ional approximat ions x~( i ) . T he membership of x ( i ) t o c depends nevert heless on x ( i ) and not on x~( i ) . Our problem t hus becomes t hat of learning c from approximat e dat a. A key assumpt ion is t hat we know t he precision of t hese approximat ions and t hat we can act ually modify in our algorit hm t o obt ain bet t er approximat ions. In t his paper, we will not deal wit h general concept s in Cn ; N as dened above but wit h a subclass where t he membership t est is given by applying t he sign funct ion t o a single polynomial. We will design an algorit hm PAC-learning a concept in t his class from approximat e dat a. In st udying t he complexity of t his algorit hm we will nat urally deal wit h a classical t heme in numerical analysis | condit ioning | and we will nd yet anot her inst ance of t he dependence of running t ime on t he condit ion number of t he input (cf. [7]). 2

T h e P r o b le m

Consider a polynomial F 2 IR[c ; x ] where degree of F . T hen we can writ e X

x

= (x 1 ; : : :

). Let

d

be t he t ot al

d

F =

g i (x )c i

;xN

i

=0

where g i ( x ) is a polynomial of degree at most d − i in x 1 ; : : : ; x N . Replacing t he paramet er c for a given c 2 IR, F becomes a polynomial in x 1 ; : : : ; x N which we will denot e by F c . Let M 2 IR, M > 0. When c varies in [− M ; M ], F c describes a class of polynomials C(F ). For an inst ance x 2 X , we

Learning from Approximat e Dat a

409

say t hat x sat ises c when F c ( x )  0. T his makes C(F ) int o a concept class by associat ing t o each f 2 C(F ) t he concept set f x 2 X j f ( x )  0g. Our goal is t o PAC learn a t arget polynomial F c 2 C(F ) wit h paramet er 2 [− M ; M ]. T he inst ance space X is a subset of IR N and we assume a c probability dist ribut ion D over it . T he error of a hypot hesis F c h is given by = sign(F c h ( x ))) Error( c h ) = P rob (sign(F c ( x )) 6 where t he probability is t aken according t o D and t he sign funct ion is dened by  1 if z  0 sign( z ) = 0 ot herwise As usual, we will suppose t hat an oracle EXc : X ! f 0; 1g is available comput ing EXc ( x ) = sign(F c ( x )). We nally recall t hat a randomized algorit hm PAC when it ret urns a concept c h sat isfying learns F c wit h error " and con dence h Error( c )  " wit h probability at least 1 − . T he goal of t his paper is t o PAC-learn F c from approximat e dat a. In t he next sect ion we briefly explain how t o do so from exact dat a since some of t he ideas used in t he exact case will come handy in t he approximat e one.

3

L e a r n in g

Fc u n d e r I n n it e P r e c is io n

Should we be able t o deal wit h arbit rary real numbers, t he following algorit hm would PAC learn F c .

1. 2. 3. 4. 5.

A lg o rit h m 1 In p u t (F ; " ; ; M )

Comput e m using (1) and (2) wit h s = 1 Draw m random point s x ( i ) 2 IR N Use t he funct ion EXc t o obt ain sign(F c ( x ( i ) )) for i = 1; : : : ; m From st ep 4, we obt ain a number of polynomial inequalit ies in c f 1 ( c )  0; f 2 ( c ) < 0; f 3 ( c ) < 0; : : : ; f m ( c )  0 6. Find any real c h 2 [− M ; M ] sat isfying t he syst em in st ep 5 7. Out put : c h Here f i ( c ) = F ( c ; x ( i ) ) 2 IR[c ] and t he sign ( 0 or < 0) is given by EXc ( x ( i ) ). Denot e by ’ t he syst em of inequalit ies in st ep 5 above. Not e t hat , t o execut e st ep 6, we don’t need t he general algorit hms for solving t he rst -order t heory over t he reals ment ioned in t he preceding sect ion bu t only an algorit hm t o nd a point sat isfying a polynomial syst em of inequ alit ies in one variable (whose solut ion set is non-empty since c belongs t o it ). We next briefly sket ch how t his may be done. First , we need t o know how t o isolat e t he root s of a single polynomial f 2 IR[c ].

410

Shirley Cheung H.C.

D e n it io n 1 . S u ppose 1 < 2 < < r are all t he real root s of f in [− M ; M ]. T hen a n it e u n ion of in t ervals J = I 1 [ [ I ‘ is called an int e rval s e t fo r f i t he followin g con dit ion s hold: 1. E very I i is an in t erval eit her open or closed. 2. For every i 

r

t here exist s j 



su ch t hat

i

3. For every j 



t here exist s i 

r

su ch t hat

i

2 Ij. 2 Ij.

= i. 4. I i \ I j = ; for all j 6 I f in addit ion r = ‘ t hen we say t hat J is an is o lat in g s e t fo r f .

To nd an isolat ing set for f we use St urm sequences [1] t o count t he number of real root s in [− M ; M ] and t hen bisect ion t o isolat e each root of f in an int erval. (T here are of course more int ermediat e uses of St urm sequences t o ensure t hat each int erval indeed cont ains exact ly one root .) We can t hus easily obt ain an isolat ing set via classical means. Renement s of isolat ing set s are t hen dened in t he most nat ural way. 0 0 = I 10 [ [ I D e n it io n 2 . Let J = I 1 [ [ I r an d J r be isolat in g set s for 0 f , where r is t he n u m ber of real root s of f in [− M ; M ] an d every I i an d I i is 0 an in t erval eit her open or closed. T he set J is t hen said t o be a re n e m e nt of J i I i0  I i for all i .

By using bisect ion t o furt her rene several isolat ing set s at once, we can solve our original semi-algebraic syst em ’ . More precisely, we const ruct isolat ing set s J 1 ; : : : ; J m (one set for each f i ), which are su cient ly rened t o lead t o a solut ion of our original syst em ’ . D e n it io n 3 . Followin g t he n ot at ion above, we say t hat L i is a b as ic fe as ib le s e t fo r f i i f i ( c ) > 0 for all c 2 L i . W e t hen say t hat L is a b as ic fe as ib le s e t fo r ’ i L is a basic feasible set for f i for all i 2 f 1; : : : ; m g.

We can const ruct a basic feasible set L for ’ from a collect ion of basic feasible set s L 1 ; : : : ; L m for f 1 ; : : : ; f m simply by set t ing L := L 1 \ \ L m . If t he int ersect ion is empty, t hen we can t ry t o nd larger basic feasibl e set s so t hat t he int ersect ion L becomes nonempty. To nd a part icular L i we can rst nd an isolat ing set J i for f i , and t hen do t he following: Take L i t o be t he union of t hose int ervals I , lying in t he complement of J i , such t hat f i > 0. T hus, as we rene t he J i , t he int ervals making up t he L i become larger, and, if t he solut ion set of ’ has non-empty int erior, we event ually arrive at a nonempty L . Let us now consider t he case where we don’t act ually know ’ for cert ain.

Learning from Approximat e Dat a

4

L e a r n in g

411

Fc fr o m A p p r o x im a t e D a t a

In t he previous sect ion, we assumed t hat exact dat a inst ances were used by our algorit hm. Now, we assume t hat we can select t he value of a paramet er such t hat , for x 2 IR N , each coordinat e x i of x is read wit h relat ive precision . T hat is, inst ead of x i , we read x~i sat isfying j x i − x~i j 

jx i j:

Denot e by f~ t he polynomial obt ained from evaluat ing F at x~ inst ead of x . If we get f~i inst ead of f i Algorit hm 1 will nd a set L whose point s all sat isfy ’~. Our quest ion now is how t o ensure t hat ’ ( c ) is t rue as well, when c 2 L and ’~( c ) is t rue. T he rest of t his paper is devot ed t o solve t his quest ion. T hrough it , we will search for a solut ion c h which is not in t he boundary of t he solut ion set of ’ . T his makes sense since solut ions in t he boundary of t his set are unst able under arbit rarily small pert urbat ions. T hus, replacing f i by − f i if necessary, we will assume t hat our syst em ’ has t he form f 1 >

0; : : :

;f

m

>

0:

T his assumpt ion simplies not at ion in t he rest of t his paper. P i a i c x , f 2 ZZ[c ; x 1 ; : : : ; x N ]. Recall t hat we writ e F = Consider F = i P P i a i x . Here = ( 1 ; : : : ; N ) 2 INN denot es a g i ( x ) c , i.e., g i ( x ) = i + N  d − i. mult iindex and j j = 1 + 1 d Dene = (1 + ) − 1 and assume in t he sequel t hat  (3= 2) d − 1 (and t hus, t hat  1= 2). We now propose a new algorit hm for learning f c when inst ances are read only approximat ely. It s main loop can be writ t en as follows. A lg o rit h m 2

1. In p u t (F ; " ; ; M ) 2. C o m p u t e m using (1) and (2) wit h s = 1 3. P ick x ( 1 ) ; : : : ; x ( m ) 2 X randomly and use t he oracle EXc t o get sign(F ( c ; x ( i ) )) for all i 2 f 1; : : : ; m g 1 4. Set := (3= 2) d − 1 and 0 = 1= 8 5. Let := (1 + ) d − 1 For all i 2 f 1; : : : ; m g (i ) a. For j = 1; : : : ; N read x j wit h precision , i.e. (i ) (i ) (i ) jx j j such t hat j x~j − x j j  b. C o m p u t e f~i ( c ) 6. C all procedure SEARCH( f~1 ; : : : ; f~m ; ; M ), possibly halt ing here. 7. S e t := 2 and g o t o st ep 5 P rocedure SEARCH, which will be described in Subsect ion 4.2, at t empt s t o nd a solut ion of ’ knowing ’~ and . If SEARCH nds a solut ion of ’ t hen it halt s t he algorit hm and ret urns a solut ion.

412

Shirley Cheung H.C.

Let

x

2

X

and

2 IR[c ] given by

f

X

X

f

g i (x )c

=

i

i

=

ai x c : i

i

We dene kf k =

4 .1

P i

ja i

x

j. Not e t hat if S = max j x j j t hen kf k  kF k 1 Sd . j



N

N e w t o n ’s M e t h o d

Recall t hat N e w t o n ’s m e t h o d fo r t he following recurrence: ci + 1

=

N

f

f

( c i ) ; where

, st art ing at t he point

N

We call c i t he i t h N e w t o n it e rat e o f N e w t o n it e rat e s o f c 0 .

f

( c i ) :=

c0 ,

ci



f

c0

2 IR, consist s of

( c i ) = f 0( c i ) :

and we call t he sequence ( c i ) 1i = 1 t he

D e n it io n 4 . C on sider a u n ivariat e polyn om ial f 2 IR[x ]. A poin t b 2 IR is an a p p rox im a t e z e ro o f f i t he N ewt on it erat es of b are all well-de n ed, an d t here exist s 2 IR ( the as s o c iat e d z e ro o f b ) su ch t hat f ( ) = 0 an d

j bi − j 

D e n it io n 5 .

2i − 1

1 2

j b − j ; for all

i

 0:

= 0. D e n e S u ppose f is an alyt ic an d f 0( c ) 6 (f

; c)

=

(f

; c )γ

(f

; c)

where

(f

; c)

= jN f (c ) − c j =

f f

(c ) 0( c )

an d γ

(f

; c)

= sup k

 2

f f

(k )

(c ) 0( c ) k !

By denit ion, ( f ; c ) is t he lengt h of t he Newt on’s st ep for result provides insight on t he nat ure of ( f ; c ).

f

1 k− 1

:

at c . T he next

T h e o re m 1 . [4] T here exist s a u n iversal con st an t 0  1= 8 su ch t hat ( f ; c )  is the associat ed zero of c , t hen 0 =) c is an approxim at e zero of f . A lso, if jc − j  2 (f ; c ).

Not e t hat T heorem 1 gives us a su cient condit ion t o guarrant ee t he exist ence of a root of f near a point c . In addit ion, it provides a bound for t he dist ance from c t o t hat root .

Learning from Approximat e Dat a

4.2

413

T h e P ro c e d u re SEARCH

We now describe t he procedure SEARCH ment ioned above. P rocedure SEARCH In p u t ( f~1 ; : : : ; f~m ; ; M ) Fo r i = 1 t o m d o Comput e an int erval set L i for f~i such t hat all t he int ervals in L i have lengt h at most 2 M

d

# The above can be done vi a bi sect i on and St ur m sequences # Fo r j = 1 t o size(L i ) d o if , for eit her z = a or z = b , ( ( f~i ; z )  0 =2 a n d ( f~i ; z )  16d M 2 d − 1 2 ( f~i ; z ) a n d 420 ( d M 2 d − 1 3 ( f~i ; z )  0 = 2) a n d j f~i0( z )j  2d M d − 2 kf~i k ( M + 64d ( d − 1) M 2 d − 1 2 ( f~i ; z )) then s e t h := 16d M 2 d − 1 2 ( f~i ; z ) s e t ( c 1 ; c 2 ) := ( z − 4h ; z + 4h ) # An i sol at i ng i nt er val f or a r eal r oot of f i # if f~i0( z ) < 0 t h e n s e t c h := c 1 e ls e s e t c h := c 2 s e t k := 1 w h ile k < m a n d ( k 6 = i or f~k ( c h ) > 2 M d kf~k k ) d o k

:=

k

+ 1

e n d w h ile if k = i or f~k ( c h ) e n d fo r e n d fo r

5

>

2 M d kf~k k t h e n HALT and R e t u rn

c

h

C o r r e c t n e s s a n d C o m p le x it y o f A lg o r it h m 2

T h e o re m 2 . I f procedu re SEARCH halt s an d ret u rn s a poin t c h , t hen c h is a solu t ion of ’ .

We now consider t he t ime complexity of Algorit hm 2. A key paramet er t o describe t his complexity is t he condit ion of ’ (see [7] for complexity and condit ioning). Consider a set of inequalit ies ’ . T he set of it s solut ions is a union of open int ervals s [

(

Sol( ’ ) = j

2j − 1 ;

2j

)

=1

wit h − M  1 < 2 < : : : < 2 s  M . Let be an ext remity of one of t hese int ervals and i  We dene   0 f k ( ) j f i ( )j K ( ) = min 1; ; : kf k k kf i k k m k

= 6

i

m

such t hat

f

i

( ) = 0.

414

Shirley Cheung H.C.

Finally, let t he con dit ion n u m ber of

be



C( ’ ) = min j

 2s

1 : K( i )

T h e o re m 3 . I f C( ’ ) < 1 t hen A lgorit hm 2 halt s an d ret u rn s a solu t ion c h . T he n u m ber of it erat ion s it perform s ( i.e. t he n u m ber of t im es t he procedu re SEARCH is execu t ed) is bou n ded by &

1

log2 where

m in

=

840d 3 M

log2 ([1 + m in ] d − 1) log2 ( 0 )

0 4 d − 2 [5C( ’

)]3

an d

0

!



:

is t he in it ial valu e set in t he begin n in g

of t he algorit hm . T he arit hm et ic com plexit y ( n u m ber of arit hm et ic operat ion s perform ed by t he algorit hm ) is bou n ded by

O[d 3 m ( d log M + log(C( ’ ))) log( d log M + log(C( ’ )))]: In t he previous discussion we have not considered t he sit uat ion where M (or − M ) belongs t o Sol( ’ ) but it is not a root of f i for i = 1; : : : ; m . A simple modicat ion of procedure SEARCH would deal wit h t hat sit uat ion. T he denit ion of C( ’ ) needs t o be slight ly modied as well. T heorem 3 remains unchanged. R e m ark.

R e fe r e n c e s 1. A. Akrit as. E lem en t s of C om put er A lgebr a wi t h A ppli cat i on s. J ohn W iley & Sons, 1989. 2. S. Basu, R. P ollack, and M.-F . Roy. On t he combinat orial and algebraic complexity of quant i er eliminat ion. In 35t h an n ual I E E E Sym p. on Foun dat i on s of C om put er Sci en ce, pages 632{641, 1994. 3. F . Bergadano, N.H. Bshouty, and S. Varrichio. Learning mult ivariat e p olynomials from subst it ut ions and equivalence queries. P reprint , 1996. 4. L. Blum, F . Cucker, M. Shub, and S. Smale. C om plexi t y an d Real C om put at i on . Springer-Verlag, 1998. 5. A. Blumer, A. Ehrenfeucht , D. Haussler, and M.K. Warmut h. Learnability and t he Vapnik-Chervonenkis dimension. J our n al of t he A C M , 36:929{965, 1989. 6. D. Cheung. Learning real p olynomials wit h a T uring machine. In O. Wat anab e, and T . Yokomori, edit or, A L T ’ 99 , volume 1720 of L ect . N ot es i n A r t i ci al I n t el li gen ce , pages 231{240. Springer-Verlag, 1999. 7. F . Cucker. Real comput at ions wit h fake numb ers. In J . W iedermann, P. van Emde Boas, and M. Nielsen, edit ors, I C A L P ’ 99 , volume 1644 of L ect . N ot es i n C om p. Sci . , pages 55{73. Springer-Verlag, 1999. 8. P.W . Goldb erg and M.R. J errum. Bounding t he Vapnik-Chervonenkis dimension of concept classes paramet erized by real numb ers. M achi n e L ear n i n g, 18:131{148, 1995.

Learning from Approximat e Dat a

415

9. M.J . Kearns and U.V. Vazirani. A n I n t r oduct i on t o C om put at i on al L ear n i n g T heor y . T he MIT P ress, 1994. 10. J . Renegar. On t he comput at ional complexity and geomet ry of t he rst -order t heory of t he reals. P art I. J our n al of Sym boli c C om put at i on , 13:255{299, 1992. 11. R.E. Shapire and L.M. Sellie. Learning sparse mult ivariat e p olynomials over a eld wit h queries and count erexamples. In 6t h an n ual A C M Sym p. on C om put at i on al L ear n i n g T heor y , pages 17{26, 1993.

A C o m b in a t o r ia l A p p r o a c h t o A s y m m e t r ic T r a it o r T r a c in g R eihaneh Safavi-Naini and Yejing Wang School of IT and CS, University of Wollongong, Wollongong 2522, Aust ralia [ r ei / yw17] @uow. edu. au

A b s t r a c t . To prot ect against illegal copying and dist ribut ion of digit al ob ject s, such as images, videos and software product s, merchant s can ‘ngerprint ’ ob ject s by emb edding a dist inct codeword in ea ch copy of t he ob ject , hence allowing unique ident icat ion of t he buye r. T he buyer does not know where t he codeword is emb edded and so cannot t amp er wit h it . However a group of dishonest buyers can compare t heir copies of t he ob ject , nd some of t he emb edded bit s and change t hem t o creat e a pirat e copy. A c-t raceability scheme can ident ify at least one of t he colluders if up t o c colluders have generat ed a pirat e copy. In t his pap er we assume t he merchant is not t rust ed and may at t empt t o ‘frame’ a buyer by emb edding t he buyer’s codeword in a second copy of t he ob ject . We int roduce a t hird party called t he ‘arbit er’ who is t rust ed and can arbit rat e b etween t he buyer and t he merchant if a disput e occurs. We describ e t he syst em as a set syst em and give two const ruct ions, one based on p olynomials over nit e elds and t he ot her based on ort hogonal arrays, t hat provide prot ect ion in t he ab ove scenario.

K e y w o rd s : Digit al ngerprint , t raceability schemes, crypt ography, informat ion security

1

I n t r o d u c t io n

Traceabilit y schemes are crypt ographic syst ems t hat provide prot ect ion against illegal copying and redist ribut ion of digit al dat a. W hen a digit al ob ject is sold, t he merchant emb eds a dist inct ngerprint in each copy hence allowing ident i cat ion of t he buyer. A ngerprint is a sequence of m arks emb edded in t he ob ject which is not dist inguishable from t he original cont ent . T he buyer does not know where t he ngerprint is insert ed and so cannot remove or t amp er wit h it . T he collect ion of all mark st rings used by t he merchant is t he n gerprin t in g code . A copy of t he ob ject wit h an emb edded ngerprint b elonging t o t his code is called a legal copy . If t wo or more buyers collude t hey can compare t heir copies which will b e ident ical on non-mark places and di erent on all mark p osit ions t hat at least D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 4 1 6 { 4 2 5 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

A Combinat orial Approach t o Asymmet ric Trait or Tracing

417

t wo colluders have di ering marks. Colluders t hen may chang e t he marks t o const ruct an illegal copy . In an illegal copy t he dat a is int act but t he mark sequence is not in t he ngerprint ing code. T he aim of t he ngerprint ing code are t he following. 1. t o ensure t hat a collusion of buyers cannot remove or t amp er wit h t he ngerprint and produce a legal copy ot her t han t heir own copies. 2. t o allow ident i cat ion of at least one memb er of a colluding group who has produced an illegal copy. We use t he t erm piracy t o refer t o t he generat ion of illegal copies of digit al ob ject s. In t his pap er we only consider binary marks. 1 .1

P re v io u s W o rk s

F ingerprint ing schemes have b een widely st udied in recent years. T he main aim of t hese schemes is t o discourage illegal copying of digit al ob ject s such as soft wares, by allowing t he merchant t o ident ify t he original buyer of a copy. Fram eproof codes are int roduced by Boneh and Shaw [1], [7], and provide a gen eral m et hod of ngerprint ing digit al ob ject s. T he code is a collect ion of bin ary m arks and prot ect s against generat ion of illegal copies. T hey also de ned c -secure codes t hat allow det erm in ist ic ident i cat ion of at least one colluder if an illegal copy of t he ob ject is const ruct ed by a collusion of up t o c colluders. T hey showed [1] t hat c -secure codes for c 2 can not exist , and prop osed a code which det ermines t he colluders wit h a very high probabilit y. T raceabilit y schem es are int roduced by Chor, F iat and Naor [2] in t he cont ext of broadcast encrypt ion schemes used for pay t elevision. In t heir prop osed scheme each aut horised user has a decoder wit h a set of keys t hat uniquely det ermines t he owner and allows him t o decrypt t he broadcast . Colluders at t empt t o const ruct a decoder t hat decodes t he broadcast by combining t he key set s in t heir decoders. A subset of keys given t o an aut horised user de nes a ngerprint ing codeword and t he set of all such codewords de nes t he code | t his is also called key n gerprin t in g. Traceabilit y schemes allow det ect ion of at least one of t he colluders in t he ab ove scenario. St inson and Wei in [7] de ned t rait or t racing schemes as set syst ems, st udied t heir combinat orial prop ert ies, and showed const ruct ions using combinat orial designs. Kurosawa and Desmedt gave a const ruct ion of one-t ime t raceabilit y scheme for broadcast encrypt ion in which t he decrypt ion key will b e revealed once it is used. It was shown [8] t hat t his const ruct ion is not secure and colluders can const ruct a decoder t hat can decrypt t he broadcast and is not ident ical t o t he decoder set of any of t he colluders.

1 .2

A s y m m e t ric T ra c in g

In all t he ab ove schemes t he merchant is assumed t o b e honest and so his knowledge of t he ngerprint s of all t he buyers is not a security t hreat . T his however

418

Reihaneh Safavi-Naini and Yejing Wang

is not always t rue and in part icular in op en environment s such as t he Int ernet assuming full t rust on t he merchant is not realist ic. If t he merchant is dishonest he may fram e a buyer by insert ing his unique code in anot her copy. In t his case t here is no way for t he buyer t o prove his innocence. Asymmet ric t raceabilit y schemes prop osed by P t zmann and Schunt er [5] remove honest y assumpt ion of t he merchant and in t he case of piracy allow t he merchant t o ident ify t he original buyer, and b e able t o const ruct a ‘proof’ for a judge. T he ngerprint ed dat a can only b e seen by t he buyer but if a merchant can capt ure such an ob ject he can ‘prove’ t he ident it y of t he buyer t o t he judge. T heir syst em requires four prot ocols, key -gen , n g, iden t ify and dispu t e and are all p olynomial-t ime in t he security paramet er k . T he securit y requirement s are: (i) a buyer should obt ain a ngerprint ed copy if all prot ocol part icipant s honest ly execut e t he prot ocols; (ii) t he merchant is prot ect ed from colluding buyers who would like t o generat e an illegal copy of t he dat a; and (iii) buyers must b e prot ect ed from t he merchant and ot her buyers. Alt hough securit y of t he merchant is against collusions of maximum size c , a buyer must remain secure against any size collusion. T he prop osed general scheme has comput at ional security and uses a general 2-part y prot ocol, a signat ure scheme and a one-way funct ion. P t zmann and Waidner’s [6] ext ended t his work by giving const ruct ions t hat are e cient for larger collusions. In t hese schemes a symmet ric ngerprint ing scheme wit h uncondit ional securit y is combined wit h a numb er of comput at ionally secure primit ives such as signat ure schemes and one-way funct ions, and so t he nal security is comput at ional. Kurosawa and Desmedt [4] also const ruct ed a comput at ionally secure asymmet ric scheme in which t here are ‘ agent s t hat coop erat ively generat e t he key. T he agent s are not required in t he t racing of a t rait or, or providing a proof for t he judge (t his is done by t he merchant ). T hey also prop osed t he rst uncondit ionally secure scheme which uses p olynomials over nit e elds. However in t his scheme merchant cannot t race t he t rait or and t he t racing is p erformed by t he arbit er. Moreover t he scheme can b e sub ject ed t o an ext ension of t he at t ack p oint ed out by St inson and Wei [8]. Det ails of t his at t ack is omit t ed b ecause of space limit at ion. In our model of asymmet ric t raceabilit y t here is a set of publicly known codewords t hat is used for ngerprint ing ob ject s. T he merchant chooses t he codeword t o b e insert ed int o an ob ject , but only insert s part of it . T he scheme consist s of t hree procedures. { F in gerprin t in g is p erformed in t wo st eps, st art ing wit h t he merchant and

t hen complet ed by t he arbit er. F irst , t he merchant chooses a ngerprint B and t hen insert s his part ial ngerprint B j M in t he ob ject O t o produce OB j . Merchant t hen gives ( OB j ; M ; B j M ; B ) t o t he arbit er, who veri es t hat t he ob ject OB j has ngerprint B j M insert ed in p osit ions given by M . T hen he insert s t he rest of t he ngerprint t o produce OB which is t he ngerprint ed ob ject which will b e given direct ly t o t he buyer wit hout merchant b eing able t o access it . Bot h M

M

M

A Combinat orial Approach t o Asymmet ric Trait or Tracing

419

t he merchant and t he arbit er st ore buyer B ident i cat ion informat ion in a secure dat abase. { T racin g is p erformed by t he merchant . If t he merchant nds a pirat e copy of t he ob ject , it ext ract s his emb edded ngerprint F j M and ident i es one of t he t rait ors using his informat ion of part ial ngerprint s. { A rbit rat ion is required if merchant ’s accusat ion is not accept able by t he accused buyer. In t his case t he merchant present s OF and t he part ial ngerprint B j j M t hat ident i es t he buyer B j . T he accused buyer shows his ID. T he arbit er will use his arbit rat ion rule which eit her veri es t he merchant ’s claims, if merchant had honest ly followed his t racing algorit hm and t he accused buyer is a correct out put of t his algorit hm, or reject his accusat ion. I n t h is p a p e r we describ e a model for uncondit ionally secure asymmet ric t rait or t racing schemes. We describ e asymmet ric t raceabilit y as a set syst em and give t wo const ruct ions based on p olynomials over nit e elds and ort hogonal arrays. T he pap er organisat ion is as follows. In Sect ion 2 we int roduce t he model. In Sect ion 3 we give a necessary and su cient condit ion for exist ence of asymmet ric t raceabilit y scheme. In sect ion 4 we show t wo const ruct ions and in Sect ion 5 conclude t he pap er.

2

M odel

Supp ose t here are n buyers lab elled by B 1 ; B 2 ; ; B n . H am m in g weight of a binary vect or is t he numb er of non-zero comp onent s of t he vect or. A buyer B i has a n gerprin t which is a binary vect or of lengt h ‘ and xed Hamming weight w , ; x i ‘ ) t hat will b e emb edded in ‘ p osit ions P = f p 1 ; p 2 ; ; p‘ g B i = (x i 1 ; x i 2 ; of t he ob ject O . T he collect ion of all such vect ors de ne t he n gerprin t code . T he code is public but t he assignment of t he codewords t o t he buyers is secret . A legal copy of t he ob ject O has a ngerprint b elonging t o t he ngerprint code. T he p osit ion set is xed, and for a user B i t he mark x i j will b e insert ed in P , denot ed by p osit ion p j of t he ob ject . By rest rict ion of a vect or B t o M B j M , we mean t he vect or obt ained by delet ing all comp onent s of B , except t hose in M . By in t ersect ion of t wo vect ors B i and B j , denot ed by B i \ B j , we mean t he binary ‘ -vect or having a 1 in all p osit ions where B i and B j are b ot h 1, and 0 in all ot her p osit ions. We use j B j t o denot e t he Hamming weight (numb er of ones) of B . T he full set of emb edding p osit ions P is only known t o t he arbit er. T here is a subset M P of t he p osit ions known by t he merchant . A buyer’s ngerprint B includes t wo part s B j M and B j A . We assume t hat j B j M j = w 1 for all buyers. For a buyer, t he merchant chooses t he ngerprint B t o b e insert ed int o t he ob ject . ; i c g f 1; 2; ; n g a p osit ion p j is said t o b e For a subset C = f i 1 ; i 2 ; ; i c have t he same mark on t hat p osit ion. Let U b e t he u n det ect able if i 1 ; i 2 ; set of undet ect able mark p osit ions for C , t hen we de ne t he feasible set of C as F (C )

= f B 2 f 0; 1g‘ : B j U = B i j U ; for some B i 2 C g: k

k

420

Reihaneh Safavi-Naini and Yejing Wang

Let F denot e a pirat e 2 F ( C ).

ngerprint . We say F is produ ced by a collu sion C

if

F

A t t a ck s

1. C ollu din g grou ps of bu y ers creat in g an illegal object : T he colluding users C t o creat e a pirat e object OF ; OB use t heir ngerprint ed ob ject s OB 1 ; where F 2 F ( C ). 2. M erchan t ’s fram in g of a u ser: t he merchant uses his knowledge of t he syst em, t hat is t he code and t he codeword he has allocat ed t o t he buyer B , t o const ruct anot her ob ject ngerprint ed wit h buyer B ’s ngerprint . i c

i

I t is im port an t t o not e t hat we do not allow merchant t o use a pirat e copy, OF in t he framing at t ack. Such an at t ack would imply collusion of merchant and buyers which is not considered in our at t ack model. We will use t he following t racing algorit hm and arbit rat ion rule for t he merchant and t he arbit er, resp ect ively.

M e rch a n t ’s t ra c in g a lg o rit h m

If t he merchant capt ures a ngerprint ed ob ject OF , he can obt ain F j M which is t he part of ngerprint emb edded by him. T hen for all i ; 1 i n , merchant calculat es j ( F \ B i ) M j , and accu ses B j whose allocat ed ngerprint rest rict ed t o M , has t he largest int ersect ion wit h F . T hat is it sat is es:

j(F \

Bj

)jM = m a x 1

i

n

j(F \

B i )jM

A rb it ra t io n ru le

If an accused user B j does not accept t he accusat ion, t he arbit er will b e called. T he merchant will provide t he capt ured ob ject , OF , t he accused buyer’s ngerprint B j j M , and t he accused buyer’s ident it y. T he arbit er will (i) ext ract t he ngerprint F from OF ; (ii) nd t he numb er a F ; and (iii) accept s t he accusat ion if a F − j F \ B j j s , and reject s ot herwise. Here t he numb er s is a xed predet ermined t hreshold paramet er of t he syst em and a F is a numb er dep ending on t he pirat e word F . Now we can formally de ne an asymmet ric c -t raceabilit y scheme. D e n it io n 1 . A n asy m m et ric c -t raceabilit y schem e is a bin ary code which has t he followin g propert ies.

n gerprin t in g

1. T he m erchan t t racin g algorit hm can always n d a t rait or in an y collu sion grou p of u p t o c collu ders. T hat is t he accu sed bu y er B j by t he m erchan t ’s t racin g algorit hm is a m em ber of t he collu sion C when ever a pirat e n gerprin t F is produ ced by C wit h size j C j c; 2. I f t he m erchan t correct ly follows t he t racin g algorit hm , his accu sat ion will always be accept ed by t he arbit er; an d 3. I f t he m erchan t accu ses an in n ocen t bu y er, t he arbit er always reject his accu sat ion .

A Combinat orial Approach t o Asymmet ric Trait or Tracing

421

T he ab ove de nit ion implies t hat if a merchant accuses a t rait or only based on his suspicion and not by following t he algorit hm, t he arbit er may accept or reject his accusat ion. T hat is merchant ’s correct applicat ion of his t racing algorit hm will serve as a proof for t he arbit er.

3

A C o m b in a t o ria l A p p ro a c h

St inson and Wei gave a combinat orial descript ion of symmet ric t raceabilit y schemes. In symmet ric schemes, t he merchant is assumed honest and t here is no need for arbit rat ion. T he merchant emb eds t he ngerprint s (codewords) in each ob ject and can t race a t rait or if a pirat e copy is found. T he t racing algorit hm is similar t o t he one in sect ion 2 but now t he algorit hm uses t he whole codeword and not t he part rest rict ed t o t he merchant . An asymmet ric scheme rest rict ed t o p osit ions M will reduce t o a symmet ric scheme. For a pirat e word F , B j is called an exposed u ser if

j(F \

Bj

)jM = m a x 1

i

n

j(F \

B i )jM :

St inson and Wei (see [7], De nit ion 1.2) de ned a symmet ric c -t raceability scheme as follows. ; x ‘ g, and a family B of subset s of X . A set Consider a set X = f x 1 ; x 2 ; syst em ( X ; B ) is a c -t raceabilit y if (i) j B j = w and (ii) whenever a pirat e decoder F is produced by C and j C j c , t hen any exp osed user U is a memb er of t he coalit ion C . T he following t heorem charact erises symmet ric c -t raceabilit y schemes as set syst ems sat isfying sp ecial prop ert ies. T h e o re m 1 . ( [7]) T here exist s a c -t raceabilit y schem e if an d on ly if t here exist s a set sy st em ( X ; B ) su ch t hat j B j = w for every B 2 B , wit h t he followin g propert y for an y d S

F

d j = 1

c blocks B 1 ; B 2 ;

;Bd

2 B an d for an y

w -su bset

B j , t here does n ot exist a block

2 B nf B 1; B 2; for 1 j d.

; B d g su ch t hat j F

B

\

Bj

j j

F

\

B

(1)

j

Not e t hat in t his t heorem it is assumed t hat j F j = w for every pirat e decoder . It is not di cult t o show t hat t his t heorem is also t rue aft er relaxing t he assumpt ion on F . F

T h e o re m 2 . T here exist s a ( sy m m et ric) c -t raceabilit y schem e if an d on ly if t here exist s a set sy st em ( X ; B ) su ch t hat j B j = w for every B 2 B , wit h t he followin g propert y for an y d

c blocks B 1 ; B 2 ; S

su ch t hat F

2 B n f B 1; B 2; for 1 j d. B

d j = 1

;Bd

2 B an d for an y su bset

B j , t here does n ot exist a block ; B d g su ch t hat j F

\

Bj

j j

F

\

B

j

F

(2)

422

Reihaneh Safavi-Naini and Yejing Wang

We present t he following t heorem which charact erises asymmet ric schemes in t erms of set syst ems wit h sp ecial prop ert ies. T he proof is omit t ed due t o space limit at ion. T h e o re m 3 . T here exist s an asy m m et ric c -t raceabilit y schem e if an d on ly if t here exist s a set sy st em ( X ; B ) wit h j B j = w for all B 2 B , an d a n u m ber s t hat sat isfy t he followin g propert ies: 1. T here exist s a n on -em pt y set M X su ch t hat 0 < j B \ M j = w 1 < w for all B 2 B , an d for t he set sy st em ( M ; BM ) , obt ain ed by rest rict in g ( X ; B ) t o M , propert y ( 2) in t heorem 2 holds; T

S

d

d

F B i for som e choice of B 1 ; 2. For every F , where i = 1 B i i= 1 B an d d c , t here exist s a n u m ber a F > 0 su ch t hat

jB \

F

j

< aF



s

j

Bj

\

F j;

for all B 2 B n f B 1 ; B 2 ;

;Bd

; B d g;

2

(3)

where

jF \

Bj

\

M

j = max j F \ B

B

2B

\

M j:

>From t heorem 3 it follows t hat b ot h t he ngerprint ing code and t he sub-code insert ed by t he merchant are (symmet ric) c -t raceabilit y schemes, and buyers’ collusions are t racable.

4

C o n s t r u c t io n s

In t his sect ion we will const ruct asymmet ric t raceabilit y schemes assuming t he weight of any pirat e ngerprint is at least w . In symmet ric t raceabilit y schemes in [7], t he weight of pirat e ngerprint is exact ly w . F irst we give su cient condit ions for a set syst em t o sat isfy condit ions of t heorem 3 and hence can b e used t o const ruct an asymmet ric c -t raceability scheme. T h e o re m 4 . S u ppose t here exist s a set sy st em ( X ; B ) an d t hree posit ive in t egers c;  an d s su ch t hat , 1. For an y B 2 B , j B j = w > c 2  + 2 cs ;  ; 2. For an y pair B i ; B j 2 B , j B i \ B j j X su ch t hat 0 < j X 3. T here exist s a su bset X 1

1

\

B

j=

s for an y B

2 B.

T hen t here exist s an asy m m et ric c -t raceabilit y schem e. P roof. Let M = X n X 1 . Since j B j = w and j X

jB \

M

j=

w



2

s > c 

1

\

B

j = s , t hen for any

+ (2c − 1) s > c 2  :

Also for any pair B i ; B j 2 B ,

jB i \

Bj

\

M

j j

Bi

\

Bj

j

 :

B

2 B,

A Combinat orial Approach t o Asymmet ric Trait or Tracing

423

T herefore using Lemma 61 of [8] t he syst em ( M ; BM ) forms a symmet ric c t raceabilit y scheme. Hence condit ion 1 of t heorem 3 is sat is ed. B d and d c . Assume j F j w . Let x i = Now supp ose F B1 [ B2 [ [ P w and so max i f x i g w =c = c + 2 s . Let a F = max i f x i g. j B i \ F j . T hen i x i ; B d g we have For any B 2 B n f B 1 ; B 2 ; aF

− jB \

F

j

> c c

+ 2s − j B \ ( [

d i= 1B i

) j = c + 2s − j [

d i= 1

(B \ B i )j

+ 2s − c = 2s:

(4)

Now let B j 2 B b e such t hat

j(B j \

F

) M j = max j ( B \ F ) M j : B

2B

Not ing t hat

jB j 0 \

F

j = (j(B j \

)M j − j(B j 0 \ F )M j) + (j(B j 0 \ F )X 1 j − j(B j \ F )X 1 j);

j − jB j \

F

j(B j \

)M j − j(B j 0 \ F )M j j (B j 0 \ F )X 1 j − j(B j \ F )X 1 j

F

and F

s:

We have aF

− jB j \

F

j

2s:

(5)

From (4) and (5) we know t hat for any B 2 B n f B 1 ; B 2 ;

jB \

F

j

< aF

− 2s j

Bj

\

; B d g,

F j;

and so condit ion 2 of t heorem 3 is sat is ed. In t he following we will const ruct t wo set syst ems sat isfying condit ions of t heorem 4, and hence result ing in asymmet ric t raceabilit y schemes. 4 .1

C o n s t ru c t io n 1

T h e o re m 5 . T here exist s an asy m m et ric c -t raceabilit y schem e wit h c

= b

− (q − t ) +

p

(q − t )2 + t q t

c:

eld of q element s, t < q − 1 b e a p osit ive int eger, and X b e + a1 x + a0 , t he set of all p oint s f ( x ; y ) : x ; y 2 F q g. For a p olynomial a t x t + i t and a t 6 = 0, de ne a block B X as ai 2 F q , 0 P roof. Let F q b e a

B

= f (x ; y ) 2 X : y = a t x t +

+ a 1 x + a 0 g:

Let B b e t he family of all blocks de ned as ab ove. T hen for any B 2 B , j B j = q . ; ( x t + 1 ; y t + 1 ) 2 X is in at most Since any set of t + 1 p oint s ( x 1 ; y 1 ) ; ( x 2 ; y 2 ) ; one block, t herefore j B \ B 0j t for every pair of B ; B 0 2 B .

424

Reihaneh Safavi-Naini and Yejing Wang

Now x s element s x 1 ; x 2 ; ; x s 2 F q , where s q − t . Let X 1 = f ( x i ; y ) : i s; y 2 F q g. For any block B 2 B we have j X 1 \ B j = s . So if q > c 2 t + 2 cs , ( X ; B ) sat is es condit ions of t heorem 4. Since q > c 2 t + 2 cs implies q > c 2 t + 2 c ( q − t ), we have

1

c

= b

− 2( q − t ) +

p

− (q − t ) + 4( q − t ) 2 + 4t q c= b 2t

p

(q − t )2 + t q t

c;

and t he t heorem is proved. 4 .2

C o n s t ru c t io n 2

T he second const ruct ion is based on ort hogonal arrays. T he following de nit ion and t heorem on t he exist ence of ort hogonal arrays can b e found in [3]. D e n it io n 2 . A n ort hogon al array O A ( t ; k ; v ) is a k v t array wit h en t ries from a set of v 2 sy m bols, su ch t hat in an y t rows, every t 1 colu m n vect or appears exact ly on ce. T h e o re m 6 . L et q be a prim e power, an d t < q be an in t eger. T hen t here exist s an O A ( t ; q + 1 ; q ) .

T he following t heorem gives t he second const ruct ion. T h e o re m 7 . L et q be a prim e power, t ; s be in t egers su ch t hat 1p< s < t < q . − s+

T hen t here exist s an asy m m et ric c -t raceabilit y schem e wit h c = b

s 2+ ( t − 1 ) ( q+ 1 ) t− 1

c.

P roof. Let A b e an O A ( t ; q + 1 ; q ). Let X = f ( x ; y ) : 1

x k; 1 y v g, ; ( k ; y k ) g where ( y 1 ; y 2 ; ; y k )T B b e t he family of all B = f (1; y 1 ) ; (2; y 2 ) ; is a column of A . Now consider t he set syst em ( X ; B ). We have j B j = k for t − 1 for every pair of B i ; B j 2 B . T his lat t er every B 2 B , and j B i \ B j j ; y t ) T app ears once in a given t rows of is t rue b ecause every t -t uple ( y 1 ; y 2 ; t he ort hogonal array. Let s b e an int eger such t hat 1 < s < t . De ne X 1 = f (x ; y ) : k − s + 1 x k; 1 y v g. T hen j X 1 \ B j > 0 for every B 2 B . Also j X 1 \ B j = s for every B 2 B . If q + 1 > c 2 ( t − 1) + 2cs , we obt ain a set syst em ( X ; B ), sat isfying condit ions of t heorem p 4. T herefore t here exist s an asymmet ric c -t raceabilit y

5

scheme wit h c = b

− s+

s2 + (t − 1)(q+ 1) t− 1

c.

C o n c lu s io n s

In t his pap er we prop ose a model for uncondit ionally secure asymmet ric t raceabilit y scheme in which t he merchant can indep endent ly t race a t rait or and as long as he correct ly follows t he t racing algorit hm, his decision will also b e approved by t he arbit er. T he syst em ensures t hat an innocent buyer can neit her b e framed nor accused unlawfully by t he merchant . In t he lat t er case merchant ’s accusat ion will always b e reject ed by t he arbit er. We gave a charact erisat ion of asymmet ric t raceable syst em in t erms of set syst ems and const ruct ed t wo classes of such syst ems.

A Combinat orial Approach t o Asymmet ric Trait or Tracing

425

R e fe r e n c e s 1. D. Boneh and J . Shaw. Collusion-secure ngerprint ing for digit al dat a. In \ Advanced in Crypt ology - CRYP T O’95, Lect ure Not es in Comput er Science, " volume 963, pages 453-465. Springer-Velag, Berlin, Heidelb erg, New York, 1995 2. B. Chor, A. F iat , and M Naor. Tracing t rait ors In \ Advanced in Crypt ology CRYP T O’94, Lect ure Not es in Comput er Science, " volume 839, pages 257-270. Springer-Velag, Berlin, Heidelb erg, New York, 1994 3. C. J . Collb ourn and J . H. Dinit z Eds. CRC \ Handb ook of Combinat orial Designs" . CRC P ress, 1996. 4. K. Kurosawa and Y. Desmedt . Opt imum t rait or t racing and asymmet ric schemes. In \ Advanced in Crypt ology - EUROCRYP T ’98, Lect ure Not es in Comput er Science, " volume 1462, pages 502-517. Springer-Velag, Berlin, Heidelb erg, New York, 1998 5. B. P t zmann and M. Schunt er. Asymmet ric ngerprint ing. I n \ Advanced in Crypt ology - EUROCRYP T ’96, Lect ure Not es in Comput er Science, " volume 1070, pages 84-95. Springer-Velag, Berlin, Heidelb erg, New York, 1996 6. B. P t zmann and M. Waidner. Asymmet ric ngerprint ing for large collusions. In \ proceedings of 4t h ACM conference on comput er and communicat ions security," pages 151-160, 1997. 7. D. St inson and R. Wei. Combinat orial prop ert ies and const ruct ions of t raceability schemes and framproof codes. \ SIAM J ournal on Discret e Mat hemat ics," 11:41-53, 1998. 8. D. St inson and R. Wei. Key preassigning t raceability schemes for broadcast encrypt ion. In \ P roceedings of SAC’98, Lect ure Not es in Comput er Science, " volume 1556, pages 144-156. Springer-Velag, Berlin, Heidelb erg, New York, 1999

R e m ov in g C o m p le x ity A ssu m p t io n s fro m C o n cu rre nt Ze ro -K n ow le d g e P ro o fs ⋆ ( E x t e n d e d A b st ract ) Giovanni Di Crescenzo Telcordia Technologies Inc., 445 Sout h St reet , Morrist own, NJ , 07960. gi ovanni @r esear ch. t el cor di a. com

Zero-knowledge proofs are a p owerful t ool for t he const ruct ion of several typ es of crypt ographic prot ocols. Recent ly, mot ivat ed by pract ical considerat ions, such prot ocols have b een invest igat ed in a concurrent and asynchronous dist ribut ed model, where prot ocols have b een prop osed relying on various synchronizat ion assumpt ions and unproven complexity assumpt ions. In t his pap er we present t he rst const ruct ions of proof syst ems t hat are concurrent zero-knowledge wit hout relying on unproven complexity assumpt ions. Our t echniques t ransform a non-concurrent zero-knowledge prot ocol int o a concurrent zero-knowledge one. T hey apply t o large classes of languages and preserve t he typ e of zero-knowledge: if t he original prot ocol is comput at ional, st at ist ical or p erfect zero-knowledge, t hen so is t he t ransformed one. A b st r a c t .

1

Int ro d u ct io n

T he not ion of zero-knowledge (zk) proof syst ems was int roduced in t he seminal paper of Goldwasser, Micali and Racko [13]. Using a zk proof syst e m, a prover can prove t o a veri er t hat a cert ain st ring x is in a language L wit hout revealing any addit ional informat ion t hat t he veri er could not comput e alone. Since t heir int roduct ion, zk proofs have proven t o be very useful as a building block in t he const ruct ion of several crypt ographic prot ocols, as ident i cat ion schemes, privat e funct ion evaluat ion, elect ronic cash schemes and elect ion schemes. Due t o t heir import ance, considerable at t ent ion has been given t o t he st udy of which adversarial set t ings and complexity assumpt ions are necessary for implement ing zk prot ocols, t he ult imat e goal being t hat of achieving t he most adversarial possible set t ing t oget her wit h t he minimal possible assumpt ions or none at all. C o m p le x it y as s u m p t io n s fo r z k p ro o fs . Comput at ional zk proofs were

shown t o be const ruct ible rst for all languages in NP [12] and t hen for all languages having an int eract ive proof syst em [1,14]. T hese proofs have int erest ing generality feat ures but rely on unproven complexity assumpt ions, such as t he exist ence of one-way funct ions. P erfect zk proofs, inst ead, require no unproven ?

Copyright 2000, Telcordia Technologies, Inc. All Right s Reserved.

D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 4 2 6 { 4 3 5 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

Removing Complexity Assumpt ions from Concurrent Zero-Knowledge P roofs

427

complexity assumpt ion; it is known t hat t hey cannot be given for all languages in NP, unless t he polynomial t ime hierarchy collapses [4,11]. T hese proofs seem t o capt ure t he int rinsic not ion of zk and are not oriously harder t o achieve; only a class of random self-reducible languages [13,12,17] and formula composit ion over t hem [6] are known t o have perfect zk proofs. We also not e t hat perfect zk proofs are t he ones used in pract ical applicat ions, because of t heir e ciency. S e t t in g s fo r z k p ro o fs: c o n c u rre nt z k. Recent ly, a lot of at t ent ion has been

paid t o t he set t ing where many concurrent execut ions of t he same prot ocol t ake place, capt uring pract ical scenarios as, for inst ance, t he Int ernet . Here t he zk property is much harder t o achieve since an adversary can corrupt many veri ers t hat are execut ing prot ocols wit h di erent provers. Const ruct ions of concurrent zk prot ocols in such a set t ing have been given in [2,9,10,16,7], relying on unproven complexity assumpt ions and various synchronizat ion assumpt ions. A negat ive result on t he possibility of obt aining small round complexity in t his set t ing was showed in [15]. O u r re s u lt s . In t his paper we present t he rst prot ocols (i.e., proof syst ems or

argument s) t hat are proved t o be concurrent zk w i t h o u t using unproven complexity assumpt ions. Our t echniques t ransform a non-concurrent zk prot ocol t o a concurrent one by preserving t he type of zk: if t he original prot ocol is comput at ional or perfect zk t hen so is t he result ing prot ocol. We present two t echniques, t he rst being applicable t o a larger class of languages but making st ronger synchronizat ion assumpt ions t han t he second. We not e t hat t he synchronizat ion assumpt ions of our prot ocols are probably st ronger t han t hose made previously in t he lit erat ure. However we believe t hat our t echniques provide a crucial st ep t owards t he const ruct ion of concurrent zk proofs in t he asynchronous model wit hout complexity assumpt ion, an import ant open quest ion, and probably t he ult imat e in t he area. In t he asynchronous model, we show some relat ionship between t he problem of obt aining concurrent zk proofs and t he well st udied problem of reducing t he soundness error of non-concurrent zk proofs. T his relat ionship allows t o derive, under some assumpt ions, lower bounds on t he round complexity of concurrent zk proofs, and gives some evidence of round-opt imality of our t echniques. Formal descript ions of prot ocols and proofs are omit t ed for lack of space.

2

D e n it io n s

We present all de nit ions of int erest : int eract ive prot ocols and int eract ive proof syst ems (int roduced in [13]), zk proof syst ems in t he two-party model (int roduced in [13]), and in various mult i-party models, in order of increasing generality: a so-called st rongly-synchronous model ( rst ly considered in t his paper), a so-called weakly-synchronous model ( rst ly considered in t his paper), and t he asynchronous model (int roduced in [9]). Int e rac t iv e p ro t o c o ls an d p ro o f s y s t e m s . An i n t e ra c t i v e T u r i n g m a c h i n e

is a Turing machine wit h a public input t ape, a public communicat ion t ape, a

428

Giovanni Di Crescenzo

privat e random t ape and a privat e work t ape. An i n t e ra c t i v e p ro t oco l (A,B) is a pair of int eract ive Turing machines A,B sharing t heir public input t ape and communicat ion t ape. An int eract ive prot ocol = ( A ; B ) is an i n t e ra c t i v e p roo f s y s t e m wit h soundness paramet er k for t he language L if B runs in polynomial t ime and t he following two requirement s are sat is ed: co m p le t e n e s s , st at ing t hat for any input x 2 L , at t he end of t he int eract ion between A and B, B accept s wit h probability at least 1 − 2− j x j , and s o u n d n e s s , st at ing t hat for any input x 6 2 L , and any algorit hm A0, t he probability t hat , at t he end of t he int eract ion between A0 and B, B accept s is at most 2− k . We say t hat an int eract ive proof syst em is p u bli c - co i n if t he messages of t he veri er only consist of uniformly chosen bit s. Zk p ro o f s y s t e m s . We de ne zk proof syst ems in various set t ings, under a

uni ed framework. Informally, a zk proof syst em for a language L in a cert ain set t ing is an int eract ive proof syst em for L such t hat any e cient adversary cannot use his power in t his set t ing t o gain any informat ion from his view t hat he did not know before running t he prot ocol. An e cient adversary is modeled as a probabilist ic polynomial t ime algorit hm. T he concept of gaining no informat ion not known before t he prot ocol is modeled using t he simulat ion not ion put forward in [13]. T he speci cat ion of t he power of t he adversary and of his view, given below, depend on t he speci c set t ing. In t he two-party set t ing a prover and a veri er are int ended t o run a prot ocol for proving t hat x 2 L , for some language L and some common input x . In t he mult i-party set t ings we consider a set of provers P = f P 1 ; : : : ; P q g and a set of veri ers V = f V 1 ; : : : ; V q g, such t hat for i = 1; : : : ; q , prover P i and veri er V i are int ended t o run a prot ocol (for simplicity, t he same prot ocol) for proving t hat x i 2 L , for some language L and some input x i common t o P i and V i . T w o - pa r t y s e t t i n g. In t his set t ing t he adversary’s power consist s of corrupt ing a single veri er; namely, t he adversary can impersonat e such veri er and t herefore use his randomness and send and receive messages on his behalf. M u lt i - pa r t y s t ro n gly - s y n c h ro n o u s s e t t i n g. Here t he adversary’s power consist s of corrupt ing up t o all veri ers V 1 ; : : : ; V q ; namely, t he adversary can impersonat e all such veri ers and t herefore use t heir randomness and send and receive messages on t heir behalf. In fact , we can assume wlog t hat he always corrupt s all of t hem. In t his set t ing t here exist s a global clock and t he t ime measured by such clock is available t o all provers, t o all veri ers and t o t he adversary. No mat t er what t he adversary does, however, each message t akes at most a cert ain xed amount of t ime, denot ed as d , in order t o arrive t o it s receiver, where t he value d is known t o all part ies. T he adversary is allowed t o st art any of t he q execut ions at any t ime (i.e., not necessarily t he same t ime); however, t he number q of pairs of part ies is known t o all part ies and cannot be changed by t he adversary. M u lt i - pa r t y w ea k ly - s y n c h ro n o u s s e t t i n g. As in t he previous set t ing, in t his set t ing t here is a global clock, t he adversary can corrupt up t o all veri ers and he is allowed t o st art any of t he q execut ions at any t ime (i.e., not necessarily t he same t ime). Cont rarily t o t he previous set t ing, here t here is no xed amount of t ime delay d t hat a message can t ake t o arrive t o it s dest inat ion (for inst ance, d

Removing Complexity Assumpt ions from Concurrent Zero-Knowledge P roofs

429

could depend on t he number of messages current ly sent in t he syst em); however, we assume t hat at any t ime d is t he same for all messages. Here, for inst ance, t he adversary could at any t ime modify d t o his advant age. Also, t he absolut e t ime measured by t he global clock does not need t o be available t o all part ies. St ill, each party can measure relat ive t ime according t o such clock (i.e., can measure whet her d seconds have passed since t he end of some ot her event ). M u lt i - pa r t y a s y n c h ro n o u s s e t t i n g. As in t he previous two set t ings, in t his set t ing t he adversary can corrupt up t o all veri ers; namely, t he adversary can impersonat e all such veri ers, use t heir randomness and send and receive messages on t heir behalf; moreover, t he adversary is allowed t o st art any of t he q execut ions at any t ime (i.e., not necessarily t he same t ime). As in t he weakly-synchronous set t ing, t he global clock is not available t o all part ies in t he syst em, and t here is no xed bound on t he amount of t ime t hat each message t akes in order t o arrive t o it s receiver. However, cont rarily t o t he previous two set t ings, t he local clock of each party can measure t ime and at a rat e possibly di erent from t hat of anot her party. T his can be used by t he adversary t o arbit rarily delay t he messages sent by t he various veri ers t hat he is impersonat ing, and event ually creat e arbit rary int erleavings between t he concurrent execut ions of a cert ain prot ocol. Moreover, in t his set t ing t he number q of pairs of part ies is not xed in advance; t herefore, t he adversary can generat e any polynomial number (on t he size of t he input s) of execut ions of t he same prot ocol. We call t he adversary in model X t he X m od e l a d v e r s a r y and his view, including all public input s and all veri ers’ random and communicat ion t apes, t he X m od e l a d v e r s a r y ’s v i e w . We are now ready t o de ne zk proof syst ems in each of t he above set t ings. We not e t hat t here exist t hree not ions of zk: comput at ional, st at ist ical and perfect , in order of increasing st rengt h. Here, we de ne t he t hird one (alt hough our result s hold for all t hree). Let X 2 f two-party, mult i-party st rongly-synchronous, mult iparty weakly-synchronous, and asynchronous g, let 1n be a security paramet er, let q be a polynomial and let = ( A ; B ) be an int eract ive proof syst em wit h soundness paramet er k for t he language L . We say t hat is q - co n c u r re n t pe r f ec t z k in model X if for all X model probabilist ic polynomial t ime adversaries A , t here exist s an e cient algorit hm S A , called t he s i m u la t o r , such t hat for = j x q ( n ) j = n , t he two dist ribut ions all x 1 ; : : : ; x q ( n ) 2 L , where j x 1 j = S A ( x 1 ;: : :; x q ( n ) ) and V i ew A ( x 1 ;: : :; x q ( n ) ) are equal, where V i ew A ( x 1 ;: : :; x q ( n ) ) is t he X model adversary’s view. D e n it io n 1 .

R e m arks . Variant s of synchronous and asynchronous dist ribut ed models are

being widely invest igat ed in t he research eld of Dist ribut ed Comput ing; our approach of invest igat ing t hese models was part ially inspired by t he research in t his eld as well. Among all t hese models, t he most adversarial scenario is in t he asynchronous model; t he models considered in [2,9,10,16,7] all make some synchronizat ion assumpt ions, our weakly-synchronous and st rongly-synchronous models make probably more rest rict ing synchronizat ion assumpt ions (t he rst

430

Giovanni Di Crescenzo

being less rest rict ing t han t he second). Not e t hat a prot ocol t hat is zk in a cert ain model is also zk in a model wit h st ronger synchronizat ion assumpt ions.

3

C o n cu rre nt Zk v s. S o u n d n e ss E rro r R e d u ct io n

We show a relat ionship between t he following two problems: (1) t ransforming a two-party zk proof syst em int o a concurrent zk proof syst em in t he st ronglysynchronous model, and (2) reducing t he soundness error of a two-party zk proof syst em. T he lat t er problem, widely st udied in t he t heory of int eract ive proofs and zk proofs, asks whet her, given a zk proof syst em wit h soundness paramet er k 1 , it is possible t o const ruct a zk proof syst em for t he same language wit h soundness paramet er k 2 , for k 2 > k 1 (so t hat t he error 2− k 1 decreases t o 2− k 2 ). Known t echniques for such reduct ions are: sequent ial and parallel composit ion (namely, repeat ing t he original prot ocol several t imes in series or in parallel, respect ively). Not e t hat t hese t echniques use no unproven complexity assumpt ion. Ot her t echniques in t he lit erat ure are for speci c languages and use algebraic propert ies of such languages, or unproven complexity assumpt ions. Informally, our result says t hat a solut ion t o problem (1) provides a solut ion t o problem (2), and relat es t he round complexity of t he t ransformat ions. T h e o re m 1 . L e t k ; n ; q b e in t eg e rs > 1 a n d le t b e a q -c o n c u rre n t z k p ro o f sy st e m fo r la n g u a g e L in t h e a sy n ch ro n o u s m o d e l a n d w it h so u n d n e ss p a ra m e t e r 0 fo r L a n d k . T h e n t h e re e x ist s ( c o n st ru c t iv e ly ) a t w o -p a rt y z k p ro o f sy st e m w it h so u n d n e ss p a ra m e t e r k su ch t h a t t h e fo llow in g h o ld s. I f t h e n u m b e r o f ro u n d s o f is r ( n ; k ; q ) , w h ere n is t h e siz e o f t h e co m m o n in p u t s, t h en t h e n u m b er o f ro u n d s o f 0 is r 0 = r ( n ; 1; k ) .

In t he proof, prot ocol 0 runs k parallel execut ions of , each using t he same input x , and each using 1 as soundness paramet er. One applicat ion of t his result is t hat any procedure for t ransforming a proof syst em t hat is two-party zk int o one t hat is zk even in t he st rongly-synchronous model gives a procedure for reducing t he soundness error of two-party zk proof syst ems. Anot her applicat ion is t hat if a round-opt imal procedure for reducing t he soundness error of a two-party zk proof syst ems is known t hen one obt ains a lower bound on t he round complexity of any zk proof syst em in t he asynchronous model for t he same language. For a large class of prot ocols [6,8], t he most round-e cient t echnique (assuming no unproven complexity assumpt ions or algebraic propert ies of t he language are used) t o reduce t he error from 1 t o k consist s of ( k = log k ) sequent ial repet it ions of (log k ) parallel repet it ion of t he at omic prot ocol wit h soundness paramet er 1. As a corollary of T heorem 1, we obt ain t hat by furt her assuming t hat such procedure is round-opt imal t hen for such languages we obt ain t hat any proof syst em wit h soundness paramet er 1, and t hat is q -concurrent zk (even) in t he st rongly-synchronous model, must have round-complexity at least Ω ( q= log q ). Conversely, a more round-e cient zk prot ocol in t he asynchronous model would give a bet t er soundness error reduct ion procedure in t he two-party model. T hese argument s can be ext ended so t hat t hey apply t o t he two concurrent zk prot ocols t hat we will present in Sect ion 4 and 5.

Removing Complexity Assumpt ions from Concurrent Zero-Knowledge P roofs

4

431

A P ro t o co l fo r t h e S t ro n g ly S y n ch ro n o u s M o d e l

In t his sect ion we present a t echnique for const ruct ing concurrent zk proof syst ems in t he st rongly synchronous model. T he t echnique consist s of t ransforming, in t his set t ing, a prot ocol t hat is two-party zk and sat is es a cert ain special property int o a prot ocol t hat is concurrent zk. We st ress t hat t his result does not use any unproven complexity assumpt ion and preserves t he type of zk of t he original proof syst em. We de ne C L 1 as t he class of languages having a twoparty zk proof syst em for which t here exist s an e cient simulat or S running in t ime c q ( n ) t ( n ), for some const ant c , some polynomial t , and on input s of lengt h n . Not e t hat a language in C L 1 is (log n )-concurrent zk but not necessarily poly( n )-concurrent zk. We remark t hat class C L 1 cont ains essent ially all languages of int erest . In part icular, we do not know of a language t hat has been given a two-party zk proof syst em in t he lit erat ure and does not belong t o it . T h e o re m 2 . L e t L b e a la n g u a g e b e lo n g in g t o c la ss C L 1 a n d le t be the t w o -p a rt y z k p ro o f sy st e m a sso c ia t e d w it h it . A lso , let q b e a p o ly n o m ia l. T h e n 0 fo r L in t h e st ro n g ly -sy n ch ro n o u s L h a s a ( q ( n )) -c o n c u rre n t z k p ro o f sy st em m o d el, w h ere n is t h e len g t h o f t h e in p u t s. M o re ov er, if is co m p u t a t io n a l, st a t ist ic a l, o r p e rfe c t z k t h e n so is 0.

T he rest of t his sect ion is devot ed t o t he proof of T heorem 2. D e sc rip t io n o f t h e t e ch n iqu e . Assume for simplicity t hat t he prot ocol 0 st art s at t ime 0. Let = (A,B) be t he two-party zk proof syst em associat ed wit h language L , let r be t he number of rounds of , let q; k be t he desired concurrency and soundness paramet ers for 0, respect ively, and let z = dq ( n ) = (log q ( n ) + log k )e. Also, let d be t he bound on t he t ime t hat a message t akes t o arrive t o it s recipient , and let t m i be t ime marks, such t hat t m i = i (2d r ), for all posit ive int egers i . We const ruct a prot ocol 0 = (P,V), as follows. On input t he n -bit st ring x , P uniformly chooses an int eger w 2 f 1; : : : ; z g and st art s execut ing , by running A’s program, on input x , at t he t ime st ep corresponding t o t he w -t h t ime mark following t he current t ime (i.e., if t he current t ime is t , P will st art prot ocol when t he current t ime is (bt = 2d r c + w ) (2d r )). V checks t hat t he execut ion of prot ocol on input x was accept ing by running B’s program. P ro p e rt ie s o f p ro t o c o l 0. We st ress t hat prot ocol 0 assumes t hat party P knows t he current t ime measured by t he global clock (for inst ance, P needs t o check t he value of t he current t ime). Here we need t he assumpt ion t hat t he global t ime is available t o all part ies, and t his is one reason for which t his t echnique does not seem t o direct ly ext end t o t he weakly synchronous model. T he complet eness and soundness of t he prot ocol 0 direct ly follow from t he analogue propert ies of . T he simulat or S 0 for 0 consist s of running P ’s program when choosing t he t ime marks, and t hen simulat or S for when simulat ing all concurrent proofs wit hin each t ime mark. It is not hard t o show t hat t he quality of t he simulat ion of S is preserved by S 0. In order t o show t hat S 0 runs in expect ed polynomial t ime, we observe t hat t he execut ion of S 0 is analogous t o a variant of a classical occupancy game of randomly t ossing balls int o bins, and analyze t his game.

432

Giovanni Di Crescenzo

A b a lls -int o -b in s g a m e . Let n be an int eger, q be a polynomial, and w t : N ! N be a penalty funct ion; also, assume an adversary sequent ially scans a possibly in nit e sequence of bins. T he adversary is able t o choose q ( n ) bins s bi n 1 ; : : : ; s bi n q ( n ) in an adapt ive way (namely, t he choice being possibly dependent on t he hist ory of t he game so far). Each t ime bin s bi n i is chosen by t he adversary, a ball is t ossed int o one out of t he z bins immediat ely following bin s bi n i , which bin being chosen uniformly and independent ly from all previous random choices. Now, denot ing by n ba l l j be t he number of ballsP in bin j , we have w t ( n ba l l j ), t hat t he goal of t he adversary is t o maximize t he value v a l = j 1 while our goal is t o show t hat for any adversary, v a l is poly( n ). In our analysis, we will only need t o consider t he case in which w t is set equal t o a speci c funct ion obt ained from our simulat ion process. E qu ivale n c e b e t w e e n g a m e a n d s im u la t io n . T he equivalence between t he above described game and t he simulat ion process comes from t he following associat ions: each bin is a t ime area between any two t ime marks; each ball is a concurrent execut ion of prot ocol ; t he act ion of t ossing a ball int o a uniformly chosen bin is equivalent t o P ’s act ion of set t ing a begin t ime for t he next execut ion of prot ocol ; t he penalty funct ion w t , when evaluat ed on n ba l l j , corresponds t o t he expect ed running t ime t aken by S 0 in order t o simulat e t he st art ing at t he j -t h t ime mark. Moreover, we n ba l l j concurrent execut ions of observe t hat by our const ruct ion all execut ions of have t o st art at some t ime mark; and t hat by our choice of t he t ime dist ance between any two consecut ive t ime marks, each execut ion of is concluded wit hin t he same t ime area (namely, before t he next t ime mark). T herefore t he ent ire simulat ion process can be seen as a sequence of st eps, each simulat ing a single t ime area. T his implies t hat t he expect ed simulat ion t ime can be writ t en as t he sum of t he values of t he penalty funct ion at values n ba l l j , for all j . A n aly s is o f t h e g am e . From t he de nit ion of funct ion w t , we derive t hat : (1) w t (0) = 0; (2) w t ( d )  c d t ( n ), for any d , for some const ant c , and some polynomial t . Speci cally, (1) follows from t he fact t hat no t ime is spent t o simulat e a t ime area cont aining no execut ion of t o be simulat ed and (2) follows from our original assumpt ions on prot ocol . Not e t hat during t he durat ion of t he game at most q ( n ) balls are ever t ossed, and each of t hem can land in one out of at most z = dq ( n ) = (log q ( n ) + log k )e bins. T his, t oget her wit h (1) and t he fact t hat q is a polynomial, implies t hat t here are at most a polynomial number of t erms w t ( d ) cont ribut ing a non-zero fact or t o t he value v a l . T herefore, in order t o show t hat v a l is bounded by a polynomial in n , it is enough t o show t hat for = 0, it holds t hat w t ( n ba l l j ) is bounded by a polynomial in n . To each n ba l l j 6 t his purpose, let us set z 0 = 1 + 3c (dlog q ( n ) + log k e), x a bin number j and denot e by E d , for any nat ural number d , t he event t hat n ba l l j = d , and, nally, by E t he event t hat one of E 1 ; : : : ; E z 0 − 1 happens. T hen it holds t hat v a l is !



( )t (n )

P rob [E ] ( k

q n

( ))

q n

3c

2

X

z

+

P rob [E d = z

X



z

( )

q n

p oly( k n ) +

d d = z

0

log q ( n ) + log k q (n )

d

]

c

d

0 d

1−

log q ( n ) + log k q (n )

q (n )

−d c

d

( )

t n

Removing Complexity Assumpt ions from Concurrent Zero-Knowledge P roofs q (n )

X



p oly( k n ) +

3q ( n ) d

d = z



d

log q ( n ) + log k q (n )

433

d

c

d

( )

t n

0

p oly( k n ) + t ( n )

( ) = p oly( k n ) ;

q n

where t he rst inequality follows from (1) and (2) above, and t he second from t he expression of t he dist ribut ion of t he number of balls int o a bin.

5

A P ro t o co l fo r a W e akly S y n ch ro n o u s M o d e l

In t his sect ion we present a concurrent zk proof syst em in a weakly synchronous model for a large class of languages. T his result does not make any unproven complexity assumpt ion and preserves t he type of zk of t he original proof syst em. We de ne C L 2 as t he class of languages having a two-party zk proof syst em for which complet eness holds wit h probability 1, soundness wit h probability at most 1= 2 + ( n ), for a negligible funct ion , and wit h t he following property. T here exist s a prover A0, called t he lu c k y p ro v e r , such t hat : (1) A 0 runs in polynomial t ime; (2) A 0 makes B accept wit h probability exact ly equal t o 1= 2 for any input x (i.e., in L or not ); (3) for any probabilist ic polynomial t ime B 0, t he t ranscript generat ed by t he original prover A when int eract ing wit h B 0 and t he t ranscript generat ed by t he lucky prover A 0 when int eract ing wit h B 0, are equally dist ribut ed whenever t he lat t er t ranscript is accept ing and x 2 L . We not e t hat all languages having a 3-round public-coin two-party perfect zk proof syst em belong t o C L 2 . Also, all languages in NP (using t he comput at ional zk proof syst em in [3]) and all languages having an int eract ive proof syst em (using t he comput at ional zk proof syst em in [14]) belong t o C L 2 . T h e o re m 3 . L e t L b e a la n g u a g e b e lo n g in g t o c la ss C L 2 a n d le t b e t h e t w o p a rt y z k p ro o f sy st em a sso cia t ed w it h L . A lso , let q b e a p o ly n o m ia l. T h e n 0 in t h e w e a k ly -sy n ch ro n o u s m o d e l, L h a s a ( q ( n )) -c o n c u rre n t z k p ro o f sy st e m w h ere n is t h e len g t h o f t h e in p u t s. M o re ov er, if is co m p u t a t io n a l, st a t ist ica l, o r p erfe c t z k t h e n so is 0.

Not e t hat t he result in T heorem 3 is uncomparable wit h t he result in T heorem 2. While in t he former t he assumpt ions on t he synchronicity of t he model is weaker, in t he lat t er t he class of languages t o which it applies is larger. T he rest of t his sect ion is devot ed t o t he proof of T heorem 3. D e sc rip t io n o f t h e t e ch n iqu e . A

rst st ep in t he const ruct ion of our proof syst em 0 = (P,V) consist s of performing some modi ed sequent ial composit ion of t he proof syst em = (A,B); speci cally, a composit ion in which P runs t he program of t he associat ed lucky prover A 0 and V uses algorit hm B t o verify t hat only one of t he proofs is accept ing (rat her t han all of t hem). More precisely, we would like t o repeat t hese execut ions unt il P nally gives a proof (using t he lucky prover) t hat is accept ing. However not e t hat we cannot repeat t hese execut ions t oo many t imes ot herwise a cheat ing prover could have a t oo high chance of complet ing at least one of t he several execut ions in which he was running t he

434

Giovanni Di Crescenzo

lucky prover. T herefore, we need t o guarant ee a nal execut ion of on which P cannot delay his accept ing proof any furt her. Speci cally, t he nal execut ion will be t he (log q ( n ))-t h execut ion, where q ( n ) is t he max number of concurrent execut ions of t he prot ocol t hat t he adversary can generat e, and k is t he desired soundness paramet er. In t his nal execut ion P runs algorit hm A and V runs algorit hm B. Let us call 00 t he prot ocol t hus obt ained; prot ocol 0 is obt ained by running k q ( n ) sequent ial execut ions of 00 . P ro p e rt ie s o f p ro t o c o l 0. Cont rarily t o t he prot ocol in Sect ion 4, t he prover and t he veri er of t he prot ocol 0 in t his sect ion do not use any informat ion about t he current t ime or about t he value of t he delay t hat a message t akes t o go from it s sender t o it s receiver. For t he proof of t he zk requirement , however, we assume t hat at any t ime such delay is t he same for all messages. We observe t hat t he complet eness property of 0 direct ly follows from t he analogue property of . Moreover, t he soundness property is proved as follows. Since has soundness paramet er 1, t he probability t hat a prover is able t o comput e an accept ing proof in 00 is  1 − 2− lo g q ( n )  1 − 1=q ( n ). Since t he number of independent execut ions of 00 in 0 is k q ( n ), for any prover, t he veri er accept s wit h probability  (1− 1=q ( n )) k q ( n )  e − k , and t herefore t he soundness paramet er of 0 is at least k . In t he rest of t he sect ion we prove t hat t he requirement of concurrent zk is sat is ed by 0. T he const ruct ion of t he simulat or S 0 consist s of ‘almost always’ running t he same program t hat is run by t he prover. Speci cally, in order t o simulat e t he rst log q ( n )− 1 execut ions of in each it erat ions of 0, t he simulat or S 0 can just run t he program of t he prover P, since it requires only polynomial t ime (recall t hat t he prover P is running t he lucky prover associat ed wit h , which runs in polynomial t ime). T he only di culty arises when t he simulat or has t o simulat e t he (log q ( n ))-t h execut ion of inside a cert ain it erat ion of 0. Not e t hat in t his case in a real execut ion of 0 t he prover always provides an accept ing proof. Here t he st rat egy of t he simulat or S 0 will be t hat of repeat edly rewinding t he adversary A up t o t he t ime right before t he beginning of t his part icular execut ion, unt il, using t he lucky prover again, S 0 is able t o produce an accept ing proof for all concurrent execut ions of . Not e t hat propert ies (1) and (3) in t he de nit ion of lucky prover imply t hat t he simulat ion is perfect . In order t o prove t hat S 0 runs in expect ed polynomial t ime, rst observe t hat t he only execut ions t hat may ever cause S 0 t o rewind are t hose corresponding t o a nal execut ion of a cert ain it erat ion; t hen, observe t hat t he expect ed number of concurrent execut ions of one it erat ion of 0 t hat will ever have t o run t he nal execut ion of is, in fact , very small. T herefore, since t he lucky prover can be run in polynomial t ime, we only need t o show t hat t he expect ed t ime of t he simulat ion of all nal execut ions in a single it erat ion is polynomial. To see t his, observe t hat t his expect ed running t ime is q (n )

X



( )

q n





1 2

d

lo g q ( n )



d

1−

−1



1 2

lo g q ( n )

q (n )

−1

−d

2d

d = 1 q (n )

X



3q ( n ) d

d





1 2l o g

q (n )

−1

d

2d 

( q ( n )) ;

d = 1

where t he rst inequality is obt ained as t he probability t hat in d execut ions of 0 a nal execut ion of is run, t imes t he expect ed t ime 2d t o simulat e all

Removing Complexity Assumpt ions from Concurrent Zero-Knowledge P roofs

435

nal execut ions using t he lucky prover, and summing over all d = 1; : : : ; q ( n ). We not e t hat t he number of rounds of 0 is k q ( n ) log q ( n ) but can be reduced t o k q ( n ) by replacing t he ‘sequent ial repet it ions’ of 00 wit h a ‘sequent ial pipelined repet it ion’ (det ails omit t ed). A ckn ow le d g e m e nt s . Many t hanks t o Alfredo De Sant is, Russell Impagliazzo,

Rafail Ost rovsky, Giuseppe P ersiano and Mot i Yung for int erest ing discussions.

R e fe re n ce s 1. M. Ben-Or, J . Hast ad, J . Kilian, O. Goldreich, S. Goldwasser, S. Micali, and P. Rogaway, Ever ythi ng Provable i s Provable i n Zero-K nowledge, CRYP T O 88. 2. T . Bet h and Y. Desmedt , I denti cati on Tokens - or : Solvi ng the Chess Grandmaster Problem, in P roc. of CRYP T O 90. 3. M. Blum, How to Prove a T heorem So No One Else Can Clai m I t , in P roc. of t he Int ernat ional Congress of Mat hemat icians, 1986. 4. R. Boppana, J . Hast ad, and S. Zachos, Does co-NP have Shor t I nteracti ve Proofs ?, in Inf. P roc. Let t ., vol. 25, May 1987. 5. I. Damgaard, I nteracti ve Hashi ng Si mpli es Zero-K nowledge Protocol De si gn Wi thout Complexi ty A ssumpti ons, in P roc. of CRYP T O 93. 6. A. De Sant is, G. Di Crescenzo, G. P ersiano and M. Yung, On Monotone For mula Closure of SZK , in P roc. of FOCS 94. 7. G. Di Crescenzo and R. Ost rovsky, On Concur rent Zero-K nowledge wi th PreProcessi ng, in P roc. of CRYP T O 99. 8. G. Di Crescenzo, K. Sakurai and M. Yung, On Zero-K nowledge Proofs: \ From M ember shi p to Deci si on" , in P roc. of ST OC 2000. 9. C. Dwork, M. Naor, and A. Sahai, Concur rent Zero-K nowledge, ST OC 98. 10. C. Dwork and A. Sahai, Concur rent Zero-K nowledge: Reduci ng the Need for T i mi ng Constrai nts, in P roc. of CRYP T O 98. 11. L. Fort now, T he Complexi ty of Per fect Zero-K nowledge, in P roc. of ST OC 87. 12. O. Goldreich, S. Micali, and A. W igderson, Proofs that Y i eld Nothi ng but thei r Vali di ty or Al l Languages i n NP Have Zero-K nowledge Proof Systems, in J ournal of t he ACM, vol. 38, n. 1, 1991. 13. S. Goldwasser, S. Micali, and C. Racko , T he K nowledge Complexi ty of I nteractive Proof-Systems, in SIAM J ournal on Comput ing, vol. 18, n. 1, February 1989. 14. R. Impagliazzo and M. Yung, Di rect M i ni mum-K nowledge Computati on, in P roc. of CRYP T O 87. 15. J . Kilian, E. P et rank, and C. Racko , Lower Bounds for Zero-K nowledge on the I nternet , in P roc. of FOCS 98. 16. R. Richardson and J . Kilian, On the Concur rent Composi ti on of Zero-K nowledge Proofs, in P roc. of EUROCRYP T 99. 17. M. Tompa and H. Woll, Random Self-Reduci bi li ty and Zero-K nowledge I nteracti ve Proofs of Possessi on of I nfor mati on, in P roc. of FOCS 87.

O n e -W ay P ro b a b ilis t ic R e v e rs ib le a n d Q u a n t u m O n e -C o u n t e r A u t o m a t a Tomohiro Yamasaki, Hirot ada Kobayashi, Yuuki Tokunaga, and Hiroshi Imai Depart ment of Informat ion Science, Faculty of Science, University of Tokyo 7{3{1 Hongo, Bunkyo-ku, Tokyo 113{0033, J apan f yamasaki , hi r ot ada, t okunaga, i mai g@i s. s. u- t okyo. ac. j p

Kravt sev int roduced 1-way quant um 1-count er aut omat a (1Q1CAs), and showed t hat several non-cont ext -free languages can b e recognized by b ounded error 1Q1CAs. In t his pap er, we rst sh ow t hat all of t hese non-cont ext -free languages can b e also recognized by b ounded error 1P R1CAs (and so 1Q1CAs). Moreover, t he accept ing probability of each of t hese 1P R1CAs is st rict ly great er t han, or at least equal t o, t hat of corresp onding Kravt sev’s original 1Q1CA. Second, we show t hat t here exist s a b ounded error 1P R1CA (and so 1Q1CA) which recognizes n f a n1 a n2 a k g, for each k  2. We also show t hat , in a quant um case, we can improve t he accept ing probability in a st rict sense by using quant um int erference. T hird, we st at e t he relat ion b etween 1-way det erminist ic 1count er aut omat a (1D1CAs) and 1Q1CAs. On one hand, all of ab ove ment ioned languages cannot b e recognized by 1D1CAs b ecause t hey are non-cont ext -free. On t he ot her hand, we show t hat a regular language f f a ; b g a g cannot b e recognized by b ounded error 1Q1CAs. A b st r a c t .

1

In t ro d u c t io n

It has been widely considered t hat quant um mechanism gives new great power for comput at ion aft er Shor [8] showed t he exist ence of quant um polynomial t ime algorit hm for int eger fact oring problem. However, it has been st ill unclear why quant um comput ers are so powerful. In t his cont ext , it is wort h considering simpler models such as nit e aut omat a. Quant um nit e aut omat a were int roduced by Moore and Crut ch eld [6] and Kondacs and Wat rous [3], independent ly. T he lat t er showed t hat t he class of languages recognizable by bounded error 1-way quant um nit e au t omat a (1QFAs) is properly cont ained in t he class of regular languages. T his means t hat 1QFAs are st rict ly less powerful t han classical 1-way det erminist ic nit e aut omat a. T his weakness comes from t he rest rict ion of reversibility. Since any quant um comput at ion is performed by unit ary operat ors and unit ary operat ors are reversible, any t ransit ion funct ion of quant um comput at ion must be reversible. Ambainis and Freivalds [2] st udied t he charact erizat ions of 1QFAs in more det ail by comparing 1QFAs wit h 1-way probabilist ic reversible nit e aut omat a (1P RFAs), for 1P RFAs are clearly special cases of 1QFAs. T hey showed t hat t here exist languages, such as f a b g, which can be recognized by bounded error 1QFAs but D .-Z. D u et a l. ( E d s.) : C O C O O N 2000, L N C S 1858, p p . 436{446, 2000.

c Sp r in ger -Ver la g B er lin H eid elb er g 2000

One-Way P robabilist ic Reversible and Quant um One-Count er Aut omat a

437

not by bounded error 1P RFAs. However, as we show in t his paper, t his sit uat ion seems dierent in case of aut omat a wit h one count er. Kravt sev [4] int roduced 1-way quant um 1-count er aut omat a (1Q1CAs), and showed t hat several non-cont ext -free languages such as L 1 =   a i ba j ba k j k = i 6 = j _k = j 6 = i , and L 3 = a i ba j ba k j i = j = k , L 2 =  a i ba j ba k j exact ly 2 of i ; j ; k are equal , can be recognized by bounded error 1Q1CAs. No clear comparisons wit h ot her aut omat a such as 1-way det erminist ic 1-count er aut omat a (1D1CAs) or 1-way probabilist ic reversible 1-count er aut omat a (1P R1CAs) were done in [4]. In t his paper, we invest igat e t he power of 1Q1CAs in comparison wit h 1P R1CAs and 1D1CAs. We rst show t hat all of t hese non-cont ext -free languages ca n be also recognized by bounded error 1P R1CAs (and so 1Q1CAs). Moreover, t he accept ing probability of each of t hese 1P R1CAs is st rict ly great er t han, or at least equal t o, t hat of corresponding Kravt sev’s original 1Q1CA. Second, we show t hat t here exist s a bounded error 1P R1CA (and so 1Q1CA) a k g, for each k 2. T his result is in cont rast which recognizes L k ; 4 = f a 1 a 2 t o t he case of no count er shown by Ambainis and Freivalds [2]. We ext end t his result by showing t hat t here exist s a bounded error 1P R1CA (and so 1Q1CA) a nk g, for each k 2. We also show t hat , in which recognizes L k ; 5 = f a n1 a n2 a quant um case, we can improve t he accept ing probability in a st rict sense by using quant um int erference. T hird, we st at e t he relat ion between 1D1CAs and 1Q1CAs. On one hand, all of above ment ioned languages cannot be recognized by 1D1CAs because t hey are non-cont ext -free. On t he ot her hand, we show t hat a regular language f f a; bg a g cannot be recognized by bounded error 1Q1CAs.

2

D e n it io n s

A 1-way det erm in ist ic 1-cou n t er au t om at on ( 1D 1C A ) is de n ed is a n it e ; ; q 0 ; Q a cc ; Q r ej ) , where Q is a n it e set of st at es, Q is a set of accept in g st at es, in pu t alphabet , q0 is t he in it ial st at e, Q a cc Q is a set of reject in g st at es, an d  : Q Γ S ! Q f − 1; 0; + 1g is a Q r ej t ran sit ion fu n ct ion , where Γ = [ f cj ; $g, sy m bol cj 2 6 is t he left en d-m arker, sy m bol $ 6 2 is t he right en d-m arker, an d S = f 0; 1g. D e n it io n 1 by M = ( Q ;

We assume t hat each 1D1CA has a count er which can cont ain an arbit rary int eger and t he count er value is 0 at t he st art of comput at ion. According t o t he second element of  , − 1; 0; + 1 respect ively, corresponds t o decrease of t he count er value by 1, ret ainment t he same and increase by 1. Let s = sign( k ), where k is t he count er value and sign( k ) = 0 if k = 0, ot herwise 1. We also assume t hat all input s are st art ed by cj and t erminat ed by $. T he aut omat on st art s in q0 and reads an input w from left t o right . At t he i t h st ep, it reads a symbol w i in t he st at e q, checks whet her t he count er value is 0 or not (i.e. checks s ) and nds an appropriat e t ransit ion  ( q; w i ; s ) = ( q0; d ). T hen

438

Tomohiro Yamasaki et al.

it updat es it s st at e t o q0 and t he count er value according t o d . T he aut omat on accept s w if it ent ers t he nal st at e in Q a cc and reject s if it ent ers t he nal st at e in Q r ej . A 1-way reversible 1-cou n t er au t om at on ( 1R 1C A ) is de n ed as a 1D 1C A su ch t hat , for an y q 2 Q , 2 Γ an d s 2 f 0; 1g, t here is at m ost on e st at e q0 2 Q su ch t hat ( q0; ; s ) = ( q; d ) . D e n it io n 2

D e n i t i o n 3 A 1-way probabilist ic 1-cou n t er au t om at on ( 1P 1C A ) is de n ed by M = ( Q ; ; ; q 0 ; Q a cc ; Q r ej ) , where Q , , q0 , Q a cc , an d Q r ej are t he sam e as for 1D 1C A s. A t ran sit ion fu n ct ion is de n ed as Q Γ S Q f − 1 ; 0 ; + 1 g ! R+ , where Γ ; cj ; $, an d S are t he sam e as for 1D 1C A s. For an y q; q0 2 Q ; 2 Γ ; s 2 f 0; 1g; d 2 f − 1; 0; + 1g, sat is es t he followin g con dit ion : P

( q; ; s; q0; d ) = 1:

q 0; d

T he denit ion of a count er remains t he same as for 1D1CAs. A language L is said recognizable by a 1P 1CA wit h probability p if t here exist s a 1P 1CA which accept s any input x 2 L wit h probability at least p > 1=2 and reject s any input x 6 2 L wit h probability at least p . We may use t he t erm \ accept ing probability" for denot ing t his probability p . D e n i t i o n 4 A 1-way probabilist ic reversible 1-cou n t er au t om at on ( 1P R 1C A ) is de n ed as a 1P 1C A su ch t hat , for an y q 2 Q , 2 Γ an d s 2 f 0; 1g, t here is at m ost on e st at e q0 2 Q su ch t hat ( q0; ; s; q; d ) is n on -zero.

D e n i t i o n 5 A 1-way qu an t u m 1-cou n t er au t om at on ( 1Q 1C A ) is de n ed by M = ( Q ; ; ; q 0 ; Q a cc ; Q r ej ) , where Q , , q0 , Q a cc , an d Q r ej are t he sam e as for 1D 1C A s. A t ran sit ion fu n ct ion is de n ed as Q Γ S Q f − 1; 0; + 1g ! C , where Γ ; cj ; $, an d S are t he sam e as for 1D 1C A s. For an y q; q0 2 Q ; 2 Γ ; s 2 f 0; 1g; d 2 f − 1; 0; + 1g, sat is es t he followin g con dit ion s:

P P q

q

y 0; d

(q1 ;

;s

(

y 0; d

1

(q1 ;

0 ;q ;

P

;s

+ 1) ( q 2 ; y

q

0 1; q ; d)

0; d

;s

2

(q2 ;

0 ;q ;

( q 1 ; ; s 1 ; q 0;

;s

0) +

0 2; q ; d) y

(q1 ;

+ 1) ( q 2 ;

;s

1 0

(q1 = (q1 6 =

0 ;q ;

0) ( q 2 ;

=

;s 2

1

0 ;q ;

q2 ) q2 ) ;s

2

; 0 ;q ;

− 1) = 0;

− 1) = 0:

T he denit ion of a count er remains t he same as for 1D1CAs. T he number of con gurat ions of a 1Q1CA on any input x of lengt h n is precisely (2n + 1) j Q j , since t here are 2n + 1 possible count er value and j Q j int ernal st at es. For a xed M , let C n denot e t his set of con gurat ions. A comput at ion on an input x of lengt h n corresponds t o a unit ary evolut ion in t he Hilbert space H n = l 2 ( C n ). For each ( q; k ) 2 C n ; q 2 Q ; k 2 [− n ; n ], let j q; k i denot e t he Pbasis vect or in l 2 ( C n ). A superposit ion of a 1Q1CA corresponds t o a unit vect or q ; k q ; k j q; k i , where q ; k 2 C is t he amplit ude of j q; k i .

One-Way P robabilist ic Reversible and Quant um One-Count er Aut omat a

A unit ary operat or U for a symbol U

P

j q; k i =

439

on H n is dened as follows:

( q; ; sign( k ) ; q0; d ) j q0; k + d i :

q 0; d

Aft er each t ransit ion, a st at e of a 1Q1CA is observed. T he comput at ional observable O corresponds t o t he ort hogonal decomposit ion l 2 ( C n ) = E a cc E n on . T he out come of any observat ion will be eit her \ accept " ( E a cc ) or E r ej \ reject " ( E r ej ) or \ non-halt ing" ( E n on ). T he probability of t he accept ance, reject ion and non-halt ing at each st ep is equal t o t he sum of t he squared amplit ude of each basis st at e in new st at e for t he corresponding subspace. T he denit ion of t he recognizability remains t he same as for 1P 1CAs. To describe concret e aut omat a easily, we use t he concept of simple 1Q1CAs. A 1Q1CA is said simple if, for any 2 Γ ; s 2 f 0; 1g, t here is a unit ary operat or Γ ! f − 1; 0; + 1g such t hat V ; s on l 2 ( Q ) and a count er funct ion D : Q (

0

( q; ; s; q ; d ) =

hq0j V ; s j qi 0

if D ( q0; ) = d ; ot herwise

where hq0j V ; s j qi is t he coe cient of j qi 2 V ; s j qi . We also use t his represent at ion for 1D1CA, 1R1CA, and 1P R1CA.

3

R e c o g n iz a b ilit y o f

L

1;

L

2,

an d

L

3

Kravt sev [4] showed t hat several non-cont ext -free languages such as L 1   = a i ba j ba k j i = j = k , L 2 = a i ba j ba k j k = i 6 = j _k = j 6 = i , and L 3 =  a i ba j ba k j exact ly 2 of i ; j ; k are equal , can be recognized by bounded error 1Q1CAs. In t his sect ion, we show t hat all of t hese languages can be also recognized by bounded error 1P R1CAs. Moreover, t he accept ing probability of each of t hese 1P R1CAs is st rict ly great er t han, or at least equal t o, t hat of corresponding Kravt sev’s original 1Q1CAs. T his also indicat es t he exist ence of a 1Q1CA for each of t hese languages whose accept ing probability is st rict ly great er t han, or at least equal t o, t hat of corresponding Kravt sev’s original one, since a 1P R1CA is regarded as a special case of a 1Q1CA.   Let L i = j = a i ba j ba k j i = j and L i = ( j + k ) = 2 = a i ba j ba k j i = ( j + k ) =2 . T he exist ence of a 1R1CA for each of t hese can be shown easily. L e m m a 1 T here exist 1R 1C A s M R ( L i = j ) , M R ( L j = k ) , M R ( L k = i ) for L i = j , L j = k , L k = i , respect ively .

M R (L j = ( k + i ) = 2 ), L e m m a 2 T here exist 1R 1C A s M R (L i = ( j + k ) = 2 ), M R ( L k = ( i + j ) = 2 ) for L i = ( j + k ) = 2 , L j = ( k + i ) = 2 , L k = ( i + j ) = 2 , respect ively .

We show t he case of L i = ( j + k ) = 2 . Ot her cases of L j = ( k + i ) = 2 ; L k = ( i + j ) = 2 can be shown in similar ways. Let t he st at e set Q = f q0 ; q1 ; q2 ; q3 ; q4 ; q5 ; qa cc ; qr ej1 ; qr ej2 ; qr ej3 ; qr ej4 ; qr ej5 g, where q0 is an init ial st at e, qa cc is an accept ing st at e, and qr ej1 , qr ej2 , qr ej3 , qr ej4 , P r o o f:

440

Tomohiro Yamasaki et al.

qr ej5 are reject ing st at es. Dene t he t ransit ion mat rices V ; s and t he count er funct ion D of M R ( L i = ( j + k ) = 2 ) as follows: V cj ; 0 j q 0 i

D D D D

= jq1 i ;

( q 1 ; a ) = + 1; ( q 2 ; a ) = − 1; ( q 4 ; a ) = − 1; ( q ; ) = 0; ot herwise,

V $ ; 0 jq1 i

= jqr e j 1 i ; = jqr e j 2 i ; V $ ; 0 jq4 i = jqa c c i ;

Va

;0

jq1 i = jq1 i ; jq2 i = jqr e j 2 i ; V a ; 0 jq4 i = jqr e j 4 i ;

V b ; 0 jq1 i

V $ ; 0 jq2 i

Va

;0

V b ; 0 jq2 i

V $ ; 1 jq1 i

jq1 i jq2 i V a ; 1 jq3 i V a ; 1 jq4 i V a ; 1 jq5 i

V b ; 1 jq1 i

= = V $ ; 1 jq3 i = V $ ; 1 jq4 i = V $ ; 1 jq5 i =

V $ ; 1 jq2 i

jqr e j 1 i ; jqr e j 2 i ; jqr e j 3 i ; jqr e j 4 i ; jqr e j 5 i ;

Va

;1

Va

;1

= = = = =

jq1 i ; jq3 i ; jq2 i ; jq5 i ; jq4 i ;

= jq2 i ; = jq4 i ; V b ; 0 jq4 i = jqr e j 4 i ;

= = V b ; 1 jq3 i = V b ; 1 jq4 i = V b ; 1 jq5 i = V b ; 1 jq2 i

jq2 i ; jq4 i ; jq5 i ; jqr e j 4 i ; jqr e j 5 i :

Reversibility of t his aut omat on can be checked easily.  Kravt sev [4] showed t he recognizability of L 1 = a i ba j ba k j i = j = k probability 1 − 1=c for arbit rary chosen c 3 by a 1P 1CA and a 1Q1CA. 1P 1CA for L 1 is clearly reversible, and so, L 1 is recognized by 1P R1CA probability 1 − 1=c.  = j _k = j 6 =i Here we show t he recognizability of L 2 = a i ba j ba k j k = i 6

2 wit h T his wit h .

T h e o r e m 1 T here exist s a 1P R 1C A M P R ( L 2 ) which recogn izes L 2 wit h proba-

bilit y 3=5.

Aft er reading t he left end-marker cj , M P R ( L 2 ) ent ers one of t he following t hree pat hs, pat h-1, pat h-2, pat h-3, wit h probability 1=4; 1=4; 1=2, respect ively. In pat h-1(pat h-2), M P R ( L 2 ) checks whet her j = k ( k = i ) or not , by behaving in t he same way as M R ( L j = k )( M R ( L k = i )) except for t he t reat ment of accept ance and reject ion. T he input is accept ed wit h probability 4=5 if j = k ( k = i ) is sat ised, while it is always reject ed if j 6 = k (k 6 = i ). = ( j + k ) =2 or not , by behaving in In pat h-3, M P R ( L 2 ) checks whet her i 6 t he same way as M R ( L i = ( j + k ) = 2 ) except for t he t reat ment of accept ance and reject ion. T he input is accept ed wit h probability 4=5 if i 6 = ( j + k ) =2 is sat ised, while it is always reject ed if i = ( j + k ) =2. T hen t he input x 2 L 2 always sat ises t he condit ion of pat h-3 and exact ly one of t he condit ions of rst two pat hs. Hence, M P R ( L 2 ) accept s it wit h probability 2 L 2 wit h probability at 3=5. On t he ot her hand, M P R ( L 2 ) reject s any input x 6 least 3=5. Indeed, when t he input sat ises i = j = k , t he condit ions of pat h-1 and pat h-2 are sat ised while t he condit ion of pat h-3 is not sat i sed, hence, M P R ( L 2 ) reject s it wit h probability 3=5. Next , when i ; j ; k dier from one anot her, none of t he condit ions of pat h-1 and pat h-2 are sat ised, hence M P R ( L 2 ) reject s it wit h probability at least 3=5. F inally, when t he input is not in t he form of a i ba j ba k , it is always reject ed, obviously. Reversibility of t his aut omat on is clear by it s const ruct ion. 2 P r o o f:

C o r o l l a r y 1 T here exist s a 1Q 1C A M Q ( L 2 ) which recogn izes L 2 wit h probabil-

it y 3=5.

Not e t hat t he accept ing probability 3=5 of t his 1Q1CA M Q ( L 2 ) for L 2 is great er t han t he original Kravt sev’s 4=7.

One-Way P robabilist ic Reversible and Quant um One-Count er Aut omat a 

Next we show t hat L 3 = a i ba j ba k j exact ly 2 of i ; j ; k are equal recognized by 1P R1CA wit h bounded error.

441



can be

T h e o r e m 2 T here exist s a 1P R 1C A M P R ( L 3 ) which recogn izes L 3 wit h proba-

bilit y 4=7.

Aft er reading t he left end-marker cj , M P R ( L 3 ) ent ers one of t he following four pat hs, pat h-1, pat h-2, pat h-3, pat h-4, wit h probability 1=6; 1=6; 1=6; 1=2, respect ively. In pat h-1(pat h-2)[pat h-3], M P R ( L 3 ) checks whet her i = j ( j = k )[k = i ] or not , by behaving in t he same way as M R ( L i = j )( M R ( L j = k ))[M R ( L k = i )] except for t he t reat ment of accept ance and reject ion. T he input is accept ed wit h probability 6=7 if i = j ( j = k )[k = i ] is sat ised, while it is always reject ed if i 6 = j (j 6 = k )[k 6 = i ]. = ( j + k ) =2 or not , by behaving in In pat h-4, M P R ( L 3 ) checks whet her i 6 t he same way as M R ( L i = ( j + k ) = 2 ) except for t he t reat ment of accept ance and reject ion. T he input is accept ed wit h probability 6=7 if i 6 = ( j + k ) =2 is sat ised, while it is always reject ed if i = ( j + k ) =2. T hen t he input x 2 L 3 always sat ises t he condit ion of pat h-4 and exact ly one of t he condit ions of rst t hree pat hs. Hence, M P R ( L 3 ) accept s it wit h probability 2 L 3 wit h probability at 4=7. On t he ot her hand, M P R ( L 3 ) reject s any input x 6 least 4=7. Indeed, when t he input sat ises i = j = k , t he condit ions of pat h-1, pat h-2, and pat h-3 are sat ised while t he condit ion of pat h- 4 is not sat ised, hence, M P R ( L 3 ) reject s it wit h probability at least 4=7. Next , when i ; k ; j dier from one anot her, none of t he condit ions of rst t hree pat hs a re sat ised, hence, M P R ( L 3 ) reject s it wit h probability at least 4=7. F inally, when t he input is not in t he form of a i ba j ba k , it is always reject ed, obviously. Reversibility of t his aut omat on is clear by it s const ruct ion. 2

P r o o f:

C o r o l l a r y 2 T here exist s a 1Q 1C A M Q ( L 3 ) which recogn izes L 3 wit h probabil-

it y 4=7.

Not e t hat t he accept ing probability 4=7 of t his 1Q1CA M Q ( L 3 ) for L 3 is great er t han t he original Kravt sev’s 1=2 +  . 

4

R e c o g n iz a b ilit y o f

L k;5

=

a

n

n

1a 2

···a

n k



Here we show t hat anot her family of non-cont ext -free languages L k ; 5 = a nk g for each xed k 2, is also recognizable by bounded error f a n1 a n2 1P R1CAs. a k g, for each xed k 2, is recognizable F irst we show t hat L k ; 4 = f a 1 a 2 by a 1P R1CA wit h bounded error. For each k 2, let L k ; i j i + 1 = f f a 1 ; : : : ; a i g f a i + 1 ; : : : ; a k g g for each i , 1 i k − 1. L e m m a 3 For each k i k − 1.

1

2, t here exist s a 1R 1C A M R ( L k ; i j i + 1 ) for each L k ; i j i + 1 ,

442

Tomohiro Yamasaki et al.

P r o o f : Let t he st at e set Q = f q0 ; q1 ; qa cc ; qr ej g, where q0 is an init ial st at e, qa cc is an accept ing st at e, and qr ej is a reject ing st at e. Dene t he t ransit ion mat rices V ; s and t he count er funct ion D of M R ( L k ; i j i + 1 ) as follows: V cj ; 0 j q 0 i V $ ; 0 jq1 i V $ ; 1 jq1 i

= jq1 i ; = jqa c c i ; = jqa c c i ;

Va j Va j Va j Va j

;0 ;1

jq1 i = jq1 i ; 1  jq1 i = jqr e j i ; 1 

jq1 i = jq1 i ; ; 1 jq1 i = jq1 i ; ;0

i i

j j

+ 1 + 1



i



D

( q 1 ; a j ) = + 1; i + 1 

D

( q ; ) = 0;

j



k

i



j j



ot herwise.

k k

2

Reversibility of t his aut omat on can be checked easily. T h e o r e m 3 For each k 2, t here exist s a 1P R 1C A M probabilit y 1=2 + 1=(4k − 6) .

P R (L

k ;4

) for L k ; 4 wit h

P r o o f : Aft er reading t he left end-marker cj , one of t he following k − 1 pat hs is chosen wit h t he same probability 1=( k − 1). In t he i t h pat h, M P R ( L k ; 4 ) checks whet her t he input is in L k ; i j i + 1 or not , k − 1. If t he input is in L k ; i j i + 1 , M P R ( L k ; 4 ) ut ilizing M R ( L k ; i j i + 1 ), for 1 i accept s it wit h probability p , while if t he input is not in L k ; i j i + 1 , M P R ( L k ; 4 ) always reject s it . Since t he input x 2 L k ; 4 sat ises t he condit ion in any pat h, M P R ( L k ; 4 ) accept s it wit h probability p . On t he ot her hand, for any input x 6 2 L k ; 4 , t here exist s at least one pat h whose condit ion is not sat ised. T hu s, t he probability M P R ( L k ; 4 ) is at most p ( k − 2) =( k − 1). Hence, if we t ake p such t hat p ( k − 2) =( k − 1) < 1=2 < p , M P R ( L k ; 4 ) recognizes L k ; 4 wit h bounded error. To maximize t he accept ing probability, we solve 1 − p ( k − 2) =( k − 1) = p , which gives p = 1=2 + 1=(4k − 6). Reversibility of t his aut omat on is clear by it s const ruct ion. 2 C o r o l l a r y 3 For each k 2, t here exist s a 1Q 1C A M probabilit y 1=2 + 1=(4k − 6) .

Q (L

k ;4

) for L k ; 4 wit h

It has been known t hat , while t here exist s a 1QFA which recognizes L k ; 4 wit h bounded error, any 1P RFA cannot recognize L k ; 4 wit h bounded error [2]. In t his point , T heorem 3 gives a cont rast ive result between no-count er and one-count er cases. Before showing t he recognizability of L k ; 5 , we prove one more lemma. Let k − 1. each L k ; # a i = # a i + 1 = f x j (# of a i in x ) = (# of a i + 1 in x ) g for 1 i L e m m a 4 For each k i k L k ;# a i = # a i+ 1 ; 1

2, t here exist s a 1R 1C A M R ( L k ; # − 1.

ai

=#

a i+ 1

) for each

Let t he st at e set Q = f q0 ; q1 ; qa cc ; qr ej g, where q0 is an init ial st at e, qa cc is an accept ing st at e, and qr ej is a reject ing st at e. Dene t he t ransit ion mat rices V ; s and t he count er funct ion D of M R ( L k ; # a i = # a i + 1 ) as follows: P r o o f:

One-Way P robabilist ic Reversible and Quant um One-Count er Aut omat a V cj ; 0 j q 0 i V $ ; 0 jq1 V $ ; 1 jq1

= jq1 i ;

V a l ; 0 jq1 i V a l ; 1 jq1 i

= jq1 i ; 1  = jqr e j i ; 1 

l l

 

k

D

k

D

( q 1 ; a i ) = + 1; ( q 1 ; a i + 1 ) = − 1;

D

( q ; ) = 0; ot herwise.

i = jqa c c i ; i = jqa c c i ;

2

Reversibility of t his aut omat on can be checked easily. Now we show t he recognizability of L k ; 5 = f a 1 a 2 n

n

a

443

n k

g.

2, t here exist s a 1P R 1C A M P R ( L k ; 5 ) which recogn izes L k ; 5 wit h probabilit y 1=2 + 1=(8k − 10) .

T h e o r e m 4 For each k

Aft er reading t he left end-marker cj , one of t he following 2( k − 1) pat hs, pat h-1-1, : : : , pat h-1-( k − 1), pat h-2-1, : : : , pat h-2-( k − 1), is chosen wit h t he same probability 1=2( k − 1). In each pat h-1-i , M P R ( L k ; 5 ) checks whet her t he input is in L k ; i j i + 1 or not , k − 1. If t he input is in L k ; i j i + 1 , M P R ( L k ; 5 ) ut ilizing M R ( L k ; i j i + 1 ), for 1 i accept s it wit h probability p , while if t he input is not in L k ; i j i + 1 , M P R ( L k ; 5 ) always reject s it . In each pat h-2-i , M P R ( L k ; 5 ) checks whet her t he input is in L k ; # a i = # a i + 1 or k − 1. If t he input is in L k ; # a i = # a i + 1 , not , ut ilizing M R ( L k ; # a i = # a i + 1 ), for 1 i M P R ( L k ; 5 ) accept s it wit h probability p , while if t he input is not in L k ; # a i = # a i + 1 , M P R ( L k ; 5 ) always reject s it . Since t he input x 2 L k ; 5 sat ises t he condit ion in any pat h, M P R ( L k ; 5 ) accept s it wit h probability p . On t he ot her hand, for any input x 6 2 L k ; 5 , t here exist s at least one pat h whose condit ion is not sat ised. T hu s, t he probability M P R ( L k ; 5 ) accept s it is at most p (2k − 3) =(2k − 2). Hence, if we t ake p such t hat p (2k − 3) =(2k − 2) < 1=2 < p , M P R ( L k ; 5 ) recognizes L k ; 5 wit h bounded error. To maximize t he accept ing probability, we solve 1 − p (2k − 3) =(2k − 2) = p , which gives p = 1=2 + 1=(8k − 10). Reversibility of t his aut omat on is clear by it s const ruct ion. 2 P r o o f:

C o r o l l a r y 4 For each k 2, t here exist s a 1Q 1C A M Q ( L k ; 5 ) which recogn izes L k ; 5 wit h probabilit y 1=2 + 1=(8k − 10) .

5

Im p ro v in g t h e A c c e p t in g P ro b a b ilit y o f 1 Q 1 C A fo r

L k;5

In t he previous subsect ion, we showed t hat L k ; 5 = f a n1 a n2 a nk g is recognizable by a bounded error 1P R1CA. In t his sect ion, we also show t hat , in a quant um case, we can improve t he accept ing probability in a st rict sense by using quant um int erference. We ut ilize t he following result . = f a1 a2 a k g can be recogn ized by a 1Q FA M 1Q FA ( L k ; 4 ) wit h probabilit y p , where p is t he root of p ( k + 1) = ( k − 1) + p = 1 in t he in t erval of (1=2; 1) . T h e o r e m 5 ( A m b a i n i s e t . a l . [1 ]) L k ; 4

By using M 1Q FA ( L k ; 4 ), we prove t he exist ence of a 1Q1CA which recognizes L k ; 4 . T he following two lemmas can be shown easily.

444

Tomohiro Yamasaki et al.

3, if p ( k + 1) = ( k − 1) + p = 1, t hen 1=2 < p < 2=3.

L e m m a 5 For each k

L e m m a 6 For arbit rary m m u n it ary m at rices U 1 ; U 2 , t here exist s an 2 block u n it ary m at rix N ( U 1 ; U 2 ) su ch t hat

1 N (U 1 ; U 2 ) = p 2

2

 

U1 U2 |

;

{ z

}

2b lo ck s

are det erm in ed t o hold u n it ary of N .

where t he blocks in dicat ed by

Now, we prove t he main t heorem. T h e o r e m 6 For each k 2, L k ; 5 can be recogn ized by a 1Q 1C A wit h probabilit y p , where p is t he root of p ( k + 1) = ( k − 1) + p = 1 in t he in t erval of (1=2; 1) .

= By using M 1Q FA ( L k ; 4 ), we can const ruct a 1Q1CA M i 3k ; m = 1; 2g, ( Q ; ; ; q 11 ; Q a cc ; Q r ej ) as follows. Let Q = f qim j 1 i k g, Q a cc = f q2mk j m = 1; 2g, and Q r ej = f qim j k + 1 = f ai j 1 i 2k − 1; 2k + 1 3k ; m = 1; 2g. For each 2 Γ , we dene t he t ransit ion mat rices f W ; s g and t he count er funct ion D as follows: P r o o f:



W cj ; 0

W

= a

V cj O

N



O I

2i − 1 ; 0

W

;

k

W

D

V a 2i O O Ik



I

k

  

V$ O O

I

 

1

(qj

; a2i

j

) = − 1; for 1 

j j

D

( q j2 ; a 1 ) = 0; for 1 

j

D

; a2i +

1

W

a

a

=

2i − 1 ; 1

2i ; 1

$;1







=



O I

I

k

O I

I

k

I

O I

2k

O

  

2k



k;

1

i

 b

k = 2c ;

k;

1

i

 b

k = 2c ;

O I

O I k

k

V a 2i − 1 O O Ik

I

I

for

;

k



 

O



O

k

 

k

V a 2i O O Ik

=



 

k

2k

O



2k

 O

= 2;



;

;

;

is odd ;

k; j j

j



k;k

) = − 1; for 1 

( q j2 ; a k ) = 0; for 1 

W



( q j2 ; a 2 i ) = + 1; for 1 

(qj

;

;

( q j1 ; a k ) = 0; for 1 

2

W



O I

k

D

D

;

V cj O

=

W cj ; 0



( q j1 ; a 2 i − 1 ) = + 1; for 1  D

D

O

3;

 

V$ O

=



k

V a 2i − 1 O O Ik



$;0

for

k



V a 2i O O Ik

=



;

 

O I



2i ; 0



V cj O

V a 2i − 1 O O Ik

= a

 



 

k;

1

i

 b ( k − 1) = 2c ;

k;

1

i

 b ( k − 1) = 2c ;

k;k

is even ;

where each V is t he t ransit ion mat rix of M 1Q FA ( L k ; 4 ) and t he columns of t he t ransit ion mat rices correspond t o t he st at es in order of q11 ; q21 ; : : : ; qk1 ; q12 ; q22 ; : : : ; qk2 (i.e. t he order of t he basis st at es is be dened in t he manner described in Secq11 ; q21 ; : : : ; qk1 ; q12 ; q22 ; : : : ; qk2 ). Let t ion 2. If t he input st ring is of t he form a n1 a n2 : : : a nk , in each of two pat hs, t he input is accept ed. T hus, t he probability of accept ing is ( p=2) 2 = p .

One-Way P robabilist ic Reversible and Quant um One-Count er Aut omat a

445

If k = 2, t he input st ring is of t he form a m1 1 a m2 2 , and m 1 6 = m 2 , in t he rst pat h, t he input st ring is reject ed and t he st at es in t he second pat h are never ent ered. T hus, t he input is always reject ed. If k 3, t he input st ring is of t he form a m1 1 a m2 2 : : : a mk k , and t here exist s = m j , in at least one of two pat hs, t he at least one pair of ( i ; j ) such t hat m i 6 count er value is not 0 upon reading t he right end-marker. T hus, t he probability of accept ing is at most ( p=2) 1 = p=2. By Lemma 5, t he probability of reject ing is at least 1 − p=2 > 1 − (2=3) (1=2) = 2=3 > p . F inally, if t he input st ring is not of t he form a 1 a 2 : : : a k , in each of two pat hs, t he input st ring is reject ed wit h probability at least p , since each pat h is equivalent t o M 1Q FA ( L k ; 4 ) when t he count er is left out of considerat ion. T herefore, t he probability of reject ing is at least p . 2 P r o p o s i t i o n 1 T he accept in g probabilit y p of M is great er t han

1=2 + 1=(8k −

10) , t he accept in g probabilit y of M Q ( L k ; 5 ) . P r o o f:

6

Omit t ed.

2

R e la t io n b e t w e e n 1 D 1 C A s a n d 1 Q 1 C A s

As we have seen in Sect ion 3, 4, and 5, some non-cont ext -free languages can be recognized by bounded error 1Q1CAs. It is clear t hat 1D1CAs cannot recognize any non-cont ext -free languages, since 1D1CAs are special cases of 1-way pushdown aut omat a. T his indicat es t he st rengt h of 1Q1CAs. Conversely, we present t he weakness of 1Q1CAs by showing t hat t here is a regular language which can be recognized by a 1D1CA but not by a 1Q1CA wit h bounded error. T h e o r e m 7 T he lan gu age f f a; bg a g can n ot be recogn ized by a 1Q 1C A wit h bou n ded error. P r o o f : Nayak [7] showed t hat , for each xed n 0, any general 1-way QFA n g must have 2Ω ( n ) basis st at es. T hus recognizing f w a j w 2 f a; bg ; j w j a 1Q1CA for f f a; bg a g should have at least 2Ω ( n ) quant um basis st at es if t he input lengt h is n . However, t he number of basis st at es of a 1Q1CA for a language of lengt h n has precisely (2n + 1) j Q j . Since (2n + 1) j Q j < 2Ω ( n ) for su cient ly large n , it proves t he t heorem. 2

7

C o n c lu s io n s a n d O p e n P ro b le m s

In t his paper, we proved t hat t here are non-cont ext -free languages which can be recognized by 1P R1CAs and 1Q1CAs, but cannot be recognized by 1D1CAs. We also showed t hat t here is a regular language which can be recognized by a 1D1CA, but cannot be recognized by a 1Q1CA. One int erest ing quest ion is what languages are recognizable by 1Q1CAs but not by 1P R1CAs. Similarly, what are t he languages recognizable by 1Q1CAs but not by 1P 1CAs?

446

Tomohiro Yamasaki et al.

Anot her quest ion is concerning t o a 2-count er case. It is known t hat a 2-way det erminist ic 2-count er aut omat on can simulat e a det erminist ic Turing machine [5]. How about t he power of 2-way quant um 2-count er aut omat a, or 2-way quant um 1-count er aut omat a?

R e fe re n c e s [1] A. Ambainis, R. Bonner, R. Freivalds, and A. K ikust s. P robabilit ies t o accept languages by quant um nit e aut omat a. In P r oceedi n gs of t he 5t h A n n u al I n t er n at i on al C on f er en ce on C om pu t i n g an d C om bi n at or i cs ( C O C O O N ’ 99) , L ect u r e N ot es i n C om pu t er Sci en ce, volume 1627, pages 174{183, 1999.

[2] A. Ambainis and R. Freivalds. 1-way quant um nit e aut oma t a: St rengt hs, weakness and generalizat ions. In P r oceedi n gs of t he 39t h A n n u al Sym posi u m on Fou n dat i on of C om pu t er Sci en ce, pages 332{341, 1998. [3] A. Kondacs and J . Wat rous. On t he P ower of Quant um F init e St at e Aut omat a. In P r oceedi n gs of t he 38t h A n n u al Sym posi u m on Fou n dat i on of C om pu t er Sci en ce, pages 66{75, 1997. [4] M. Kravt sev. Quant um nit e one-count er aut omat a. In P r oceedi n gs of t he 26t h C on f er en ce on C u r r en t T r en ds i n T heor y an d P r act i ce of I n f or m at i cs ( SO F SE M ’ 99) , L ect u r e N ot es i n C om pu t er Sci en ce, volume 1725, pages 431{440, 1999.

[5] M. L. Minsky. Recursive unsolvability of p ost ’s problem of ‘t ag’ and ot her t opics in t he t heory of t uring machines. A n n al s of M at h. , 74:3:437{455, 1961. [6] C. Moore and J . Crut ch eld. Quant um aut omat a and quant um grammars. Technical Rep ort 97-07-02, Sant a-Fe Inst it ut e Working P ap er, 1997. Also available at ht t p: / / xxx. l anl . gov/ ar chi ve/ quant - ph/ 9707031. [7] A. Nayak. Opt imal lower b ounds for quant um aut omat a and random access codes. In P r oceedi n gs of t he 40t h A n n u al Sym posi u m on Fou n dat i on of C om pu t er Sci en ce, pages 369{376, 1999. [8] P. Shor. Algorit hms for quant um comput at ion: Discret e log and fact oring. In P r oceedi n gs of t he 35t h A n n u al Sym posi u m on Fou n dat i on of C om pu t er Sci en ce, pages 56{65, 1994.

S im ilarit y E n rich m e nt in Im ag e C o m p re ssio n t h ro u g h W e ig ht e d F in it e A u t o m at a Zhuhan J iang1 , Bruce Lit ow2 , and Olivier de Vel3 1

School of Mat hemat ical and Comput er Sciences, University of New England, Armidale NSW 2351, Aust ralia zhuhan@mcs. une. edu. au 2

School of Informat ion Technology, J ames Cook University, Townsville, QLD 4811, Aust ralia br uce@cs. j cu. edu. au

3

Informat ion Technology Division, DST O, P O Box 1500, Salisbury SA 5108, Aust ralia ol i vi er . devel @dst o. def ence. gov. au

We prop ose and st udy in det ails a similarity enrichment scheme for t he applicat ion t o t he image compression t hrough t he ext ension of t he weight ed nit e aut omat a (W FA). We t hen develop a mechanism wit h which rich families of legit imat e similarity images can b e syst emat ically creat ed so as t o reduce t he overall W FA size, leading t o an event ual b et t er W FA-based compression p erformance. A numb er of desirable prop ert ies, including W FA of minimum st at es, have b een est ablished for a class of packed W FA. Moreover, a codec based on a sp ecial ext ended W FA is implement ed t o exemplify explicit ly t he p erformance gain due t o ext ended W FA under ot herwise t he same condit ions. A b st r a c t .

1

Int ro d u c t io n

T here are many dierent compression schemes each of which concent rat es on oft en speci c image or compression charact erist ics. For inst ance, a wavelet based compression scheme makes use of t he mult iresolut ion analysis, see e.g. [1] and t he references t here, while t he J P EG st andard hinges on t he signal superposit ion of t he Fourier harmonics. Alt ernat ively, similarit ies among given images and t heir subimages may be explored t o decorrelat e t he image component s for t he perceived compression purpose. In t his regard, weight ed nit e aut omat a (WFA) have been successfully applied t o bot h image and video compressions, see e.g. [2,3,4]. T hese WFA are basically composed of subimages as t he st at es, and t he linear expansions of t he st at e images in t erms of t hemselves and t he rest of st at e images. For a given image under considerat ion, a typical inferred WFA will select a collect ion of subimages t o form t he WFA st at es in such a way t hat t he given original image can be reconst ruct ed, oft en as a close approximat ion, from t he inferred WFA. Such a WFA, when furt her encoded, may t hen be regarded as a compressed image. T he main ob ject ive of t his work is t herefore t o propose a similarity enrichment scheme t hat will reduce t he overall size of an inferred D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 4 4 7 { 4 5 6 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

448

Zhuhan J iang, Bruce Lit ow, and Olivier de Vel

WFA, t o set up t he basic st ruct ure and develop int errelat ed propert ies of t he ext ended WFA, and t o est ablish a mechanism t hat det ermines syst emat ically what type of similarity enrichment is t heoret ically legit imat e for a WFA based compression. In fact we shall also devise a simpli ed yet st ill fully-fledged image compression codec based on a newly ext ended WFA, and demonst rat e explicit ly t hat , under ot herwise t he same condit ions, a codec based on similarity enriched WFA will out perform t hose wit hout such an enrichment . T hroughout t his work we shall follow t he convent ion and assume t hat all images are square images, and t hat all WFA based compressors are lossy compressors. We recall t hat an image x of t he resolut ion of n n pixels is mat hemat ically an n n mat rix whose ( i ; j )-t h element x i ; j t akes a real value. For any image of 2d 2d pixels, we de ne it s m u lt ir e s o lu t io n r e p r e s e n t a t io n ( x ) by ( x ) = f ( x ) : D 2 N g, where N = f 0; 1; 2; 3; : : : g and ( x ) denot es t he same 2D pixels. In fact we will ident ify any image x image at t he resolut ion of 2D wit h it s mult iresolut ion represent at ion ( x ) unless ot herwise st at ed. In order t o address pixels of all resolut ions in ( x ), we follow t he convent ion in [2] and divide x int o 4 31 33 equal-sized quadrant s, numbering t hem clockwise from 1 301 303 t he t op left by 1, 3, 2 and 0 respect ively. T hese numbers 32 300 302 are t he a d d r e s s e s of t he corresponding quadrant subimages. Let be an empty st ring and Q = f 0; 1; 2; 3g be 0 2 t he set of alphabet . T hen a ( x ) wit h a 2 Q will denot e all four quadrant subimages of x . Furt hermore t he subimage de ned by D

D

F ig. 1 . Subimages addressable via a quadt ree

a1a2

a 1 ; a 2 ; : : : ; a k 2 Q will t hus of a 2 -t h quadrant of a 1 -t h

a

k

(x ) =

a

k

(

a

k

− 1

(

a2

(

a1

( x ))

))

(1)

represent a k -t h quadrant of a k − 1 -t h quadrant of quadrant of x . For inst ance, 3 2 ( x ) represent s t he larger shaded block in Fig. 1 and 3 0 0 ( x ), t he smaller shaded block. S 1 m Q Let t he set of quadrant addresses be given by Q where Q = m = 0 0 m wit h Q = f g and Q = f a 1 a m : a 1 ; : : : ; a m 2 Q g for m 1. If we de ne a m u lt ir e s o lu t io n f u n c t io n Γ as aP mapping Γ : Q ! R sat isfying t he areapreserving condit ion Γ ( ! ) = j Q1 j a 2 Q Γ ( ! a ), where j Q j is t he cardinality of Q and R denot es t he set of all real numbers, t hen each mult iresolut ion image ( x ) corresponds t o a unique mult iresolut ion funct ion Γ x : Q ! R de ned by Γ x ( ! ) = ! ( x ). In fact all images of nit e resolut ion will be aut omat ically promot ed t o mult iresolut ion images. For simplicity we shall always denot e ! ( x ) for any ! 2 Q by x ! when no confusion is t o occur, typically when x is in bold face, and denot e by ( x ) t he average int ensity of t he image x . T here exist so far two forms of WFA t hat have been applied t o image compression. T he rst was adopt ed by Culik et al [2,5] while t he second was due t o Hafner [3,4]. For convenience, Culik et al’s WFA will be referred t o as a lin e a r WFA while Hafner’s ( m )-WFA will be t ermed a h ie r a r c h ic WFA due t o it s hierarchic nat ure. We not e t hat a linear WFA may also be regarded as a generalised for

Similarity Enrichment in Image Compression

449

st ochast ic aut omat on [6], and can be used t o represent real funct ions [7] and wavelet coe cient s [8], t o process images [9], as well as t o recognise speech [10]. In a WFA based image compressor, t he design of an in f e r e n c e a lg o r it h m plays an import ant role. An inference algorit hm will typically part it ion a given image int o a collect ion of r a n g e b lo c k s , i.e. subimages of t he original given image, t hen nd proper d o m a in b lo c k s t o best approximat e t he corresponding range blocks. In general, t he availability of a large number of domain blocks will result in fewer number st at es when encoding a given image. T his will in t urn lead t o bet t er compression performance. Some init ial but inconclusive at t empt s t o engage more domain blocks have already been made in [11] for bi-level images. T he ext ra blocks t here were in t he form of cert ain t ransformat ions such as some special rot at ions, or in t he form of some unions of such domain blocks. Due t o t he lack of t heoret ical just i cat ion t here, it is not obvious whet her and what ext ra image blocks can be le g it im a t e ly added t o t he pool of domain images. Hence one of t he main ob ject ives of t his work is t o provide a sound t heoret ical background on which one may readily decide how a d d it io n a l domain images may be art i cially generat ed by t he exist ing ones, result ing in a similarity enriched pool of domain images. T his paper is organised as follows. We rst in t he next sect ion propose and st udy two types of import ant mappings t hat are indispensible t o a proper ext ension of WFA. T hey are t he resolut ion-wise and resolut ion-driven mappings, and are formulat ed in pract ically t he broadest possible sense. Sect ion 3 t hen set s out t o t he act ual ext ension of WFA, it s associat ed graph represent at ion as well as t he uni cat ion of t he exist ing di erent forms of WFA. A number of relevant propert ies and met hods, such as t he det erminat ion of minimum st at es for an ext ended WFA, have also been est ablished. Finally in sect ion 4, t he bene t s of t he proposed similarity enrichment are demonst rat ed on t he compression of t he Lena image t hrough a complet e codec based on a speci c ext ended WFA. We not e t hat t he import ant result s in t his work are oft en summarised in t he form of t heorems. Alt hough all proofs are fairly short , t hey are not explicit ly present ed here due t o t he lack of space. Int erest ed readers however may consult [12] for furt her det ails.

2

R e so lu t io n -w ise an d R e so lu t io n -D riv e n M ap p in g s

A fundament al quest ion relat ed t o t he generalisat ion of WFA is t o nd what kind of similarity enrichment will preserve t he original WFA’s crucial feat ures t hat underpin t heir usefulness in t he image compression. T he resolut ion-driven and resolut ion-wise mappings are t herefore speci cally designed for t his purpose and for t heir broadness. A r e s o lu t io n - d r iv e n m a p p in g f is a mapping t hat maps a nit e sequence of mult iresolut ion images f x i g int o anot her mult iresolut ion image x , sat isfying t he following invariance condit ion: for any k 2 N , if x i and k 2k pixels for all i , t hen image y i are indist inguishable at t he resolut ion of 2 x = f (f x i g) and image y = f (f y i g) are also indist inguishable at t he same resolut ion. A resolut ion-driven mapping is said t o be a r e s o lu t io n - w is e mapping if

450

Zhuhan J iang, Bruce Lit ow, and Olivier de Vel

t he result ing image x at any given resolut ion is complet ely det ermined t hrough by t he images f x i g at t he s a m e resolut ion. Let F and G be t he set of resolut ion-wise mappings and t he set of resolut iondriven mappings respect ively, and let I be t he set of all in v e r t ib le operat ors in F. We will always use t he addressing scheme (1) associat ed wit h Q = f 0; 1; 2; 3g unless ot herwise st at ed. T hen t he following t heorem gives a rich family of resolut ionwise mappings. f

T h eor em 1 . S u ppose a m appin g h perm u t es pixels at all resolu t ion s. T hat is, for an y m u lt iresolu t ion im age x , t he m u lt iresolu t ion im age h( x ) at an y resolu t ion is a pixel perm u t at ion of x at t he sam e resolu t ion . I f every addressible block in t he form of x ! at an y resolu t ion will alway s be m apped o n t o an addressible block 0 h( x ) ! for som e ! 0 2 Q in t he m apped im age, t hen t he m appin g h is an in vert ible resolu t ion -wise m appin g, i.e. h 2 I.

A st raight forward corollary is t hat I cont ains t he horizont al mirror mapping m, t he diagonal mirror mapping d, t he ant iclockwise rot at ion r by 90 , as well as t he permut at ion of t he j Q j quadrant s. Obviously I F G, ident ity mapping 1 2 I, and I is a group wit h respect t o t he \ " product , i.e. t he composit ion of funct ions. Moreover F and G are bot h linear spaces. We also not e t hat , for any ! 2 Q , t he zoom-in operat or z de ned by z ( x ) = x for all x belongs t o G. To underst and more about I, we rst int roduce P, t he group of all permut at ions of Q ’s element s. A typical permut at ion p 2 P can be writ t en as p = !

0

1

2

!

3

!

which means symbol i 2 Q will be permut ed t o symbol n i 2 Q . As a convent ion, every permut at ion of k element s can be represent ed by a product of some disjoint cycles of t he form ( n 1 ; n 2 ; : : : ; n m ), implying t hat n 1 will be permut ed t o n 2 and n 2 will be permut ed t o n 3 and so on and t hat n m will be cycles will t hus not be permut ed back t o n 1 . Any element s t hat are not in any   0 1 2 3 4 5 permut ed at all. Hence for inst ance t he permut at ion 4 3 2 1 5 0 can be writ t en as (1; 3)(0; 4; 5), or equivalent ly (0; 4; 5)(1; 3)(2) because t he \ (2)" t here is redundant . be Let p = f p ! g! 2 Q 1 2 5 6 13 14 1 2 16 15 1 2 a sequence of permut at ions 4 3 8 7 16 15 4 3 13 14 4 3 p p p ! 2 P, t hen p represent s an 13 14 9 10 9 10 5 6 10 9 7 6 invert ible resolut ion-wise mapa 2 Q 11 12 8 5 16 15 12 11 12 11 8 7 ping in t he following sense: for any mult iresolut ion image F ig. 2 . A resolut ion-wise mapping in act ion x , t he mapped mult iresolut ion image p( x ) at any resolut ion of 2k 2k pixels is de ned by, for m = 0 t o k − 1 in sequence, permut ing t he j Q j quadrant s of t he subimage x ! according t o p ! for all ! 2 Q m . T he horizont al mirror mapping m t hus corresponds t o f p ! g wit h p ! = (0; 2)(1; 3) for a ll ! 2 Q . As anot her example, let p = f p ! g wit h p " = (0; 1; 3; 2), p 0 = (0; 2)(1; 3), p 1 = (0; 1)(2; 3), p 2 = (0; 3), p 3 = (1; 2) and p ! = (0) for all j ! j > 1. T hen t he mapping process of p is shown in Fig. 2 in which t he left most image is gradually t ransformed t o t he right most result ing image. Addit ional propert ies are summarised in t he next t heorem. n 0 n 1 n 2 n 3

"

-

a

-

Similarity Enrichment in Image Compression T h eor em 2 . L et p!

0

=

p!

00

8!

P=

0 00 ;! 2Q

S 1 0

m

= 0

m

P

an d

m

wit h m 0



P



=

m

p2 I:p=

f p ! g!

451

su ch t hat

2Q

, an d let m be an y n on -n egat ive in t eger.

m

T hen P m Pm + 1 P I F G : ( i) ( ii) For an y p 2 Pm , it s in verse, p− 1 , is also in Pm . p( q) is again in Pm . ( iii) For an y p; q 2 Pm , t he com posit ion p q ( iv) Pm is a n it e grou p u n der t he m appin g com posit ion . ( v) For an y p = f p ! g! 2 Q 2 Pm an d an y zoom -in operat or za wit h a 2 Q , we P0 in t he case of m = 0. set a 0 = p " ( a ) 2 Q , q = f p a 0! g! 2 Q , an d P− 1 T hen q 2 Pm − 1 an d on e-t o-on e an d on t o.

z p a

0

qz

=

a

. M oreover t he m appin g a !

For easy reference, a resolut ion-wise mapping will be called p e r m u t a t iv e if it belongs t o P. Fig. 3 exempli es some of t he typical operat ors in G: m is t he horizont al mirror, d is t he diagonal mirror, r is an ant iclockwise rot at ion, (0; 3) is a quadrant permut at ion/ exchange and z3 is a zoom-in operat ion int o quadrant 3. In fact , m, d and r all belong t o P0 . Moreover we can conclude from t he propert ies of G t hat t he image negat ion is for inst ance also a resolut ion-wise mapping. We not e t hat t he funct ion space F is of great import ance as is manifest ed in t he following t heorem. T h eor em 3 . L et f

a i

2

F an d

2

i

R

a

0

on Q is

m-

?d

Rr 0 3z (

;

N

3

)

F ig. 3 . Some typical resolut ion-driven mappings

for all i 2 I an d a 2 Q . I f

X a i

f

(f

j

g) = j Q j

;

i

2I

i

(2)

;

q2 Q

(k ) xi

t hen t he im ages

of 2k

2k pixel resolu t ion det erm in ed it erat ively by i

h (0) xi

= i

h (m ) xi

i

(1) xi

;

a

=

f

a i

a

=

(m − 1)

(f x j

f

a i

(0)

(f x j g)

; i

h

g)

;

(m + 1) xi

a

=

f

a i

u n iqu ely de n e for each i 2 I a m u lt iresolu t ion im age T he represen t at ion of x i at t he resolu t ion of 2 for all i 2 I . M oreover t he x i will sat isfy a

xi

=

f

a i

(f x j g) ;

f

a i

k

2

(m )

(f x j xi

g)

(3)

;

2 pixels is given by

F;

i

2I

(x i ) =

of in t en sit y

k

(k )

xi

.

precisely

(4)

:

C on versely if ( 4) holds for all i 2 I , t hen ( 2) m u st be valid for

i

i

=

(x i ).

In t he case t hat corresponds event ually t o a linear WFA, t he result s can be represent ed in a very concise mat rix, see [12] for det ails. To conclude t his sect ion, we not e t hat t he symbols such as Pm , I, F, G and za will always carry t heir current de nit ions, and t hat resolut ion-driven mappings can be regarded as t he similarity generat ing or enriching operat ors.

452

Zhuhan J iang, Bruce Lit ow, and Olivier de Vel

3

E x t e n d e d W e ig ht e d F in it e A u t o m at a

T he ob ject ive here is t o show how resolut ion-wise or resolut ion-driven mappings come int o play for t he represent at ion, and hence t he compression, of images. We shall rst propose an ext ended form of WFA and it s graph represent at ion, and t hen devise a compression scheme based on such an ext ended WFA. In fact we shall est ablish a broad and uni ed t heory on t he WFA for t he purpose of image compression, including t he creat ion of ext ended WFA of minimum number of st at es. 3 .1

D e n it ion an d G r ap h R ep r esent at ion of E x t en d ed W FA

Suppose a nit e sequence of mult iresolut ion images f x k g1 a

xi

=

f

a i

(x 1 ; : : : ; x r ) ;

xj

=

g j (x 1 ; : : : ; x j − 1 ) ;

f

a i

2

k

n

F;

gj

sat isfy 2

G;

for 1 i r and r < j n . T hen all images x k can be const ruct ed at any resolut ion from t he image int ensit ies k = ( x k ). For all pract ical purposes we however consider t he following canonical form Xr a

xi

= k

j

−1

k

= 1

X

f

a i ;k

(x k ) ;

xj

g j ; k (x k

=

= 1

);

a

2

Q ;

0

q < i

r ; r < j

n :

(5)

We rst represent (5) by an ext ended WFA of n st at es. T his ext ended WFA will consist of (i) a nit e set of st at es, S = f 1; 2; : : : ; n g; (ii) a nit e alphabet Q ; (iii) a t arget st at e; (iv) a nal dist ribut ion 1 ; : : : ; n 2 R; (v) a set of weight r, r < j n and 1 ‘ < j . funct ions f ia; k 2 F and g j ; ‘ 2 G for a 2 Q , q < k T he rst q st at es will be called t he p u m p s t a t e s , and t he next r − q st at es and t he last n − r st at es will be called t he g e n e r ic s t a t e s and t he r e la y s t a t e s respect ively. For each st at e k 2 S , image x k is t he corresponding s t a t e im a g e alt hough a more convenient but slight ly abusive approach is t o ident ify a st at e simply wit h t he st at e image. T he t a r g e t im a g e is t he st at e image corresponding t o t he t arget st at e. In general t he pump st at es refer t o some preselect ed base images, and t hese base images at any resolt ions may be generat ed, or pumped out , independent of t he ot her st at e images. As an example, we consider t he following ext ended WFA wit h Q = f 0; 1; 2; 3g, r = n = 5, q = 0 and 0 x1

=

x3 ;

0 x2

=

1 x1

=

x2 ;

1 x2

=

2 x1

=

x1 ;

2 x2

=

3 x2

=

3 x1 0 x5 2 x5

= d( x 1 ) ; 1 = x5 ; 2 1 = x5 ; 2

1 x5

=

3 x5

=

x4 ;

0 x3

=

x5 ;

1 1 1 x3 + x 4; x2 ; x3 = 2 2 1 2 x3 ; x2 ; x3 = 2 3 0; x3 = 0; 1 1 1 x 5+ x4+ d( x 4 ) ; 2 4 4 1 1 1 x 5+ x4+ d( x 4 ) ; 2 4 4

+ d( x 4 ) ;

0 x4

=

x4

1 x4

=

x4 ;

2 x4

=

x4 ;

3 x4

= 0;

(6)

Similarity Enrichment in Image Compression

453

where d denot es t he diagonal reflec3 : d( 1 ) t ion, see Fig. 3. Let i = ( x i ) for = 1,2( 1) i = 1; : : : ; 5. T hen (6) de nes a valid 1 : 152 1(1) 2(1) WFA (5) if, due t o (2), (  1 ; 2 ; 3 ; z 2: 1 y  2 5 1 1 1 0(1) ; ; ; 1 ; for some 4; 5) = 12 2 3 2 0(1) 1 1 1( 2 ) 2 R. T he diagram for t he WFA, 3: 3 0,1,2( 1) wit h x 1 as t he t arget image, is drawn 1 , 2 ( 21 ) z y 0(1) 1 , 3 ( 41 ) : 4 :1 1 ) in Fig. 4. It is not di cult t o see 0 , 1 , 2 , 3 ( 2 )~ : 0 : d( 1 ) 5 : 12 1 , 3 : d( 14 ) t hat t he WFA will generat e t he t ar get image x 1 given in Fig. 5. We not e t hat , in a graph represent at ion, F ig. 4 . W FA of 5 st at es for (6) i : i inside a circle represent s st at e i wit h int ensity i , and label a ( w ) or a : h( w ) on an arrow from st at e i t o st at e a j implies x i cont ains linearly w x j or w h( x j ) respect ively, where w is t he weight . Moreover t he doubly circled st at e denot es t he t arget st at e. We not e t hat t he t arget image det ermined by t he ext ended WFA  Fig. 4 can also be generat ed by a linear WFA, at t he cost of having more  t han doubled number of st at es. T he x7 x1 linear WFA is given in Fig. 5 in which x2 x8 ? ? ? ? each st at e is now labelled by t he corresponding st at e image and t he   x3 x9 image int ensit ies i = ( x i ) are given 5 x x 10 by 1 = 7 = 1 2 , 2 = 5 = 8 = ? ^ ? 4 ?  ? 1 1 11 = 2 , 3 = 9 = 3, 4 = 10 = 1   and 6 = 2. Incident ally, if we keep x5 x11 ?= s just t he rst 6 st at es in Fig. 5 and j  assign T = (5= 36; 1= 4; 1= 6; 1= 2; x6 1= 4; 1) t o t he nal dist ribut ion in T heorem 3, t hen t he equat ions in (4) again de ne a valid WFA wit h 6 F ig. 5 . Transit ion diagram of a W FA for t he t arget image det ermined by (6) st at es and 23 edges. T he t arget image x 1 in t his case reduces t o t he diminishing t riangles by Culik and Kari [5], which is just t he image x 1 in Fig. 5 wit hout t he det ails above t he diagonal.





 





 

0(1)

2(1)

2(1)

3(1)

0(1)

1(1)

3(1)

1(1)

1,2( 21 )

1,2( 21 )

1,2(1)

1,2(1)

1( 12 )

0(1)

0(1)

0,1,2,3( 21 )

1( 21 )

3(1)

1,2(1)

3( 12 )

0,1,2,3( 21 )

1,2(1)

0,1,2,3(1)

0(1)

3(1)

1,3( 41 )

3 .2

0,1( 14 )

P ack ed W FA an d t h e A sso ci at ed P r op er t ies

For t he pract icality of applicat ions, it is of int erest t o rest rict ourselves t o t he following special yet su cient ly general form of WFA relat ions Xn x

a i

X

= k

= 1

2

R

W

a; i ;k

Xn

(x k ) ;

x

X

= k

= 1

2

R

k

(x k ) ;

a

2

Q ;

0

q < i

n ;

(7)

F is a nonempty nit e set of resolut ion-wise where W i a; k; ; k 2 R and R mappings. T he t arget image x corresponds t o t he only relay st at e, implicit ly t he

454

Zhuhan J iang, Bruce Lit ow, and Olivier de Vel

st at e n + 1. However x may be absent if t he t arget st at e is just one of t he generic st at es. An ext ended WFA de ned t hrough (7) will be called a p a c k e d WFA, and t he WFA is also said t o be p a c k e d u n d e r R. To analyse properly t he propert ies of packed WFA, we rst int roduce a feat ure t hat re nes a set of resolut ion-driven mappings. More speci cally, a set R I is said t o be q u a d r a n t ly - s u p p o r t iv e if all mappings in R are linear and0 t hat for all 2 R and a 2 Q , t here exist 0 2 R and a 0 2 Q such t hat za = 0za ,  a 0 i.e. ( x ) = 0( x a ) holds for all mult iresolut ion images x . As an example, P and Pm for m 0 are all quadrant ly-support ive. Wit h t hese preparat ions, we now summarise some addit ional ner propert ies for packed WFA in t he next two t heorems.

R

can alway s be expan ded in t o T h eor em 4 . A packed W FA u n der a n it e grou p a lin ear W FA if is also qu adran t ly -su pport ive. I n part icu lar, a W FA packed can alway s be expan ded in t o a lin ear W FA . u n der a n it e su bset of

R

P

Alt ernat ively, a packed WFA can be regarded as a linear WFA reduced or packed under t he similarit ies or symmet ries dict at ed by R. We not e t hat symmet ries or similarit ies are immensely useful in various applicat ions, including for example t he group t heoret ical analysis by Segman and Zeevi in [13], t he image processing and underst anding in [14], and t he solut ions and classi cat ion of di erent ial and di erence syst ems in [15,16]. Given a linear WFA and a set R of resolut ion-wise mappings, we may reduce t he linear WFA t o a packed WFA of fewer number of st at es. For t his purpose we sayP a set Pof images f x i g are R- d e p e n d e n t if t here exist s an i 0 such t hat fin it e fin it e xi0 = 2 R c i ( x i ) for some const ant s c i 2 R. It is easy t o see t hat i6 = i0 R-independent images are also linearly independent if 1 2 R. Moreover one can show for a WFA packed under a nit e group R I, if t he generic st at e images are R-dependent , t hen t he WFA can be shrunk by at least 1 generic st at e. Nat urally it is desirable t o have a WFA wit h as few st at es as possible while not incurring t oo many addit ional edges. For any given image t here is a lower bound on t he number of st at es a packed WFA can have if t he WFA is t o regenerat e t he given image.

R I R

is a n it e grou p an d is qu adran t ly -su pport ive, an d T h eor em 5 . S u ppose t hat a packed W FA u n der has a t arget im age x an d has n o pu m p st at es. L et has t he m in im u m n u m ber f x i gni= 1 be all t he st at e im ages of t he W FA . T hen of st at es, t he m in im u m requ ired t o recon st ru ct t he t arget im age x , if an d on ly if ( i) all t he st at e im ages x i are -in depen den t ; ( ii) all st at e im ages are com bin at ion s of addressible su bim ages of x , i.e. all st at e im ages are of t he form

A

A

R

Xn i t e

X

2

( iii)

t arget im age

x

R

c !

;!

(x ! ) ;

c

;!

2

R;

2Q

correspon ds t o a gen eric st at e.

To conclude t his sect ion, we not e t hat t he set R pract ically never exceeds t he scope of P in t he applicat ion t o image compression. T his means t hat all

Similarity Enrichment in Image Compression

455

assumpt ions for t he above two t heorems are in fact aut omat ically sat is ed if R is just a nit e group. As far as WFA based image compression is concerned, R doesn’t even have t o be a group: it su ces t o be just a nit e subset of F. We also remark t hat t he two apparent ly di erent formulat ions of WFA due t o Culik et al and Hafner respect ively can be easily uni ed: for each hierarchic WFA due t o Hafner we can st ruct explicit ly a linear WFA adopt ed by Culik et al, but not vice versa. T he det ails are again available in [12].

4

Im p le m e nt at io n o f a P acke d W FA an d t h e R e su lt in g C o m p re ssio n Im p rov e m e nt

T he purpose here is t o show, t hrough an implement ed image compressor based on t he t heory developed in t he previous sect ions, t hat similarity enriched WFA are indeed more desirable and F ig. 6 . Ext ended W FA vs J P EG and vs linear W FA bene cial t o t he image compression. For clarity and simplicity of t he act ual implement at ion, we do not consider any pump st at es here and will use only t hree resolut ion-wise operat ors. T hey are respect ively t he horizont al, vert ical and diagonal reflect ions. Hence our compressor is in fact built on t he simplist ic t reat ment of t he auxiliary t echniques associat ed wit h t he compression scheme based on an ext ended WFA. For inst ance no ent ropy coding is performed aft er t he quant isat ion of t he WFA weight s. Despit e t hese simpli cat ions, t he compression performance is st ill on a par wit h t he J P EG st andard on nat ural images: slight ly bet t er t han J P EG at very low bit rat es but ot herwise marginally worse t han J P EG in t he present simplist ic implement at ion, see t he l.h.s. gure in Fig. 6 for t he compression of t he st andard Lena image at 256 256 pixels in t erms of RMSE. T he lit t le circles t here correspond t o t he WFA based compressor. We now compare t he compression performance on t he Lena image for t he linear WFA and t hat for t he packed WFA. First we not e t hat in t he encoding of a linear WFA, t he st orage spaces for t he resolut ion-wise mappings are complet ely eliminat ed. Despit e t his apparent equal foot ing, a codec based on ext ended WFA demonst rat es a consist ent ly superior compression rat io. In t he case of compressing t he st andard Lena image at 256 256 pixels, for inst ance, t he r.h.s. gure in Fig. 6 illust rat es explicit ly t he bet t er compression performance by t he codec based on an ext ended WFA in t erms of P SNR. T he curve t raced out t here by t he lit t le circles corresponds t o our current ly implement ed codec based on a packed WFA. T he ot her curve corresponds t o t he same codec when t he 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

5

15

0

0

0.5

1

1.5 2 2.5 bpp: bit per pixel (x=JPEG, o=WFA)

3

3.5

10

0

0.5

1 1.5 2 2.5 3 bpp: bit per pixel (o=use rotations, x=no rotations)

3.5

4

456

Zhuhan J iang, Bruce Lit ow, and Olivier de Vel

similarity enrichment is t urned o. We nally not e t hat t he above benchmark codec, for simplicity and speed, made use of only a t opdown non-recursive inference algorit hm. Hence a sizable improvement is nat urally expect ed if a more comput at ion-int ensive r e c u r s iv e inference algorit hm, akin t o t hat adopt ed in [5] for t he lin e a r WFA, is inst ead implement ed t o t he codec. T hese will however be left t o our fut ure pursuit .

R e fe re n c e s 1. J iang Z, Wavelet based image compression under minimum norms and vanishing moment s, in Yan H, Eades P, Feng D D and J in J (edrs), P roceedings of P SA Workshop on Visual Informat ion P rocessing, (1999)1{5. 2. Culik II K and Kari J , Image compression using weight ed nit e st at e aut omat a, Comput er Graphics 1 7 (1993)305{313. 3. Hafner U, Re ning image compression wit h weight ed nit e aut omat a, P roceedings of Dat a Compression Conference , edrs. St orer J and Cohn M, (1996)359{368. 4. Hafner U, Weight ed nit e aut omat a for video compression, IEEE J ournal on Select ed Areas in Communicat ions , edrs. Enami K, Krikelis A and Reed T R, (1998)108{119. 5. Culik II K and Kari J , Inference algorit hm for W FA and image compression, in F isher Y (edr), Fract al Image Compression: t heory and applicat ion, Springer, New York 1995. 6. Lit ow B and De Vel O, A recursive GSA acquisit ion algorit hm for image compression, T R 9 7 / 2 , Depart ment of Comput er Science, J ames Cook University 1997. 7. Culik II K and Karhumaki, F init e aut omat a comput ing real funct ions, SIAM J ournal of Comput at ions 2 3 (1994)789{814. 8. Culik II K, Dub e S and Ra jcani P, E ect ive compression of wavelet coe cient s for smoot h and fract al-like dat a, P roceedings of Dat a Compression Conference , edrs. St orer J and Cohn M, (1993)234{243. 9. Culik II K and Fris I, Weight ed nit e t ransducers in image processing, Discret e Applied Mat hemat ics 5 8 (1995)223{237. 10. P ereira F C and Riley M D, Sp eech recognit ion by comp osit ion of weight ed nit e aut omat a, At &T Labs, Murray Hill 1996. 11. Culik II K and Valent a V, F init e aut omat a based compression of bi-level and simple color images, present ed at t he Dat a Compression Conference, Snowbird, Ut ah 1996. 12. J iang Z, Lit ow B and De Vel O, T heory of packed nit e st at e aut omat a, Technical Rep ort 99-173, University of New England, J une 1999. 13. Laine A (edr), Wavelet T heory and Applicat ion: A Sp ecial Issue of t he J ournal of Mat hemat ical Imaging and Vision, Kluwer, Bost on 1993. 14. Lenz R, Group T heoret ical Met hods in Image P rocessing, Lect ure Not es in Comput er Science 4 1 3 , Springer, Berlin 1990. 15. J iang Z, Lie symmet ries and t heir local det erminancy for a class of di erent ialdi erence euqat ions, P hysics Let t ers A 2 4 0 (1998)137{143. ( ) 16. J iang Z, T he int rinsicality of Lie symmet ries of u n ( t ) = F n ( t ; u n + a ; : : : ; u n + b ), J ournal of Mat hemat ical Analysis and Applicat ions 2 2 7 (1998)396{419. k

O n t h e P o w e r o f I n p u t - S y n c h ro n iz e d A lt e rn a t in g F in it e A u t o m a t a Hiroaki Yamamot o Depart ment of Informat ion Engineering, Shinshu University, 4-17-1 Wakasat o, Nagano-shi, 380-8553 J apan. yamamot o@cs. shi nshu- u. ac. j p

In t his pap er, we int roduce a new model of aut omat a, called input -synchronized alt ernat ing nit e aut omat a (i-SAFAs) , and st udy t he p ower of i-SAFAs. We here consider two typ es of i-SAFAs, oneway i-SAFAs and two-way i-SAFAs. T hen we show t hat (1) t he class of languages accept ed by one-way i-SAFAs is equal t o t he class of regular languages, (2) two-way i-SAFAs are more p owerful t han one-way i-SAFAs, t hat is, t here exist s a language L such t hat L is accept ed by a two-way i-SAFA but not accept ed by any one-way i-SAFAs. In addit ion, we show t hat t he class of languages accept ed by f ( n ) parallelb ounded two-way i-SAFAs is included in Nspace( S ( n )), where S ( n ) = minf n log n ; f ( n ) log n g. A b st r a c t .

1

I n t ro d u c t io n

St udying t he power of synchronizat ion in parallel comput at ions is one of import ant problems in t he eld of comput er science, and several researchers [2,5,6,7,9] have st udied t he power of synchronizat ion by using alt ernat ing machines. T hey have shown t hat synchronizat ion increases t he power of alt ernat ing machines. T his paper is concerned wit h alt ernat ing nit e aut omat a wit h a new kind of synchronizat ion, called an in pu t -sy n chron ized alt ern at in g n it e au t om at a (i-SAFAs), which have a di erent synchronizat ion from t he exist ing synchronized alt ernat ing machines. Yamamot o [11] has shown an e cient recognit ion algorit hm for semi-ext ended regular expressions by using a variant of i-SAFAs. T hus t he input synchronizat ion is an import ant concept in t he pract ical point of view as well as t he t heoret ical point of view. We show an int erest ing result t hat i-SAFAs have a di erent charact erist ic from t he exist ing models. In t his paper, two types of iSAFAs are discussed; one is one-way i-SAFAs whose input head is permit t ed only t o move right or t o remain st at ionary and t he ot her is two-way i-SAFAs whose input head is permit t ed t o move left , t o move right or t o remain st at ionary. Chandra et al. [1] int roduced alt ernat ing nit e aut omat a (AFAs for short ) as a generalizat ion of NFAs and showed t hat one-way AFAs also exact ly accept regular languages. Ladner et al. [8] st udied two-way AFAs and showed t hat twoway AFAs also accept only regular languages. T hus one-way AFAs and two-way AFAs have t he same power. D . -Z . D u e t a l. ( E d s . ) : C O C O O N 2 0 0 0 , L N C S 1 8 5 8 , p p . 4 5 7 { 4 6 6 , 2 0 0 0 .

c S p r in g e r -V e r la g B e r lin H e id e lb e r g 2 0 0 0

458

Hiroaki Yamamot o

T he concept of synchronizat ion was rst int roduced by Hromkovic. Slobodova [9] st udied t he power of synchronized alt ernat ing nit e aut omat a (SAFAs for short ), which are an ext ension of AFAs, and showed t hat SAFAs can accept a wider class of languages t han t he class of regular languages. Dassow et al. [3] showed t hat two-way SAFAs accept exact ly cont ext -sensit ive languages, t hat is, languages in Nspace( n ). Here, for any funct ion S ( n ) from nat ural numbers t o real numbers, by Nspace( S ( n )) we denot e t he class of languages accept ed by nondet erminist ic Turing machines (NT Ms) in O ( S ( n )) space. Hromkovic et al. [5] improved t his result and showed t hat t he class of languages accept ed by one-way SAFAs is exact ly equal t o t he class of cont ext -sensit ive languages. T hus SAFAs are more powerful t han AFAs, but one-way SAFAs and two-way SAFAs also have t he same power. We will here show t hat one-way i-SAFAs accept only regular languages, but two-way i-SAFAs accept a wider class t han t he class of regular languages. In addit ion, we also show an upper bound of t he power of two-way i-SAFAs. T he di erence between i-SAFAs and SAFAs is in t he synchronizat ion syst em. SAFAs have a set of synchronizing symbols, and each t ime one of t he processes working in parallel ent ers a st at e wit h a synchronizing symbol, it must wait unt il all ot her processes working in parallel ent er accept ing st at es or st at es wit h t he same synchronizing symbol. T hus all processes of an SAFA are synchronized by t he same synchronizing symbol. Ot her models of synchronized aut omat a also adopt a similar de nit ion. On t he ot her hand, i-SAFAs have a family S = f S1 ; : : : ; St g of synchronizing set s such t hat each Si is a set of synchronizing st at es, and processes of an i-SAFA are synchronized by t he posit ion of t he input head when ent ering a synchronizing st at e. T hat is, each t ime several processes working in parallel ent er synchronizing st at es belonging t o t he same synchronizing set Si , t hey all must st art t heir comput at ions from t he same posit ion of t he input . Not e t hat it is not necessary t hat all processes of an i-SAFA working in parallel ent er synchronizing st at es in t he same synchronizing set . For example, it is possible t hat a process ent ers a synchronizing st at e in a synchronizing set Si and ot her process ent ers a synchronizing st at e in a di erent synchronizing set Sj . T his t ime, t hese processes do not need t o synchronize. Clearly, i-SAFAs are also a generalizat ion of AFAs because i-SAFAs wit hout any synchronizing st at es are AFAs. In t his paper, we will show t he following result s: 1. T he class of languages accept ed by one-way i-SAFAs is equal t o t he class of regular languages, 2. T here exist s a language L such t hat L is accept ed by a two-way i-SAFA but not accept ed by any one-way i-SAFAs. In fact , we show t hat t here is a twoway i-SAFA accept ing non-regular language L = f w # w # j w 2 f 0; 1g g. In addit ion, we show t hat t he class of languages accept ed by f ( n ) parallelbounded two-way i-SAFAs is included in Nspace( S ( n )), where S ( n ) = min f n log n ; f ( n ) log n g. We say t hat a two-way i-SAFA M is f ( n ) parallelbounded if, for any accept ed input w of lengt h n , t he number of universal

On t he P ower of Input -Synchronized Alt ernat ing F init e Aut omat a

459

con gurat ions on t he accept ing comput at ion t ree of M on w is at most O ( f ( n )).

2

O n e - W ay i- S A FA s

2.1

D e n i t i on s

We rst de ne one-way i-SAFAs. D e n i t i on 1 . A on e-way i-S A FA M is a seven -t u ple M = ( Q ; S; where

; ; q0 ; ; F ) ,

{ Q is a n it e set of st at es, { S = f S1 ; : : : ; St g is a fam ily of sy n chron izin g set s su ch t hat each Si ( Q ) i; j t, is a set of sy n chron izin g st at es an d Si \ Sj = ; for an y 1 { is a n it e in pu t alphabet , { q0 ( 2 Q ) is t he in it ial st at e, { is a fu n ct ion m appin g Q t o f _ ; ^ g, { F ( Q ) is a set of n al st at es, { is a t ran sit ion fu n ct ion m appin g Q ( [ f g) t o 2Q , where den ot es t he em pt y st rin g.

If ( q) = ^ ( _ , respect ively), t hen q is called a u n iversal ( exist en t ial, respect ively) st at e . A con gurat ion of M is de ned t o be a pair ( q; pos), where q is a st at e and pos is a posit ion of t he input head. If q is a universal (exist ent ial, respect ively) st at e, t hen ( q; pos) is called a u n iversal ( exist en t ial, respect ively) con gu rat ion . Among t hese con gurat ions, if a st at e q is in F , t hen t he congurat ion is also called an accept in g con gu rat ion . T he con gurat ion ( q0 ; 1) is called an in it ial con gu rat ion . T he int erpret at ion of ( q; a ) = f q1 ; : : : ; ql g is t hat M reads t he input symbol a and changes t he st at e from q t o q1 ; : : : ; ql . T his t ime, if a 6 = , t hen M advances t he input head one symbol right , and if a = , t hen M does not advance t he input head (t his is called an -m ove ). We give a precise de nit ion of accept ance for one-way i-SAFAs. D e n i t i on 2 . A fu ll com pu t at ion t ree of a on e-way i-S A FA M on an in pu t a n is a labelled t ree T su ch t hat

w = a1 { { { {

each n ode of T is labelled by a con gu rat ion of M , each edge of T is labelled by a sy m bol in f a 1 ; : : : ; a n ; g, t he root of T is labelled by ( q0 ; 1) , if a n ode v of T is labelled by ( q; pos) an d ( q; a ) = f q1 ; : : : ; qk g for a sy m bol a 2 f ; a p o s g is de n ed, t hen v has k children v 1 ; : : : ; v k su ch t hat each v i is labelled by ( qi ; pos0) an d every edge ei from v t o v i is labelled by t he sy m bol a . Fu rt herm ore, if a = a p o s , t hen pos0 = pos + 1, an d if a = , t hen pos0 = pos.

460

Hiroaki Yamamot o

D e n i t i on 3 . L et T be a fu ll com pu t at ion t ree of a on e-way i-S A FA M on an in pu t w of len gt h n an d let v 0 be t he root of T . For a n ode v of T , let ( pu ; bu ) be t he m axim u m sequ en ce of labels on t he pat h from v 0 = ( p1 ; b1 ) t o v sat isfy in g t he followin g: ( 1) b1 b2 bu n , an d ( 2) for an y i (1 i u ) , pi is a sy n chron izin g st at e. For t he sequ en ce , we m ake a su b( pi e ; bi e )( pu ; bu ) by t akin g ou t all labels ( pi ; bi ) sat isfy in g sequ en ce ( pi 1 ; bi 1 ) i u − 1 an d ( pu ; bu ) in t he order. T hen t he sequ en ce bi < bi + 1 for 1 ( pi e ; bi e )( pu ; bu ) is called a synchronizing sequence of v . T his se( pi 1 ; bi 1 ) qu en ce m ean s t hat on ly t he last sy n chron izin g st at e is con sidered when M t ravels sy n chron izin g st at es by con secu t ive -m oves. I n addit ion , for an y sy n chron izin g ( sl ; bi l ) m ade by pickin g u p set Ss ( 2 S) , let u s con sider a sequ en ce ( s1 ; bi 1 ) ( p0l ; b0l ) of all labels ( p0i ; b0i ) wit h p0i 2 Ss from a sy n chron izin g sequ en ce ( p01 ; b01 ) v . T hen we call t his su bsequ en ce an Ss -synchronizing sequence of v .

D e n i t i on 4 . A com pu t at ion t ree T 0 of a on e-way i-S A FA M on an in pu t w of len gt h n is a su bt ree of a fu ll com pu t at ion t ree T su ch t hat { if v is labelled by a u n iversal con gu rat ion , t hen v has t he sam e children as in T , { if v is labelled by an exist en t ial con gu rat ion , t hen v has at m ost on e child, { let v 1 an d v 2 be arbit rary n odes. For an y sy n chron izin g set Ss ( 2 S) , let ( s0l 2 ; cl 2 ) ( l 1 l 2 ) be Ss -sy n chron izin g ( sl 1 ; bl 1 ) an d ( s01 ; c1 ) ( s1 ; b1 ) bl 1 is an in it ial sequ en ces of v 1 an d v 2 , respect ively . T hen t he sequ en ce b1 cl 2 . T his con dit ion en su res t hat processes su bsequ en ce of t he sequ en ce c1 workin g in parallel read an in pu t sy m bol at t he sam e posit ion if t hey en t er sy n chron izin g st at es belon gin g t o Ss . W e call t his an input -synchronizat ion .

We now associat e a comput at ion t ree T 0 wit h a boolean funct ion by regarding st at es of M as variables as follows. Let ( p1 ; b1 ) ; : : : ; ( pt ; bt ) be leaves of T 0. T hen pt . Furt hermore, t he boolean funct ion f denot ed by T 0 is de ned t o be p1 ^ ^ by eval ( f ), we denot e t he value of f evaluat ed by assigning 1 t o variables p 2 F and 0 t o variables p 2= F . D e n i t i on 5 . A n accept in g com pu t at ion t ree of a on e-way i-S A FA M on an in pu t w of len gt h n is a n it e com pu t at ion t ree of M on w su ch t hat { t he root is labelled by t he in it ial con gu rat ion , { each leaf is labelled by an accept in g con gu rat ion wit h t he in pu t head posit ion n + 1, t hat is, labelled by a label ( q; n + 1) wit h q 2 F .

We say t hat a one-way i-SAFA M accept s an input w if t here exist s an accept ing comput at ion t ree on w . We denot e t he language accept ed by M by L ( M ). Clearly, all st at es occurring in t he boolean funct ion denot ed by an accept ing comput at ion t ree are in F .

On t he P ower of Input -Synchronized Alt ernat ing F init e Aut omat a 2.2

461

ǫ- F r ee O n e- W ay i - SA FA s

We will here de ne -free one-way i-SAFAs, and show an algorit hm t o const ruct an -free one-way i-SAFA from any given one-way i-SAFA. T he only di erence from one-way i-SAFAs is t hat -free one-way i-SAFAs have no -moves. T hus an -free one-way i-SAFA on an input w of lengt h n always halt s in n st eps. Unlike one-way i-SAFAs, we de ne t he t ransit ion funct ion of an -free one-way i-SAFA t o be a mapping from a pair ( st at e; i n put sym bol ) t o a monot one boolean funct ion in order t o make t he const ruct ion easier. Below is t he formal de nit ion. D e n i t i on 6 . A n -free on e-way i-S A FA M is a six-t u ple M = ( Q ; S; ; ; q where

0;

F ),

{ Q is a n it e set of st at es, { S = f S1 ; : : : ; St g is a fam ily of sy n chron izin g set s su ch t hat each Si ( Q ) i; j t, is a set of sy n chron izin g sat es an d Si \ Sj = ; for an y 1 { is a n it e in pu t alphabet , { q0 ( 2 Q ) is t he in it ial st at e, { F ( Q ) is a set of n al st at es, { is a t ran sit ion fu n ct ion m appin g Q to F , where F is a set of m on ot on e boolean fu n ct ion s m appin g f 0; 1gj Q j t o f 0; 1g. D e n i t i on 7 . T he fu ll com pu t at ion t ree of an -free on e-way i-S A FA M on an a n is a labelled t ree T su ch t hat in pu t word w = a 1 { { { {

each n ode of T is labelled by a con gu rat ion of M , t he root of T is labelled by t he in it ial con gu rat ion ( q0 ; 1) , each edge of T is labelled by an in pu t sy m bol a 2 f a 1 ; : : : ; a n g, if a n ode v of T is labelled by ( q; pos) an d ( q; a p o s ) = g( q1 ; : : : ; qk ) , t hen v has k children , v 1 ; : : : ; v k , su ch t hat each v i is labelled by ( qi ; pos + 1) an d each edge ei from v t o v i is labelled by a p o s .

A synchronizing sequence and an Ss -synchronizing sequence are de ned in t he same way as one-way i-SAFAs. Now we de ne a language accept ed by an -free one-way i-SAFA. D e n i t i on 8 . L et M be an -free on e-way i-S A FA . T hen a com pu t at ion t ree T w of M on an in pu t w is a su bt ree of t he fu ll com pu t at ion t ree T sat isfy in g t he followin g: { For an y n ode v , let V = f v 0 j v 0 is a child of v in T g. T hen , for a su bset V , v has on ly t he n odes of V1 as t he children , V1 { let v 1 an d v 2 be arbit rary n odes ot her t han leaves. For an y sy n chron izin g l 2 ) be ( sl 2 ; cl 2 ) ( l 1 ( sl 1 ; bl 1 ) an d ( s1 ; c1 ) set Ss ( 2 S) , let ( s1 ; b1 ) Ss -sy n chron izin g sequ en ces of v 1 an d v 2 , respect ively . T hen t he sequ en ce cl 2 . bl 1 is an in it ial su bsequ en ce of t he sequ en ce c1 b1

In t he following, we associat e a comput at ion t ree of an -free one-way i-SAFA wit h a boolean funct ion by regarding a con gurat ion ( q; i ) as a variable.

462

Hiroaki Yamamot o

D e n i t i on 9 . L et M = ( Q ; S; ; ; q0 ; F ) be an -free on e-way i-S A FA . B y a n su ch t hat T w ; q , we m ean a com pu t at ion t ree of M on an in pu t w = a 1 it is com pu t ed by st art in g from t he st at e q. T hen we de n e a boolean fu n ct ion den ot ed by each n ode v of T w ; q as follows. L et t he label of v be ( q0; pos) , where q0 2 Q .

1. I f v is a leaf, t hen t he boolean fu n ct ion den ot ed by v is ( q0; pos) , 2. if v is n ot a leaf an d ( q0; a p o s ) = g( q1 ; : : : ; qk ) , t hen t he boolean fu n ct ion f den ot ed by v is de n ed as follows; let v 10 ; : : : ; v k01 be children of v havin g labels ( q10; i ) ; : : : ; ( qk01 ; i ) , respect ively , an d let f 1 ; : : : ; f k 1 be boolean fu n ct ion s den ot ed by v 10 ; : : : ; v k01 , respect ively . T hen f = g( g1 ; : : : ; gk ) , where, for an y 1 i k , gi = f j if t here is qj0 su ch t hat qi = qj0; ot herwise gi = 0.

Let r be t he root of T w ; q . T hen, by t he boolean funct ion denot ed by T w ; q , we mean t he boolean funct ion f w denot ed by r , and say t hat T w ; q has a boolean funct ion f w . Such a boolean funct ion f w is evaluat ed by t he following assignment t o each variable, and it s value is denot ed by val ue( f w ). T he assignment is done as follows. Here not e t hat j w j = n . For each variable ( q; i ) occurring in f w , 1. if i = n + 1, t hen 

1 0

( q; i ) =

if q 2 F , if q 2= F ,

2. if i < n + 1, t hen ( q; i ) = 0. Let L ( M ) be t he language accept ed by an -free one-way i-SAFA M . T hen L ( M ) = f w j t here exist s a comput at ion t ree T w ; q 0 wit h a boolean funct ion f w

such t hat q0 is t he init ial st at e and val ue( f w ) = 1g: 2.3

C on v er si on fr om a O n e- W ay i - SA FA t o an ǫ- F r ee O n e- W ay i - SA FA

Since an image of t he t ransit ion funct ion of an -free one-way i-SAFA is a boolean funct ion, it is convenient t o associat e a subt ree of a comput at ion t ree of a oneway i-SAFA on i for t he const ruct ion of an -free one-way i-SAFA. We int roduce two types of such comput at ion t rees. D e n i t i on 1 0 . L et M = ( Q ; S; ; ; q

1. by T

1 i ;q

0;

; F ) be a on e-way i-S A FA . T hen ,

, we m ean a com pu t at ion t ree of M on an in pu t

i

su ch t hat ( 1) it

is com pu t ed by st art in g from t he st at e q an d ( 2) all t he n odes ot her t han t he root are labelled by a n on -sy n chron izin g st at e, 2. by T 2i ; q , we m ean a com pu t at ion t ree of M on an in pu t i su ch t hat ( 1) it is com pu t ed by st art in g from t he st at e q an d ( 2) each leaf is labelled by eit her a sy n chron izin g st at e or a n on -sy n chron izin g st at e, an d if it is labelled by a n on -sy n chron izin g st at e, t hen t here is n ot an y sy n chron izin g st at es on t he pat h from t he root t o t he leaf ( hen ce n ot e t hat q m u st be also n on -sy n chron izin g st at e in t his case) .

On t he P ower of Input -Synchronized Alt ernat ing F init e Aut omat a

463

Now, we ext end t he de nit ion of -CLOSURE de ned for an NFA wit h moves (see [4]) t o a one-way i-SAFA. D e n i t i on 1 1 . L et M = ( Q ; S; ; ; q 0 ; ; F ) be a on e-way i-S A FA . T hen , for an y st at e q 2 Q , t wo set s - C L 1 ( q) an d - C L 2 ( q) are de n ed as follows.

0, f is t he boolean fu n ct ion den ot ed by a com pu t at ion - C L 1 ( q) = f f j for 9i t ree T 1i ; q of M g. 0, f is t he boolean fu n ct ion den ot ed by a com pu t at ion - C L 2 ( q) = f f j for 9i t ree T 2i ; q of M g. Let M = ( Q ; S; ; ; q 0 ; ; F ) wit h Q = f q0 ; : : : ; ql g be a one-way i-SAFA. T hen t he boolean funct ion denot ed by a comput at ion t ree of M has l + 1 variables. We will const ruct an -free one-way i-SAFA M 1 = ( Q [ f q~g; S; [ f # g; 1 ; q~; F 1 ) from M , where q~ is a new st at e and # is a new symbol. T he di erences between M and M 1 are just in t he t ransit ion funct ions and t he set s of nal st at es. Let q be any st at e in Q . T hen we de ne 1 as follows: X

1 ( q;

a) =

h ( q0 ; q1 ; : : : ; ql ) ;

(1)

h2H

where [

f g( g0 ; g1 ; : : : ; gl ) j g0 2 -C L 2 ( q0 ) ; : : : ; gl 2 -C L 2 ( ql ) g;

H =

(2)

g2 G

and

[

f gj g = f ( f 0 ; f 1 ; : : : ; f l ) g;

G = f

2

(3)

-C L 1 ( q)

qi j , if where ( qi ; a ) = f qi 1 ; : : : ; qi j g and if ( qi ) = P_ t hen f i = qi 1 _ _ qi j . Not e t hat P means t he repeat ed boolean ( qi ) = ^ t hen f i = qi 1 ^ ^ f and a set F 1 OR. For t he init ial st at e q~, we have 1 ( q~; # ) = f 2 -C L ( q )

is de ned as follows. For any qi 2 Q , let gi =

2

P

0

-C L 1 ( qi ) f . T hen F 1 = F [ f qi j eval ( gi ) = 1g. Clearly, from t he above const ruct ion, t he following property holds for M and M 1 . Here, for any boolean funct ions f 1 and f 2 , f 1 and f 2 , if and only if t he value of f 1 is f 2 are said t o be equivalent , denot ed by f 1 equal t o t he value of f 2 for any assignment t o variables. f

2

L em m a 1 2 . L et M an d M 1 be a on e-way i-S A FA an d an -free i-S A FA described above, respect ively . T hen , for an y q 2 Q an d a 2 , if h is in H , t hen t here exist s a com pu t at ion t ree T a ; q of M on t he sy m bol a wit h a boolean fu n ct ion f a , an d con versely , if T a ; q is a com pu t at ion t ree of M on t he f a su ch t hat h f a. sy m bol a wit h a boolean fu n ct ion f a , t hen t here exist s h 2 H su ch t hat h Fu rt herm ore, if M en t ers a sy n chron izin g st at e aft er readin g a , t hen M 1 also en t ers t he sam e sy n chron izin g st at e an d vice versa.

By t his lemma, we immediat ely have t he following t heorem.

464

Hiroaki Yamamot o

T h eor em 1 3 . L et M be a on e-way i-S A FA wit h m st at es. T hen we can con st ru ct an -free on e-way i-S A FA M 1 su ch t hat M 1 has m + 1 st at es an d L ( M 1 ) = f # w j w 2 L ( M ) g. 2.4

T h e P ow er of O n e- W ay i - SA FA s

In t he previous sect ion, we have shown t hat one-way i-SAFAs can be convert ed t o -free one-way i-SAFAs. We here show t hat -free one-way i-SAFAs can be simulat ed by AFAs, and t hus one-way i-SAFAs accept exact ly t he class of regular languages by T heorem 13. L em m a 1 4 . L et M be an -free on e-way i-S A FA wit h m st at es in clu din g t sy n chron izin g st at es. T hen t here exist s an A FA N wit h m 2t st at es su ch t hat L (M ) = L (N ). T h eor em 1 5 . T he class of lan gu ages accept ed by on e-way i-S A FA s is equ al t o t he class of regu lar lan gu ages.

3

T w o - W ay i- S A FA s

In t his sect ion, we show two result s; one is t hat a two-way i-SAFAs can accept a non-regular language, t he ot her is t hat t he class of languages accept ed by f ( n ) parallel-bounded two-way i-SAFAs is included in Nspace( S ( n )), where S ( n ) = min f n log n ; f ( n ) log n g. T hus two-way i-SAFAs are more powerful t han one-way i-SAFAs. 3.1

D e n i t i on s

D e n i t i on 1 6 . A t wo-way i-S A FA M is a seven -t u ple M = ( Q ; S; ; ; q where

0;

{ Q is a n it e set of st at es, { S = f S1 ; : : : ; St g is a fam ily of sy n chron izin g set s su ch t hat each Si ( i; j t, is a set of sy n chron izin g sat es an d Si \ Sj = ; for an y 1 { is a n it e in pu t alphabet , { q0 ( 2 Q ) is t he in it ial st at e, { is a fu n ct ion m appin g Q t o f _ ; ^ g, { F ( Q ) is a set of n al st at es, { is a t ran sit ion fu n ct ion m appin g Q t o 2Q f L ; R ; N g .

; F ),

Q)

T he int erpret at ion of ( q; a ) = f ( q1 ; D 1 ) ; : : : ; ( ql ; D l ) g is t hat M reads t he input symbol a , changes t he st at e from q t o qi and moves t he input head one cell depending on D i . If D i = L t hen M moves t he input head one cell t o t he left , if D i = R t hen M moves t he input head one cell t o t he right , if D i = N t hen M does not move t he input head. We give a precise de nit ion of accept ance of an input for two-way i-SAFAs.

On t he P ower of Input -Synchronized Alt ernat ing F init e Aut omat a

465

D e n i t i on 1 7 . T he fu ll com pu t at ion t ree of a t wo-way i-S A FA M on an in pu t a n is a labelled t ree T su ch t hat w = a1 { each n ode of T is labelled by a t riple ( q; pos; dept h ) of a st at e of M , a head posit ion of M an d t he dept h of t he n ode, { t he root of T is labelled by ( q0 ; 1; 0) , { if a n ode v of T is labelled by ( q; pos; dept h ) an d ( q; a p o s ) = f ( q1 ; D 1 ) ; : : : ; ( qk ; D k ) g, t hen v has k children v 1 ; : : : ; v k su ch t hat each v i is labelled by ( qi ; posi ; dept h + 1) . T his t im e, if D i = L t hen posi = pos − 1, if D i = R t hen posi = pos + 1, if D i = N t hen posi = pos.

D e n i t i on 1 8 . L et T be t he fu ll com pu t at ion t ree of a t wo-way i-S A FA M on an in pu t w of len gt h n an d let v 0 be t he root of T . For a n ode v of T , let ( p1 ; b1 ; d1 ) ( pu ; bu ; du ) be t he m axim u m sequ en ce of labels on t he pat h from v 0 t o v su ch n . T hen t his t hat for an y i (1 i u ) , pi is a sy n chron izin g st at e an d bi sequ en ce is called a synchronizing sequence of v . I n addit ion , for an y sy n chron iz( pi l ; bi l ; di l ) m ade in g set Ss ( 2 S) , let u s con sider t he sequ en ce ( pi 1 ; bi 1 ; di 1 ) by pickin g u p all labels ( pi ; bi ; di ) wit h pi 2 Ss from a sy n chron izin g sequ en ce ( pu ; bu ; du ) of v . T hen , we call t his sequ en ce an Ss -synchronizing ( p1 ; b1 ; d1 ) sequence of v .

D e n i t i on 1 9 . A com pu t at ion t ree T 0 of a t wo-way i-S A FA M on an in pu t w of len gt h n is a su bt ree of t he fu ll com pu t at ion t ree T su ch t hat { if v is labelled by a u n iversal con gu rat ion , t hen v has t he sam e children as in T , { if v is labelled by an exist en t ial con gu rat ion , t hen v has at m ost on e child, { let v 1 an d v 2 be arbit rary n odes. For an y sy n chron izin g set Ss ( 2 S) , let ( s0l 2 ; cl 2 ; d0l 2 ) ( l 1 l 2 ) be Ss ( sl 1 ; bl 1 ; dl 1 ) an d ( s01 ; c1 ; d01 ) ( s1 ; b1 ; d1 ) sy n chron izin g sequ en ces of v 1 an d v 2 , respect ively . T hen t hese t wo sequ en ces d0i di + 1 or m u st sat isfy t he followin g: ( 1) for an y i (1 i l 1 − 1) , di 0 0 di di + 1 holds, ( 2) t he sequ en ce b1 bl 1 is an in it ial su bsequ en ce of di cl 2 . t he sequ en ce c1

Suppose t hat several processes ent er synchronizing st at es in a synchronizing set Ss . T hen t he condit ion (1) means t hat a process cannot ent er successively synchronizing st at es in Ss before ot her processes ent er a synchronizing st at e in Ss . An accept ing comput at ion t ree of a two-way i-SAFA M is de ned in same way as De nit ion 5. We say t hat M accept s an input w if t here exist s an accept ing comput at ion t ree on w . Let f ( n ) be a funct ion from nat ural numbers t o real numbers. T hen it is said t hat M is f ( n ) parallel-bounded if, for any accept ed input w of lengt h n , t he number of universal con gurat ions on an accept ing comput at ion t ree of M on w is at most O ( f ( n )).

466 3.2

Hiroaki Yamamot o T h e P ow er of T w o- W ay i - SA FA s

We show t hat two-way i-SAFAs are more powerful t han one-way i-SAFAs, and t hen show an upper bound for t he power of two-way i-SAFAs. T h eor em 2 0 . T here exist s a lan gu age L su ch t hat L can be accept ed by a t woway i-S A FA bu t n ot accept ed by an y on e-way i-S A FA s.

Let us consider L = f w # w # j w 2 f 0; 1g g. Since t he language L is not regular, it is clear t hat any one-way i-SAFAs cannot accept L because one-way i-SAFAs accept only regular languages. Hence t he following lemma leads t o t he t heorem. L em m a 2 1 . T he lan gu age L = f w # w # j w 2 f 0; 1g g can be accept ed by a t wo-way i-S A FA .

T he following t heorem st at es an upper bound. T h eor em 2 2 . T he class of lan gu ages accept ed by f ( n ) parallel-bou n ded t wo-way i-S A FA s is in clu ded in N space( S ( n ) ) , where S ( n ) = min f n log n ; f ( n ) log n g.

R e fe re n c e s 1. A.K. Chandra, D.C. Kozen and L.J . St ockmeyer, Alt ernat ion, J . Assoc. Comput . Mach. 28,1, 114-133, 1981. 2. O.H. Ibarra and N.Q. Tran, On communicat ion-b ounded synchronized alt ernat ing nit e aut omat a, Act a Informat ica, 31, 4, 315-327, 1994. 3. J .Dassow, J .Hromkovic, J .Karhuaki, B.Rovan and A. Slob odova, On t he p ower of synchronizat ion in parallel comput at ion, In P roc. 14t h MFCS’89, LNCS 379,196206, 1989. 4. J .E. Hop croft and J .D. Ullman, Int roduct ion t o aut omat a t heory language and comput at ion, Addison Wesley, Reading Mass, 1979. 5. J . Hromkovic, K. Inoue, B. Rovan, A. Slob odova, I. Takanami and K.W . Wagner, On t he p ower of one-way synchronized alt ernat ing machines wit h small space, Int ernat ional J ournal of Foundat ions of Comput er Science, 3, 1, 65-79, 1992. 6. J . Hromkovic and K. Inoue, A not e on realt ime one-way synchronized alt ernat ing one-count er aut omat a, T heoret . Comput . Sci., 108, 2, 393-400, 1993. 7. J . Hromkovic, B. Rovan and A. Slob odova, Det erminist ic versus nondet erminist ic space in t erms of synchronized alt ernat ing machines, T heoret . Comput . Sci., 132, 2, 319-336, 1994. 8. R.E. Ladner, R.J . Ript on and L.J . St ockmeyer, Alt ernat ing pushdown and st ack aut omat a, SIAM J . Comput ing, 13, 1, 1984. 9. A. Slob odova, On t he p ower of communicat ion in alt ernat ing machines, In P roc. 13t h MFCS’88, LNCS 324,518-528, 1988. 10. M.Y. Vardi, Alt ernat ing aut omat a and program vericat i on, In Comput er Science Today-Recent Trends and Development s, LNCS 1000, 471-485, 1996. 11. H. Yamamot o, An aut omat a-based recognit ion algorit hm for semi-ext ended regular expressions, manuscript , 2000.

O rd e re d Q u a n t u m B ra n ch in g P ro g ra m s A re M o re P ow e rfu l t h a n O rd e re d P ro b a b ilis t ic B ra n ch in g P ro g ra m s u n d e r a B o u n d e d -W id t h R e s t ric t io n Masaki Nakanishi, Kiyoharu Hamaguchi, and Toshinobu Kashiwabara Graduat e School of Engineering Science, Osaka University, Toyonaka, Osaka 560-8531, J apan

One of imp ort ant quest ions on quant um comput ing is whet her t here is a comput at ional gap b etween t he model t hat may use quant um e ect s and t he model t hat may not . Researchers have s hown t hat some quant um aut omat on models are more p owerful t han classical ones. As one of classical comput at ional models, branching programs have b een st udied int ensively as well as aut omat on models, and several typ es of branching programs are int roduced including read-once branching programs and b ounded-widt h branching programs. In t his pap er, we int roduce a new quant um comput at ional model, a quant um branching program, as an ext ension of a classical probabilist ic branching program, and make comparison of t he p ower of t hese two models. We show t hat , under a b ounded-widt h rest rict ion, ordered quant um branching programs can comput e some funct ion t hat ordered probabilist ic branching programs cannot comput e. A b st r a c t .

1

In t ro d u c t io n

T here are many result s t hat quant um comput ers might b e more p owerful t han classical comput ers [2,5], it is unclear whet her t here is a comput at ional gap b etween t he model t hat may use quant um e ect s and t he model t hat may not . Researchers have shown t hat some quant um aut omat on models are more p owerful t han classical ones [1,3]. It would give hint s on t he p ower of quant um comput at ion t o st udy ab out ot her comput at ional models t o see whet her quant um comput at ional models can b e more p owerful t han classical ones. As one of classical comput at ional models, branching programs have b een st udied int ensively as well as aut omat on models, and several typ es of branching programs are int roduced including read-once branching programs and b oundedwidt h branching programs [4]. In t his pap er, we int roduce a new quant um comput at ional model, a quant um branching program, as an ext ension of a classical probabilist ic branching program, and make comparison of t he p ower of t hese two models. We show t hat , under a b ounded-widt h rest rict ion, ordered quant um branching programs can D .-Z . D u et a l. ( E d s.) : C O C O O N 2000, L N C S 1858, p p . 467{ 476, 2000.

c S p r in ge r -Ve r la g B e r lin H e id e lb e r g 2000

468

Masaki Nakanishi, Kiyoharu Hamaguchi, and Toshinobu Kashiwabara

comput e some funct ion t hat ordered probabilist ic branching programs cannot comput e. T he remainder of t his pap er has t he following organizat ion. In Sect . 2, we de ne several typ es of quant um branching programs and probabilist ic branching programs. In Sect . 3, we show t hat , under a b ounded-widt h rest rict ion, ordered quant um branching programs can comput e some funct ion t hat ordered probabilist ic branching programs cannot comput e. We conclude wit h fut ure work in Sect . 4.

2

P re lim in a rie s

We de ne t echnical t erms. D e n it ion 1 . Probabilistic Branching Program s

A probabilistic branching program (a PBP) is a directed acyclic graph that has two term inal nodes, which are labeled by 0 and 1, and internal nodes, which are labeled by boolean variables taken from a set X = f x 1 ; : : : ; x n g. T here 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 E 0 ( v ) and E 1 ( v ) be the set of 0-edges and the set of 1-edges of a node v respectively. T he sum of the weights of the edges in E 0 ( v ) and E 1 ( v ) is 1. T hat is, X

X

w ( e) = 1 :

w ( e) = 1 ; e2 E 0 (v )

e2 E 1(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 E 0 ( v ) ( E 1 ( v ) ) is chosen according to the probability distribution given as the weights of the edges. T he next node that will be tested is the node pointed by the chosen edge. A rriving at the term inal node, the labeled boolean value is returned. W e say that a PBP P com putes 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). tu We show examples of P BP s in F ig. 1. D e n it ion 2 . Quantum Branching Program s

A quantum branching program (a QBP) is an extension of a probabilistic branching program , and its form is sam e as a probabilistic branching program except for edge weights. In a QBP, the weight of each edge has a com plex num ber w ( e) ( 0 jj w ( e) jj 1). T he sum of the squared m agnitude of the weights of the edges in E 0 ( v ) and E 1 ( v ) is 1. T hat is, X e2 E 0 (v )

jj w ( e) jj 2 = 1;

X e2 E 1(v )

jj w ( e) jj 2 = 1 :

Ordered Quant um Branching P rograms x

x

0.2

1

y

1

1-edge 0-edge

0.8

0.8

469

y 0.2

1 1

1 1

0

1

0

1

F ig. 1 . probabilist ic branching programs t hat comput e f = x y wit h error rat e 0 and 0.2 resp ect ively

T he edge weight w ( e) represents the am plitude 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 ( Q a c c ), the rejecting set ( Q r ej ) and the non-halting set ( Q n on ). T he con gurations of P are identi ed with the nodes in Q = ( Q a c c [ Q r ej [ Q n on ) . A superposition of a QBP P is any elem ent of l 2 ( Q ) (the space of m appings from Q to C with l 2 norm ). For each q 2 Q , j q i denotes the unit vector that takes value 1 at q and 0 elsewhere. W e de ne a transition function : ( Q f 0; 1g 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 a edge from v to v 0 does not exist, then ( v ; a; v 0) = 0. W e de ne a tim e evolution operator as follows: U

x

X

jv i =

( v ; x ( v ) ; v 0) j v 0i ;

v ′2 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 tim e evolution operator is unitary, we say that the corresponding QBP is well-form ed, that is, the QBP is valid in term s of the quantum theory. W e de ne the observable O to be E a c c E r ej E n on , where E a c c = span f j v i j v

2 Q a c c g ; E r ej = span f j v i j v 2 Q r ej g ;

E n on = span f j v i j v

2 Q n on g :

A QBP reads n inputs and returns a boolean value as follows: T he initial state j 0 i is the source j v s i . A t each step, the tim e evolution operator is applied to the state j i i , that is, j i + 1 i = U x j i i . Next, j i + 1 i is observed with respect to E a c c E r ej E n on . Note that this observation causes the quantum state j i + 1 i to

470

Masaki Nakanishi, Kiyoharu Hamaguchi, and Toshinobu Kashiwabara 1-edge

x

0-edge

+

+ -

+ y

y

+

+ +

+

+ -

+

0

1

F ig. 2 . A quant um branching program t hat comput es f = x

T he weight of each edge is

p1

or −

2

p1

y wit h no error. , and only signs are put on t he gure. 2

be projected onto the subspace com patible with the observation. Let the outcom es of an observation be \ accept" , \ reject" and \ non-halting" corresponding to E a c c , E r ej and E n on respectively. Until \ accept" or \ reject" is observed, applying the tim e evolution operator and observation is repeated. If \ accept" (\ reject" ) is observed, boolean value 1 (0) is returned. W e say that a QBP P com putes 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). tu We show an example of a QBP in F ig. 2. To check well-formedness, we int roduce t he following t heorem. T h eor em 1 .

A QBP P is well-form ed. , for any input x , the transition function satis es the following condition.  P 1 q = q 1 2 0 ( q1 ; x ( q1 ) ; q 0) ( q2 ; x ( q2 ) ; q ) = q′ 0 q1 6 = q2 ; where ( q; a; q 0) denotes the conjugate of ( q; a; q 0) . Proof. It is obvious since U x is unit ary if and only if t he vect ors U x j v i are ort honormal. tu D e n it ion 3 . T he Language Recognized by a Branching Program

A language L is a subset of f 0; 1g . Let the n -th restriction L n of a language L be L \ f 0; 1gn . A sequence of branching program s f P n g recognizes a language L if and only if, there exists ( > 0) , and the n -input branching program P n com putes the characteristic function f L ( x ) of L n with error rate at m ost 1= 2 − for all n 2 N , where  1 (x 2 L n ) f L (x ) = 0 (x 6 2 Ln) : tu n

n

Ordered Quant um Branching P rograms

471

D e n it ion 4 . Bounded-W idth Branching Program s

For a branching program P , we can m ake any path from the source to a node have the sam e length by inserting dum m y nodes. Let the resulting branching program be P 0. W e say that P 0 is leveled. Note that P 0 does not need to com pute the sam e function as P . T he length of the path from the source to a node v is called the level of v . W e de ne widt h( i ) for P 0 as follows: v

widt h( i ) = jf v j the level of v is i . gj :

W e de ne W idt h( P 0) as follows: W idt h( P 0) = max f widt h( i ) g : i

W e say that the width of P is bounded by W idt h( P 0) . A sequence of branching program s f P n g is a bounded-width branching program if, for a constant w , f P n g satisfy the following condition.

8P 2 f P n g; T he width of P is bounded by w : tu We also call a sequence of branching programs \ a branching program" when it is not confused. We denot e a b ounded-widt h QBP and a b ounded-widt h P BP as a bw-QBP and a bw-P BP resp ect ively. D e n it ion 5 . Ordered Branching Program s

Given a bounded-width branching program , we can m ake it leveled as shown ::: x k ) , if the xk2 in the above. For a given variable ordering  = ( x k 1 appearances of the variables obey the ordering  , that is, x k precedes x k ( i < j ) on any path from the source to a term inal node, and the labeled variables to all the nodes at the sam e level are the sam e, we say that the branching program is ordered. tu n

j

i

3

C o m p a ris o n o f t h e C o m p u t a t io n a l P ow e r o f O rd e re d b w -Q B P s a n d O rd e re d b w -P B P s

In t his sect ion, we show t hat ordered bw-QBP s can comput e some funct ion t hat ordered bw-P BP s cannot comput e. We de ne t he funct ion HALF n and t he language L H A L F . D e n it ion 6 . T he Function HALF n and the Language L H A L F W e de ne HALF n : B n −! B as follows: 

HALF n ( x 1 ; : : : ; x n ) =

1 0

jf x i j x i = 1gj = otherwise

n

2

:

In the following, we denote the variables on which HALF n depends as X = f x i j 1 i n g. W e de ne L H A L F as follows: 

L HALF =



x x

2 f 0; 1gk ; HALF k ( x ) = 1



:

tu

472 3 .1

Masaki Nakanishi, Kiyoharu Hamaguchi, and Toshinobu Kashiwabara O r d er ed bw - Q B P s T h at R ecogn ize

L H A LF

In quant um comput ing, di erent comput at ional pat hs int erf ere wit h each ot her when t hey reach t he same con gurat ion at t he same t ime. In [3], a quant um nit e aut omat on is const ruct ed so t hat , only for input s t hat t he quant um nit e aut omat on should accept , t he comput at ional pat hs int erfere wit h each ot her. In t his pap er, we modify t his t echnique for quant um branching programs, and const ruct a quant um branching program t hat recognizes t he language L H A L F . T h eor em 2 . Ordered bw-QBPs can recognize L H A L F .

Proof. To show t hat ordered bw-QBP s can recognize L H A L F , we const ruct an ordered bw-QBP t hat comput es HALF n for any n . F igure 3 illust rat es t he QBP. We de ne t he set of nodes Q as follows: Q =

f v s ; v 1 ; v 2 ; v 3 ; v a c c ; v r ej 1 ; v r ej 2 g [



v ( i ; x ) jx k 

[ [



2 X ;1

k

3

i



v(i ;x

k

;j ;T )

jx k 2 X ; 1

i

3; 1

j

i

v(i ;x

k

;j ;F )

jx k 2 X ; 1

i

3; 1

j

3− i + 1





:

T he lab eled variable t o t he node v ( i ; x ) , v ( i ; x ; j ; T ) , and v ( i ; x ; j ; F ) is x k . T he lab eled variable t o t he node v s is x 1 . T he lab eled variable t o t he node v 1 , v 2 , and v 3 is x n . We de ne t he accept ing set ( Q a c c ), t he reject ing set ( Q r ej ), t he set of 0-edges ( E 0 ), t he set of 1-edges ( E 1 ) and t he weight s of edges ( w ( e)) as follows: k





(vs ; v( i ; x 1 ) ) j1

3

i



[

(v( i ; x

k

);

(v( i ; x

k

;j ;F ) ;

v(i ;x

(v( i ; x

k

; 3− i +

1; F ) ;



[ 

[ 

k

f v a c c g; Q r ej = f v r ej 1 ; v r ej 2 g :

Q a cc =

E0 =

k

v(i ;x

k

; 1; F )

k

;j



) j1

i

j1

+ 1; F ) )

v(i ;x

k

3; 1

k

i

3; 1

) j1

+ 1)

i

n

3 − i;1

j

3; 1

k

n

− 1



k

n

k

n





3 [ (v ( i ; x ; 3− i + 1; F ) ; v i ) j1 i [ f ( v i ; v a c c ) ; ( v i ; v r ej 1 ) ; ( v i ; v r ej 2 ) j 1 n



E1 =

[

(v( i ; x

k

);

(v( i ; x

k

;j ;T ) ;

v(i ;x

k

(v( i ; x

k

;i ;T ) ;

v(i ;x

k

  

3; 1

k

n

i

3; 1

3

i



[

3g :



(v s ; v ( i ; x 1 ) ) j1

[

i

v(i ;x

k

; 1; T ) ;j

) j1



i

+ 1; T ) )

+ 1)

j1

) j1

i

3; 1

k

j

i n

− 1



[ (v ( i ; x ; i ; T ) ; v i ) j1 i 3 [ f ( v i ; v a c c ) ; ( v i ; v r ej 1 ) ; ( v i ; v r ej 2 ) j 1 n

i

− 1; 1

3g :





Ordered Quant um Branching P rograms x

x

1

2

x

n-1

x

473

1-edge

n

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

F ig. 3 . a QBP t hat comput es HALF n

w (( v s ; v ( 1 ; x 1 ) )) = w (( v s ; v ( 2 ; x 1 ) )) = w (( v s ; v ( 3 ; x 1 ) )) =

1 p ; 3

1 p ; 3   2 i 1 1 ; w (( v 2 ; v r ej 1 )) = p ex p w (( v 2 ; v a c c )) = p ; 3 3 3   4 i 1 1 ; ; w (( v 3 ; v a c c )) = p w (( v 2 ; v r ej 2 )) = p ex p 3 3 3    4 i 8 i 1 1 w (( v 3 ; v r ej 1 )) = p ex p ; w (( v 3 ; v r ej 2 )) = p ex p 3 3 3 3 w (( v 1 ; v a c c )) = w (( v 1 ; v r ej 1 )) = w (( v 1 ; v r ej 2 )) =



T he weight s of t he ot her edges are all 1. Adding some more nodes and edges, each node of t he QBP can b e made t o have 1. one incoming 0-edge and one incoming 1-edge wit h t he weight of 1, 2. or, t hree incoming 0-edges and t hree incoming 1-edges wit h t he same weight s as b etween ( v 1 ; v 2 ; v 3 ) and ( v a c c ; v r ej 1 ; v r ej 2 ). and have 1. one out going 0-edge and one out going 1-edge wit h t he weight of 1, 2. or, t hree out going 0-edges and t hree out going 1-edges wit h t he same weight s as b etween ( v 1 ; v 2 ; v 3 ) and ( v a c c ; v r ej 1 ; v r ej 2 ). In addit ion, incoming edges of each node can b e made t o b e originat ed from t he nodes lab eled by t he same variable. T hen it is st raight forward t o see t hat t his QBP can b e well-formed by T heorem 1. Given an input x , let t he numb er of t he variables in X = f x 1 ; : : : ; x n g t o which t he value 1 is assigned b e k . T hen t he numb er of st eps from v ( i ; x 1 ) t o v i is

474

Masaki Nakanishi, Kiyoharu Hamaguchi, and Toshinobu Kashiwabara

i k + (3 − i + 1)( n

− k ) + n . T hus for any two dist inct i and j (1 i ; j 3), t he numb er of st eps from t he source t o v i ( v j ) is t he same if and only if k = n = 2. T herefore t he sup erp osit ion of t his QBP b ecomes p13 j v 1 i + p13 j v 2 i + p13 j v 3 i aft er 3n + 1 st eps if HALF n ( x ) = 1. Since U x ( p13 j v 1 i + p13 j v 2 i + p13 j v 3 i ) = j v a c c i , t his ordered bw-QBP ret urns 1 wit h probability 1 if HALF n ( x ) = 1. On t he ot her hand, since U x j v i i = p13 j v a c c i + ep 3 j v r ej 1 i + ep 3 j v r ej 2 i , t his ordered bwQBP ret urns 0 wit h probability 2/ 3 if HALF n ( x ) = 0. T herefore t his ordered tu bw-QBP comput es HALF n wit h one-sided error. i

3 .2

i

O r d er ed bw - P B P s C an n ot R ecogn ize

L H A LF

tu

T h eor em 3 . Ordered bw-PBPs cannot recognize L H A L F .

To prove T heorem 3, we int roduce t he following de nit ion and lemma. D e n it ion 7 . Variation Distance

T he variation distance of two probability distributions P 1 and P 2 over the sam e sam ple space I is de ned as follows: 1 2

X

jP 1 (i ) − P 2 (i )j : i2I

Sim ilarly, we de ne the variation distance of two vectors x 1 = ( a 1 ; : : : ; a n ) and = ( b1 ; : : : ; bn ) ( a 1 ; : : : ; a n ; b1 ; : : : ; bn : real num bers) as follows:

x 2

1 2

X

j a i − bi j : 1 i  n

tu L em m a 1 . Let Γ

m

be the set that consists of all probability distributions of m

events, that is, Γ

m

= f (a 1 ; : : : ; a m ) ja 1

0; a 1 + : : : + a m = 1 g :

0; : : : ; a m

For a nite set S Γ m and a constant su ciently large, the following holds.

( >

0), if the cardinality of S is

9D 1 2 S; D 2 2 S ( the variation distance of D 1 and D 2 ) < Proof. We prove by induct ion on m . It is obvious t hat t he lemma holds when m = 2. We assume t hat t he lemma holds when m = k − 1. We consider t he case of m = k . We assume t hat t he cardinality of S Γ k is su cient ly large, and, for any two dist inct D i ; D j 2 S , t he variat ion dist ance of D i and D j is great er ai r ) as follows: t han or equal t o . For a i , we de ne Γ N ( l 

Γ

N

(l

ai

r) =



( a 1 ; a 2 ; : : : ; a N )



aj l

0(1 ai

j r

N ) ; a 1 + : : : + a N = 1;

:

Ordered Quant um Branching P rograms

475

Since t he cardinality of S is su cient ly large, t he following holds.

9c; i ai c + = 2) ; and S 0 = S \ Γ k (c t he cardinality of S 0 is su cient ly large. We x c and i in t he following. We assume t hat i = k wit hout loss of generality. For x = ( a 1 ; : : : ; a k ), let t he least index of t he minimum of f a 1 ; : : : ; a k − 1 g b e s . For example, if x = (0 : 35 ; 0 : 3 ; 0 : 05 ; 0 : 05 ; 0 : 25), t he minimum is 0.05 and t he least index is s = 3. For x 0 = ( a 1 ; : : : ; a s − 1 ; a s + a k − c; a s + 1 ; : : : ; a k − 1 ), we de ne t he funct ion F as F ( x ) = x 0. For any two dist inct x 1 = ( a 1 ; : : : ; a k ) 2 S 0 and 0 bk w.l.o.g.), since t he variat ion disx 2 = ( b1 ; : : : ; bk ) 2 S (we assume t hat a k t ance of x 1 and x 2 is at least , t he variat ion dist ance of t he vect ors F ( x 1 ) and F ( x 2 ) is at least − 12 (( a k − bk ) − ( a k − c ) − ( bk − c )) = − ( bk − c ) − = 2 = = 2. T hus F ( x 1 ) di ers from F ( x 2 ) for any two dist inct x 1 ; x 2 2 S 0. T herefore j S 0j = j S 00j if we de ne 

S

00

=



1 F ( x ) 1− c

 x

2S

0

:

Not e t hat , for a vect or x 2 S 0 and F ( x ) = ( a 1 ; : : : ; a k − 1 ), a 1 + : : : + a k − 1 = 1 − c 0; : : : ; a k − 1 0. T hus, for a vect or ( b1 ; : : : ; bk − 1 ) 2 S 00, b1 + : : : + bk − 1 = and a 1 0; : : : ; bk − 1 0. T herefore in t he case of m = k − 1, t here is S 00 Γ k − 1 1 and b1 such t hat , for any two dist inct D i ; D j 2 S 00, t he variat ion dist ance of D i and D j is at least 2( 1 − c ) , and t he cardinality of S 00 is su cient ly large. T his is a cont radict ion. tu We show t he proof of T heorem 3 in t he following. (Proof of T heorem 3) We assume t hat t here is an ordered bw-P BP f P n g t hat recognizes L H A L F , t hat is, P 2 f P n g comput es HALF n wit h error rat e 1= 2 − . We say t hat a P BP is in normal form when all t he variables app ear on any pat h from t he source t o a t erminal node. We assume t hat P is in normal form wit h t he ordering ::: x n ) wit hout loss of generality. Let S 2 b e t he set of t he variables  = (x 1 n of t he former half of t he variable ordering, t hat is, S 2 = f x j j 1 j g. W hen n 2 is su cient ly large, t here are su cient numb er of assignment s t o t he variables in S 2 such t hat , for any two dist inct assignment s, t he weight s of t he assignment s di er. Let D a denot es t he probability dist ribut ion for t he nodes at which we arrive when we comput e according t o a . T hat is, D a ( v ) is t he probability such t hat we arrive at t he node v aft er we comput e according t o a . For su cient numb er of assignment s, t here are su cient numb er of corresp onding probability dist ribut ions. T hus, since P is a b ounded-widt h P BP, when n is su cient ly large, t here are two dist inct assignment , a 1 and a 2 , t o t he variables in S 2 sat isfying t he following condit ions by Lemma 1. n

n

n

n

{ T he variat ion dist ance of D a 1 and D a 2 is less t han  . { T he weight of a 1 (t he numb er of 1 in a 1 ) di ers from t hat of a 2 .

476

Masaki Nakanishi, Kiyoharu Hamaguchi, and Toshinobu Kashiwabara

Let t he a r e s t b e t he assignment t o t he variables of t he lat t er half of t he variable ordering such t hat , for t he complet e assignment a 1 a r e s t , HALF n ( a 1 a r e s t ) = 1. T hen if we comput e according t o a 1 a r e s t , we arrive at t he t erminal node of 1 wit h probability at least 1= 2 + . On t he ot her hand, if we comput e according t o a 2 a r e s t , we arrive at t he t erminal node of 1 wit h probability at least 1= 2 + − = 1= 2. We show t he reason in t he following. Let I b e I = f i jD a 1 (i ) > D a 2 (i )g : Since t he variat ion dist ance of D a 1 and D a 2 is less t han , 0

1 X

X

( D a 1 ( i ) − D a 2 ( i )) @ = i2I

( D a 2 ( i ) − D a 1 ( i )) A