Lecture Notes in Computer Science Commenced Publication in 1973 Founding and Former Series Editors: Gerhard Goos, Juris Hartmanis, and Jan van Leeuwen
Editorial Board David Hutchison Lancaster University, UK Takeo Kanade Carnegie Mellon University, Pittsburgh, PA, USA Josef Kittler University of Surrey, Guildford, UK Jon M. Kleinberg Cornell University, Ithaca, NY, USA Alfred Kobsa University of California, Irvine, CA, USA Friedemann Mattern ETH Zurich, Switzerland John C. Mitchell Stanford University, CA, USA Moni Naor Weizmann Institute of Science, Rehovot, Israel Oscar Nierstrasz University of Bern, Switzerland C. Pandu Rangan Indian Institute of Technology, Madras, India Bernhard Steffen University of Dortmund, Germany Madhu Sudan Microsoft Research, Cambridge, MA, USA Demetri Terzopoulos University of California, Los Angeles, CA, USA Doug Tygar University of California, Berkeley, CA, USA Gerhard Weikum Max-Planck Institute of Computer Science, Saarbruecken, Germany
5715
Cristian S. Calude José Félix Costa Nachum Dershowitz Elisabete Freire Grzegorz Rozenberg (Eds.)
Unconventional Computation 8th International Conference, UC 2009 Ponta Delgada, Portugal, September 7-11, 2009 Proceedings
13
Volume Editors Cristian S. Calude The University of Auckland, Department of Computer Science Science Centre, 38 Princes St., Auckland 1142, New Zealand E-mail:
[email protected] José Félix Costa Instituto Superior Técnico, Department of Mathematics and University of Lisbon, Centro de Matemática e Aplicações Fundamentais 1649 Lisboa, Portugal E-mail:
[email protected] Nachum Dershowitz Tel Aviv University, School of Computer Science Ramat Aviv, Tel Aviv, 69978, Israel E-mail:
[email protected] Elisabete Freire University of Azores, Department of Mathematics Rua da Mãe de Deus, 9501-855 Ponta Delgada, Portugal E-mail:
[email protected] Grzegorz Rozenberg Leiden University, Leiden Institute of Advanced Computer Science (LIACS) Niels Bohrweg 1, 2333 CA Leiden, The Netherlands E-mail:
[email protected] Library of Congress Control Number: 2009933350 CR Subject Classification (1998): F.1, F.2, I.1, C.1.3, C.1, J.2 LNCS Sublibrary: SL 1 – Theoretical Computer Science and General Issues ISSN ISBN-10 ISBN-13
0302-9743 3-642-03744-5 Springer Berlin Heidelberg New York 978-3-642-03744-3 Springer 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. Violations are liable to prosecution under the German Copyright Law. springer.com © Springer-Verlag Berlin Heidelberg 2009 Printed in Germany Typesetting: Camera-ready by author, data conversion by Scientific Publishing Services, Chennai, India Printed on acid-free paper SPIN: 12739301 06/3180 543210
Preface
The 8th International Conference on Unconventional Computation, UC 2009, was held in Ponta Delgada during September 7–11, 2009, and was organized under the auspices of the European Association for Theoretical Computer Science (EATCS) by the University of Azores (Ponta Delgada, Portugal) and the Centre for Discrete Mathematics and Theoretical Computer Science (Auckland, New Zealand). The venue was the University of Azores, with its modern and well-equipped auditoria, next to the magnificent rectory, and surrounded by a pleasant and peaceful garden. The university is located in the city of Ponta Delgada, on S˜ao Miguel Island, in the Archipelago of the Azores. S˜ ao Miguel is famous for its beautiful landscapes and exceptional volcanic lakes. Depending on the surrounding countryside, some appear peaceful and relaxing, while others are more dramatic. Ponta Delgada has many magnificent buildings of tremendous architectural value portraying the urban architecture of the sixteenth to nineteenth centuries. The majority of these are presently used to accommodate various political, administrative, religious and cultural offices. There are several churches that are authentic works of art, with Gothic structures and Manueline exteriors. Others are in the baroque style, with interior embroideries in gold thread and rare wood pieces. Famous paintings are also easily found in Ponta Delgada. The International Conference on Unconventional Computation (UC) series is devoted to all aspects of unconventional computation — theory as well as experiments and applications. (See https://www.cs.auckland.ac.nz/CDMTCS/ conferences/uc/.) Typical, but not exclusive, topics are: natural computing including quantum, cellular, molecular, membrane, neural, and evolutionary computing, as well as chaos and dynamical system-based computing, and various proposals for computational mechanisms that go beyond the Turing model. The first venue of the Unconventional Computation Conference (formerly called Unconventional Models of Computation) was Auckland, New Zealand in 1998. Subsequent sites of the conference were Brussels, Belgium in 2000, Kobe, Japan in 2002, Seville, Spain in 2005, York, UK in 2006, Kingston, Canada in 2007, and Vienna, Austria, in 2008. The proceedings of the previous UC conferences appeared as follows: 1. Calude, C. S., Casti, J., Dinneen, M. J. (eds.): Unconventional Models of Computation, Springer, Singapore (1998); 2. Antoniou, I., Calude, C. S., Dinneen, M. J. (eds.): Unconventional Models of Computation, UMC 2K: Proceedings of the Second International Conference, Springer, London (2001); 3. Calude, C. S., Dinneen, M. J., Peper, F. (eds.): UMC 2002. LNCS 2509, Springer, Heidelberg (2002);
VI
Preface
4. Calude, C. S., Dinneen, M. J., P˘ aun, G., P´erez-Jim´enez, M. J., Rozenberg, G. (eds.): UC 2005. LNCS 3699, Springer, Heidelberg (2005); 5. Calude, C. S., Dinneen, M. J., P˘ aun, G., Rozenberg, G., Stepney, S. (eds.): UC 2006. LNCS 4135, Springer, Heidelberg (2006); 6. Akl, S. G., Calude, C. S., Dinneen, M. J., Rozenberg, G., Wareham, H. T. (eds.): UC 2007. LNCS 4618, Springer, Heidelberg (2007); 7. Calude, C. S., Costa, J. F., Freund, R., Rozenberg, G. (eds.): UC 2008. LNCS 5204, Springer, Heidelberg (2008). The eight keynote speakers at the 2009 conference were: – – – – –
– – –
Edwin Beggs (Swansea University): “Experimental Computation” Jarkko Kari (University of Turku): “Cellular Automata” Carlos Louren¸co (University of Lisbon): “Brain Dynamics” Jonathan Mills (Indiana University): “Awakening the Analogue Computer: Rubel’s Extended Analog Computer Workshop” (Action Event) James M. Nyce (Ball State University and Indiana School of Medicine): “Artifice, Interpretation and Nature: Key Categories in Radiology Work” (Action Event) Przemyslaw Prusinkiewickz (University of Calgary): “Developmental Computing” Luk´ aˇs Sekanina (Brno University of Technology): “Evolvable Hardware: From Successful Applications to Implications for the Theory of Computation” Philip Welch (University of Bristol): “Relativistic Computers and Transfinite Computation” The conference also included three tutorials:
– Manuel Lameiras Campagnolo (Technical University of Lisbon): “Analogue Computation” – James Crutchfield (University of California at Davis): “Computational Mechanics: Natural Computation and Self-Organization” – Martin Davis (New York University and Visiting Scholar, Berkeley): “Diophantine Equations” In a special lecture, Gabriela Queiroz, from the Volcanology and Geological Risks Evaluation Centre of University of Azores, spoke on “The Geology of the Island.” In this talk, the geological evolution of S˜ ao Miguel Island was characterized in the context of the Azores geodynamic setting. The main active volcanic systems of the island were described, covering their eruptive history, volcanic hazard and historical eruptions. In addition, UC 2009 hosted three workshops — one on “Hyper-computation” organized by Mike Stannett (University of Sheffield ), one on “Novel Computing Substrates” organized by Andrew Adamatzky (University of the West of England, Bristol), and one on “Physics and Computation” organized by Olivier ´ ´ Bournez (Ecole Polytechnique), and Gilles Dowek (Ecole Polytechnique and INRIA).
Preface
VII
The Program Committee consisting of Andrew Adamatzky (Bristol, UK), Selim G. Akl (Kingston, Canada), Masashi Aono (Tokyo, Japan), Edwin Beggs (Swansea, UK), Olivier Bournez (Paris, France), Mark Burgin (California, Los Angeles, USA), Cristian S. Calude (Auckland, New Zealand), Luca Cardelli (Cambridge, UK), S. Barry Cooper (Leeds, UK), Jos´e F´elix Costa (Lisbon, Portugal and Swansea, UK, Co-chair), James Crutchfield (California, Davis, USA), Martin Davis (New York and Berkeley, USA), Nachum Dershowitz (Tel Aviv, Israel, Co-chair), Michael J. Dinneen (Auckland, New Zealand), Gilles Dowek (Paris, France), Rudolf Freund (Vienna, Austria), Dina Q. Goldin (Providence, USA), Masami Hagiya (Tokyo, Japan), Mark Hogarth (Cambridge, UK), Natasha Jonoska (Tampa, FL, USA), Lila Kari (London, Ontario, Canada), Julia Kempe (Tel Aviv, Israel), Yasser Omar (Lisbon, Portugal), Ferdinand Peper (Kobe, Japan), Mario J. P´erez-Jim´enez (Seville, Spain), Petrus H. Potgieter (Pretoria, South Africa), Kai Salomaa (Kingston, Canada), Hava Siegelmann (Massachusetts, USA), Darko Stefanovic (Albuquerque, USA), Susan Stepney (York, UK), Christof Teuscher (Portland, USA), and Jon Timmis (York, UK), selected 18 papers (out of 40), 2 posters (out of 3), and 3 papers converted to posters to be presented as full-length talks. The Program Committee is grateful for the highly appreciated work done by the additional reviewers, and for their help in improving the papers for this volume. These experts included: Jack Copeland, Felipe Cucker, Bo Cui, Michael Domaratzki, Emmanuel Hainry, Carlos Louren¸co, Benoit Masson, Marius Nagy, Naya Nagy, Mark Olah, Shinnosuke Seki, Petr Sosik, Karl Svozil, Klaus Weihrauch, Damien Woods, and Martin Ziegler. The Steering Committee of the International Conference on Unconventional Computation series comprised Thomas B¨ack (Leiden, The Netherlands), Cristian S. Calude (Auckland, New Zealand, Co-chair), Lov K. Grover (Murray Hill, NJ, USA), Jan van Leeuwen (Utrecht, The Netherlands), Seth Lloyd (Cambridge, MA, USA), Gheorghe P˘ aun (Bucharest, Romania), Tommaso Toffoli (Boston, MA, USA), Carme Torras (Barcelona, Spain), Grzegorz Rozenberg (Leiden, The Netherlands, Co-chair), and Arto Salomaa (Turku, Finland). We extend our thanks to all members of the local Conference Organizing Committee, particularly to Jos´e F´elix Costa (Chair) of the Technical University of Lisbon and Swansea University, and Elisabete Freire, Matthias Funk, Lu´ıs Mendes Gomes, and H´elia Guerra of the University of Azores for their invaluable organizational work. The conference was partially supported by the University of Azores, Centro de Matem´atica e Aplica¸c˜oes Fundamentais of the University of Lisbon, the Regional Government of Azores, FLAD – Acordo Mobilidade Antero de Quental, Funda¸c˜ao para a Ciˆencia e a Tecnologia (FCT), and Banco Internacional do Funchal (BANIF). We extend to all of them our deep gratitude. It is a great pleasure to acknowledge the developers of the Easychair system, and the fine cooperation with the Lecture Notes in Computer Science team of
VIII
Preface
Springer which made possible the production of this volume in time for the conference. Finally, we thank all the authors for the high quality of their contributions. June 2009
Cristian S. Calude Jos´e F´elix Costa Nachum Dershowitz Elisabete Freire Grzegorz Rozenberg
Venue Geology of S˜ ao Miguel Island Introduction S˜ao Miguel is the largest of the nine volcanic islands that constitute the Azores archipelago, located in the North Atlantic Ocean between 36o – 43o latitude north and 25o – 31o longitude west. The islands are situated in a complex geodynamic setting dominated by the interplay between Eurasian, African and American tectonic plates. Accordingly, main tectonic structures affecting the region are the Mid-Atlantic Ridge (MAR), which crosses the archipelago between the islands of Faial and Flores with a general N–S direction, the East Azores Fracture Zone, which extends E–W from the MAR to the Strait of Gibraltar, including the Gloria Fault, and the Terceira Rift [1], which, in a strict approach, trends NW–SE along a line defined by Graciosa, Terceira and S˜ ao Miguel islands, and in a larger scale comprises, the WNW–ESE fracture systems of Faial, Pico and S˜ ao Jorge islands.
Historical Volcanism and Seismicity Despite some uncertainties about the exact date of the discovery, it is known that the Azores were settled by the Portuguese in the second quarter of the 15th century. Throughout more than 500 years of history, the region experienced about 27 volcanic eruptions and more than 20 strong earthquakes, due to this complex geodynamic environment. The initial reports of volcanic manifestations go back to the fifteenth century and are related to an eruption at Furnas Valley, at about the time of the S˜ao Miguel island settlement, sometime between 1439 and 1443 [2]. The last volcanic event with serious social-economic repercussions took place on the NW end of Faial Island, during 1957 − 1958, and gave rise to the Capelinhos Volcano [3]. More recently, a submarine eruption occurred about 10 km west of Terceira island, between 1998 and 2002 [4] with no direct consequences for the community. The Azores region is frequently affected by earthquakes, either linked to tectonic movements or related with volcanic activity. The first strong earthquake reported took place on October 22, 1522 and reached the maximum intensity of X (Modified Mercalli Scale, MM–56) on S˜ ao Miguel Island [5, 6]. Vila Franca do Campo, the capital of the Azores at that time, was destroyed by the earthquake, and, subsequently, was buried by a large landslide produced by the collapse of an adjacent hill [7]. About 5,000 people died, houses were destroyed and all the existing infrastructures were disrupted. The most recent event with social-economic impact occurred on July 9, 1998 and reached a maximum intensity of V III (MM–56) on Faial Island. It caused eight deaths and significant destruction in most of the rural villages, due to the fragility of the constructions and some recognized geological site effects.
X
Preface
S˜ ao Miguel Geology At present, about 250, 000 people live in the Azores, the S˜ ao Miguel island being the most populated, with approximately 132, 000 inhabitants. The island has an area of about 745 km2 and its highest point reaches 1, 103 m at Pico da Vara, north of Povoa¸c˜ao Caldera. Volcanic structures and the morphological expression of some fractures and scarp faults dominate the landscape in S˜ ao Miguel. Also notorious are the erosion processes, particularly in the streamlines and sea cliffs. Six distinct volcanic regions can be defined in S˜ ao Miguel island, which are from east to west (1) Nordeste/Povoa¸c˜ao Volcanic Region, (2) Furnas Central Volcano, (3) Achada das Furnas Volcanic System, (4) Fogo Central Volcano, (5) Picos Region Volcanic System, and (6) Sete Cidades Central Volcano (Fig. 1).
Fig. 1. Location of the different volcanic systems in S˜ ao Miguel island
The Nordeste/Povoa¸c˜ao Volcanic Region comprises the thick sequences of lava flows of the Nordeste region and the Povoa¸c˜ao Caldera. With about 4 million years [8], the oldest volcanic structures and deposits in the island can be observed at this region. The landscape shows deep valleys resultant from erosion processes. At the southeastern part of the area the Povoa¸c˜ao Caldera is a volcanic depression with 6 km × 8 km across and walls as high as 700 m. The Povoa¸c˜ao Volcano is considered to be extinct and its surface is mantled by deposits originating mainly in the adjacent Furnas Volcano. Furnas, Fogo and Sete Cidades are the three active central volcanoes in S˜ ao Miguel. They have recent eruptive histories marked by a predominance of explosive activity and all of them developed summit calderas that are now partially occupied by lakes. Unlike the other two, Furnas does not have a well-defined edifice, but consists of a steep-sided caldera complex 7 km × 4.5 km across (Fig. 2). The eruptive history at Furnas appears to have been essentially explosive, producing thick deposits of pumice, and registering at least two
Preface
XI
major caldera collapses [9]. There have been 10 recognized eruptions over the last 5, 000 years, of which two occurred in historical times, the first, as previously mentioned, in 1439−1443 AD and the second in 1630 AD. During the latter about 100 people lost their lives due to the formation of pyroclastic surges [10]. Moreover, pumice and ash covered almost the entire island, reaching as far as Santa Maria island about 80 km to the south.
Fig. 2. View of Furnas Caldera in the area of the village. The hill present at the top of the picture is the eastern wall of Povoa¸ca ˜o Caldera.
Fogo is a central volcano formed by a series of hills, with the summit truncated by a depression with a diameter of about 3 km, partially occupied by the Fogo Lake (Fig.3). The main edifice was built by the accumulation of lava flows, domes and pyroclasts. One major caldera-forming eruption was recognized between 46, 500 and 26, 500 years ago [11]. In the last 5, 000 years 7 explosive eruptions marked the activity of this volcano, including the historical event of 1563 AD originating inside the caldera, which produced ash deposits that mantled the eastern part of the island. Sete Cidades is the westernmost central volcano of the island. It has an approximately circular summit caldera of about 5 km diameter partly occupied by two connecting lakes — Lagoa Azul and Lagoa Verde, and several secondary pumice cones and tuff cones (Fig. 4). The oldest dated rocks revealed more than 200, 000 years of age. The actual caldera is interpreted as been formed in three main phases as a result of three paroxysmal eruptions at about 36, 000 years, 29, 000 years and 16, 000 years ago [12]. In the last 5, 000 years at least 17 intracaldera eruptions occurred, the latest of which formed the Caldeira Seca
XII
Preface
Fig. 3. Partial view of Fogo Caldera and Fogo lake
Fig. 4. View of Sete Cidades Volcano with Azul and Verde lakes and the caldera steep northern wall
Preface
XIII
cone, some 700 years ago [13]. The recent eruptive history of Sete Cidades makes it one of the most active volcanoes of the Azores. The two volcanic systems of the Achada das Furnas and Picos Region occupy the area between Furnas and Fogo volcanoes and Fogo and Sete Cidades volcanoes, respectively. Achada das Furnas is a relatively flat region with dispersed cinder cones. The smooth landscape is made up of lava flows intercalated with scoria deposits from the closest cinder cones and pumice layers from the adjacent central volcanoes. The Volcanic System of the Picos Region is dominated by the presence of numerous alignments of cinder cones. From these eruptive centers were several lava flows produced and built large low-slope surfaces which extend toward the north and south seashores. This volcanic system is strongly affected by a fault system, trending NW–SE, clearly made evident by the spatial distribution of the eruptive centers and the direction of important eruptive fissures [14]. In this region historical eruptions occurred (1) in 1563, on Pico do Sapateiro, three days after the explosion centerd inside Fogo’s caldera, and (2) in 1652, on Pico do Fogo, in three eruptive vents aligned along a NW–SE fracture.
Fig. 5. Asmodeu fumarole in Furnas village
Hydrothermal Activity The current normal levels of volcanic activity in S˜ ao Miguel are displayed in several fumarolic fields, hot springs and extensive soil degassing, particularly well expressed in some areas of Furnas and Fogo volcanoes. In general, the
XIV
Preface
fumaroles present temperatures close to the boiling point of the fluids and their compositions are CO2 dominated (Fig. 5). Gabriela Queiroz Centre of Volcanology and Geological Risks Assessment – Azores University Rua da M˜ ae de Deus – 9501-801 Ponta Delgada – Portugal
[email protected]
References 1. Machado, F.: Submarine pits of the Azores plateau. Bull. Volcanol., S´erie II, Tome XXI (1959) 109–116 2. Queiroz, G., Gaspar, J., Cole, P., Guest, J., Wallenstein, N., Duncan, A., Pacheco, J.: Erup¸co ˜es vulcˆ anicas no Vale das Furnas (ilha de S.Miguel, A¸cores) na primeira metade do s´eculo xv. A¸coreana VIII(1) (1995) 131–137 3. Machado, F.: Actividade vulcˆ anica da ilha do Faial not´ıcia preliminar relativa aos meses de Maio a Agosto de 1958. Atlˆ antida III (1959) 40–55 4. Gaspar, J.L., Queiroz, G., Pacheco, J.M., Ferreira, T., Wallenstein, N., Almeida, M.H., Coutinho, R.: Basaltic lava balloons produced during the 1998-2001 Serreta Submarine Ridge eruption (Azores). In White, J., Clague, D., Smellie, J., eds.: Subaqueous Explosive Volcanism. Volume 140 of Geophysical Monograph. American Geophysical Union (2003) 205–212 5. Machado, F.: Anomalias das intensidades do terramoto de S. Miguel (A¸cores) em 1522. Bol. Mus. Lab. Miner. Geol. Fac. Cincias de Lisboa 10(2) 6. Silveira, D.: Caracteriza¸ca ˜o da sismicidade hist´ orica da ilha de S. Miguel com base na reinterpretao de dados de macross´ısmica: contribui¸ca ˜o para a avalia¸ca ˜o do risco s´ısmico. Tese de Mestrado em Vulcanologia e Riscos Geol´ ogicos, Universidade dos A¸cores (2002) 7. Marques, R.: Contribui¸ca ˜o para o conhecimento da instabilidade geomorfol´ ogica nos A¸cores: Estudo de movimentos de vertente associados a diferentes mecanismos desencadeante. Tese de Mestrado em Vulcanologia e Riscos Geol´ ogicos, Universidade dos A¸cores (2004) 8. Abdel-Monem, A.A., Fernandez, L.A., Boone, G.M.: K/ar ages from the eastern Azores group (Santa Maria, S˜ ao Miguel and the Formigas Islands). Lithos 4 (1975) 247–254 9. Guest, J.E., Gaspar, J.L., Cole, P., Queiroz, G., Duncan, A., Wallenstein, N., Ferreira, T., Pacheco, J.M.: Volcanic geology of Furnas volcano, S˜ ao Miguel, A¸cores. J. Volcanol. Geotherm. Res. 92 (1999) 1–29 10. Cole, P.D., Queiroz, G., Wallenstein, N., Duncan, A.M., Guest, J.E.: An historic subplinian to phreatomagmatic eruption: the 1630 eruption of Furnas volcano, S˜ ao Miguel, Azores. J. Volcanol. Geotherm. Res. 69 (1995) 117–135 11. Wallenstein, N.: Estudo da hist´ oria recente do comportamento eruptivo do Vulc˜ ao do Fogo (S. Miguel, A¸cores). Avalia¸ca ˜o preliminar do hazard. Tese de Doutoramento no ramo de Geologia especialidade de Vulcanologia, Universidade dos A¸cores (1999) 12. Queiroz, G.: Vulc˜ ao das Sete Cidades (S. Miguel, A¸cores): hist´ oria eruptiva e avalia¸ca ˜o do hazard. Tese de Doutoramento no ramo de Geologia especialidade de Vulcanologia, Universidade dos A¸cores (1997)
Preface
XV
13. Queiroz, G., Pacheco, J.M., Gaspar, J.L., Aspinall, W., Guest, J.E., Ferreira, T.: The last 5000 years of activity at Sete Cidades volcano (S. Miguel Island, Azores): implications for hazard assessment. J. Volcanol. Geotherm. Res. 178 (2008) 562– 573 14. Ferreira, T.: Caracteriza¸ca ˜o da actividade vulcˆ anica da ilha de S˜ ao Miguel, A¸cores: vulcanismo bas´ altico recente e zonas de desgeisifica¸ca ˜o. Avalia¸ca ˜o de Riscos. Tese de Doutoramento no ramo de Geologia especialidade de Vulcanologia, Universidade dos A¸cores (2000)
Conference Organization
Program Chairs
Steering Chairs
Jos´e F´elix Costa Nachum Dershowitz
Cristian S. Calude Grzegorz Rozenberg
Program Committee
Steering Committee
Andrew Adamatzy Selim Akl Masashi Aono Edwin Beggs Olivier Bournez Mark Burgin Cristian S. Calude Luca Cardelli S. Barry Cooper James Crutchfield Martin Davis Michael Dinneen Gilles Dowek Rudolf Freund Dina Q. Goldin Masami Hagiya Mark Hogarth Natasha Jonoska Lila Kari Julia Kempe Yasser Omar Ferdinand Peper Petrus H. Potgieter Mario J. P´erez-Jim´enez Kai Salomaa Hava T. Siegelmann Darko Stefanovic Susan Stepney Christof Teuscher Jon Timmis
Thomas B¨ack Lov K. Grover Jan van Leeuwen Seth Lloyd Gheorghe P˘ aun Tommaso Toffoli Carme Torras Arto Salomaa
Proceedings Committee Cristian S. Calude Jos´e F´elix Costa Nachum Dershowitz Elisabete Freire Grzegorz Rozenberg
Local Organization Chair Jos´e F´elix Costa
Local Organization Elisabete Freire Matthias Funk Lu´ıs Mendes Gomes H´elia Guerra
XVIII
Organization
Sponsors
DRCT
Associa¸c˜ao para a Mobilidade Antero de Quental
Table of Contents
Invited Talks and Tutorials Using Physical Experiments as Oracles (Abstract) . . . . . . . . . . . . . . . . . . . . Edwin J. Beggs
1
A Tutorial on Analog Computation: Computing Functions over the Reals (Tutorial Abstract) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manuel Lameiras Campagnolo
2
Computational Mechanics: Natural Computation and Self-organization (Tutorial Abstract) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . James P. Crutchfield
3
Diophantine Equations and Computation: A Tutorial (Tutorial Abstract) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Martin Davis
4
Structure of Reversible Cellular Automata (Abstract) . . . . . . . . . . . . . . . . Jarkko Kari
6
Brain Dynamics Promotes Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Carlos Louren¸co
7
Awakening the Analogue Computer: Rubel’s Extended Analog Computer Workshop (Abstract) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Jonathan W. Mills
10
Artifice, Interpretation and Nature: Key Categories in Radiology Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . James M. Nyce
11
Developmental Computing (Extended Abstract) . . . . . . . . . . . . . . . . . . . . . Przemyslaw Prusinkiewicz Evolvable Hardware: From Applications to Implications for the Theory of Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Luk´ aˇs Sekanina Relativistic Computers and Transfinite Computation . . . . . . . . . . . . . . . . . Philip D. Welch
16
24 37
Regular Contributions Turing Completeness Using Three Mobile Membranes . . . . . . . . . . . . . . . . Bogdan Aman and Gabriel Ciobanu
42
XX
Table of Contents
Resource-Competing Oscillator Network as a Model of Amoeba-Based Neurocomputer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Masashi Aono, Yoshito Hirata, Masahiko Hara, and Kazuyuki Aihara Networks of Evolutionary Picture Processors with Filtered Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Paolo Bottoni, Anna Labella, Florin Manea, Victor Mitrana, and Jose M. Sempere
56
70
Mapping Computation with No Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . Serge Burckel, Emeric Gioan, and Emmanuel Thom´e
85
Real Computable Manifolds and Homotopy Groups . . . . . . . . . . . . . . . . . . Wesley Calvert and Russell Miller
98
Distributed Quantum Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ellie D’Hondt and Yves Vandriessche
110
Foundations of Optical Encryption: Formal Modeling and Achieving Shannon Secrecy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Giovanni Di Crescenzo, Ron Menendez, Shahab Etemad, and Janet Jackel
125
Random Number Selection in Self-assembly . . . . . . . . . . . . . . . . . . . . . . . . . David Doty, Jack H. Lutz, Matthew J. Patitz, Scott M. Summers, and Damien Woods
143
Abstract Geometrical Computation and Computable Analysis . . . . . . . . . J´erˆ ome Durand-Lose
158
Descriptional Complexity of Tissue-Like P Systems with Cell Division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Daniel D´ıaz-Pernil, Pilar Gallego-Ortiz, Miguel A. Guti´errez-Naranjo, Mario J. P´erez-Jim´enez, and Agust´ın Riscos-N´ un ˜ez Computing Domains of Attraction for Planar Dynamics . . . . . . . . . . . . . . . Daniel S. Gra¸ca and Ning Zhong
168
179
Approximating the Behaviours of Physarum polycephalum for the Construction and Minimisation of Synthetic Transport Networks . . . . . . . Jeff Jones
191
Simulation of Neurocomputing Based on Photophobic Reactions of Euglena: Toward Microbe–Based Neural Network Computing . . . . . . . . . . Kazunari Ozasa, Masashi Aono, Mizuo Maeda, and Masahiko Hara
209
Reasoning about Entanglement and Separability in Quantum Higher-Order Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fr´ed´eric Prost and Chaouki Zerrari
219
Table of Contents
XXI
On the Brightness of the Thomson Lamp: A Prolegomenon to Quantum Recursion Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Karl Svozil
236
Advances in I/O, Speedup, and Universality on Colossus, an Unconventional Computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Benjamin Wells
247
Membrane Dissolution and Division in P . . . . . . . . . . . . . . . . . . . . . . . . . . . . Damien Woods, Niall Murphy, Mario J. P´erez-Jim´enez, and Agust´ın Riscos-N´ un ˜ez
262
Computing Naturally in the Billiard Ball Model . . . . . . . . . . . . . . . . . . . . . Liang Zhang
277
Posters Water as a Quantum Computing Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . Edward G. Belaga, Daniel Grucker, Tarek Khalil, Jean Richert, and Kees van Schenk Brill Cloning for Heteroscedasticity Elimination in GMDH Learning Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Marcel Jirina and Marcel Jirina jr. Tug-Of-War Model for Two-Bandit Problem . . . . . . . . . . . . . . . . . . . . . . . . Song-Ju Kim, Masashi Aono, and Masahiko Hara Intrusion Detection in Circular Frustrated Systems: An Eminently Parallel Processing Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Patricia Mostardinha and Fern˜ ao Vistulo de Abreu
287
288 289
290
NMR-Based Encoding and Processing of Alphanumeric Information . . . . Tamar Ratner, Ofer Reany, and Ehud Keinan
291
Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
293
Using Physical Experiments as Oracles Edwin J. Beggs Dept. of Mathematics, Swansea University, Wales SA2 8PP
In my talk I will consider how a digital computer (a Turing machine for the sake of being definite) could communicate with the physical world. Turing himself gave a mythological name to an external source of information for a computer an oracle. We shall consider how a physical experiment can be used to function as an oracle for a computer - a physical oracle. Thought experiments can be constructed using various physical theories, and we will examine their properties when used as oracles. The fundamental ideas we have to introduce into oracles for this are the time taken to perform the experiment, and the possibility of error in the answer. On the side of the Turing machine, we ask what such an augmented machine can compute. To do this we consider the established area of nonuniform complexity, and how physical oracles act as advice functions. We can also look at the occurrence of error in the physical experiment, and show how this can also be expressed in terms of nonuniform complexity classes. The time taken to perform an experiment can be unpredictable. If we consider how to get round this by implementing timers on the experiments we see that there are unexpected consequences for our ability to measure physical quantities. On the side of physical theory, we ask whether there are limits on how much (or rather how quickly) information can be read from an experiment. This translates into the question of the trade off between the accuracy of an experiment and the time it takes to perform. By considering various experiments with various degrees of ‘realism’ we can suggest a common form of lower bound on the time taken to obtain a required accuracy. Finally we can put the ideas of nonuniform complexity together with our proposed lower bound on the time for an experiment to formulate a conjecture on the upper bound of what a Turing machine connected to a physical oracle can compute in polynomial time - the class BPP//log*. Joint work with John Tucker and Jose Felix Costa.
C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, p. 1, 2009. c Springer-Verlag Berlin Heidelberg 2009
A Tutorial on Analog Computation: Computing Functions over the Reals Manuel Lameiras Campagnolo I.S.A., Technical University of Lisbon, Tapada da Ajuda, 1349-017 Lisboa, Portugal SQIG, Instituto de Telecomunica¸co ˜es, Lisboa
The best known programmable analog computing device is the differential analyser. The concept for the device dates back to Lord Kelvin and his brother James Thomson in 1876, and was constructed in 1932 at MIT under the supervision of Vannevar Bush. The MIT differential analyser used wheel-and-disk mechanical integrators and was able to solve sixth-order differential equations. During the 1930’s, more powerful differential analysers were built. In 1941 Claude Shannon showed that given a sufficient numbers of integrators the machines could, in theory, precisely generate the solutions of all differentially algebraic equations. Shannon’s mathematical model of the differential analyser is known as the GPAC. Gra¸ca and Costa improved the GPAC model and showed that all of the interesting functions it can define are solutions of polynomial differential equations. From the point of view of computability two natural questions arise: Are all those functions computable? Are all computable functions definable by a GPAC? To answer those questions one has to agree upon a notion of computability of real functions. We will use Computable Analysis, which is a model of computation based on type-2 Turing machines. Roughly, a function f is considered computable if from a sequence that converges rapidly to x the machine can compute in discrete steps a sequence that converges rapidly to f (x). Computable analysis is an effective model of computation over the real numbers and it cannot use real numbers with infinite precision. In this tutorial, we consider that analog models of computation handle real numbers represented exactly rather than by strings of digits. We also consider that the state of the model evolves in a continuum. The GPAC, other continuous dynamical systems, and more general real recursive functions fit into that framework and will also be addressed. A series of papers from Bournez, Campagnolo, Hainry, Gra¸ca and Ojakian establish equivalences between several analog models and Computable Analysis, showing that in that sense digital and analog computation are ultimately not too far apart. In the tutorial a unified view of those results will be provided, using a technique called “approximation”. If two classes approximate each other sufficiently, we can derive an equality using the notion of limit which is implicit in Computable Analysis. In short, the goal of this tutorial is to relate various computational models over the reals, using the notion of approximation as a unifying tool and language. C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, p. 2, 2009. c Springer-Verlag Berlin Heidelberg 2009
Computational Mechanics: Natural Computation and Self-organization James P. Crutchfield Complexity Sciences Center Physics Department University of California at Davis Davis, California 95616 USA http://cse.ucdavis.edu/~chaos/
Abstract. The tutorial explores how nature’s structure reflects how nature computes. It reviews intrinsic unpredictability (deterministic chaos) and the emergence of structure (self-organization) in natural complex systems. Using statistical mechanics, information theory, and computation theory, it develops a systematic framework for analyzing processes in terms of their causal architecture. This is determined by answering three questions: (i) How much historical information does a process store? (ii) In what architecture is that information stored? And (iii) how is the stored information used to produce future behavior? The answers to these questions tell one how a system intrinsically computes.
Readings. For the tutorial, see the articles, going from less to more technical (that is, the recommended reading order): 1. Is Anything Ever New? Considering Emergence http://cse.ucdavis.edu/~cmg/compmech/pubs/EverNewTitlePage.htm 2. Regularities Unseen, Randomness Observed: Levels of Entropy Convergence http://cse.ucdavis.edu/~cmg/compmech/pubs/ruro.htm 3. The Calculi of Emergence: Computation, Dynamics, and Induction http://cse.ucdavis.edu/~cmg/compmech/pubs/ CalcEmergTitlePage.htm 4. Computational Mechanics: Pattern and Prediction, Structure and Simplicity http://cse.ucdavis.edu/~cmg/compmech/pubs/cmppss.htm 5. The Organization of Intrinsic Computation: Complexity-Entropy Diagrams and the Diversity of Natural Information Processing http://cse.ucdavis.edu/~cmg/compmech/pubs/oic.htm 6. Structure or Noise? http://cse.ucdavis.edu/~cmg/compmech/pubs/son.htm
C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, p. 3, 2009. c Springer-Verlag Berlin Heidelberg 2009
Diophantine Equations and Computation A Tutorial Martin Davis Unless otherwise stated, we’ll work with the natural numbers: N = {0, 1, 2, 3, . . .}. Consider a Diophantine equation F (a1 , a2 , . . . , an , x1 , x2 , . . . , xm ) = 0 with parameters a1 , a2 , . . . , an and unknowns x1 , x2 , . . . , xm For such a given equation, it is usual to ask: For which values of the parameters does the equation have a solution in the unknowns? In other words, find the set: {< a1 , . . . , an >| ∃x1 , . . . , xm [F (a1 , . . . , x1 , . . .) = 0]} Inverting this, we think of the equation F = 0 furnishing a definition of this set, and we distinguish three classes: – a set is called Diophantine if it has such a definition in which F is a polynomial with integer coefficients. We write D for the class of Diophantine sets. – a set is called exponential Diophantine if it has such a definition in which F is an exponential polynomial with integer coefficients. We write E for the class of exponential Diophantine sets. – a set is called recursively enumerable (or listable)if it has such a definition in which F is a computable function. We write R for the class of recursively enumerable sets. Evidently: D ⊆ E ⊆ R. Remarkably, the converse inclusions hold as well so that R = D. This connection between Diophantine equations and computation has many interesting applications. In particular it is a consequence that there is no algorithmic solution to the tenth problem in Hilbert’s famous list, in which he had asked for such an algorithm to determine whether a given polynomial Diophantine equation has a solution. In addition it has led to Diophantine forms of various famous problems, to a prime-representing polynomial, and to a Diophantine form of G¨ odel’s incompleteness theorem. A key step in the proof was finding a Diophantine definition of the exponential function {< a, b, c >| c = ab }, since that implies D = E. Julia Robinson initiated this effort making use of the Pell equation x2 − (a2 − 1)y 2 = 1 to show that such a Diophantine definition could be found if there is a Diophantine set J of pairs < a.b > such that b ≤ aa for all < a, b >∈ J while for every C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 4–5, 2009. c Springer-Verlag Berlin Heidelberg 2009
Diophantine Equations and Computation
5
k there are pairs < a, b >∈ J for which b > ak . Using the Fibonacci numbers, Yuri Matiyasevich found such a set J two decades after Robinson has begun her efforts. A decade earlier Hilary Putnam, Julia Robinson and the author had proved that R = E, so Matiyasevich’s work completed the proof.
Structure of Reversible Cellular Automata Jarkko Kari Mathematics Department FI-20014 University of Turku Finland
[email protected]
Abstract. Cellular automata are examples of discrete complex systems where non-trivial global behavior emerges from the local interaction of trivial components. Cellular automata have been studied, among other perspectives, as models of massively parallel computation tightly connected to the microscopic physics. Physics is time reversible and satisfies various conservation laws, and by a careful design these properties can be implemented in cellular automata as well. The concept of time reversibility is important in this context, as irreversible logical operations such as AND and OR are ”wasteful” and necessarily lead to dissipation of energy. It is well known that simple cellular automata rules can be computationally universal, and universal cellular automata exist even under the additional constraints of reversibility and conservation laws. In this talk we discuss computational universality in (reversible) cellular automata and the connection to reversible logic. We demonstrate how any globally reversible one-dimensional cellular automaton can be implemented using locally reversible logical gates. Analogous result is true also among two-dimensional cellular automata, while in higher dimensions the question is open. Note that locally reversible cellular automata are the classical counter part of quantum cellular automata, which can be most conveniently defined as infinite, regular arrays of locally unitary operators. Many of the structure results concerning reversible cellular automata can then be naturally extended to hold for the quantum cellular automata as well.
C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, p. 6, 2009. c Springer-Verlag Berlin Heidelberg 2009
Brain Dynamics Promotes Function Carlos Louren¸co Faculty of Sciences of the University of Lisbon - Informatics Department, Campo Grande, 1749-016 Lisboa - Portugal Instituto de Telecomunica¸co ˜es - Security and Quantum Information Group, Av. Rovisco Pais, 1, 1049-001 Lisboa - Portugal
[email protected] http://www.di.fc.ul.pt/~csl
Abstract. Dynamical structure in the brain promotes biological function. Natural scientists look for correlations between measured electrical signals and behavior or mental states. Computational scientists have new opportunities to receive ’algorithmic’ inspiration from brain processes and propose computational paradigms. Thus a tradition which dates back to the 1940s with neural nets research is renewed. Real processes in the brain are ’complex’ and withstand trivial descriptions. However, dynamical complexity need not be at odds with a computational description of the phenomena and with the inspiration for algorithms that actually compute something in an engineering sense. We engage this complexity from a computational viewpoint, not excluding dynamical regimes that a number of authors are willing to label as chaos. The key question is: what may we be missing computation-wise if we overlook brain dynamics? At this point in brain research, we are happy if we can at least provide a partial answer. Keywords: Brain computation.
1
dynamics,
spatiotemporal
dynamics,
chaos,
Natural Computing
Natural computing is regarded as belonging to two strands: computation taking place in nature and human-designed computation inspired by nature [1]. Our work takes the understanding of the former as a starting point, and aims to contribute to the latter by proposing abstractions leading to computing paradigms or actual analog devices.
2
Natural Neurons and Artificial Neural Networks
Classical neural nets research has emphasized the structure and the role of the individual neuron, either through trying to infer the formal function that would be best approximated by a given biological neuron, or through using synaptic adaptation as inspiration for automatic learning procedures in computation [2]. C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 7–9, 2009. c Springer-Verlag Berlin Heidelberg 2009
8
C. Louren¸co
This lead to a bottom-up engineering approach, and quite naturally to initial examples of emergent behavior in artificial networks. Such emergence or selforganization is most evident in recurrent networks, which are believed to mimic the structure of the biological brain better than non-recurrent ones.
3
Dynamics
Despite researchers having studied processes involving neural populations, the dynamical aspects thereof have been viewed as somewhat secondary in artificial computation. The dynamics has mainly consisted in periodic cycles of synchronized populations, or in transients to equilibrium states. A modern stream of research goes one step further by considering the so-called dynamical complexity as revealed e.g. by the measurement of the brain’s electrical activity [3,4,5,6,7,8]. Inspired by such experiments with the biological brain, our own work and that of others tries to assess the computational role of the brain’s complex dynamics, as well as to obtain inspiration for possible artificial computing paradigms. In this extended abstract we refer the reader e.g. to Refs. [9,10,11] and references therein. Here we briefly point out a few interpretations of the so-called dynamical state of the brain, providing as many implementation ideas for the computer scientist. The definition of dynamical state is left somewhat open. The approach evolves from viewing dynamics as a tag, up to viewing it as a structural explanation or a functional necessity. The Dynamical State Is a Label Under this ’passive’ view, the dynamical state labels what the animal is able to process at a given time, which can be related to anticipation or predisposition. It can also label whatever the animal is already computing in a broad sense. Either way, the observed dynamics is regarded as an epiphenomenon, secondary to some other, deeper, process which is taking place and which is what really matters in terms of computation. The Dynamical State Is a Substrate Freeman and co-workers [12] have identified amplitude and phase modulation patterns over a spatiotemporal wave of electrical activity in the animal’s brain. The underlying wave is a so-called carrier wave. The identified modulation patterns convey meaning, e.g., by identifying particular odors that are being sensed. The Dynamical State Modulates Attention With enough control available, a seemingly complex dynamics —or mixture of dynamical regimes— can be driven into a particular state, which is specialized in a processing task, or class of tasks. In biological terms, we would say that the animal (or the bio-inspired device) is ’attentive’ to input data with certain characteristics [9].
Brain Dynamics Promotes Function
9
The Dynamical State Provides an Operator for Input Data Input data can itself generally be described as a function of time and space. Several scenarios can be envisaged whereby external input data perturbs an internal dynamical state [9,10,11]. The way in which the internal state is perturbed depends on its own details and on details of the input data. The Dynamical State Is the Output of a Computation Traditionally, the concept of computation implies that some output is read out. An observed dynamics can constitute such a readout, or ’result’ of the computation. Output functions need not be as complicated as full spatiotemporal waves of activity, and the reduction of complexity can happen at several levels [9]. Acknowledgments. The author acknowledges the partial support of Funda¸c˜ao para a Ciˆencia e a Tecnologia and EU FEDER via Instituto de Telecomunica¸c˜oes.
References 1. Rozenberg, G.: Natural computing: a natural and timely trend for natural sciences and science of computation. In: Cooper, S.B., L¨ owe, B., Sorbi, A. (eds.) CiE 2007. LNCS, vol. 4497, pp. 670–671. Springer, Heidelberg (2007) 2. Hertz, J., Krogh, A., Palmer, R.G.: Introduction to the Theory of Neural Computation. Addison-Wesley, Reading (1991) 3. Babloyantz, A., Salazar, J., Nicolis, C.: Evidence of chaotic dynamics of brain activity during the sleep cycle. Physics Letters A 111, 152–156 (1985) 4. Rapp, P., Zimmerman, I., Albano, A., de Guzman, G., Greenbaun, N.: Dynamics of spontaneous neural activity in the simian motor cortex: The dimension of chaotic neurons. Physics Letters A 110, 335–338 (1985) 5. Wu, J.-Y., Cohen, L., Falk, C.: Neuronal activity during different behaviors in Aplysia: A distributed organization. Science 263, 820–823 (1994) 6. Freeman, W.: The physiology of perception. Scientific American 264, 78–85 (1991) 7. Freeman, W.: Chaos in the CNS: Theory and practice. In: Ventriglia, F. (ed.) Neural Modeling and Neural Networks, pp. 185–216. Pergamon Press, New York (1994) 8. Lachaux, J.-P., Pezard, L., Garnero, L., Pelte, C., Renault, B., Varela, F., Martinerie, J.: Spatial extension of brain activity fools the single-channel reconstruction of EEG dynamics. Human Brain Mapping 5, 26–47 (1997) 9. Louren¸co, C.: Attention-locked computation with chaotic neural nets. International Journal of Bifurcation and Chaos 14, 737–760 (2004) 10. Louren¸co, C.: Dynamical computation reservoir emerging within a biological model network. Neurocomputing 70, 1177–1185 (2007) 11. Louren¸co, C.: Structured reservoir computing with spatiotemporal chaotic attractors. In: Verleysen, M. (ed.) 15th European Symposium on Artificial Neural Networks (ESANN 2007), April 25-27, pp. 501–506. d-side publications (2007) 12. Freeman, W.J., Baird, B.: Relation of olfactory EEG to behavior: Spatial analysis. Behavioral Neuroscience 101, 393–408 (1987)
Awakening the Analogue Computer: Rubel’s Extended Analog Computer Workshop Jonathan W. Mills School of Informatics and Computing, Indiana University, Bloomington, Indiana, 47404 USA
Shannon’s General Purpose Analog Computer (GPAC) was unable to directly solve many problems that Lee A. Rubel believed were critical to implement the functions of the human brain. In response Rubel defined the Extended Analog Computer (EAC) in 1993, which was able to directly compute partial differential equations, solve the inverse of functions and implement spatial continuity, among other operations. Rubel believed that the EAC was an ideal machine, never capable of being built physically. However, research has shown that close approximations to the EAC can be constructed whose functionality is partially contained in the physical structure (implicit computation via the laws of nature), partially contained in the configuration chosen for the material and its energy budget (explicit in the physical computer’s structure) and partially, and finally, completed by analogies defined between the EAC and the problem it solves. This tri-partite solution to problems using the EAC represents a new paradigm for computing, and one that is foreign to most first-time users. During Unconventional Computing 2009 attendees at this workshop will be given a tutorial pamphlet to learn about the EAC, then have the opportunity to conduct experiments on physical EACs available at the conference. They will also learn techniques for the design of “smart matter,” that is, applications that run on the EAC supercomputer simulator available at Indiana University. “Smart matter” as implemented with the EAC is a configuration that is reflexive, limitedly self-aware and self-modifying, and that runs on the large-array hybrid supercomputer simulator sEAC (in the future, our goal is to build a VLSI sEAC supercomputer). A large-array sEAC configuration resembles a proprioceptic cellular automaton that can be configured to solve problems such as protein folding, graph reduction and data mining, among many others. Expressed as a general analogy, smart matter is a kind of “computronium” that allows its users, by a tongue-in-cheek definition of new “elements,” to think of their applications as “Proteinium,” “NP-Celium,” “Dataminium,” and other varieties of designed materials. Techniques for designing smart matter will be presented in the workshop, at a plenary talk at the conference and in Professor Andrew Adamatzky’s session on Novel Computing Substrates.
C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, p. 10, 2009. © Springer-Verlag Berlin Heidelberg 2009
Artifice, Interpretation and Nature: Key Categories in Radiology Work James M. Nyce Department of Anthropology, Ball State University, Muncie, IN, USA Department of Radiology, Indiana University School of Medicine, Indianapolis, IN, USA
[email protected]
Abstract. This paper extends on some prior work on nature, culture and computation. This paper will look at “image work” in a radiology department, i.e, how radiologists use images and other kinds of knowledge in daily clinical work. In particular, the paper will look at the role tacit knowledge and categories have in the work radiologists carry out. How radiologists make use of and contrast analog and digital representations of nature will be explored here because this is key to how radiologists work and think. In other words, the role that computer derived artifacts, correspondence theory and mimesis play in the clinical work of radiology will be discussed. Keywords: Representation, computation, Radiology.
Memesis,
Correspondence
theory,
Analog
There has been some discussion of how radiologists have learned over time to translate images into medical findings. Pasveer talks about this process as though radiologists “lived in a world of shadows, [which] they had to make relevant to those who were supposed to need it” (1). There has been more research done on those changes in technology, work, and organizational forms that have led to and made radiology part of modern medicine. What this literature has tended to ignore the epistemological and ontological issues regarding representation in radiology and medicine more generally (2). Even though for example radiology is in the midst of a transition from analog to digital images and technology, these higher order issues have received little attention (3). What has been noted is that there has been some “resistance” on the part of radiologists to the introduction and use of digital, networked PAC ([digital] Picture Archiving and Communication) platforms. PAC vendors have responded to these user complaints with ‘screen level” solutions, e.g., new desktop tools. Vendors have also provided a variety of hardware/software updates. Given that the specialty’s history is characterized by the quick uptake of (and innovation with) a variety of technologies, it seems unwise to dismiss their responses to PACs as either some kind of “off the wall” (inexplicable) or as a resurgent Ludditism. Further, when looked at closely, the radiologists’ objections to PACs have little to do with what usually in computer science falls under the rubric of “useablity”. Before we go on however, we have to say a few things about the word “digital”. What this term means here is not limited to the more technical meaning related to how C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 11–15, 2009. © Springer-Verlag Berlin Heidelberg 2009
12
J.M. Nyce
information is coded. What it relates to is how in late twentieth N. Euro-American culture elements of natural and biological world can best be represented and understood. This gives the term more ontological and epistemological “credibility” than most computer/information scientists and engineers might grant it. The result however is that certain representations of reality (as well as certain [binary] categories that frame these representations) today have come to be accepted not as models but as the things themselves. The equation of von Neumann’s model of neural activity with the brain exemplifies this (4,5). It is against this backdrop that radiologists today carry out imaging studies and produce reports so that other health professionals can care for their patients. What is described here are some results from a long term (+10 year) qualitative research project carried out in one of the largest radiology teaching departments in North America. To understand this resistance to PACs, we need to first identify the central objects and concerns of radiological work. In radiology these are images and image work, and radiologists, when asked about both, tell us “it’s all there in black and white”. In short, reading images for them is a self evident, reasonably straight forward process (the term reading indicates how unproblematic radiologists think this work is). In other words, for radiologists what is common sense relies more on Hume than Kant in that it reflects a kind of naïve empiricism that values perception more than cognition when it comes to understanding things in the world. Note though that the “all there” above refers only to “old fashioned,” i.e, analog x rays. For radiologists then, image work is simply making sense of a number of ‘artifacts”. This does not involve, radiologists believe, “interpretation” at least as social scientists use the term. For radiologists, analog x ray images are not representations at all. In fact, radiologists these images (representations) and biology are both very much the same kind of “thing”. As one radiologist put it, analog x rays just “make the body [more] crystal” To put it another way, radiological thought and practice denies that anything like correspondence theory is at work here. This is why radiologists do not see image work as any kind of an interpretive act because there is nothing with these images to “reconcile” or to “make sense of” Further, as technology evolves, radiologists believe, the body and nature will “naturally” become less opaque. In short, radiologists tend to believe that none of the issues associated with the term mimetic fallacy apply to them. This is the belief that it is possible to achieve a one to one relation, a perfect correspondence, between some objective reality and a representation. (6). Radiologists, on the other hand, enact (and validate) the belief that technology and human competence can reproduce with precision and exactitude things in the world. More to the point, it is possible to achieve a direct correspondence in certain cases between image/ representation and things in the world In fact, the only thing that stands in the way of achieving mimesis, radiologists believe, are relatively trivial issues like signal/noise ratios (7). In other words, radiologists deny that there has to be any representational distance between a thing and a facsimile or copy. In other words, they believe, it is possible for a representation to match point by point things in the world. This is why these images are not seen as having anything in common with conventional, “cultural” representations”. It is important to point out again these beliefs only apply to analog x rays. It is not that these image are closer to, or even approximate nature. For radiologists they represent nature or at least natural “facts”. This is a
Artifice, Interpretation and Nature: Key Categories in Radiology Work
13
claim that has been made for almost every kind of analog operation (8). All one has to think is of is the identities Vannevar Bush saw between his Memex machine and the human mind (9,10). If radiologists are asked to expand on or defend this position, they almost invariably reply, “Do you know who Francis Crick was?” The fact that he used (analog) xray diffraction to reveal the structure of DNA is taken as evidence that analog x rays can render nature and its inner structure and processes visible. Crick’s Nobel Prize research also proves, to these radiologists, that analog x-ray technology can be a direct, unmediated window into nature. This is why radiologists regard interpretation, again as we might use the term, as “unnecessary”. The same is true regarding mimesis. For radiologists it is self evident that nature can be directly revealed through analog images. This is confirmed in what a radiologist does with these images. A radiologist everyday in his work maps (connects very directly) nature and image. Without taking this in account, the enduser “failures” that have occurred with PACS can not be understood. This is not a matter of a “better” gray scale, “a better” user interface, or an “improved” toolbox. Something more fundamental (and interesting) is at work here. This takes us to how radiologists perceive digital images and digital technology. These images, unlike analog ones, are not seen as “natural” but as “cultural” representations. To clarify what he meant by this, one radiologist compared live music, phonograph records and CD recordings with analog x ray and digital radiological images. For him, phonograph records and x rays have much in common because with them either a sound or a biological event, i.e. something that is real and exists in the world, is literally reproduced in another medium. In much the same way as Bush’s differential analog calculators directly represent the equations themselves, the shape of the grooves in a phonograph record literally reproduce the scales and the magnitude of an actual (musical) event (11,12). Much the same thing occurs, this radiologist believed, with analog x rays. This is not the case with CDs or digital images, he argued, because there any number of black box, binary “translation” processes can occur between an event (or thing) and its representation. For radiologists, with analog x-rays to read” nature and biology requires only a “visual inspection”. This is however not the case with digital images because they are result of unknown (even unknowable) machine operations, i.e., algothrims. The result is that radiologists perceive, even if they find it hard to talk about (but see this discussion of music and sound above), a kind of “distance” with digital images, between representation and the thing. This is compounded because radiologists are well aware that digital images consist of pixels (arbitrary cultural artifacts) and because with digital imaging technology any number of choices regarding image color, shape and other features are taken out of their hands. What radiologists fear with digital technology is the loss of what we would call interpretative control. In part this is because radiologists can not challenge or correct, let alone inspect, the alogthrims and other technological constraints responsible for the form digital images will take. However, keep in mind that radiologists regard certain kinds of (analog) images as true, accurate (unmediated) portals into nature. Nevertheless, regardless of what they tell the anthropologist, radiologists do critique, assess, and interpret representations. It is in fact central to the “detective work” they do as clinicians. To label this image work as only pattern matching and/or to discuss it as radiologists often do in terms of
14
J.M. Nyce
accuracy, i.e., close or far approximations to “reality” only demonstrates how important what we might consider a naturalistic fallacy is to them. In other words radiologists hold the belief, often without acknowledging this to themselves, that nature (or the “natural”) is inherently good and better than any cultural artifact no matter how closely it resembles nature. This is why radiologists find digital technologies like PACs so problematic. The claims made for digital images and technology threaten the ontological and epistemological foundations of the discipline. It is difficult for outsiders to understand how radiologists can be so analytical and reflective about the work they do and still not recognize the naturalistic fallacy that underlies and inform all their image work. For radiologists, the primary representation remains analog because of the truth claims made for it, and because it is valorized in the history of the discipline, confirmed every day in the clinic and because this is taught to every medical student and resident. For these reasons, it is still the gold standard against which all other representational forms and technologies are judged. However analog operations, as they often do, confuse if not collapse two fundamental opposing categories - the natural and the artifactual, i.e., the cultural (8). It is this “collapse” of categories that lay at the heart of the radiological enterprise. The photorealism, three dimensionality, and color fidelity that advocates argue make digital technology more “life like” and more “realistic” paradoxically for radiologists render them all the more suspect. The markers we might associate with fidelity, accuracy and realism just remind radiologists how conventional and artificial (and therefore biased) these representations can be. One result is that when radiologists read digital images, they try to “compensate” for (or on the fly edit out) what has been “added” to these images. In other words, digital technology not only increases the labor involved in the reading process, it can make their results less certain. In this way, digital imaging not only challenges but can undermine that interpretive autonomy that is characteristic of, but so seldom acknowledged, in radiology. From the radiologists’ point of view, proponents of digital technology equate (and confuse) relatively superficial markers of “reality” with the things itself. In other words, the window into nature that digital advocates promise to bring to the clinic, radiologists believe, is already there.
References 1. Pasveer, B.: Knowledge of Shadows: The Introduction of X-ray Images in Medicine. Soc. Health & Illness. 11, 360–381 (1989) 2. Barley, R.S.: Technology as an Occasion for Structuring: Observations on CT scanners and the Social Order of Radiology Departments. Adm. Sci. Quart. 31, 78–108 (1986) 3. Karasti, H., Reponen, J., Tervonen, O., Kuutti, K.: The Teleradiology System and Changes in Work Practices. Comp. Meth. Progr. Biomed. 57, 69–78 (1998) 4. Nyce, J.M.: Analogy or Identity: Brain and Machine at the Macy Conferences on Cybernetics. ACM SIGBIO 12, 32–37 (1992) 5. Dupuy, J.-P.: The Mechanization of the Mind: On the Origins of Cognitive Science. M.B. Debevoise (trans). Princeton University Press, Princeton (2002) 6. Aristotle: Poetics. Malcom Heath (ed.) Penguin Group, London (1996)
Artifice, Interpretation and Nature: Key Categories in Radiology Work
15
7. Gunderman, R.B., Nyce, J.M.: The Tyranny of Accuracy in Radiologic Education. Radiology 222, 297–300 (2002) 8. Nyce, J.M.: Nature’s Machine: Mimesis, the Analog Computer and the Rhetoric of Technology. In: Patton, R. (ed.) Computing With Biological Metaphors, pp. 414–423. Chapman & Hall, London (1994) 9. Nyce, J.M., Kahn, P.: Innovation, Pragmatism, and Technological Continuity: Vannevar Bush’s Memex. JASIS 40, 214–220 (1989) 10. Nyce, J.M., Kahn, P.: A Machine for the Mind: Vannevar Bush’s Memex. In: Nyce, J.M., Kahn, P. (eds.) From Memex to Hypertext: Vannevar Bush and the Mind’s Machine, pp. 39–66. Academic Press, Boston (1991) 11. Owens, L.: Where are We Going, Phil Morse? In: Changing Agendas and the Rhetoric of Obviousness in the Transformation of Computing at MIT, pp. 1939–1957; IEEE An. His. Comp. 18, 34–41 (1996) 12. Mindell, D.A.: Between Human and Machine: Feedback, Control, and Computing Before Cybernetics. John Hopkins University Press, Baltimore (2002)
Developmental Computing (Extended Abstract) Przemyslaw Prusinkiewicz Department of Computer Science, University of Calgary 2500 University Dr. N.W., Calgary, AB T2N 1N4, Canada
[email protected] http://algorithmicbotany.org
Abstract. Since their inception over forty years ago, L-systems have proven to be a useful conceptual and programming framework for modeling the development of plants at different levels of abstraction and different spatial scales. Formally, L-systems offer a means of defining cell complexes with changing topology and geometry. Associated with these complexes are self-configuring systems of equations that represent functional aspects of the models. The close coupling of topology, geometry and computation constitutes a computing paradigm inspired by nature, termed developmental computing. We analyze distinctive features of this paradigm within and outside the realm of biological models. Keywords: natural computing, dynamic system with a dynamic structure, L-system, modeling of plant development, geometric modeling.
1
Introduction
Ideas in natural sciences and mathematics often feed off each other (Figure 1). An example of the resulting synergy is the development of calculus, which was prompted by physical questions regarding the motion of celestial bodies and subsequently found applications in many areas of science. Biological questions and processes have also led to the development of new mathematical formalisms and their applications (Table 1). For example, questions regarding the essence of inspiration
studies of nature
applications
mathematical concepts
applications
new problems
inspiration
Fig. 1. The progress of ideas in science and mathematics. Studies of nature lead to the development of mathematical concepts that not only apply to the solution of the original problem, but also find applications in other areas of science. These applications, in turn, inspire further development of mathematical concepts and tools. C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 16–23, 2009. c Springer-Verlag Berlin Heidelberg 2009
Developmental Computing
17
Table 1. Sample biological phenomena and mathematical formalisms they inspired Phenomenon Computational formalism self-reproduction cellular automaton neural system artificial neural network evolution genetic algorithm DNA recombination splicing system molecular processes in a cell membrane computing
self-reproduction lie at the origin of cellular automata, which subsequently found applications in physics, e.g. in the studies of percolation and diffusion-limited aggregation [29]. Here we focus on the development of multicellular organisms, in particular plants, as an inspiration for computational methods that can be applied to both biological and non-biological problems. The resulting paradigm of developmental computing is characterized by a close link between computation and topology.
2
The Essence of Developmental Computing
From a mathematical perspective, plants have the following characteristics: 1. A plant is a dynamic system with a dynamic structure [5,7]: it consists of discrete components (modules), the number and states of which change over time. 2. Development takes place in a topological space, which determines the neighboring relations between components. 3. The development is symplastic: the neighborhood relations can only be changed as a result of the addition or removal of components (in contrast to animal cells, plant cells do not move with respect to each other). 4. The state of each component advances over time as a function of its own state and the state of the neighboring components, i.e., according to temporally and spatially local rules or equations. 5. There is feedback between the topology of the system and the state of its components. On one hand, changes in topology (the addition or removal of components and connections between them) are controlled by the state of the components. On the other hand, the state of each component depends on the input from its neighbors. The formalism of L-systems [12,13] captures these characteristics in the important case of filamentous (linear) and branching structures. L-system identify system components by their state and context (the state of the neighbors). This makes it possible to: 1. Describe indefinitely growing structures using a finite set of rules, 2. Simplify the notation by eliminating the use of indices.
18
P. Prusinkiewicz
A
B
c
c
ci-1
ci
ci+1
x
x
Fig. 2. Continuous (A) and discrete (B) model of diffusion in a filament
Let us consider diffusion in a filament as an example of the difference between traditional and L-system-based description of a physical process. Diffusion is often viewed as a spatially and temporally continuous process (Figure 2A), described in one dimension by the partial differential equation ∂c ∂2c = D 2, ∂t ∂x
(1)
where c is the concentration of the diffusing substance and D is the diffusion constant. At the cellular level, however, diffusion may be more conveniently approximated as a system of ordinary differential equations, since the main obstacles for diffusion are cell walls (Figure 2B). In this case, dci = k[(ci−1 − ci ) + (ci+1 − ci )], i = 2, 3, . . . , n − 1. dt
(2)
where parameter k depends on the diffusion constant and the geometry of the walls (interface between the cells). Using forward Euler integration, the solution to this system can be expressed as ct+Δt = k[(cti−1 − cti ) + (cti+1 − cti )]Δt, i
i = 2, 3, . . . , n − 1, t = 0, 1, . . . . (3)
The standard notation employed in these equations creates three problems: 1. It requires the use of double indices, and thus is cumbersome; 2. It relies on a systematic indexing of system components, which is difficult to maintain in a growing structure (Figure 3); 3. It is not inherently local: formally correct expressions may refer to compot nents that are distant in space and time (e.g. ct−200Δt 2i+100 is distant from ci ). These problems are eliminated in parametric L-systems [14,21]. For instance, the relations expressed by the system of equations (3) are summarily expressed as a production M (cl ) < M (c) > M (cr ) → M (c + k(cl + cr − 2c)Δt) .
(4)
Symbol M (c) denotes a cell M with the concentration of diffusing substance c. Spatial relations between system components are specified in an index-free manner using symbols < and > that separate the component being updated (strict predecessor) from its left and right neighbors (context). Temporal precedence is
Developmental Computing A
19
B
Fig. 3. Problems with component ordering in a growing multicellular structure. In case (A), one of the descendent cells receives a number out or order (42), preventing future use of index arithmetic to identify neighbors. In case (B) the sequence of indices is preserved, but some cells had to be renumbered (10 → 11 and 11 → 12), which makes it difficult to track cell identity over time.
indicated by the production application symbol →. Cell division, which can be expressed by production M (c) → M (c)M (c), (5) thus automatically reorganizes the set of variables and equations associated with specific components, without incurring the problems depicted in Figure 3. Automatic changes in the set of variables and the system of equations describing a spatial system, governed by changes in the system topology that are controlled by these variables, constitute the essence of developmental computing (Figure 4). B
A variable
relation between modules
relation within module
module (internode)
aspects
module (apex)
modules
Fig. 4. The essence of developmental computing. At each point in time, the growing system consists of a set of modules with associated variables. Variables within the same or neighboring modules may be related by equations. The structure may grow, for example due to the creation of new modules by the selected ”apical” modules (compare structures (A) and (B)). The newly created modules introduce new variables to the description of the system, which are automatically related to others by the updated neighborhood relations. The set of variables and equations describing the system thus grows with the structure. This growth is in turn controlled by the state of the system (values of the variables).
3
Progress of Ideas
In the context of the original biological applications, developmental computing is the paradigm behind diverse simulation models of plant functioning, which
20
P. Prusinkiewicz
include: growth regulation and long-distance signaling by hormones [9,21]; acquisition, transport and allocation of water, nutrients, and sugars, e.g. [1]; bending of branches due to gravity [2,10,20]; and responses to pathogens or insects [18]. Nevertheless, many modeling problems remain open and require further advancements of the mathematical and computational concepts. 1. Extensions of L-system-based programming constructs and languages. The required extensions include programming support for multiscale modeling [8] and for aspect-oriented programmingi [11]. In the latter case, the objective is to provide constructs for easily incorporating previously modeled aspects of plant behavior (e.g., responses to mechanical forces) into new models. 2. Extensions of developmental computing to surfaces and volumes. Although several software packages capable of simulating developing tissues and organs exist, e.g. [6,24,25,26], the question of what mathematical foundations, data structures and programming constructs are most appropriate as the basis for simulations in two and three dimensions (i.e., of systems represented by discrete 2- and 3-manifolds [3]) remains open. These data structures and constructs should conveniently represent the changing topology and geometry of the modeled systems, act as dynamic domains in which simulations can take place, and allow easy updates to the topology, geometry, and systems of equations during the simulations. 3. Numerical methods for developmental computing. Systems of equations describing developing structures continually change. One approach to solving these equations is to reformulate and resubmit them to a standard solver each time they are changed. A potentially more efficient alternative is to store and manipulate quantities at their geometrically meaningful location [3]; in other words, to reformulate numerical methods so that they operate directly on the dynamic data structures that represent the system topology [27,28]. Examples include a method for solving systems of linear equations in growing tree structures directly using L-systems [4,17], based on an adaptation of Gaussian elimination to tree graphs [15]. Consistent with Figure 1, many algorithms outside the domain of plant modeling and simulations benefit from recasting in terms of L-systems or general notions of developmental computing [19]. Geometric examples include the generation of fractals [16] and space-filling curves [22], as well as the generation of smooth subdivision curves [23] and surfaces [26]. Similar to biological models, these algorithms involve a growing number of components and relations between them, and thus benefit from the conceptual and notational clarity afforded by developmental computing.
4
Conclusions
Modeling and simulation of the development of multicellular organisms is characterized by:
Developmental Computing
21
1. a changing number of discrete components, state variables and equations that describe the system at each point of time, and 2. the spatio-temporal nature of the models. The paradigm of developmental computing consists of using the spatio-temporal characteristic of the system under consideration to address computational problems created by the changing number of its components. Specifically, the state variables of individual components are linked to each other according to the neighborhood relations between the components. These relations are automatically updated following changes in the system topology. This approach makes it possible to organize computation in a conceptually elegant manner, making the models easy to specify and implement. In particular, identification of system components with indices, cumbersome in the case of growing spatial structures with arbitrary topologies, is avoided. Parametric L-systems capture the concept of developmental computing in linear and branching structures, and have inspired current extensions of developmental computing to 2- and 3-dimensional multicellular structures. Current work also includes programming constructs that support efficient construction of complex developmental models, and numerical methods tailored to the framework of developmental computing. Applications of developmental computing span both the modeling of plants and algorithms outside the scope of biological models. The latter include dynamic geometric modeling problems, such as the construction of subdivision curves and surfaces, and algorithms that are not inherently spatial, but can be recast in spatial terms. Despite a 40-year history [12] and the crucial impact of L-systems on plant modeling, developmental computing remains a fascinating, applicationrich area bringing together computation and topology. Acknowledgments. I would like to thank all the colleagues and students with whom I have had the pleasure of discussing the ideas outlined in this abstract. In particular, I acknowledge discussions with Jean-Louis Giavitto, Olivier Michel, and Eric Mjolsness, who have been working on similar concepts in the context of their modeling systems. I also thank the Natural Sciences and Engineering Research Council of Canada for financial support of the underlying research.
References 1. Allen, M., Prusinkiewicz, P., DeJong, T.: Using L-systems for modeling source-sink interactions, architecture and physiology of growing trees: the L-PEACH model. New Phytologist, 869–880 (2005) 2. Costes, E., Smith, C., Renton, M., Gu´edon, Y., Prusinkiewicz, P., Godin, C.: MAppleT: simulation of apple tree development using mixed stochastic and biomechanical models. Functional Plant Biology 35, 936–950 (2008) 3. Desbrun, M., Kanso, E., Tong, Y.: Discrete differential forms for computational modeling. In: SIGGRAPH 2006 Course Notes on Discrete Differential Geometry (2006)
22
P. Prusinkiewicz
4. Federl, P., Prusinkiewicz, P.: Solving differential equations in developmental models of multicellular structures expressed using L-systems. In: Bubak, M., van Albada, G.D., Sloot, P.M.A., Dongarra, J. (eds.) ICCS 2004, Part II. LNCS, vol. 3037, pp. 65–72. Springer, Heidelberg (2004) 5. Giavitto, J.-L., Godin, C., Michel, O., Prusinkiewicz, P.: Computational models for integrative and developmental biology. In: Proceedings of the Autrans seminar on modelling and simulation of biological processes in the context of genomics, pp. 65–72 (2002) 6. Giavitto, J.-L., Michel, O.: MGS: A programming language for the transformation of topological collections. Research Report 61-2001, CNRS - Universit´e d’Evry Val d’Esonne, Evry, France (2001) 7. Giavitto, J.-L., Michel, O.: Modeling the topological organization of cellular processes. BioSystems 70, 149–163 (2003) 8. Godin, C., Caraglio, Y.: A multiscale model of plant topological structures. Journal of Theoretical Biology 191, 1–46 (1998) 9. Janssen, J.M., Lindenmayer, A.: Models for the control of branch positions and flowering sequences of capitula in Mycelis muralis (L.) Dumont (Compositae). New Phytologist 105, 191–220 (1987) 10. Jirasek, C., Prusinkiewicz, P., Moulia, B.: Integrating biomechanics into developmental plant models expressed using L-systems. In: Spatz, H.-C., Speck, T. (eds.) Plant biomechanics 2000. Proceedings of the 3rd Plant Biomechanics Conference, pp. 615–624. Georg Thieme Verlag, Stuttgart (2000) 11. Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., Loingtier, J.-M., Irwin, J.: Aspect-oriented programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997) 12. Lindenmayer, A.: Mathematical models for cellular interaction in development, Parts I and II. Journal of Theoretical Biology 18, 280–315 (1968) 13. Lindenmayer, A.: Developmental systems without cellular interaction, their languages and grammars. Journal of Theoretical Biology 30, 455–484 (1971) 14. Lindenmayer, A.: Adding continuous components to L-systems. In: Rozenberg, G., Salomaa, A. (eds.) L Systems. LNCS, vol. 15, pp. 53–68. Springer, Heidelberg (1974) 15. Parter, S.: The use of linear graphs in Gauss elimination. SIAM Review 3, 119–130 (1961) 16. Prusinkiewicz, P.: Graphical applications of L-systems. In: Proceedings of Graphics Interface 1986 — Vision Interface 1986, pp. 247–253 (1986) 17. Prusinkiewicz, P., Allen, M., Escobar-Gutierrez, A., DeJong, T.: Numerical methods for transport-resistance source-sink allocation models. In: Vos, J. (ed.) Functional-structural modeling in crop production, pp. 123–137. Springer, Dordrecht (2007) 18. Prusinkiewicz, P., Hammel, M., Hanan, J., Mˇech, R.: L-systems: from the theory to visual models of plants. In: Michalewicz, M.T. (ed.) Plants to ecosystems. Advances in computational life sciences I, pp. 1–27. CSIRO Publishing, Melbourne (1997) 19. Prusinkiewicz, P., Hanan, J.: L-systems: from formalism to programming languages. In: Rozenberg, G., Salomaa, A. (eds.) Lindenmayer systems: Impacts on theoretical computer science, computer graphics, and developmental biology. Springer, Berlin (1992) 20. Prusinkiewicz, P., Karwowski, R., Lane, B.: The L+C plant-modeling language. In: Vos, J. (ed.) Functional-structural modeling in crop production, pp. 27–42. Springer, Dordrecht (2007)
Developmental Computing
23
21. Prusinkiewicz, P., Lindenmayer, A.: The Algorithmic Beauty of Plants. Springer, New York (1990); With Hanan, J.S., Fracchia, F.D., Fowler, D.R., de Boer, M.J.M., Mercer, L. 22. Prusinkiewicz, P., Lindenmayer, A., Fracchia, F.D.: Synthesis of space-filling curves on the square grid. In: Peitgen, H.-O., Henriques, J.M., Penedo, L.F. (eds.) Fractals in the fundamental and applied sciences, pp. 341–366. North-Holland, Amsterdam (1991) 23. Prusinkiewicz, P., Samavati, F., Smith, C., Karwowski, R.: L-system description of subdivision curves. International Journal of Shape Modeling 9(1), 41–59 (2003) 24. Shapiro, B., Mjolsness, E.: Developmental simulations with Cellerator. In: Second International Conference on Systems Biology (ICSB), pp. 342–351 (2001) 25. Smith, C.: On vertex-vertex systems and their use in geometric and biological modeling. PhD thesis, University of Calgary (January 2006) 26. Smith, C., Prusinkiewicz, P., Samavati, F.: Local specification of subdivision algorithms. In: Pfaltz, J.L., Nagl, M., B¨ ohlen, B. (eds.) AGTIVE 2003. LNCS, vol. 3062, pp. 313–327. Springer, Heidelberg (2004) 27. Smith, R.: Simulation models of phyllotaxis and morphogenesis in plants. PhD thesis, University of Calgary (January 2007) 28. Sowell, E., Haves, P.: Numerical performance of the spark graph-theoretic simulation program. In: Proc. IBPSA Building Simulation 1999, p. 14 (2001) 29. Wolfram, S.: A New Kind of Science. Wolfram Media, Champaign (2002)
Evolvable Hardware: From Applications to Implications for the Theory of Computation Luk´ aˇs Sekanina Faculty of Information Technology, Brno University of Technology Boˇzetˇechova 2, 612 66 Brno, Czech Republic
[email protected]
Abstract. The paper surveys the fundamental principles of evolvable hardware, introduces main problems of the field and briefly describes the most successful applications. Although evolvable hardware is typically interpreted from the point of view of electrical engineering, the paper discusses the implications of evolvable hardware for the theory of computation. In particular, it is shown that it is not always possible to understand the evolved system as a computing mechanism if the evolution is conducted with real hardware in a loop. Moreover, it is impossible to describe a continuously evolving system using the computational scenario of a standard Turing machine.
1
Introduction
Evolutionary algorithms (EAs) are population-based search algorithms that have been successfully applied to solve hard optimization problems in many application domains [1]. In the recent years, EAs have been also utilized in the area of engineering design [2]. In the field of evolvable hardware, EA is used to generate configurations for reconfigurable chips that can dynamically alter the functionality and physical connections of their circuits [3, 4]. Research in the field of evolvable hardware can be split into the two related areas of evolutionary hardware design and adaptive hardware. While evolutionary hardware design is the use of EAs for creating innovative (and sometimes patentable) physical designs, the goal of adaptive hardware is to endow physical systems with some adaptive characteristics in order to allow them to operate successfully in a changing environment or under presence of faults. The recent years of development of this field can be characterized as a continuous search for promising problems/applications from the point of view of evolutionary design. In this paper, we will survey the fundamental principles of evolvable hardware, introduce main problems of the field and briefly describe the most successful applications. The second part of the paper (Sections 3 and 4) is more theoretically oriented. Although evolvable hardware is typically interpreted from the point of view of electrical engineering, we will discuss the implications of evolvable hardware for C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 24–36, 2009. c Springer-Verlag Berlin Heidelberg 2009
Evolvable Hardware: From Applications to Implications
25
the theory of computation. There are two significant features from the perspective of computer science: (1) Resulting systems are not designed conventionally; they are created in the process of evolution which is based on the ‘generate-andtest’ approach. We will show that it is not always possible to understand the evolved system as a computing mechanism (in the sense of Turing machines) if the evolution is conducted in a physical hardware. (2) It is impossible to describe a continuously evolving system in terms of Turing machine if EA is used to dynamically adapt the system in a changing environment. Then, evolvable machines can be characterized as super-computing systems.
2
Evolvable Hardware
This section presents the concept of evolvable hardware, introduces relevant terminology, discusses open problems and briefly surveys some important applications. 2.1
The Method
Figure 1 shows the basic principle of the evolvable hardware method: electronic circuits that are encoded as bit strings (chromosomes, in the parlance of EAs) are constructed and optimized by the evolutionary algorithm in order to obtain the circuit implementation satisfying the specification given by designer. In order to evaluate the candidate circuit, the new configuration of a reconfigurable device is created on the basis of the chromosome content. This configuration is uploaded into the reconfigurable device and evaluated for a chosen set of input stimuli. The fitness function, which reflects the problem specification, can include behavioral as well as non-behavioral requirements. For example, the correct functionality is a typical behavioral requirement. As a non-behavioral requirement, we can mention the requirement for minimum power consumption or minimum area occupied on the chip. Once the evaluation of the population of candidate circuits is complete, a new population can be produced. That is typically performed by applying the genetic operators (such as mutation and crossover) on existing circuit configurations. High-scored candidate circuits have got a higher probability that their genetic material (parts of configuration bitstreams) will be selected for next generations. The process of evolution is terminated when a perfect solution is obtained or when a certain number of generations is evaluated. As the EA is a stochastic algorithm, the quality of resultant circuits is not guaranteed at the end of evolution. However, the method has two important advantages: (1) Artificial evolution can in principle produce intrinsic designs for electronic circuits which lie outside the scope of circuits achievable by conventional design methods. (2) The challenge of conventional design is replaced by that of designing an evolutionary algorithm that automatically performs the design in a target place (e.g., in space). This may be harder than doing the design directly, but makes autonomy possible.
26
L. Sekanina
Fig. 1. High-level description of the evolvable hardware approach
The main contribution of the evolutionary hardware design can be seen in the areas where it is impossible to provide a perfect specification for target implementations and conventional design methods are based on experience and intuition rather than on a fully automated methodology. Then, the EA can explore the “dark corners” of design spaces which humans have left unexplored [5]. 2.2
Extrinsic and Intrinsic Evolution
Most reconfigurable circuits consist of configurable blocks whose functions and interconnections are controlled by the configuration bitstream. On the position of the reconfigurable circuit we can find various reconfigurable devices, including Field Programmable Gate Arrays (FPGAs), Field Programmable Analog Arrays (FPAAs), Field Programmable Transistor Arrays (FPTAs) and special application-specific circuits (RISA [6], PAMA [7], Evolvable Motherboard [8], REPOMO32 [9] etc.). More exotic devices include reconfigurable mirrors [10], reconfigurable nanosystems [11], reconfigurable antennas [12] and reconfigurable liquid crystals [13]. If all candidate circuits are evaluated in a physical reconfigurable device, the approach is called intrinsic evolution. If the evolution is performed using a circuit simulator and only the resulting circuit is uploaded to a reconfigurable device the approach is called extrinsic evolution. Why is it important to distinguish between these approaches? In 1996 and the following years, Adrian Thompson performed a series of experiments which clearly demonstrated that there can be a significant difference in the resulting behavior if candidate circuits are evaluated not in a circuit simulator but directly in a physical reconfigurable device [14]. Thompson used FPGA XC6216 chip to evolve a tone discriminator – a circuit discriminating between square waves of 1 kHz and 10 kHz. With 10 x 10 configurable blocks of an XC6216 device, the
Evolvable Hardware: From Applications to Implications
27
circuit should output 5V for one of the frequencies and 0V for the other. The problem is that evolved circuit has to discriminate between input periods five orders of magnitude longer than the propagation time of each configurable block. Thompson evolved a surprising solution: Only 21 out of 10x10 blocks contributed to the actual circuit behavior. However, some unconnected blocks also influenced the circuit behavior. According to Thompson, these blocks interacted with the circuit in some non-standard ways. Evolved circuit was carefully analyzed using simulators, tested under different conditions and on other XC6216 chips [15]. Surprisingly, Thompson was not able to create a reliable simulation model of the evolved circuit. In addition, he observed that the circuit configuration works only with the chip used during evolution. Although the circuit has a digital interface its internal behavior is typical for analog circuits. It can be stated that the evolution was able to explore a full repertoire of behaviors available from the silicon resources provided to create the required behavior. This is an outstanding result, practically unreachable by means of conventional design methods. Similar results were observed by those doing evolutionary design in FPTA [16], liquid crystals [13] and some other unconventional platforms. 2.3
Scalability Problems
The scalability problem has been identified as the most important problem from the point of view of practical applicability of evolvable hardware. The scalability of representation means that long chromosomes which are usually required to represent complex solutions imply large search spaces that are typically difficult to search. In order to evolve large designs and simultaneously keep the size of chromosome small, the four main techniques have been developed: – Functional-level evolution [17]: Instead of gates and single-wire connections, the system is composed of complex application-specific functional blocks (such as adders, multipliers and comparators) connected using multi-bit connections. The selection of suitable functional blocks represents a domain knowledge that has to be included into the system. – Incremental evolution [18, 19]: Target circuit is decomposed onto modules which are evolved separately. The decomposition strategy is a kind of domain knowledge which has to be supplied by designer. – Development [20, 21]: The above mentioned approaches employ a direct encoding of target circuit (phenotype) in the chromosome (genotype). Hence the size of the chromosome is proportional to the size of the circuit. Developmental approaches utilize indirect (generative) encodings which specify how to construct the target circuit. The phenotype is, in fact, constructed by a program which is encoded in the genotype. Designing these developmental encodings is not trivial and represents a domain knowledge which has to be supplied by designer. – Modularization [22]: Some EAs enable to dynamically create and destroy reusable modules (subcircuits). The reuse of modules make the evolution easier even for large circuits.
28
L. Sekanina
Another problem is related to the fitness calculation time. In case of the combinational circuit evolution, the evaluation time of a candidate circuit grows exponentially with the increasing number of inputs (assuming that all possible input combinations are tested in the fitness function). Hence, the evaluation time becomes the main bottleneck of the evolutionary approach when complex circuits with many inputs are evolved. This problem is known as the problem of scalability of evaluation. In order to reduce the time of evaluation, various techniques have been adopted: – Only a subset of all possible input vectors is utilized. That is typical for evolution of filters, classifiers or robot controllers [23]. Evolved circuits have to be validated at the end of evolution using a test set — a representative set of input vectors which differs from the training set. – In some cases it is sufficient to evaluate only some structural properties (not the function) of candidate circuits which can be done with a reasonable time overhead. For example, because the testability of a candidate circuit can be calculated with the O(n2 ) complexity, very large benchmark circuits (more than 1 million gates) have been evolved with predefined testability properties [24]. – In case that the target system is linear, it is possible to perfectly evaluate a candidate circuit using a single input vector independently of the circuit complexity. Multiple-constant multipliers composed of adders, subtractors and shifters were evolved for tens of multibit outputs [25]. An obvious conclusion is that the perfect evaluation procedures are applicable only for small circuits or in very specific cases of large circuits. On the other hand, when more complex circuits have to be evolved, only an imperfect fitness calculation method may be employed due to time constraints. 2.4
Applications
The applications of evolvable hardware fall into two categories: evolutionary design and adaptive hardware. We will briefly survey them. Evolutionary Hardware Design. Innovative designs were presented in the areas of small combinational circuits (multipliers [26]), digital filters [27], image operators [28], classifiers [29], diagnostics benchmark circuits [24] and many others. Innovative implementations of analog circuits, antennas and optical systems were mostly obtained using indirect encodings, for example, developmental genetic programming introduced by John Koza [21, 30]. Koza’s team has clearly illustrated that genetic programming can automatically produce a circuit that is competitive with human performance. In particular, genetic programming has created patentable new inventions and created circuits that either infringe or duplicate the functionality of previously patented inventions. Adaptive Hardware. Examples of adaptive hardware systems can be presented according to the types of changes which usually lead to the requirement for system adaptation. These changes can be classified either as changes
Evolvable Hardware: From Applications to Implications
29
– in the hardware platform itself (i.e., faults), – in the input data characteristics, or – in the specification. A promising application for evolution of analog circuits is the adaptation in extreme environments. JPL’s evolvable hardware group has demonstrated for simple circuits created in the FPTA-2 that the evolutionary approach can recover the functionality lost (1) after a fault artificially injected into FPTA-2, (2) in extreme high and low temperatures (from –196◦C to 320◦ C) and (3) in high radiation environments (up to 250 krad of total ionizing dose) [31, 32, 16, 33]. For example, the Self-Reconfigurable Analog Array (SRAA) developed at JPL provides the capability of continual temperature compensation using evolutionaryoriented reconfiguration [34]. Adaptive image compression methods allow for modifying the compression algorithm according to the particular data which has to be compressed. In consequence, a higher compression ratio can be achieved. A chip for adaptive lossless data compression was presented in [35]. Another evolvable hardware chip was designed to control a myoelectric prosthetic hand which processes the signals generated with muscular movements (electromyography, EMG signals). It takes a long time, usually almost one month, before a disabled person is able to control a multifunction prosthetic hand freely using a fixed controller. The evolvable chip allows the myoelectric hand to adapt itself to the disabled person and thus significantly reduce the training period to several minutes [36]. A post-fabrication calibration of ASICs can be also considered as a kind of hardware adaptation. Fabrication variances in the manufacture of chips can cause problems for some high-performance applications, especially when a cutting-edge manufacturing technology is employed. In other words, only some of the fabricated chips really meet the specification. Hence an EA is used to tune selected circuit parameters with the aim of obtaining required circuit function even for the chips which do not work because of variance of the fabrication process. Although some area of the chip has to be spent for implementing the reconfiguration logic and controller, the overall benefits are significant: It is possible to fabricate simpler, smaller and low-power designs which do not contain large circuits needed to compensate fabrication variances. A typical chip in which the post-fabrication tuning was successfully applied is an intermediate filter (IF), commonly found in mobile telephones [37]. Off line as well as on line evolution is often applied in the area of evolutionary robotics to design a reactive robot controller [38]. In more sophisticated scenario, robot controllers are evolved together with robot physical bodies [39].
3
Are Evolved Systems Computing Mechanisms?
A common feature of the conventional design process and evolutionary design is that target system’s input/output behavior (and interpretation) has to be defined in advance. In the case of evolutionary design, this interpretation is used
30
L. Sekanina
to define the fitness function. However, the main difference between the two design approaches is that while the conventional design is based on a systematic transformation of the abstract problem model into the implementation in a given platform, the evolutionary approach is based on the ‘generate-and-test’ method. When not constrained, the evolution can utilize all the resources available, including normally unused characteristics of the reconfigurable platform and environment to build the target system. Although the evolution is often able to find an implementation perfectly satisfying the specification, we can have problems to understand how and why the solution works. Therefore, nothing is known about the mapping between an abstract computational model and its physical implementation [40]. The next paragraph will demonstrate this phenomenon. Assume that a simple non-trivial circuit performing required transformation has been evolved in an FPTA, liquid crystals or another ‘physically-rich’ platform. Moreover, assume that the environment is stable (i.e., temperature, radiation and all the phenomena that could influence its behavior are stable). In principle, we are able to interpret the signals at the inputs and outputs because we had to declare our interpretation in the fitness evaluation process (i.e., in advance, before the circuit was evolved). However, we don’t exactly understand at the end of evolution how the platform performs the required computation. We have specified only the required input/output relation in the fitness function, i.e. we have not introduced any abstract model indicating the way of computation. Does the evolved system really perform a computation? Since we can interpret the input/output behavior of the circuit as computation we can agree that the system really computes. However, there are problems with the interpretation of internal behavior of the evolved system. Copeland, Johnson and others would like to see that the symbols within the system have a consistent interpretation throughout the computation and that the interpretation is specified beforehand [41, 42]. It makes no sense to establish the mapping before the evolution is executed because the evolution can use various physical properties of the physical device to implement the required behavior. On the other hand, establishing the mapping at the end of evolution could solve the problem because (under some assumptions, such as that the environment does not influence the physical device at all) it could be possible to identify the physical states that correspond to the abstract computational states. Unfortunately, the discovery of the computational states/functions within the physical system is not quite sure. Although we could apply all the physical theories we currently know to analyze and explain the evolved system, we could obtain no satisfactory answer. As Bartles et al. have shown [43], the evolution is able to utilize those physical behaviors that are physically impossible from the point of view of current physical theories. If we agree that (1) it does not matter how the system realizes a function as long as the system is digital from the outside (a digital system can be treated as a “black box” with digital inputs and outputs), (2) we are able to interpret its input/output behavior as computation and (3) this interpretation is defined in advance then the evolved system is computational system (computing mechanism). On the other hand, if the correspondence between the abstract states
Evolvable Hardware: From Applications to Implications
31
and physical states is crucial to qualify the system as computational one then the evolved system is not a computing mechanism. Table 1 compares ordinary computers, evolved computational systems and the brain (the brain represents here all biological systems that are often studied as computational devices). We can observe that the evolved computational devices represent a distinctive class of devices that exhibits a specific combination of properties, not visible in the scope of all computational devices up till now. Table 1. Comparison of different types of computational devices Property Processor The brain Evolved device I/O behavior can be interpreted as computing Yes Yes Yes Device is a computing mechanism Yes Unsure Unsure An abstract model exists before implementation Yes No No The required behavior is specified beforehand Yes No Yes Engineers can design&build Yes No Yes
4
Evolvable Computational Machines as Super-Turing Machines
In this paragraph, we will investigate computational properties of evolvable systems that can be adapted in a dynamically changing environment. In order to provide a simple formal framework for machine evolution in a dynamic environment, a mathematical model of the evolvable computational machine will be defined (according to [28]) as a quadruple M = (E, M, g, f ), where – E denotes a search (evolutionary) algorithm. Note that classical evolutionary algorithms utilize the fitness function of the form Φ : C → R where C denotes a set of chromosomes. – M denotes a set of machines which can be constructed from chromosomes for a given problem domain using – genotype-phenotype mapping g : C → M. – f is a ‘machine’ fitness function f : M → R which is used to evaluate candidate machines. Φ is expressed as composition Φ = f ◦ g. Note that f is a problem specific function, g can cover any type of constructional process and M is defined implicitly or explicitly before the evolution is executed. In order to model evolvable machine M in a dynamic environment, the following specification of machine context (environment) is proposed according to [28]. The machine context is considered as a set of (machine) fitness functions (we can call them context functions) together with a mechanism of transition among them. Context functions are changed in discrete time points modeled as natural numbers N = {1, 2, . . .}. A set of all mappings from M into R will be denoted RM . Formally, machine context is defined in terms:
32
L. Sekanina
– Γ ⊆ RM – a set of context functions (ϕi ∈ Γ specifies the fitness function in environment i). – ϕ0 ∈ Γ – an initial context function. – ε : Γ × N → Γ – a relation that determines a successive context function. The following example illustrates the proposed formal definitions: Consider a real-time adaptive and reactive robot controller implemented as evolvable machine (as evolvable hardware in practice). The controller controls the motors of a flying robot which is deployed to monitor Mars surface. The goal is to maximize the measurement accuracy and minimize robot’s power consumption. The quality of measurement is proportional to the number of active sensors, i.e. to the power consumption. It is assumed that the robot’s operational time is endless. The system exhibits three important properties: – The computation is reactive because the robot is controlled according to the data coming from sensors. The robot also influences its environment (e.g., other robots). – The control algorithm is dynamically changed. The changes are unpredictable because the stimuli from environment (e.g., the occurrence of a meteorite) or hardware failures are uncomputable. – It is not assumed that the computation will be terminated. In reality, the computation will terminate because of unavoidable hardware failures or insufficient power supply. The evolvable machine, in fact, produces a (potentially endless) sequence of controllers (i.e., machines from M), one for the most recent environment/specification. The type of environment is reflected in the context function ϕi . The change of environment (i.e., the change of context function described by ε) is not computable. It is evident that proposed robot does not share the computational scenario of a standard Turing machine and hence it can not be simulated on Turing machine. Nevertheless, van Leeuwen and Wiedermann have shown that such computations may be realized by an interactive Turing machines with advice [44]. The interactive Turing machine with advice is a classical Turing machine endowed with three important features: advice function (a weaker type of oracle), interaction and infinity of operation. The same authors have proposed that any (non-uniform interactive) computation can be described in terms of interactive Turing machines with advice. We can observe that evolvable computational machines (theoretical models!) operating in a dynamic environment show simultaneous non-uniformity of computation, interaction with an environment, and infinity of operations. Furthermore, relation ε is in general uncomputable. It was proven that computational power of an evolvable computational machine operating in a dynamic environment is equivalent with the computational power of an interactive Turing machine with advice, however, only in the case that evolutionary algorithm is efficient [28].
Evolvable Hardware: From Applications to Implications
33
Also physical implementations of evolvable machines, Internet and other similar devices are very interesting from a computational viewpoint. At each time point they have a finite description. However, when one observes their computation in time, they represent infinite sequences of reactive devices computing non-uniformly. The “evolution” of machine’s behavior is supposed to be endless. In fact it means that they offer an example of real devices (physical implementations!) that can perform computations that no single Turing machine (without oracle) can.
5
Conclusions
In this paper, we have surveyed the fundamental principles of evolvable hardware, introduced main problems of the field and mentioned the most successful applications. Proposed theoretical analysis of evolvable hardware which was conducted from the perspective of computer science should help in understanding of what we can obtain from a design method that utilizes the evolutionary design instead of conventional design techniques. Finally, we have shown that adaptive hardware does not reflect the computational scenario of a standard Turing machine.
Acknowledgements This research was partially supported by the Czech Science Foundation under No. 102/07/0850 Design and hardware implementation of a patent-invention machine and the Research Plan No. MSM 0021630528 Security-Oriented Research in Information Technology.
References [1] Eiben, A.E., Smith, J.E.: Introduction to Evolutionary Computing. Springer, Berlin (2003) [2] Bentley, P.J.: Evolutionary Design by Computers. Morgan Kaufmann, San Francisco (1999) [3] Higuchi, T., Niwa, T., Tanaka, T., Iba, H., de Garis, H., Furuya, T.: Evolving Hardware with Genetic Learning: A First Step Towards Building a Darwin Machine. In: Proc. of the 2nd International Conference on Simulated Adaptive Behaviour, pp. 417–424. MIT Press, Cambridge (1993) [4] de Garis, H.: Evolvable hardware – genetic programming of a darwin. In: International Conference on Artificial Neural Networks and Genetic Algorithms, Innsbruck, Austria. Springer, Heidelberg (1993) [5] Lohn, J.D., Hornby, G.S.: Evolvable hardware: Using evolutionary computation to design and optimize hardware systems. IEEE Computational Intelligence Magazine 1(1), 19–27 (2006) [6] Greensted, A., Tyrrell, A.: RISA: A hardware platform for evolutionary design. In: Proceedings of 2007 IEEE Workshop on Evolvable and Adaptive Hardware, pp. 1–7. IEEE, Los Alamitos (2007)
34
L. Sekanina
[7] Zebulum, R., Pacheco, M., Vellasco, M.: Evolutionary Electronics – Automatic Design of Electronic Circuits and Systems by Genetic Algorithms. The CRC Press International Series on Computational Intelligence (2002) [8] Layzell, P.J.: A new research tool for intrinsic hardware evolution. In: Sipper, M., Mange, D., P´erez-Uribe, A. (eds.) ICES 1998. LNCS, vol. 1478, pp. 47–56. Springer, Heidelberg (1998) [9] Sekanina, L., Ruzicka, R., Vasicek, Z., Prokop, R., Fujcik, L.: Repomo32 – new reconfigurable polymorphic integrated circuit for adaptive hardware. In: Proceedings of 2009 IEEE Workshop on Evolvable and Adaptive Hardware, pp. 39–46. IEEE CIS, Los Alamitos (2009) [10] Loktev, M., Soloviev, O., Vdovin, G.: Adaptive Optics – Product Guide. OKO Technologies, Delft (2003) [11] Tour, J.M.: Molecular Electronics. World Scientific, Singapore (2003) [12] Linden, D.S.: A system for evolving antennas in-situ. In: EH 2001: Proceedings of the The 3rd NASA/DoD Workshop on Evolvable Hardware, Washington, DC, USA, pp. 249–255. IEEE Computer Society, Los Alamitos (2001) [13] Harding, S.L., Miller, J.F., Rietman, E.A.: Evolution in materio: Exploiting the physics of materials for computation. Journal of Unconventional Computing 4(2), 155–194 (2008) [14] Thompson, A.: Silicon Evolution. In: Proc. of Genetic Programming GP 1996, pp. 444–452. MIT Press, Cambridge (1996) [15] Thompson, A., Layzell, P., Zebulum, S.: Explorations in Design Space: Unconventional Electronics Design Through Artificial Evolution. IEEE Transactions on Evolutionary Computation 3(3), 167–196 (1999) [16] Stoica, A., Zebulum, R.S., Keymeulen, D., Ferguson, M.I., Duong, V., Guo, X.: Evolvable hardware techniques for on-chip automated reconfiguration of programmable devices. Soft Computing 8(5), 354–365 (2004) [17] Murakawa, M., Yoshizawa, S., Kajitani, I., Furuya, T., Iwata, M., Higuchi, T.: Evolvable Hardware at Function Level. In: Ebeling, W., Rechenberg, I., Voigt, H.-M., Schwefel, H.-P. (eds.) PPSN 1996. LNCS, vol. 1141, pp. 62–71. Springer, Heidelberg (1996) [18] Torresen, J.: A Divide-and-Conquer Approach to Evolvable Hardware. In: Sipper, M., Mange, D., P´erez-Uribe, A. (eds.) ICES 1998. LNCS, vol. 1478, pp. 57–65. Springer, Heidelberg (1998) [19] Torresen, J.: A scalable approach to evolvable hardware. Genetic Programming and Evolvable Machines 3(3), 259–282 (2002) [20] Kitano, H.: Morphogenesis for evolvable systems. In: Sanchez, E., Tomassini, M. (eds.) Towards Evolvable Hardware 1995. LNCS, vol. 1062, pp. 99–117. Springer, Heidelberg (1996) [21] Koza, J.R., Bennett, F.H., Andre, D., Keane, M.A.: Genetic Programming III: Darwinian Invention and Problem Solving. Morgan Kaufmann Publishers, San Francisco (1999) [22] Walker, J.A., Miller, J.: The Automatic Acquisition, Evolution and Re-use of Modules in Cartesian Genetic Programming. IEEE Transactions on Evolutionary Computation 12(4), 397–417 (2008) [23] Higuchi, T., Liu, Y., Yao, X.: Evolvable hardware. Springer, Berlin (2006) [24] Pecenka, T., Sekanina, L., Kotasek, Z.: Evolution of synthetic rtl benchmark circuits with predefined testability. ACM Transactions on Design Automation of Electronic Systems 13(3), 1–21 (2008)
Evolvable Hardware: From Applications to Implications
35
[25] Vasicek, Z., Zadnik, M., Sekanina, L., Tobola, J.: On evolutionary synthesis of linear transforms in FPGA. In: Hornby, G.S., Sekanina, L., Haddow, P.C. (eds.) ICES 2008. LNCS, vol. 5216, pp. 141–152. Springer, Heidelberg (2008) [26] Miller, J., Job, D., Vassilev, V.: Principles in the Evolutionary Design of Digital Circuits – Part I. Genetic Programming and Evolvable Machines 1(1), 8–35 (2000) [27] Hounsell, B.I., Arslan, T., Thomson, R.: Evolutionary design and adaptation of high performance digital filters within an embedded reconfigurable fault tolerant hardware platform. Soft Computing 8(5), 307–317 (2004) [28] Sekanina, L.: Evolvable components: From Theory to Hardware Implementations. Natural Computing. Springer, Berlin (2004) [29] Glette, K., Torresen, J., Gruber, T., Sick, B., Kaufmann, P., Platzner, M.: Comparing evolvable hardware to conventional classifiers for electromyographic prosthetic hand control. In: Proc. of the 2008 NASA/ESA Conference on Adaptive Hardware and Systems, pp. 32–39. IEEE Computer Society, Los Alamitos (2008) [30] Koza, J.R., Keane, M.A., Streeter, M.J., Mydlowec, W., Yu, J., Lanza, G.: Genetic Programming IV: Routine Human-Competitive Machine Intelligence. Kluwer Academic Publishers, Dordrecht (2003) [31] Keymeulen, D., Zebulum, R., Jin, Y., Stoica, A.: Fault-tolerant evolvable hardware using field-programmable transistor arrays. IEEE Transactions on Reliability 49(3), 305–316 (2000) [32] Stoica, A., Keymeulen, D., Zebulum, R.S., Guo, X.: Reconfigurable electronics for extreme environments. In: Higuchi, T., Liu, Y., Yao, X. (eds.) Evolvable Hardware, pp. 145–160. Springer, Heidelberg (2006) [33] Stoica, A., Wang, X., Keymeulen, D., Zebulum, R.S., Ferguson, M., Guo, X.: Characterization and Recovery of Deep Sub Micron (DSM) Technologies Behavior Under Radiation. In: 2005 IEEE Aerospace Conference, pp. 1–9. IEEE, Los Alamitos (2005) [34] Stoica, A., Keymeulen, D., Zebulum, R.S., Katkoori, S., Fernando, P., Sankaran, H., Mojarradi, M., Daud, T.: Self-reconfigurable mixed-signal integrated circuits architecture comprising a field programmable analog array and a general purpose genetic algorithm ip core. In: Hornby, G.S., Sekanina, L., Haddow, P.C. (eds.) ICES 2008. LNCS, vol. 5216, pp. 225–236. Springer, Heidelberg (2008) [35] Sakanashi, H., Iwata, M., Higuchi, T.: A lossless compression method for halftone images using evolvable hardware. In: Liu, Y., Tanaka, K., Iwata, M., Higuchi, T., Yasunaga, M. (eds.) ICES 2001. LNCS, vol. 2210, pp. 314–326. Springer, Heidelberg (2001) [36] Kajitani, I., Iwata, M., Higuchi, T.: A ga hardware engine and its applications. In: Higuchi, T., Liu, Y., Yao, X. (eds.) Evolvable Hardware, pp. 41–63. Springer, Heidelberg (2006) [37] Murakawa, M., Yoshizawa, S., Adachi, T., Suzuki, S., Takasuka, K., Iwata, M., Higuchi, T.: Analogue EHW chip for intermediate frequency filters. In: Sipper, M., Mange, D., P´erez-Uribe, A. (eds.) ICES 1998. LNCS, vol. 1478, pp. 134–143. Springer, Heidelberg (1998) [38] Nofli, S., Floreano, D.: Evolutionary Robotics: The Biology, Intelligence, and Technology of Self-Organizing Machines. MIT Press/Bradford Books (2000) [39] Lipson, H., Pollack, J.B.: Automatic design and manufacture of robotic lifeforms. Nature 406, 974–978 (2000) [40] Sekanina, L.: Evolved computing devices and the implementation problem. Minds and Machines 17(3), 311–329 (2007) [41] Copeland, B.J.: What is computation? Synthese 108, 335–359 (1996)
36
L. Sekanina
[42] Johnson, C.G.: What kinds of natural processes can be regarded as computations? In: Paton, R. (ed.) Computation in Cells and Tissues: Perspectives and Tools of Thought, pp. 327–336. Springer, Heidelberg (2004) [43] Bartels, R.A., Murnane, M.M., Kapteyn, H.C., Christov, I., Rabitz, H.: Learning from Learning Algorithms: Applications to attosecond dynamics of high-harmonic generation. Physical Review A 70(4), 1–5 (2004) [44] van Leeuwen, J., Wiedermann, J.: The Turing Machine Paradigm in Contemporary Computing. In: Mathematics Unlimited - 2001 and Beyond, pp. 1139–1155. Springer, Heidelberg (2001)
Relativistic Computers and Transfinite Computation Philip D. Welch School of Mathematics, University of Bristol England
[email protected]
(1) Simple models in Malament-Hogarth spacetimes, up to Δ11 or HYP. (2) Ordinal Time Register Machines: up to Π11 -CA0 . (3) Infinite Time Turing Machines: up to Π21 -CA0 +Det(Σ20 ) and beyond. In this paper we survey some of the complexity issues surrounding discrete models of transfinite recursion. We emphasise today the connections with Proof Theory, Reverse Mathematics, and Subsystems of Second Order Number Theory as set forth in Simpson’s [13]. Our concerns are thus mainly the logico-mathematical ones of analysing such models rather ‘implementational concerns’ (to put it broadly).
1
Relativistic Models
Pitowsky [9] gave an account of an attempt to define spacetimes in which the effect of infinitely many computational tasks could be seen by an observer Or . (By ‘spacetime’ we mean here a Hausdorff, paracompact, Riemannian manifold which is a solution to the Einsteinian GR equations - we refer the reader to [4].) The device here is that it is possible to define spacetimes in which one observer’s chronological past contains another observer’s worldline of infinite proper time length. This, with some signalling from the observer on the “infinite path” to that on the “short path”, allows information about a universal Π1 , or ∀, property of the natural numbers, to be passed along, without any actual performance of a supertaskby any observer or individual. Subsequently Earman and Norton [1] pointed out problems with that particular model and its story not least that of the unbounded acceleration of one observer. Since then accounts of more sophisticated spacetimes due to Hogarth [5] and Etesi & N´emeti [2], have been published. The latter’s model allows a fixed finite Boolean combinations of Π1 predicates to be decided if a correspondingly fixed finite number of signals is allowed. Hence although an observer would not actually be swamped with infinitely many signals, they would have to be prepared to receive, to arbitrary precision, any unbounded but finite number of such. As we have observed in [15], to allow for Δ2 predicates to be decided, an arbitrarily large, but nevertheless finite, number of signals must be allowed for, that cannot be determined in advance. C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 37–41, 2009. c Springer-Verlag Berlin Heidelberg 2009
38
P.D. Welch
Hogarth in a series of papers [5], [6], [7], stacks up a finite number of (what he calls) SAD-regions to allow for a fixed number of alternating quantifiers as a prefix to a recursive predicate, to be decided. By then taking a region containing a suitably connected infinite string of such he defines an “Arithmetically Deciding Spacetime” (AD) which is then capable of deciding any arithmetical predicate. This was extended in [15] to a “Hyperarithmetically Deciding Spacetime” (HYPD) region, by allowing the regions to be attached to nodes of recursive finite path trees, (which were only implicit in [6] and to a finite depth), to be explicitly of countable (but recursive) ordinal depth. We attached in [15] a universal constant to a spacetime by classifying the “weight” of a spacetime as follows: Definition 1. ( [15], Def. 7) Let M = (M, gab ) be a spacetime. We define w(M) to be the least ordinal η so that M contains no SAD region whose underlying tree structure has ordinal rank η. Note that 0 ≤ w(M) ≤ ω1 . A zero value w(M) implies that M contains no SAD regions whatsoever, that is, is not MH; the upper bound is for the trivial reason that every finite path tree is a countable object and so cannot have uncountable ordinal rank. However conceptual problems emerge (even if physical ones have not!): finite path trees need not be recursive and can have any countable ordinal height: if AD spacetimes are physically possible, then it is easy, for any countable ordinal α, to cook-up a spacetime in which a tree has depth α < ω1 and thus one can decide “Σα ” predicates. However any set of integers can be construed as a Σα predicate, on integers, for a sufficiently complicated α: we just hard-wire into the physical spacetime the desired complexity. Where as any hyperarithmetically decidable set has a recursive protocol for its construction (which of course does not imply that the set itself is recursive - it merely has a recursively specifiable construction procedure), the general depth α tree does not. How are such spacetimes to be treated? Indeed how does one even recognise one with its infinitely many regions? Or indeed, how does one even recognise the “entrance” to the AD spacetime? It would seem that recognising anything more than finitely many SAD regions would be an impossible task. However if one adheres to an assumption that the relevant SAD regions are open and disjoint, one has the simple observation (assuming the manifolds modelling the spacetimes are paracompact and Hausdorff) that at most countably many finite path trees can be instantiated. Proposition 1. ([15]Prop.2) For any spacetime M, w(M) < ω1 .
2
Simple Supertask Models
Suppose one has a standard Register machine in the manner of ShepherdsonSturgis [12]. This has a finite number of registers containing natural numbers. Its behaviour follows a standard finite program or list of instructions I j , and
Relativistic Computers and Transfinite Computation
39
as is well known, this is functionally equivalent to a standard Turing machine. However we now allow it to perform supertasks, in that we allow it to run transfinitely: we only have to specify its behaviour at “limit stages” of time. Let λ be such. We set the value of register i, say Ri at time λ, Ri (λ), to be the liminf of values at previous times: Ri (λ) = lim inf ν→λ Ri (ν) =0
if this is finite; otherwise.
We further specify that at time λ it returns to instruction number ι(λ) where again we set the latter to be lim inf ν→λ ι(ν) where it performs instruction Iι(ν) at time ν. This has the effect of placing the next instruction to be executed at time λ that at the head of the outermost loop that the machine had been performing unboundedly in λ. Such Ordinal Time Register Machines (OTRM) were devised and studied by Koepke and Miller, see [8]. What can such a machine calculate? More or less equivalently: how strong is the assertion simply that such a machine always either halts or goes into a repeating loop? Conjecture: The assertion that any OTRM either halts or goes into an infinite loop is equivalent (once stated in a number theoretic fashion concerning possible lengths of well-orders) in strength to Π11 -CA0 in second order number theory. To recast this another way: suppose the Conjecture is true. Then if one gives such a machine the bits (as an oracle) coding a closed set A in it should be able to correctly answer questions as to the code of the perfect kernel of A.
3
Infinite Time Turing Machines
We consider the ITTM’s of Hamkins and Kidder. These are defined in [3] where the analogy with standard Turing machines is explored in depth. That paper contains a wealth of detail concerning their basic properties. The decidable and semi-decidable sets for this model as well as the halting set {e ∈ | Pe (e) ↓} (the set of programs that halt on their own code as input) were identifed first in [14]. Essentially, just as the Ordinal Time Register Machines (above - which however were developed later) the ITTM takes as a model the standard Turing model of an infinite tape, a finite program as usual, but specifies liminf behaviour (or rather [3] specified limsup but this is a trivial difference): if the alphabet is {0, 1} a particular cell Ci has value Ci (λ) = lim inf ν→λ Ci (ν) at limit times; the machine goes to the liminf ’th instruction number, and the read/write head is placed over the liminf ’th cell at a limit stage λ. Such machines are much more powerful than their OTRM cousins. An ITTM program on some input X,(say with the bits of X placed on every third cell of the tape initially) may either halt or go into some infinite loop. How long one has to wait for that infinite loop to start corresponds to the strength of the theory needed to prove that assertion.
40
P.D. Welch
For any such ITTM program Pe with input X, we define the repeat pair of Pe on a starting set X, as the lexicographically least pair of ordinals (ζ(e, X), Σ(e, X)) with the machine configuration at time ζ being that at time Σ (thus if Pe (X) halts at time ζ we may consider Σ = ζ + 1). Definition 2. AQI is the sentence: “For every ITTM program Pe , for every X ⊆ , there is a wellordering W with a repeat pair (ζ(e, X), Σ(e, X)) in Field(W )”.
Then AQI can be formulated in second order number theory, and essentially is asserting that there are sufficient wellorderings for every ITTM on every input set X to halt or loop. One may ask: Q: What is the strength of ACA0 + AQI? (The choice of arithmetical comprehension, ACA0 , as a base theory is somewhat arbitrary, as the AQI statement alone is rather strong.) The ordinals ζ, Σ are identified in [14]: for X = ∅, the universal ITTM program goes into a loop first at the least ζ such that ∃Σ > ζ(Lζ ≺Σ2 LΣ ). Π31 -CA0 is sufficient to prove there are β-models of AQI. (A β-model is one which is correct about which sets of integers truly code wellorderings.) More precisely: Theorem 1. Δ13 -CA0 +Σ30 -Determinacy, Δ13 -CA0 +AQI, and Δ13 CA0 +Σ20 -Determinacy are in strictly descending order of strength, in that each proves the existence of countably coded β-models of the next theory. We close by mentioning some of the possibilities that connect these concepts with potential proof theoretical results on the way to looking at ordinal notation systems for Π31 -CA0 : for Π21 -CA0 , by work of Rathjen ([11], [10]), we see that his notation system for the second level of Comprehension is tied up with the theory of arbitrarily long finite Σ1 -elementary chains through the Lα -hierarchy: Lκ0 ≺Σ1 Lκ1 ≺Σ1 Lκ2 ≺Σ1 · · · ≺Σ1 Lκn . (Not unnaturally, the first level Lα which is an infinite tower of such models, is the first whose reals form a β-model of Π21 -CA0 .) The same occurs for Π31 -CA0 : the first Lβ whose reals form a β-model of Π31 -CA0 is the union of an infinite tower of models Lζn ≺Σ2 Lζn+1 and presumably one will need to analyse arbitrarily long finite chains of such models to get at an ordinal system ` a la Rathjen for this theory. Seeing that AQI is connected with levels Lζ of the G¨odel’s L-hierarchy, with Σ2 -end extensions, (albeit only chains of length 1) analysing the proof theoretic strength of AQI would be a natural stepping stone on the way to full Π31 -CA0 . Beyond It is also possible to define a generalised ITTM which works not with a Σ2 -limit rule, as exemplified by liminf but by an intrinsically Σ3 -limit rule. The universal such machine then goes into a loop at the first pair χ, π with Lχ ≺Σ3 Lπ . The machine works by taking liminf’s not at every ordinal below a limit stage, but only along those that satisfy a certain closure or stability property.
Relativistic Computers and Transfinite Computation
41
References [1] Earman, J., Norton, J.D.: Forever is a day: Supertasks in Pitowsky and MalamentHogarth spacetimes. Philosophy of Science 60, 22–42 (1993) [2] Etesi, G., N´emeti, I.: Non-Turing computations via Malament-Hogarth spacetimes. International Journal of Theoretical Physics 41(2), 341–370 (2002) [3] Hamkins, J.D., Lewis, A.: Infinite time Turing machines. Journal of Symbolic Logic 65(2), 567–604 (2000) [4] Hawking, S.W., Ellis, G.F.R.: The large scale structure of space-time. Cambridge University Press, Cambridge (1973) [5] Hogarth, M.: Does general relativity allow an observer to view an eternity in a finite time? Foundations of Physics Letters 5(2), 173–181 (1992) [6] Hogarth, M.: Non-Turing computers and non-Turing computability. In: PSA: Proceedings of the Biennial Meeting of the Philosophy of Science Association, vol. 1, pp. 126–138 (1994) [7] Hogarth, M.: Deciding arithmetic using SAD computers. British Journal for the Philosophy of Science 55, 681–691 (2004) [8] Koepke, P., Miller, R.: An enhanced theory of infinite time register machines. In: Beckmann, A., Dimitracopoulos, C., L¨ owe, B. (eds.) CiE 2008. LNCS, vol. 5028, pp. 306–315. Springer, Heidelberg (2008) [9] Pitowsky, I.: The physical Church-Turing thesis and physical computational complexity. Iyyun 39, 81–99 (1990) [10] Rathjen, M.: An ordinal analysis of parameter-free Π21 comprehension. Archive for Mathematical Logic 44(3), 263–362 (2005) [11] Rathjen, M.: An ordinal analysis of stability. Archive for Mathematical Logic 44(1), 1–62 (2005) [12] Shepherdson, J., Sturgis, H.: Computability of recursive functionals [13] Simpson, S.: Subsystems of second order arithmetic. Perspectives in Mathematical Logic. Springer, Heidelberg (1999) [14] Welch, P.D.: Eventually infinite time Turing degrees: infinite time decidable reals. Journal for Symbolic Logic 65(3), 1193–1203 (2000) [15] Welch, P.D.: Turing Unbound: The extent of computations in Malament-Hogarth spacetimes. British J. for the Philosophy of Science, 15 (December 2008)
Turing Completeness Using Three Mobile Membranes Bogdan Aman and Gabriel Ciobanu Romanian Academy, Institute of Computer Science, Ia¸si A.I. Cuza University of Ia¸si, Romania
[email protected],
[email protected]
Abstract. The mutual mobile membrane systems represent a variant of mobile membrane systems in which the endocytosis and exocytosis work whenever the involved membranes “agree” on the movement (this agreement is described by using dual objects a and a in the involved membranes). We study the computational power of this variant of mobile membrane systems, proving that only three membranes are enough to get the same computational power as a Turing machine.
1
Introduction
In the past decades, molecular biology has interacted with several fields, mainly to discover the mechanisms of diseases. Among them, computer science was central in providing appropriate models in which mobility, interaction, concurrency and causality are well-defined notions. In biology, more specific in systems biology, models play an important role in the representation, manipulation and communication of biologic knowledge. Models are mainly a collection of rules operating on an initial set of molecules, in analogy to rules of biochemical reactions. The model of mutual mobile membrane systems is part of the large approach defined by the membrane systems. Basic membrane systems (also called P systems) together with several variants are presented in the monograph [12]. Membrane systems were introduced as distributed, parallel and nondeterministic computing models inspired by the compartments of eukaryotic cells and by their biochemical reactions. The cellular components are formally represented in the definition of membrane systems. The structure of the cell is represented by a set of hierarchically embedded regions, each one delimited by a surrounding boundary (called membrane), and all of them contained inside an external special region called the skin membrane. Multisets of objects are distributed inside these regions, and they can be modified or communicated between adjacent compartments. Objects represent the formal counterpart of the molecular species (ions, proteins, etc.) floating inside cellular compartments , and they are described by means of symbols or strings over a given alphabet. Evolution rules represent the formal counterpart of chemical reactions, and are given in the form of rewriting rules which operate on the objects, as well as on the compartmentalized structure (by dissolving, dividing, creating, C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 42–55, 2009. c Springer-Verlag Berlin Heidelberg 2009
Turing Completeness Using Three Mobile Membranes
43
or moving membranes). A membrane system can perform computations in the following way. Starting from an initial configuration which is defined by the multiset of objects initially placed inside the compartmentalized structure and by the sets of evolution rules, the system evolves by applying the evolution rules in a nondeterministic and maximally parallel manner. A rule is applicable when all the objects that appear in its left-hand side are available in the region where the rule is placed. The maximal parallelism of rule application means that every rule that is applicable inside a region has to be applied in that region. Since there is a competition for the available objects, only certain nondeterministically selected rules are applied. A halting configuration is reached when no rule is applicable; the result is then given by the number of the objects (in a specified region). Several variants of membrane systems are inspired by different aspects of living cells (symport and antiport-based communication through membranes, catalytic objects, membrane charge, etc.). Their computing power and efficiency have been investigated using the approaches of formal languages and grammars, register machines and complexity theory. An updated bibliography can be found at the webpage http://ppage.psystems.eu. A first definition of P systems with mobile membranes is given in [10] where the mobile membrane systems are presented as a variant of P systems with active membranes [12]. The new feature of mobile membrane systems is provided by the operations of endocytosis and exocytosis, namely moving a membrane inside a neighbouring membrane (endocytosis), or moving a membrane outside the membrane where it is placed (exocytosis). The computational power of this variant of mobile membrane systems is treated in [10]; the approach is purely technical, without examples from biology motivating the approach. Turing completeness is obtained by using nine membranes together with the operations of endocytosis and exocytosis. Using also some contextual evolution rules (together with endocytosis and exocytosis), in [8] it is proven that four mobile membranes are enough to get the power of a Turing machine, while in [3] the number of membranes is decreased to three. The enhanced mobile membrane systems are a variant of membrane systems which have been proposed in [2] for describing some biological mechanisms of the immune system. The operations governing the mobility of the enhanced mobile membrane systems are endocytosis (endo), exocytosis (exo), forced endocytosis (fendo) and forced exocytosis (fexo). The computational power of the enhanced mobile membrane systems using these four operations was studied in [9] where it is proved that twelve membranes can provide the computational universality, while in [3] the result is improved by reducing the number of membranes to nine. It is worth to note that unlike the previous results, the context-free evolution of objects is not used in any of the results (proofs). Another results presented in [9] claim that eight membranes are enough to get the power of the ET0L systems (P sET 0L ⊆ P sEM8 (endo, exo, f endo, f exo)), and seven membranes for E0L systems (P sE0L ⊆ P sEM7 (endo, exo, f endo, f exo)). In this paper we consider a model where the central issues are given by the biological movements described by endocytosis and exocytosis. Using such a model,
44
B. Aman and G. Ciobanu
we provide a computability result. It is enough to consider the biologically inspired operations of mutual endocytosis and mutual exocytosis and three membranes (compartments) to get the full computational power of a Turing machine. Three represents the minimum number of membranes in order to discuss properly about the movement provided by endocytosis and exocytosis: we work with two membranes inside a skin membrane. This result opens many challenges, and it is difficult to predict the theoretical and practical consequences. Other calculability results are possible; the paper presents just one related to ET0L systems. The model given by mutual mobile membrane systems can be extended with topological and other properties, and it could be used for designing lab experiments.
2
Mutual Mobile Membrane Systems
Endocytosis and exocytosis are general terms which refer to the process by which anything is taken into or expelled from the cell through the action of vacuoles. Exocytosis involves the movement of materials out of the cytoplasm of the cell using ATP energy. In exocytosis, a vesicle (vacuole) migrates to the membrane inner surface and fuses with the cell membrane. This process of exocytosis is how the cells of glands that produce proteins (enzyme and steroids) export molecules for use in other areas of the body. For example, proteins made in salivary glands act in the mouth, and pancreatic enzymes act in the small intestine. Endocytosis of large particles is called phagocytosis; in our bodies, various types of white blood cells ingest foreign particles and bacteria by phagocytosis. Endocytosis of small particles is called pinocytosis; an example of pinocytosis is the absorption of small nutrient particles into the small intestine. Exocytosis and endocytosis operations were considered in terms of process algebra by Cardelli [4], with careful biological motivation and formulation, while in terms of membrane computing, by Cardelli and Paun [5].
Fig. 1. Receptor-Mediated Endocytosis [16]
In receptor-mediated endocytosis, specific reactions at the cell surface trigger the uptake of specific molecules [16]. We present this process by an example. In such an endocytosis, a cell takes in a particle of low-density lipoprotein (LDL)
Turing Completeness Using Three Mobile Membranes
45
from the outside. To do this, the cell uses receptors that specifically recognize and bind to the LDL particle. An LDL particle contains one thousand or more cholesterol molecules at its core. A monolayer of phospholipid surrounds the cholesterol and it is embedded with proteins called apo-B. This apo-B proteins are specifically recognized by receptors in the cell membrane. The receptors in the coated pit bind to the apo-B proteins on the LDL particle. The pit is re-enforced by a lattice like network of proteins called clathrin. Additional clathrin molecules then add to the lattice which eventually pinches off apart from the membranes.
Fig. 2. SNARE-Mediated Exocytosis
SNARE-mediated exocytosis is the movement of materials out of a cell via vesicles [1]. SNARES (Soluble NSF Attachment Protein Receptor)) located on the vesicles (v-SNARES) and on the target membranes (t-SNARES) interact to form a stable complex that holds the vesicle very close to the target membrane. Endocytosis and exocytosis are modelled by systems of mobile membranes [10]. Based on the previous examples (Figure 1 and Figure 2) where the endocytosis is triggered by the “agreement” between specific receptors and LDL particles and exocytosis by the agreement of SNARES, we introduce and study a new model of mutual mobile membrane systems. In mutual mobile membrane systems, any movement takes place only if the involved membranes agree on the movement, and this agreement is described by means of objects a and coobjects a present in the membranes involved in such a movement. An object a marks the active part of the movement, and an object a marks the passive part. The motivation for introducing the mutual mobile membrane systems comes both from biology (e.g., receptor-mediated endocytosis), and from theoretical computer science, namely for defining powerful and elegant models. For an alphabet V = {a1 , . . . , an }, we denote by V ∗ the set of all strings over V ; λ denotes the empty string and V + = V ∗ \{λ}. A multiset over V is represented by a string over V (together with all its permutations), and each string precisely identifies a multiset.
46
B. Aman and G. Ciobanu
The mutual mobile membrane systems represent a variant of mobile membrane systems in which the endocytosis and exocytosis work whenever the involved membranes “agree” on the movement. This agreement is described by using dual objects a and a in the involved membranes, with a = a. The duality relation is distributive over a multiset, namely u = a1 . . . an for u = a1 . . . an . Definition 1. A mutual mobile membrane system is a construct = (V, H, μ, w1 , . . . , wn , R, iO ), where: n ≥ 1 represents the number of membranes; V is an alphabet (its elements are called objects); H is a finite set of labels for membranes; iO is the output membrane; μ ⊂ H × H describes the membrane structure, such that (i, j) ∈ μ denotes that the membrane labelled by j is contained in the membrane labelled by i; we distinguish the external membrane (usually called the “skin” membrane) and several internal membranes; a membrane without any other membrane inside it is said to be elementary; 6. w1 , . . . , wn ∈ V ∗ are multisets of objects placed in the n regions of μ; 7. R is a finite set of developmental rules of the following forms: 1. 2. 3. 4. 5.
mutual endocytosis
(a) [uv]h [uv ]m → [ [w]h w ]m for h, m ∈ H, u, u ∈ V , v, v , w, w∈ V ∗ ; An elementary membrane labelled h enters the adjacent membrane labelled m under the control of the multisets of objects uv and uv . The labels h and m remain unchanged during this process; however the multisets of objects uv and uv are replaced with the multisets of objects w and w , respectively. mutual exocytosis +
(b) [uv [uv]h ]m → [w]h [w ]m for h, m ∈ H, u, u ∈ V + , v, v , w, w∈ V ∗ ; An elementary membrane labelled h exits a membrane labelled m, under the control of the multisets of objects uv and uv . The labels of the two membranes remain unchanged, but the multisets of objects uv and uv are replaced with the multisets of objects w and w , respectively. The rules are applied according to the following principles: 1. All rules are applied in parallel, non-deterministically choosing the rules, the membranes, and the objects, but in such a way that the parallelism is maximal; this means that in each step we apply a set of rules such that no further rule can be added to the set. 2. The membrane m from the rules of type (a) − (b) is said to be passive (identified by the use of u), while the membrane h is said to be active (identified by the use of u). In any step of a computation, any object and any active membrane can be involved in at most one rule, while passive membranes are not considered involved in the use of the rules (hence they can be used by several rules at the same time as passive membranes).
Turing Completeness Using Three Mobile Membranes
47
3. When a membrane is moved across another membrane, by endocytosis or exocytosis, its whole contents (its objects) are moved. 4. If a membrane exits the system (by exocytosis), then its evolution stops. 5. All objects and membranes which do not evolve at a given step (for a given choice of rules which is maximal) are passed unchanged to the next configuration of the system. By using the rules in this way, we get transitions among the configurations of the system. A sequence of transitions is a computation, and a computation is successful if, starting from the initial configuration, it halts (it reaches a configuration where no rule can be applied). The multiplicity vector of the multiset from a special membrane called output membrane is considered as a result of the computation. Thus, the result of a halting computation consists of all the vectors describing the multiplicity of objects from the output membrane; a nonhalting computation provides no output. The set of vectors of natural numbers produced in this way by a system Π is denoted by P s(Π). A computation can produce several vectors, all of them considered in the set P s(Π). Hence a computation is structured as follows: it starts with an initial configuration of the system (the initial membrane structure and the initial distribution of objects within regions), then the computation proceeds, and when it stops the result is to be found in a specific output membrane. Using the rules of mutual mobile membrane systems we can describe the biological example presented above as follows. First we encode all the components of the biological system into a mutual mobile membrane system. This can be realized by associating a membrane to each component, and objects to the parts of molecules. For the step presented in Figure 1 we use the following encodings: – LDL particle - [cholesterol . . . cholesterol apoB . . . apoB]LDL An LDL particle contains one thousand or more cholesterol molecules and some apo-B proteins. – cell membrane - [receptor . . . receptor clarithin . . . clarithin]cell The cell contains receptors which are able to recognize apo-B proteins and also some proteins clathrin which enforce the pit containing the receptors. Using the above described membranes, and the equality apoB = receptor, the system is represented as [cholesterol . . . cholesterol apoB . . . apoB]LDL [apoB . . . apoB clarithin . . . clarithin]cell , and its evolution by using a rule of type (a): [apoB . . .]LDL [apoB . . .]cell → [ [apoB . . .]LDL apoB . . .]cell where apoB marks the active membrane, and apoB the passive one.
3
Computational Power
Several notions and notations from the field of formal languages that are used here can be found in [6] and [14].
48
B. Aman and G. Ciobanu
For an alphabet V = {a1 , . . . , an }, we denote by V ∗ the set of all strings over V ; λ denotes the empty string. V ∗ is a monoid with λ as its unit element. For a string x ∈ V ∗ , |x|a denotes the number of occurrences of symbol a in x. A multiset over V is represented by a string over V (together with all its permutations), and each string precisely identifies a multiset. For an alphabet V , the Parikh vector is ψV : V ∗ → Nn with ψV (x) = (|x|a1 , . . . , |x|an ), for all x ∈ V ∗ . For a language L, the Parikh vector is ψV (L) = {ψV (x) | x ∈ L}, while for a family F L of languages, it is P sF L = {ψV (L) | L ∈ F L}. A matrix grammars with appearance checking is a construct G = (N , T , S, M , F ) where N , T are disjoint alphabets of non-terminals and terminals, S ∈ N is the axiom, M is a finite set of matrices of the form (A1 → x1 , . . . , An → xn ) of context-free rules, and F is a set of occurrences of rules in M . For w, z ∈ (N ∪T )∗ , we write w ⇒m z if there is a matrix m = (A1 → x1 , . . . , An → xn ) in M and the strings wi ∈ (N ∪ T )∗ , 1 ≤ i ≤ n + 1, such that w = w1 , z = wn+1 , and for all i, 1 ≤ i ≤ n, either (1) wi = wi Ai wi , wi+1 = wi xi wi , for some wi , wi ∈ (N ∪ T )∗ , or (2) wi = wi+1 , Ai does not appear in wi , and the rule Ai → xi appears in F. The language generated by G is L(G) = {x ∈ T ∗ | S ⇒∗ x}. A matrix grammar in the strong binary normal form is a construct G = (N , T , S, M , F ), where N = N1 ∪ N2 ∪ {S, #}, with these three sets mutually disjoint, two distinguished symbols B (1) , B (2) ∈ N2 , and the matrices in M of one of the following forms: (1) (2) (3) (4)
(S → XA), with X ∈ N1 , A ∈ N2 ; (X → Y, A → x), with X, Y ∈ N1 , A ∈ N2 , x ∈ (N2 ∪ T )∗ , |x| ≤ 2; (X → Y, B (j) → #), with X, Y ∈ N1 , j = 1, 2; (X → λ, A → x), with X ∈ N1 , A ∈ N2 , x ∈ T ∗ , |x| ≤ 2.
If we ignore the empty string when comparing languages, then the rules of type (4) are of the form (X → a, A → x), with X ∈ N1 , a ∈ T , A ∈ N2 , x ∈ T ∗ . The family of all sets P s(Π) generated by systems of n mobile membranes using mutual endocytosis rule mendo and mutual exocytosis rule mexo is denoted by P sM Mn (mendo, mexo). We denote by P sRE the family of Turing computable sets of vectors generated by arbitrary grammars. We prove that it is enough to consider only systems with three mobile membranes together with the operations of mutual endocytosis and mutual exocytosis to get the full computational power of a Turing machine. The proof is done in a similar manner with the proof for the computational universality of the enhanced mobile membranes [9]. Theorem 1. P sM M3 (mendo, mexo) = P sRE. Proof. It is proved in [7] that each recursively enumerable language can be generated by a matrix grammar in the strong binary normal form. We consider a matrix grammar G = (N, T, S, M, F ) in the strong binary normal form, having n1 matrices m1 , . . . , mn1 of types 2 and 4, and n2 matrices of type 3 labelled by mi , n1 + 1 ≤ i ≤ n1 + n2 with i ∈ labj , for j ∈ {1, 2}, such that lab1 , lab2 , and lab0 = {1, 2, . . . , n1 } are mutually disjoint sets. The initial matrix is m0 : (S → XA).
Turing Completeness Using Three Mobile Membranes
49
We construct a system Π = (V, H, μ, w1 , w2 , w3 , R, 2) with three mutual mobile membranes, where V = N ∪ T ∪ {X0i , A0i | X ∈ N1 , A ∈ N2 , 1 ≤ i ≤ n1 } ∪ {α, α, β, β} (j) ∪{Xji , Aji | 0 ≤ i, j ≤ n1 } ∪ {Xi , Yj | X ∈ N1 , j ∈ {1, 2}, 1 ≤ i ≤ n2 } H = {1, 2, 3} μ = [[ ]2 [ ]3 ]1 w1 = ∅ w2 = α αj ββj XA w3 = ααj β β j , j = 1, 2, where (S → XA) is the initial matrix and the set R constructed as follows: (i) For each (nonterminal) matrix mi : (X → Y, A → x), X, Y ∈ N1 , A ∈ N2 , x ∈ (N2 ∪ T )∗ , with 1 ≤ i ≤ n1 , we consider the rules: 1. [Xβ]2 [β]3 → [[Xii β]2 β]3 (mendo) [[Aβ]2 β]3 → [Ajj β]2 [β]3 (mexo) 2. [Xki β]2 [β]3 → [[Xk−1i β]2 β]3 , k > 0 (mendo) [[Akj β]2 ]β]3 → [Ak−1j β]2 [β]3 , k > 0 (mexo) 3. [X0i A0j β]2 [β]3 → [[X0i A0j β]2 β]3 (mendo) [[X0i A0j β]2 β]3 → [Y xβ]2 [β]3 (mexo) 4. [[Xki A0j β]2 β]3 → [#β]2 [β]3 , k > 0 (mexo) 5. [X0i Akj β]2 [β]3 → [[#β]2 β]3 , k > 0 (mendo) By rule 1, membrane 2 enters membrane 3, replacing X ∈ N1 with Xii . A symbol A ∈ N2 is replaced with Ajj , and membrane 2 comes out of membrane 3. The subscripts represent the matrices mi (mj ), 1 ≤ i, j ≤ n1 corresponding to which X, A have a rule. Next, rule 2 is used until Xii and Ajj become X0i and A0j , respectively. If i = j, then we have X0i and A0j simultaneously in membrane 2. Then rule 3 is used, by which membrane 2 enters membrane 3 replacing X0i and A0j with X0i and A0j , while X0i and A0j are replaced with Y and x when membrane 2 exits membrane 3. If i > j, then we obtain A0j before X0i . In this case, we have a configuration where membrane 2 is inside membrane 3 containing A0j . Rule 2 cannot be used now, and the only possibility is to use rule 4, replacing Xki and A0j with #, which leads to an infinite computation (due rule 12). If j > i, then we obtain X0i before A0j . In this case, we reach a configuration with X0i Akj , k > 0 in membrane 2, and membrane 2 is in the skin membrane. Rule 2 cannot be used now, and the only possibility is to use rule 5, replacing X0i and Akj with #, which leads to an infinite computation. In this way, we correctly simulate a type-2 matrix whenever i = j. (ii) For each matrix mi : (X → Y, B (j) → #), X, Y ∈ N1 , B (j) ∈ N2 , where n1 + 1 ≤ i ≤ n1 + n2 , i ∈ labj , j = 1, 2, we consider the rules: (j)
6. [Xβj ]2 [β j ]3 → [[Xi βj ]2 β j ]3 (mendo) (j)
(j)
[[Xi βj ]2 β j ]3 → [Xi βj ]2 [β j ]3 (mexo) 7. [B (j) βj ]2 [β j ]3 → [[#βj ]2 β j ]3 (mexo) (j)
8. [Xi βj ]2 [β j ]3 → [[Yj βj ]2 β j ]3 (medo) 9. [[Yj βj ]2 β j ]3 → [Y βj ]2 [β j ]3 (mexo) (j)
Membrane 2 enters membrane 3 by rule 6, and creates an object Xi depending whether it has the symbol B (j) , j = 1, 2 associated with it, and
50
B. Aman and G. Ciobanu
then exits with the newly created object. Next, by rule 7, membrane 2 enters membrane 3 if the object B (j) is present, replacing it with #. If this rule is applied, membrane 2 exits membrane 3 by applying rule 12. Regardless (j) the existence of object B (j) , membrane 2 enters membrane 3 replacing Xi with Yj . Membrane 2 exits membrane 3, replacing Yj with Y , successfully simulating a matrix of type 3. (iii) For a terminal matrix mi : (X → λ, A → x), X ∈ N1 , A ∈ N2 , x ∈ T ∗ , where 1 ≤ i ≤ n1 . We begin with rules 1-5 as before and simulate the matrix (X → Z, A → x) in place of mi , where Z is a new symbol. 10. [α]3 [Zα]2 11. [Aα[α]3 ]2 12. [#β]2 [β]3 [[#β]2 β]3
→ [λα[α]3 ]2 (mendo) → [α]3 [#α] (mexo) → [[#β]2 β]3 (mendo) → [#β]2 [β]3 (mexo)
Now we use rule 10 to erase the symbol Z while membrane 3 enters membrane 2. This is followed by rule 11 if there are any more symbols A ∈ N2 remaining, in which case they are replaced with the trap symbol #. An infinite computation is obtained if the symbol # is present in membrane 2. It is clear that if the computation proceeds correctly, then membrane 2 contains a multiset of terminal symbols x ∈ T ∗ . In this way we can conclude that P s(Π) is in P sRE. It is worth noting that three is the smallest number of membranes making sense of the movements given by endocytosis and exocytosis inside a skin membrane. Minsky introduced the concept of register machines in [11] by showing that the power of Turing machines can be achieved by such abstract machines using a finite number of registers for storing arbitrarily large non-negative integers. A register machine runs a program consisting of labelled instructions which encode simple operations for updating the content of the register. Definition 2. An n-register machine is a construct M = (n, B, l0 , lh , I), where: – n is the number of registers; B is a set of labels; l0 and lh are the labels of the initial and halting instructions; – I is a set of labelled instructions of the form li : (op(r), lj , lk ), where op(r) is an operation on register r of M , and li , lj , lk are labels from the set B. – the machine is capable of the following instructions: 1. li : (ADD(r), lj , lk ): Add one to the content of register r and proceed, in a non-deterministic way, to instruction with label lj or to instruction with label lk ; in the deterministic variant, lj = lk and then the instruction is written in the form li : (ADD(r), lj ). 2. li : (SU B(r), lj , lk ): If register r is not empty, then subtract one from its contents and go to instruction with label lj , otherwise proceed to instruction with label lk . 3. lh : halt: This instruction stops the machine and can only be assigned to the final label lh .
Turing Completeness Using Three Mobile Membranes
51
Theorem 2 ([15]). A 3-register machine can compute any partial recursive function of one variable. It starts with the arguments in a counter, and (if it halts) leaves the answer in a counter. Considering the number of objects and reduction to a register machine, we prove that the family NRE of all sets of natural numbers generated by arbitrary grammars is the same as the family NM M3 (mendo, mexo) of all sets of natural numbers generated by systems with three mobile membranes using mendo and mexo rules. This is calculated by looking at the cardinality of the objects in a specified output membrane of the mutual mobile membrane systems at the end of a halting configuration. Theorem 3. NM M3 (mendo, mexo) = NRE. Proof. We only prove the assertion NRE ⊆ NM M3 (mendo, mexo), and infer the other inclusion from the Church-Turing thesis. The proof is based on the observation that each set from NRE is the range of a recursive function. Thus, we prove that for each recursive enumerable function f : N → N, there is a mutual mobile membrane systems Π with three membranes satisfying the following condition: for any arbitrary x ∈ N, the system first “generates” a multiset of the form ox1 and halts if and only if f (x) is defined, and, if so, the result is f (x). In order to prove the assertion, we consider a register machine with three registers, the last one being a special output register which is never decremented. Let there be a program P consisting of h instructions P1 , . . . , Ph which computes f . Let Ph correspond to the instruction HALT and P1 be the first instruction. The input value x is expected to be in register 1 and the output value in register 3. Without loss of generality, we can assume that all registers other that the first one are empty at the beginning of the computation, and in the halting configuration all registers except the third one are empty. We construct a mutual mobile membrane Π = (V, H, μ, w0 , wI , wop , R, I): V = {s} ∪ {or | 1 ≤ r ≤ 3} ∪ {Pk , Pk | 1 ≤ k ≤ h} ∪ {β, β, γ, γ} ∪{βr | 1 ≤ r ≤ 2} H = {0, I, op} μ = [[ ]I [ ]op ]0 wI = sβγ w0 = ∅ wop = β γ (i) Generation of the initial contents x of register 1: 1. [sβ]I [β]op → [[sβ]I β]op (mendo) [[sβ]I β]op → [so1 β]I [β]op (mexo) 2. [[sβ]I β]op → [P1 β]I [β]op (mexo) The rule 1 can be used for any number of times, generating a number x (ox1 ) as the initial content of register 1. Rule 2 replaces s with the initial instruction P1 , and we are ready for the simulation of the register machine. (ii) Simulation of an add rule Pi = (ADD(r), j), 1 ≤ r ≤ 3, 1 ≤ i < h, 1 ≤ j ≤ h 3. [Pi β]I [β]op → [[Pi β]I β]op (mendo) 4. [[Pi β]I β]op → [Pj or β]I [β]op (mexo) Membrane I enters membrane op using rule 3, and then exits it by replacing Pi with Pj or (rule 4), thus simulating an add instruction.
52
B. Aman and G. Ciobanu
(iii) Simulation of a subtract rule Pi = (SU B(r), j, k), 1 ≤ r ≤ 3, 1 ≤ i < h, 1 ≤ j, k ≤ h 5. [[Pi β]I β]op → [Pj βr β]I [β]op (mexo) 6. [or βr β]I [β]op → [[β]I β]op (mendo), otherwise [Pj βr β]I [β]op → [[Pk β]I β]op (mendo) 7. [[Pj β]I β]op → [Pj β]I [β]op (mexo) [[Pk β]I β]op → [Pk β]I [β]op (mexo) To simulate a subtract instruction, we start with rule 3, with membrane I entering membrane op. Then rule 5 is used, by which Pi is replaced with Pj βr , and membrane I exit membrane op. The newly created object βr denotes the register which has to be decreased. If there is an or in membrane I, then by rule 6 the object or is erased together with βr , and membrane I enters membrane op. This is followed by rule 7, where Pj is replaced with Pj and membrane I is back inside the skin membrane. If there are no or ’s in membrane I, then by applying rule 6, Pj together with βr are replaced by Pk . This is followed by rule 7, where Pk is replaced with Pk and membrane I is inside the skin membrane, thus simulating a subtract instruction. (iv) Halting: 8. [γ]op [Ph γ]I → [[γ]op γ]I (mendo) To halt the computation, the halt instruction Ph must be obtained. Once we obtain Ph in membrane I, membrane op enters membrane I and the computation stops (rule 8). When system halts, membrane I contains only o3 ’s, the content of register 3. This result reveals a different technique in proving the computational power of a system with three mutual mobile membranes. There are many families of languages included in RE. Even Theorem 1 is valid for all of them, these families can have particular sets of rules simulating them. We exemplify this aspect by an effective construction of a system with three mutual membranes able to simulate an ET0L system in the normal form. An E0L system is a construct G = (V, T, ω, R) where V is the alphabet, T ⊆ V is the terminal alphabet, ω ∈ V ∗ is the axiom, and R is a finite set of rules of the form a → v with a ∈ V and v ∈ V ∗ such that for each a ∈ V there is at least one rule a → v in R. For w1 , w2 ∈ V ∗ , we say that w1 ⇒ w2 if w1 = a1 . . . an , w2 = v1 . . . vn for ai → vi ∈ R, 1 ≤ i ≤ n. The generated language is L(G) = {x ∈ T ∗ | ω ⇒∗ x}. An ET0L systems is a construct G = (V, T, ω, R1 , . . . Rn ) such that each (V, T, ω, Ri ) is an E0L system; each Ri is called a table, 1 ≤ i ≤ n. The generated language is defined as L(G) = {x ∈ T ∗ | ω ⇒Rj1 . . . ⇒Rjm wm = x}, where m ≥ 0, 1 ≤ ji ≤ n, 1 ≤ i ≤ m. We denote by P sET 0L the families of languages generated by extended tabled 0L grammars. In order to get the power of an ET0L system by using the operations of mutual endocytosis and mutual exocytosis, we need only three membranes. Proposition 1. P sET 0L ⊂ P sM M3 (mendo, mexo).
Turing Completeness Using Three Mobile Membranes
53
Proof. In what follows, we use the following normal form: each language L ∈ ET 0L can be generated by G = (V, T, ω, R1 , R2 ). Moreover, from [13], any derivation starts by several steps of R1 , then R2 is used exactly once, and the process is iterated; the derivation ends by using R2 . Let G = (V, T, ω, R1 , R2 ) be an ET0L system in the normal form. We construct the mutual mobile membrane system Π = (V , H, μ, w0 , w1 , w2 , R, 0) as follows: V = {†, α, α, β, β} ∪ {βi , β i | i = 1, 2} ∪ V ∪ Vi , where Vi = {ai | a ∈ V }, i = 1, 2 H = {0, 1, 2} μ = [[ ]0 [ ]1 ]2 w0 = ωαβ1 β w1 = αββ i Simulation of table Ri , i = 1, 2 [βi ]0 [βi ]1 → [[βi ]0 β i ]1 (mendo) [[aβi ]0 β i ]1 → [wi βi ]0 [β i ]1 , if a → w ∈ Ri (mexo) [β]1 [aβ]0 → [[β]1 †β]0 (mendo) [[ai βi ]0 β i ]1 → [aβi ]0 [β i ]1 (mexo) [β]1 [ai β]0 → [[β]1 †β]0 (mendo) [[β1 α]0 α]1 → [βi α]0 [α]1 (mexo) [[β2 α]0 α]1 → [β1 α]0 [α]1 (mexo) [[β2 α]0 α]1 → [α]0 [α]1 (mexo) 7. [[β]1 †β]0 → [β]1 [†β]0 (mexo) [β]1 [†β]0 → [[β]1 †β]0 (mendo)
1. 2. 3. 4. 5. 6.
In the initial configuration the string β1 ω is in membrane 0, where ω is the axiom, and β1 indicates that table 1 should be simulated first. The simulation begins with rule 1: membrane 0 enters membrane 1. In membrane 1, the only applicable rule is 2, by which the symbols a ∈ V are replaced by w1 corresponding to the rule a → w ∈ R1 . Rules 1 and 2 can be repeated until all the symbols a ∈ V are replaced according to a rule in R1 , thus obtaining only objects from the alphabet V1 . In order to keep track of which table Ri of rules is simulated, each rule of the form a → w ∈ Ri is rewritten as a → wi . If any symbol a ∈ V is still present in membrane 0, i.e., if some symbol a ∈ V has been left out from the simulation, membrane 1 enters membrane 0, replacing it with the trap symbol † (rule 3), and this triggers a never ending conputation (rule 7). Otherwise, rules 1 and 4 are applied as long as required until all the symbols of V1 are replaced with the corresponding symbols of V . Next, if any symbol a1 ∈ V1 has not been replaced, membrane 1 enters membrane 0 and the computation stops, replacing it with the trap symbol † (rule 5), and this triggers a never ending conputation (rule 7). Otherwise, we have three possible evolutions (rule 6): (i) if β1 is in membrane 0, then it is replaced by βi , and the computation continues with the simulation of table i; (ii) if β2 is in membrane 0, then it is replaced by β1 , and the computation continues with the simulation of table 1;
54
B. Aman and G. Ciobanu
(iii) if β2 is in membrane 0, then is deleted, and the computation stops. It is clear that P s(Π) contains only the vectors in P sRE.
4
Conclusions
In this paper we have studied the computational power of mutual mobile membrane systems, a variant of mobile membrane systems motivated by a biological example. The operations governing the mobility of mutual mobile membrane systems are mutual endocytosis and mutual exocytosis. Systems of three mobile membranes get the same computational power as Turing machine, and two different results using different proof techniques are presented. It is also described a system with three mutual membranes able to simulate an ET0L system (P sET 0L ⊂ P sM M3 (mendo, mexo)). In all these results the number of membranes is minimal in terms of mobility (we have a skin membrane and two inner membranes able to move according to the endocytosis and exocytosis rules).
Acknowledgements Many thanks to the referees for their helpful remarks and comments. This work was partially supported by research grants CNCSIS IDEI 402/2007 and CNCSIS TD 345/2008.
References 1. Alberts, B., Johnson, A., Lewis, J., Raff, M., Roberts, K., Walter, P.: Molecular Biology of the Cell, 5th edn. Garland Science. Taylor & Francis, Abington (2008) 2. Aman, B., Ciobanu, G.: Describing the Immune System Using Enhanced Mobile Membranes. Electronic Notes in Theoretical Computer Science 194, 5–18 (2008) 3. Aman, B., Ciobanu, G.: Simple, Enhanced and Mutual Mobile Membranes. In: Transactions on Computational Systems Biology. Springer, Heidelberg (to appear, 2009) 4. Cardelli, L.: Brane Calculi - Interactions of Biological Membranes. In: Danos, V., Schachter, V. (eds.) CMSB 2004. LNCS (LNBI), vol. 3082, pp. 257–278. Springer, Heidelberg (2005) 5. Cardelli, L., P˘ aun, G.: An Universality Result for a (Mem)Brane Calculus Based on Mate/Drip Operations. International Journal of Foundations of Computer Science 17, 49–68 (2006) 6. Dassow, J., P˘ aun, G.: Regulated Rewriting in Formal Language Theory. Springer, Heidelberg (1990) 7. Freund, R., P˘ aun, G.: On the Number of Non-terminals in Graph-Controlled, Programmed, and Matrix Grammars. In: Margenstern, M., Rogozhin, Y. (eds.) MCU 2001. LNCS, vol. 2055, pp. 214–225. Springer, Heidelberg (2001) 8. Krishna, S.N.: The Power of Mobility: Four Membranes Suffice. In: Cooper, S.B., L¨ owe, B., Torenvliet, L. (eds.) CiE 2005. LNCS, vol. 3526, pp. 242–251. Springer, Heidelberg (2005)
Turing Completeness Using Three Mobile Membranes
55
9. Krishna, S.N., Ciobanu, G.: On the Computational Power of Enhanced Mobile Membranes. In: Beckmann, A., Dimitracopoulos, C., L¨ owe, B. (eds.) CiE 2008. LNCS, vol. 5028, pp. 326–335. Springer, Heidelberg (2008) 10. Krishna, S.N., P˘ aun, G.: P Systems with Mobile Membranes. Natural Computing 4, 255–274 (2005) 11. Minsky, M.: Finite and Infinite Machines. Prentice Hall, Englewood Cliffs (1967) 12. P˘ aun, G.: Membrane Computing. An Introduction. Springer, Heidelberg (2002) 13. Rozenberg, G., Salomaa, A.: The Mathematical Theory of L Systems. Academic Press, London (1980) 14. Salomaa, A.: Formal Languages. Academic Press, London (1973) 15. Schroeppel, R.: A Two Counter Machine Cannot Calculate 2N . Massachusetts Institute of Technology, A.I. Laboratory, Artificial Intelligence Memo #257 (1972) 16. Webpage, http://bcs.whfreeman.com/thelifewire
Resource-Competing Oscillator Network as a Model of Amoeba-Based Neurocomputer Masashi Aono1 , Yoshito Hirata2 , Masahiko Hara1 , and Kazuyuki Aihara2,3 1
Flucto-Order Functions Asian Collaboration Team, Advanced Science Institute, RIKEN, Wako, Saitama 351-0198, Japan 2 Institute of Industrial Science, The University of Tokyo, Meguro-ku, Tokyo 153-8505, Japan 3 ERATO Aihara Complexity Modelling Project, JST, Shibuya-ku, Tokyo 151-0064, Japan
[email protected]
Abstract. An amoeboid organism, Physarum, exhibits rich spatiotemporal oscillatory behavior and various computational capabilities. Previously, the authors created a recurrent neurocomputer incorporating the amoeba as a computing substrate to solve optimization problems. In this paper, considering the amoeba to be a network of oscillators coupled such that they compete for constant amounts of resources, we present a model of the amoeba-based neurocomputer. The model generates a number of oscillation modes and produces not only simple behavior to stabilize a single mode but also complex behavior to spontaneously switch among different modes, which reproduces well the experimentally observed behavior of the amoeba. To explore the significance of the complex behavior, we set a test problem used to compare computational performances of the oscillation modes. The problem is a kind of optimization problem of how to allocate a limited amount of resource to oscillators such that conflicts among them can be minimized. We show that the complex behavior enables to attain a wider variety of solutions to the problem and produces better performances compared with the simple behavior. Keywords: Physarum, Amoeba-based Computing, Resource Allocation.
1
Introduction
A single-celled amoeboid organism, the true slime mold Physarum polycephalum (Fig. 1A), has been studied actively in recent years to explore and exploit its notable computational capabilities. Nakagaki and co-workers showed that the amoeba is capable of searching for optimal paths between foods [1,2,3] and anticipating periodic events [4]. In the amoeba’s body, a constant amount of intracellular protoplasmic sol flows through tubular channels in a shuttle-wise manner, as its extracellular gel layer like a sponge (ectoplasm) oscillates the contraction tension rhythmically to squeeze and absorb the sol (Fig. 1B). To observe the dependences of the amoeba’s spatiotemporal oscillation modes on geometric constraints, Takamatsu C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 56–69, 2009. c Springer-Verlag Berlin Heidelberg 2009
Resource-Competing Oscillator Network
57
Fig. 1. (A) An individual Physarum amoeba in an Au-coated plastic chamber on an agar plate (scale bar = 7 mm). The amoeba acts only inside the chamber due to its aversion to Au. In the absence of light stimulation, the spherically shaped amoeba (top) flattened to elongate its three branches (bottom) by keeping its total volume almost constant. (B) The amoeba’s body architecture. (C) Schematic diagram of the model in which the volumes of the amoeba’s branches (nodes) are stationary. (D) Schematic diagram of the model that takes into account the growth/degeneration of the branches. Due to inhibitory feedback, branch 2 is stressed by light s2 1 (dotted rectangle) as branches 1 and 3 grow beyond the critical level Lθ (broken lines).
and co-workers placed the amoeba in a chamber patterned as a ring network with several nodes [5,6]. The amoeba’s body part in each node is regarded as an oscillator because its vertical thickness oscillates. In a two-oscillator chamber, the amoeba showed antiphase synchronization. Circularly coupled three oscillators exhibited rotation modes, partial in-phase and partial antiphase synchronization modes. Interestingly, after maintaining each of these modes for several periods, the amoeba spontaneously switched among different modes even though no external perturbation was applied [7]. The amoeba shows a photoavoidance response to degenerate its branches when illuminated by light. Introducing optical feedback applied according to a recurrent neural network model, Aono and co-workers created a neurocomputer employing the amoeba as a solution searcher of optimization problems [8,9,10,11]. In previous works [12,13], the amoeba’s branches were induced to grow or degenerate in a network-patterned chamber in search of an optimal solution to the Traveling Salesman Problem (TSP). It was shown that the system was capable of reaching the optimal solution of the four-city TSP with a high probability. In the solution-searching processes, the amoeba showed various oscillation modes and spontaneous switching among them. Depending on the oscillation modes, the performances in finding the solution seemed to vary. This dependence, however, could not be verified experimentally because it is hard to control the amoeba’s oscillation mode. Thus, we create a model that produces different oscillation modes by changing parameters. Setting a problem derived from TSP, we explore the relationships between the oscillation modes and performances.
58
2 2.1
M. Aono et al.
Models Resource-Competing Oscillator Network
We model the amoeba as a network of oscillators coupled such that the sums of their variables are kept constant while resources are exchanged competitively. Consider a graph G(Q, E) with a set of nodes Q and a set of edges E, where Q contains M nodes. Let vq (t) ∈ R and xq (t) ∈ R be a volume of node q and its rate of change, respectively. That is, v˙q = xq .
(1)
We define the dynamics of xq in accordance with Kirchhoff’s current law. Namely, the increment of xq is supplied as the sum of resources flown from its coupled nodes: x˙q = Ip,q , (2) p∈Pq
where Ip,q is a current of resource flowing from node p to q, and Pq is a set of all nodes connected to node q. Owing to the in currents Ip,q = −Iq,p , symmetry the sum of all increments for x vanishes: q∈Q x˙q = (p,q)∈E Ip,q + Iq,p = 0. This property set the initial states xq (0) keeps q∈Q xq constant. Thus, if we such that q∈Q xq (0) = 0, the sum of the volumes q∈Q vq is conserved. This corresponds to a condition that a constant amount of protoplasmic sol flowing inside the amoeba is shared by a number of branches. Each node q has its own intranode dynamics defined as the following twovariable oscillator to generate a regular rotation on a x-y plane R × R: x˙∗q = f (rq xq − yq − xq (x2q + yq2 )),
(3)
y˙q∗ = f (xq + rq yq − yq (x2q + yq2 )),
(4)
√ where f adjusts a frequency, and rq sets an amplitude (radius) to be rq . This oscillator produces stable limit-cycle and was taken from a standard form of super-critical Hopf bifurcation [14]. The variables x and y might be considered as representing the concentrations of activator and inhibitor in a reduced model of the amoeba’s intracellular biochemical oscillation, respectively. However, this oscillator would be insufficient to give a physiologically valid model. We chose the oscillator just because it simply produces a pure rotation that allows us to concentrate on complex behavior generated by coupling the simple dynamics. To determine currents Ip,q in Eq. (2), each node q requires that the actual volume change x˙q becomes closer to the expected demand x˙∗q of the intranode dynamics Eq. (3). Additionally, currents Ip,q are required to flow from smallerincremented to larger-incremented nodes to represent the competitive internode relationships in the amoeba (Fig. 1B). That is, the protoplasmic sol flows from a contracting (squeezing) site to a relaxing (absorbing) site of the sponge-like gel layer so that the pressure difference between the two sites is widened further. To
Resource-Competing Oscillator Network
59
balance these intranode and internode requirements, currents Ip,q are determined to minimize the following object function HI : 2 2 HI = λ (x˙∗q − Ip,q ) + (1 − λ) (Wp,q (x˙∗q − x˙∗p ) − Ip,q ) , (5) q∈Q
p∈Pq
(p,q)∈E
where λ ∈ (0.0, 1.0) is a control parameter, and Wp,q is the coupling strength 1 between nodes p and q. When minimizing the first and second terms, the intranode and internode requirements are met maximally, respectively. The dynamics and object function of the variable yq are given as well as xq : y˙q = Jp,q , (6) p∈Pq
HJ = λ
q∈Q
(y˙q∗ − gq −
2
Jp,q ) + (1 − λ)
p∈Pq
2 (Wp,q (y˙q∗ − y˙p∗ ) − Jp,q ) , (7)
(p,q)∈E
where Jp,q is also a current of resource, and gq (t) ∈ R is a variable to regulate the growth of the volume vq , which will be explained later. In this paper, we consider a four-node star network shown in Fig. 1C, where Q = {0, 1, 2, 3}, E = {(0, 1), (0, 2), (0, 3)}, λ = 0.2, and all coupling strengths are uniformly set as Wp,q = 1. Because the object functions HI and HJ are quadratic, unique solutions for optimal currents Ip,q and Jp,q can be obtained ∂HI ∂HI analytically. Indeed, simultaneously solving equations ∂I = 0, ∂I = 0, and 0,1 0,2 ∂HI ∂I0,3
= 0, we get the optimal currents I0,1 , I0,2 , and I0,3 as follows: 1 I0,1/2/3 = 1+3λ W0,1/2/3 (x˙∗ 1/2/3 − x˙∗0 ) −λ2 −2x˙∗ 1/2/3 + x˙∗ 2/1/2 + x˙∗ 3/3/1 − 2W0,1/2/3 (x˙∗ 1/2/3− x˙∗0 ) ˙∗ ˙∗ W0,3/3/1 (x˙∗ 3/3/1 − x˙∗0 ) − W0,2/1/2 (x 2/1/2 − x0 ) − ∗ ∗ +λ (1 + W0,1/2/3 )(x˙ 1/2/3 − x˙0) − W0,2/1/2 (x˙∗ 2/1/2 − x˙∗0 ) − W0,3/3/1 (x˙∗ 3/3/1 − x˙∗ ) ,
(8)
0
where the subscript expression “1/2/3” indicates that three equations are collectively written. Similarly, we obtain the optimal currents J0,1 , J0,2 , and J0,3 : 1 J0,1/2/3 = 1+3λ W0,1/2/3 (y˙∗ 1/2/3 − y˙0∗ ) −λ2 −2g1/2/3 + g2/1/2 + g3/3/1 + 2y˙∗ 1/2/3 − y˙∗ 2/1/2 − y˙∗ 3/3/1 − 2W0,1/2/3 (y˙∗ 1/2/3 − y˙0∗ ) + W0,2/1/2 (y˙∗ 2/1/2 − y˙0∗ ) (9) + W0,3/3/1 (y˙∗ 3/3/1 − y˙0∗ ) +λ g0 − g1/2/3 + (1 + W0,1/2/3 )(y˙∗ 1/2/3 − y˙0∗ ) − W0,2/1/2 (y˙∗ 2/1/2 − y˙∗ ) − W0,3/3/1 (y˙∗ 3/3/1 − y˙∗ ) . 0
0
Substituting Eqs. (8), (9), (3), and (4) into Eqs. (2) and (6), the dynamics x˙q and y˙q are given as ordinary differential equations and can be solved numerically. 1
It is possible to model the asymmetry in the influx and efflux of the resource current from node p to q. Indeed, replacing Wp,q with a sigmoid function (Wp,q − ) + /(1 + Exp{−κ(x˙∗q − x˙∗p )}), the influx and efflux become uneven when > 0 or < 0.
60
2.2
M. Aono et al.
Oscillation Modes
In this section, we fix all growth variables to be vanished as gq (t) = 0 so that the amoeba’s branch in each node never elongates nor withdraws (Fig. 1C). We √ introduce a parameter ρ to adjust the amplitude of the hub node 0 as r0 = 3ρ, √ √ √ while that of the other terminal nodes are r1 = r2 = r3 = 3. Depending on the hub’s amplitude adjusted by ρ, the model produces different oscillation modes. In this study, we focus on six distinctive modes shown in Fig. 2, where for each mode we appropriately choose f to equalize the frequencies of all modes. – Mode 1: In-phase synchronization. All terminal nodes 1, 2, and 3 synchronize in in-phase, but they synchronize with the hub node 0 in antiphase. – Mode 2: Partial in-phase synchronization A. Two terminal nodes synchronize in in-phase, where the phases of these terminals are about 90◦ ahead of the other isolated terminal and are about 135◦ behind the hub. Because each of three terminals can be isolated, this mode gives three variations depending on initial states. – Mode 3: Partial in-phase synchronization B. Two terminals perform in-phase synchronization, where the phases of these terminals are about 120◦ ahead of the other isolated terminal and are about 120◦ behind the hub. This mode also has three variations and is initial-state dependent. – Mode 4: Spontaneous mode switching. The terminals spontaneously switch among three variations of the mode 3, as node 1, 3, and 2 are isolated cyclically in that order. Although each mode switches once every three periods, this behavior is not exactly periodic and produces a number of variations depending on initial states. The behavior is understood as complex quasiperiodic motion that appears to involve irregular fluctuations like chaotic behavior. We have also observed similar switching behavior in a model of a ring network of nonuniformly-coupled three oscillators and confirmed its mechanism to be the saddle node bifurcation. The chaos-like behavior was not strictly chaos, as the dynamics did not show the exponential divergence of neighboring points in the orbits. We will report these results elsewhere [15]. – Mode 5: Long-term behavior. Because the hub oscillates with the same amplitude as the terminals, the hub does not have enough capacity to absorb and emit the sum of resources flowing from the terminals within a single period. This leads the hub to oscillate 3/2 times as fast as the terminals and to have a large-scale trend varied in a long-term cycle, which requires 21 periods of oscillations. This mode also exhibits a number of variations. – Mode 6: Rotation. Because the amplitude of the hub is much smaller than that of the terminals, the hub has only a small effect on resource traffic. The phase of each terminal differs equally about 120◦ from that of neighboring ones. That is, each terminal in turn transfers resources to its adjacent terminal in a manner similar to a unidirectional rotation movement. This mode has another variation to rotate in opposite direction. The amoeba exhibited all these modes in experiments, but each mode continued for at most 10 periods and spontaneously switched to other modes, as reported in [7]. In this sense, the amoeba’s behavior is best described by the mode 4.
Resource-Competing Oscillator Network
61
Fig. 2. Time series of six oscillation modes at (μ, δ) = (0, 0) with initial states randomly chosen from xq ∈ [−3.0, 3.0] such that q∈Q xq = 0, where yq = 0 and vq = 15. The thickest solid, second-thickest solid, dashed, and dotted lines correspond to the nodes 0, 1, 2, and 3, respectively. (A) In-phase synchronization at (ρ, f ) = (3, 0.456). (B) Partial in-phase synchronization A at (ρ, f ) = (2.5, 0.529). (C) Partial in-phase synchronization B at (ρ, f ) = (2, 0.628). (D) Spontaneous mode switching at (ρ, f ) = (1.5, 0.746). (E) Long-term behavior at (ρ, f ) = (1, 1). (F) Rotation at (ρ, f ) = (0.1, 1.139).
2.3
Growth and Degeneration of Branch
In our model depicted in Fig. 1D, the volume of each node vq can be led to increase and decrease by setting the growth variable gq to be positive and negative, respectively. Indeed, suppressing the increment of yq by a positive gq in Eq. (7), the increment of xq is enhanced, and thus vq grows. When xq and yq are considered to be the activator and inhibitor respectively, the effect of the positive gq is taken as a process that the decrease of inhibitor yields the increase of activator. The growth variable gq gives the amoeba a force for pushing and pulling its branch, as it serves in a way comparable to the acceleration of the volume in Eq. (7). Assuming the sum of the amoeba’s internally generated forces to be constant, we define gq in a way similar to the Kirchhoff’s laws Eqs. (2) and (6): gq =
p∈Pq
Kp,q ,
(10)
62
M. Aono et al.
where Kp,q is called a force transmission from node p to q. As well as previously defined currents, transmissions Kp,q are determined by minimizing the following object function HK which balances intranode and internode requirements: 2 2 HK = (μ sq vˆq − Kp,q ) + (δ Wp,q (ˆ vp − vˆq ) − Kp,q ) , (11) q∈Q
p∈Pq
(p,q)∈E
where vˆq = vq /L is a fraction of volume divided by the reference volume L = 40. The first term of HK models the effect of intranode inhibitory stimulation adjusted by μ ≤ 0 to reduce the volume when stimulated by light. In the next section, we will describe how to determine the stimulation signal sq , which is a sort of on-off signal for indicating whether each node is illuminated (sq 1) or not (sq 0). The second term represents the effect of internode diffusion regulated by the parameter δ, which is a diffusion coefficient for tuning the reduction rate of the differences among the volumes of the nodes. ∂HK ∂HK ∂HK Solving ∂K = 0, ∂K = 0, and ∂K = 0, the optimal transmissions Kp,q 0,1 0,2 0,3 can be obtained analytically as follows: 1 K0,1/2/3 = 10L −μ 2s0 v0 − 4s1/2/3 v1/2/3 + s2/1/2 v2/1/2 + s3/3/1 v3/3/1 ) + δ −4W0,1/2/3 (v1/2/3 − v0 ) + W0,2/1/2 (v2/1/2 − v0 ) (12) + W0,3/3/1 (v3/3/1 − v0 ) . There are dynamics v˙q , x˙q , and y˙q given by Eqs. (1), (2), and (6), and we can rewrite these dynamics as ordinary differential equations by substituting analytic solutions of Ip,q , Jp,q , Kp,q obtained as Eqs. (8), (9), and (12). Thus, numerical solutions for vq , xq , and yq are obtained by routine procedures. This means that we can also calculate time series of Ip,q , Jp,q , Kp,q , and gq . Fig. 3 gives examples of the time series showing how the growth variable gq works. In comparison with Fig. 3A showing a control condition gq (t) = 0, it
Fig. 3. Time series of the mode 3 at (L, θ) = (40, 0.35) with initial volumes v0 = 30 and v1 = v2 = v3 = 10. In v-panels, broken lines show the critical level Lθ = 14. (A) No growth at (μ, δ) = (0, 0). (B) Volume diffusion at (μ, δ) = (0, 20). (C) Problem-solving process at (μ, δ) = (−200, 20). bT , pA, and b3+ are explained in Fig. 4.
Resource-Competing Oscillator Network
63
is confirmed in Fig. 3B that a large volume of the amoeba placed initially in the hub diffused into the terminal nodes as g0 (t) < 0, while the branches in the terminals grew as g1 (t), g2 (t), g3 (t) > 0. For all modes, the positive diffusion coefficient δ > 0 brings about an effect to equalize the volumes of all nodes to oscillate around q∈Q vq (0)/M eventually. 2.4
Stress Minimization Problem in Volume Allocation
In previous works, the authors showed experimentally that the amoeba is useful for searching for solutions to the N -city TSP (N = 4 in [12,13]) in adopting the following discrete-time-state modified Hopfield-Tank model [16] to update sq . sq (t + Δt) = 1 − Stp( Up,q sgm(˜ vp (t))), (13) p∈Q
where sq = 1 if the light is on; otherwise 0, v˜q is an area 2 of the amoeba’s branch in terminal node q, sgm(˜ v ) = 1/(1 + Exp{−b(˜ v − θ)}), and Stp(V ) = 0 if V < Θ; otherwise 1. Each terminal node q ∈ Q is coupled with every node (c, n) ∈ Q = {c1 , c2 , · · · , cN } × {1, 2, · · · , N } labeled with a city name c and its visit order n as ⎧ (if q = (c, n = n) or q = (c = c, n) ), ⎨ −α = c, n = n) and |n − n | = 1 ), U(c,n),q = −β dst(c, c ) (if q = (c (14) ⎩ 0 (otherwise), where dst(c, c ) is a distance between c and c , and each coupling weight is symmetric (Up,q = Uq,p ). The optimal solution to the problem, the shortest travel to visit all cities, is expressed by the amoeba’s stably relaxed shape that maximizes the body area while minimizing the risk of being stressed by light. The solution, therefore, would be the most comfortable condition for the amoeba and can be attained if the amoeba succeeds in elongating only the least-frequently stressed branches and withdrawing the other ones. To determine which branches to grow, the amoeba needs to examine a lot of possible shapes (solutions) and to choose the minimally stressed one by comparing relative differences in the stressed frequencies of the candidates. It was observed that the amoeba examined a wide variety of shapes in a trial-and-error method by alternately expanding and shrinking its branches with its oscillatory behavior. That is, the oscillatory behavior was shown to be essential for the amoeba to attain the optimal solution because it enables the search of a broad solution space [12]. Although the amoeba exhibited various oscillation modes in the solution-searching processes, the dependence of the optimization performances on the oscillation modes remained unclear. In this paper, we use our model to compare the performances of the oscillation modes. 2
In the experiments, the area v˜q was measured from a digital image taken at each interval Δt = 6 sec using a video camera. The area v˜q should be distinguished from the volume vˆq considered in the model, because the sum of the latter is constant while that of the former is not.
64
M. Aono et al.
We make minor revisions of the above scheme to be embedded in the continuoustime-state ordinary differential equations of our model as follows: sq = 1 − Sgm( Up,q sgm(ˆ vp )), (15) p∈Q
where Sgm(V ) = 1/(1 + Exp{−B(V − Θ)}), b = 35, θ = 0.35, B = 1000, and Θ = −0.5. Additionally, we allow the weight matrix to be asymmetric: ⎛ ⎞ ⎛ ⎞ U0,0 U0,1 U0,2 U0,3 0 0 0 0 ⎜ U1,0 U1,1 U1,2 U1,3 ⎟ ⎜ 0 0 − 0.3 − 0.3 ⎟ ⎜ ⎟ ⎜ ⎟. (16) ⎝ U2,0 U2,1 U2,2 U2,3 ⎠ = ⎝ 0 − 0.4 0 − 0.3 ⎠ U3,0 U3,1 U3,2 U3,3 0 − 0.2 − 0.3 0 As we saw in Fig. 3B, in the absence of the feedback stimulation (μ = 0), all terminal nodes grow beyond the critical level Lθ to reach around q∈Q vq (0)/M due to the diffusion of the initial volume of the hub node. Namely, the hub volume is equally distributed to the terminals. On the other hand, when Eqs. (15) and (16) are substituted into Eq. (12) with μ < 0, the feedback stimulation is implemented. As shown in Fig. 1D, a terminal node q is stimulated (sq 1) if the other two terminals grow their volumes vq and vq to reach nearly the critical level Lθ. It is also confirmed in Fig. 3C that the feedback stimulation interferes the amoeba to elongate at most two branches while the other one is stressed by light . As the growth of a branch brings to put certain levels of stresses on the other branches, the branches come into conflict over the allocation of the hub volume. We consider that this conflict presents a problem of finding an optimal way to allocate the hub volume to the terminals such that the total of stresses subjected to the amoeba can be minimized. We classify the volume allocation patterns by checking if each node is in sub-critical level (vq ≤ Lθ) or in super-critical level (vq > Lθ). Accordingly, there are 16 patterns as shown in Fig. 4. We quantify the stress level as q∈Q sq vˆq , because in the first term of Eq. (11) we assumed that each node is suppressed by a stress proportional to its volume when stimulated.
Fig. 4. Volume allocation patterns. Each circle over the critical level Lθ (broken lines) represents vq > Lθ, otherwise vq ≤ Lθ. Flat-headed arrows indicate inhibition by light.
Resource-Competing Oscillator Network
3 3.1
65
Results Diversities in Reachable Allocation Patterns
Typical examples of the problem-solving processes for all oscillation modes are shown in Fig. 5. For each mode, we carried out 100 trials of problem-solving processes started from the initial volumes (v 0 , v1 , v2 , v3 ) = (45, 5, 5, 5) and random initial states xq ∈ [−3.0, 3.0] such that q∈Q xq = 0, where (μ, δ) = (−15, 10) and (L, θ) = (40, 0.35). For the pattern classification in each trial, we used timeaveraged time series taken from t = 1000 to t = 1500. In almost all trials, the nodes finally reached a steady behavior that fell into one of the allocation patterns in Fig. 4, except for a few cases in the mode 4. The histograms of the reached allocation patterns of all modes are shown in Fig. 6A. The modes 1, 2, 3, and 5 attained three patterns b1+ , b2+ , and b3+ , but their frequency distributions were different. The mode 6 did not reach any pattern other than pA in which all nodes are judged as slightly larger than the critical level after the time-averaging.
Fig. 5. Time series of problem-solving processes at (μ, δ) = (−15, 10) and (L, θ) = (40, 0.35) with the initial volumes (v0 , v1 , v2 , v3 ) = (45, 5, 5, 5). In each v-panel, broken lines show the reference volume L and critical level Lθ = 14. In each sˆ v -panel, we showed the stress level ˆq which was time-averaged after reaching a steady q∈Q sq v allocation pattern. For all modes, the parameters (ρ, f ) were given as well as Fig.2.
66
M. Aono et al.
Fig. 6. Comparison of performances in diversity production (A) and stress minimization (B) among the oscillation modes. (A) Distributions of finally reached allocation patterns. (B) Distributions of time-averaged stress levels q∈Q sq vˆq .
On the other hand, the mode 4, spontaneous mode switching, achieved 12 different patterns. Note that most of these patterns were not transient but were finally attained steady behavior. That is, the mode 4 is capable of not only searching for a large number of patterns but also maintaining each of these diverse patterns. Additionally, in a few cases, we observed spontaneous transitions among a number of patterns as shown in Fig. 7. This unstable transition behavior was likely to be a transient behavior before reaching a steady pattern. 3.2
Stress Minimization Capabilities
Fig. 6B shows the histograms of the stress level q∈Q sq vˆq achieved by all modes. For each mode, we analyzed the 100 trials of data used for Fig. 6A. The stress level shown here was time-averaged from t = 1000 to t = 1500, and it might be considered as a measure of discomfort felt by the amoeba resulting from conflicts among its branches. The stress levels of the modes 1, 2, 3, and 5 were relatively higher than that of the other modes. Namely, these modes maintained their allocation patterns in highly stressed ways. The mode 6 showed better performances in stress minimization, although it limits all nodes to have equally small volumes in the pattern pA. The mode 4, spontaneous mode switching, produced the best stress minimization performances among all the modes. In most cases, the allocation patterns were maintained in less stressed ways compared with other modes. There existed a few stress-free cases in which no node was subjected to any stress while stably maintaining the pattern p1+ or p2+ . On the other hand, there were some cases that were counted as highly stressed before reaching a steady pattern due to spontaneous transition among multiple patterns, as we saw in Fig. 7.
Resource-Competing Oscillator Network
67
Fig. 7. An example of spontaneous transition among several volume allocation patterns produced by the mode 4. All parameters were set as well as Fig. 5.
4
Discussion and Conclusion
We presented a dynamical system model of the amoeba-based neurocomputer as a network of oscillators competing for limited resources. The model can be used for the solution search of various optimization problems of how to allocate limited resources to several nodes by minimizing the conflicts among the nodes. The resource allocation problem considered in this study is unique, because the problem should be solved under a looped constraint in which the system has to search for an optimal allocation pattern of a given resource (i.e., the amoeba’s volume) by using the resource itself as the cost for the solution search (i.e., the growth movements of the amoeba’s branches). Metaphorically speaking, the constraint is like a situation in which a consumer who tries to spend a certain amount of money usefully is requested to buy some products just to know their prices. That is, the history in information collecting process significantly influences the final decision on the solution. Therefore, it would be preferable that the time course of the process can be designed appropriately. In order to cope with this unique problem, the model exploits the oscillatory behavior in the volumes of the nodes to perform deterministic trial and error for the solution search. The model produced a number of spatiotemporal oscillation modes, and these modes implemented different time courses of trial and error. We compared the performances of these modes in solving the problem. The
68
M. Aono et al.
best performances were achieved by a complex mode in which the oscillators spontaneously switch among several modes. The complex behavior reproduced well the amoeba’s oscillatory behavior observed experimentally. Additionally, it resulted in spontaneous transition behavior among a number of solutions, which also looks similar to the amoeba’s observed behavior in solving optimization problems [9,10,11,12,13]. In the experiments, after reaching a solution, the amoeba spontaneously destabilized the once-stabilized solution by elongating its branch under stressed condition and performed transition among multiple solutions. These similarities suggest that our model captures the essence of the amoeba’s dynamics and will be a useful tool in exploring the origin and potential applications of the amoeba’s computational capabilities. Many natural, computing, economic, and social systems compete for limited resources and face problems similar to ours. In the absence of supervisor systems, these competitive systems need to discover optimal allocations in their own sophisticated trial-and-error methods. Our model is easily extended to model diverse competitive systems. Indeed, various dynamical systems can be coupled in the proposed form, and the object functions can be replaced freely by alternative ones as long as their optimal solutions can be obtained analytically. Thus, we expect that the scheme of our model provides various insights for establishing efficient trial-and-error methods in a wide spectrum of competitive systems to solve the problems.
References 1. Nakagaki, T., Yamada, H., Toth, A.: Maze-Solving by an Amoeboid Organism. Nature 407, 470 (2000) 2. Tero, A., Kobayashi, R., Nakagaki, T.: Physarum solver: A biologically inspired method of road-network navigation. Physica A 363, 115–119 (2006) 3. Nakagaki, T., Iima, M., Ueda, T., Nishiura, Y., Saigusa, T., Tero, A., Kobayashi, R., Showalter, K.: Minimum-risk path finding by an adaptive amoebal network. Phys. Rev. Lett. 99, 068104 (2007) 4. Saigusa, T., Tero, A., Nakagaki, T., Kuramoto, Y.: Amoebae anticipate periodic events. Phys. Rev. Lett. 100, 018101 (2008) 5. Takamatsu, A., Fujii, T., Endo, I.: Time delay effect in a living coupled oscillator system with the plasmodium of Physarum polycephalum. Phys. Rev. Lett. 85, 2026–2029 (2000) 6. Takamatsu, A., Tanaka, R., Yamada, H., Nakagaki, T., Fujii, T., Endo, I.: Spatiotemporal symmetry in rings of coupled biological oscillators of Physarum plasmodial slime mold. Phys. Rev. Lett. 87, 078102 (2001) 7. Takamatsu, A.: Spontaneous switching among multiple spatio-temporal patterns in three-oscillator systems constructed with oscillatory cells of true slime mold. Physica D 223, 180–188 (2006) 8. Aono, M., Gunji, Y.-P.: Beyond input-output computings: Error-driven emergence with parallel non-distributed slime mold computer. BioSystems 71, 257–287 (2003)
Resource-Competing Oscillator Network
69
9. Aono, M., Hara, M.: Amoeba-based Nonequilibrium Neurocomputer Utilizing Fluctuations and Instability. In: Aki, S.G., Calude, C.S., Dinneen, M.J., Rozenberg, G., Wareham, H.T. (eds.) UC 2007. LNCS, vol. 4618, pp. 41–54. Springer, Heidelberg (2007) 10. Aono, M., Hara, M., Aihara, K.: Amoeba-based Neurocomputing with Chaotic Dynamics. Commun. ACM 50(9), 69–72 (2007) 11. Aono, M., Hara, M.: Spontaneous deadlock breaking on amoeba-based neurocomputer. BioSystems 91, 83–93 (2008) 12. Aono, M., Hirata, Y., Hara, M., Aihara, K.: Amoeba-based chaotic neurocomputing: Combinatorial optimization by coupled biological oscillators. New Generation Computing 27, 129–157 (2009) 13. Aono, M., Hara, M., Aihara, K., Munakata, T.: Amoeba-based emergent computing: Combinatorial optimization and autonomous meta-problem solving. International Journal of Unconventional Computing (in press) 14. Kuznetsov, Y.A.: Elements of applied bifurcation theory. Springer, New York (2004) 15. Hirata, Y., Aono, M., Hara, M., Aihara, K.: Spontaneous mode switching in coupled oscillators competing for constant amounts of resources (submitted) 16. Hopfield, J.J., Tank, D.W.: Computing with Neural Circuits: A model. Science 233, 625–633 (1986)
Networks of Evolutionary Picture Processors with Filtered Connections Paolo Bottoni1 , Anna Labella1 , Florin Manea2,∗ , Victor Mitrana2,3, , and Jose M. Sempere3, 1
Department of Computer Science, “Sapienza” University of Rome Via Salaria 113, 00198 Rome, Italy {bottoni,labella}@di.uniroma1.it 2 Faculty of Mathematics, University of Bucharest Str. Academiei 14, 70109 Bucharest, Romania {flmanea,mitrana}@fmi.unibuc.ro 3 Department of Information Systems and Computation Technical University of Valencia, Camino de Vera s/n. 46022 Valencia, Spain
[email protected]
Abstract. In this paper we simplify the model of computation considered in [1], namely network of evolutionary picture processors, by moving the filters from the nodes to the edges. Each edge is now viewed as a twoway channel such that input and output filters, respectively, of the two nodes connected by the edge coincide. Thus, the possibility of controlling the computation in such networks seems to be diminished. In spite of this observation all the results concerning the computational power of networks of evolutionary picture processors reported in [1] are extended over these simplified networks.
1
Introduction
The origin of accepting networks of evolutionary processors (ANEP for short) is a basic architecture for parallel and distributed symbolic processing, related to the Connection Machine [8] as well as the Logic Flow paradigm [5], which consists of several very simple processors (called evolutionary processors), each of them being placed in a node of a virtual complete graph. By an evolutionary processor we mean an abstract processor which is able to perform very simple operations, namely point mutations in a DNA sequence (insertion, deletion or substitution of a pair of nucleotides). More generally, each node may be viewed as a cell having genetic information encoded in DNA sequences which may evolve by local evolutionary events, that is point mutations. Each node is specialized just for one of these evolutionary operations. Furthermore, the data in each node
Work supported by the PN-II Programs 11052 (GlobalComp) and 11056 (CellSim). Victor Mitrana acknowledges support from Academy of Finland, project 132727. Work supported by the Spanish Ministerio de Educaci´ on y Ciencia under project TIN2007-60769.
C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 70–84, 2009. c Springer-Verlag Berlin Heidelberg 2009
Networks of Evolutionary Picture Processors with Filtered Connections
71
is organized in the form of multisets of strings (each string appears in an arbitrarily large number of copies), and all copies are processed in parallel such that all the possible events that can take place do actually take place once on each copy. Further, all the nodes send simultaneously their data and the receiving nodes handle also simultaneously all the arriving messages, according to some strategies. The reader interested in a more detailed discussion about the model is referred to [10,11] and the references thereof. A picture (2-dimensional word) is a rectangular array of symbols over an alphabet. Picture languages defined by different mechanisms have been studied extensively in the literature. For a survey on picture languages the reader may consult [6] while an early survey on automata recognizing rectangular pictures languages is [9]. The investigation on ANEPs started in [10] has been carried over rectangular picture in [1] where accepting networks of evolutionary picture processors (ANEPP for short) have been considered. Each node of an ANEPP is either a row/column substitution node or a row/column deletion node. The action of each node on the data it contains is precisely defined. For instance, if a node is a row substitution node, then it can substitute a letter by another letter in either the topmost or the last or an arbitrary row. Moreover, if there are more occurrences of the letter that is to be substituted in the row on which the substitution rule acts, then each such occurrence is substituted in different copies of that picture. An implicit assumption is that arbitrarily many copies of every picture are available. A similar informal explanation concerns the column substitution and deletion nodes, respectively. Two ways of accepting pictures are considered in [1]: weak acceptance, when at least one output node is nonempty, and strong acceptance, when all output nodes are nonempty. Every language weakly accepted by a network can be strongly accepted by another network. One shows that ANEPPs can weakly accept the complement of any local language, as well as languages that are not recognizable. The problem of pattern matching in pictures is then considered in the framework of ANEPPs. It is clear that filters associated with each node allow a strong control of the computation. Indeed, every node has an input and output filter; two nodes can exchange data if it passes the output filter of the sender and the input filter of the receiver. Moreover, if some data is sent out by some node and not able to enter any node, then it is lost. In this paper we simplify the ANEPP model considered in [1] by moving the filters from the nodes to the edges. A similar investigation has been done for ANEPs in [3,4], where it was shown that both devices equal the computational power of Turing machines. Each edge of a network of evolutionary picture processors with filtered connections (ANEPPFC for short) is viewed as a two-way channel such that the input and output filters, respectively, of the two nodes connected by the edge coincide. Clearly, the possibility of controlling the computation in such networks seems to be diminished. For instance, there is no possibility to lose data during the communication steps. In spite of this fact we can extend all the results reported in [1] to these new devices. Moreover, in all cases the ANEPPFCs have a smaller size (number of processors). This suggests
72
P. Bottoni et al.
that moving the filters from the nodes to the edges does not decrease the computational power of the model. It is worth mentioning that a direct proof showing that ANEPs and ANEPs with filtered connections are computationally equivalent was proposed in [2]. However, that construction essentially need an operation that has not a corresponding one in ANEPPs or ANEPPFCs, therefore we do not know a proof for a direct simulation of one model by the other.
2
Basic Definitions
For basic terminology and notations concerning the theory of one-dimensional languages the reader is referred to [13]. The definitions and notations concerning two-dimensional languages are taken from [6]. The set of natural numbers from 1 to n is denoted by [n]. The cardinality of a finite set A is denoted by card(A). Let V be an alphabet, V ∗ the set of onedimensional strings over V and ε the empty string. A picture (or two-dimensional string) over the alphabet V is a two-dimensional array of elements from V . We denote the set of all pictures over the alphabet V by V∗∗ , while the empty picture will be still denoted by ε. A two-dimensional language over V is a subset of V∗∗ . The minimal alphabet containing all symbols appearing in a picture π is denoted by alph(π). Let π be a picture in V∗∗ ; we denote the number of rows and the number of columns of π by π and |π|, respectively. The pair (π, |π|) is called the size of the picture π. The size of the empty picture ε is obviously (0, 0). The set of all pictures over V of size (m, n), where m, n ≥ 1, is denoted by Vmn . The symbol placed at the intersection of the ith row with the jth column of the picture π, is denoted by π(i, j). The row picture of size (1, n) containing occurrences of the symbol a only is denoted by an1 . Similarly the column picture of size (m, 1) containing occurrences of the symbol a only is denoted by a1m . We recall informally the row and column concatenation operations between pictures. For a formal definition the reader is referred to [9] or [6]. The row concatenation of two pictures π of size (m, n) and ρ of size (m , n ) is denoted by and is defined only if n = n . The picture πρ is obtained by adding the picture ρ below the last row of π. Analogously one defines the column concatenation c We now recall from [1] the definition of four new operations, in denoted by . some sense the inverse operations of the row and column concatenation. Let π and ρ be two pictures of size (m, n) and (m , n ), respectively. We define -
The The The The
c column right-quotient of π with ρ: π/→ ρ = θ iff π = θρ. c column left-quotient of π with ρ: π/← ρ = θ iff π = ρθ. row down-quotient of π with ρ to the right: π/↓ ρ = θ iff π = θρ. column up-quotient of π with ρ: π/↑ ρ = θ iff π = ρθ.
We now proceed with the definition of an evolutionary picture processor following [1]. We want to stress that the evolutionary processor described here is just a mathematical concept similar to that of an evolutionary algorithm, both being inspired from the Darwinian evolution. Let V be an alphabet; a rule of the form
Networks of Evolutionary Picture Processors with Filtered Connections
73
a → b(X), with a, b ∈ V ∪ {ε} and X ∈ {−, |} is called an evolutionary rule. For any rule a → b(X), X indicates which component of a picture (row if X = − or column if X = |) the rule is applied to. We say that a rule a → b(X) is a substitution rule if both a and b are not ε, is a deletion rule if a = ε, b = ε, and is an insertion rule if a = ε, b = ε. In this paper we shall ignore insertion rules because we want to process every given picture in a space bounded by the size of that picture. We denote by RSubV = {a → b(−) | a, b ∈ V } and RDelV = {a → ε(−) | a ∈ V }. The sets CSubV and CDelV are defined analogously. Given a rule σ as above and a picture π ∈ Vmn , we define the following actions of σ on π: • If σ ≡ a⎧→ b(|) ∈ CSubV , then ⎪ {π ∈ Vmn : ∃i ∈ [m] (π(i, 1) = a & π (i, 1) = b), π (k, 1) = π(k, 1), ⎪ ⎪ ⎪ ⎨ k ∈ [m] \ {i}, π (j, l) = π(j, l), (j, l) ∈ [m] × ([n] \ {1})} ← σ (π) = ⎪ ⎪ ⎪ {π}, if the first column of π does not contain any occurrence ⎪ ⎩ a. ⎧ of the letter n {π ∈ V : ∃i ∈ [m] (π(i, n) = a & π (i, n) = b), π (k, n) = π(k, n), ⎪ m ⎪ ⎪ ⎪ ⎨ k ∈ [m] \ {i}, π (j, l) = π(j, l), (j, l) ∈ [m] × [n − 1]} → σ (π) = ⎪ ⎪ {π}, if the last column of π does not contain any occurrence ⎪ ⎪ ⎩ ⎧ of the nletter a. {π ∈ Vm : ∃(i, j) ∈ [n] × [m] such that π(i, j) = a and ⎪ ⎪ ⎨ π (i, j) = b, π (k, l) = π(k, l), ∀(k, l) ∈ ([n] × [m]) \ {(i, j)}} σ ∗ (π) = ⎪ ⎪ ⎩ {π}, if no column of π contains any occurrence of the letter a. Note that a rule as above is applied to all occurrences of the letter a either in the first or in the last or in any column of π, respectively, in different copies of the picture π. Analogously, we define: • If σ ≡ a ∈ RSubV , then ⎧→ b(−) n {π ∈ V ⎪ m : ∃i ∈ [n](π(1, i) = a & π (1, i) = b), π (1, k) = π(1, k), ⎪ ⎪ ⎪ ⎨ ∀k ∈ [n] \ {i}, π (j, l) = π(j, l), ∀(j, l) ∈ ([m] \ {1}) × [n]} σ ↑ (π) = ⎪ ⎪ {π}, if the first row of π does not contain any occurrence ⎪ ⎪ ⎩ a. ⎧ of the letter n {π ∈ V : ∃i ∈ [n](π(m, i) = a & π (m, i) = b), π (m, k) = π(m, k), ⎪ m ⎪ ⎪ ⎪ ⎨ ∀k ∈ [n] \ {i}, π (j, l) = π(j, l), ∀(j, l) ∈ [m − 1] × [n]} ↓ σ (π) = ⎪ ⎪ {π}, if the last row of π does not contain any occurrence ⎪ ⎪ ⎩ of the letter a. σ ∗ (π) = ρ∗ (π), where ρ ≡ a → b(|) ∈ CSubV . • If σ ≡ a → ε(|) ∈ CDelV , then
74
P. Bottoni et al.
σ ← (π) =
σ → (π) =
⎧ π/← ρ, where ρ is the leftmost column of π, if the leftmost ⎪ ⎪ ⎪ ⎪ ⎨ column of π does contain at least one occurrence of the letter a ⎪ ⎪ π, if the leftmost column of π does not contain any occurrence ⎪ ⎪ ⎩ ⎧ of the letter a. π/→ ρ, where ρ is the rightmost column of π, if the rightmost ⎪ ⎪ ⎪ ⎪ ⎨ column of π does contain at least one occurrence of the letter a
⎪ ⎪ π, if the rightmost column of π does not contain any occurrence ⎪ ⎪ ⎩ ⎧ of the letter a. c 2 | π = π1 ρ c π c 2 , for some π1 , π2 ∈ V∗∗ and ρ is a ⎪ ⎪ {π1 π ⎨ column of π1 that contains an occurrence of the letter a} σ ∗ (π) = ⎪ ⎪ ⎩ {π}, if π does not contain any occurrence of the letter a. In an analogous way we define: • If σ ≡ a ⎧→ ε(−) ∈ RDelV , then ⎪ π/↑ ρ, where ρ is the first row of π, if the first row ⎪ ⎪ ⎪ ⎨ of π does contain at least one occurrence of the letter a σ ↑ (π) = ⎪ ⎪ ⎪ π, if the first row of π does not contain any occurrence ⎪ ⎩ ⎧ of the letter a. π/↓ ρ, where ρ is the last row of π, if the last row ⎪ ⎪ ⎪ ⎪ ⎨ of π does contain at least one occurrence of the letter a σ ↓ (π) = ⎪ ⎪ π, if the last row of π does not contain any occurrence ⎪ ⎪ ⎩ ⎧ of the letter a. {π1 π2 | π = π1 ρπ2 , for some π1 , π2 ∈ V∗∗ and ρ is a ⎪ ⎪ ⎨ row of π1 that contains an occurrence of the letter a} σ ∗ (π) = ⎪ ⎪ ⎩ {π}, if π does not contain any occurrence of the letter a. For every rule σ, action α∈ {∗, ←, →, ↑, ↓}, and L ⊆ V∗∗ , we define the α-action of σ on L by σ α (L) = σ α (π). Given a finite set of rules M , we define the π∈L
α-action of M on the picture π and the language L by M α (π) = α
M (L) =
σ α (π) and
σ∈M α
M (π), respectively. In what follows, we shall refer to the rewriting
π∈L
operations defined above as evolutionary picture operations since they may be viewed as the 2-dimensional linguistic formulations of local gene mutations. For two disjoint subsets P = ∅ and F of an alphabet V and a picture π over V , we define the following two predicates which will define later two types of filters: rcs (π; P, F ) ≡ rcw (π; P, F ) ≡
P ⊆ alph(π) ∧ F ∩ alph(π) = ∅ alph(π) ∩ P = ∅ ∧ F ∩ alph(π) = ∅.
Networks of Evolutionary Picture Processors with Filtered Connections
75
The construction of these predicates is based on context conditions defined by the two sets P (permitting contexts/symbols) and F (forbidding contexts/symbols). Informally, both conditions require that no forbidding symbol is present in π; furthermore the first condition requires all permitting symbols to appear in π, while the second one requires that at least one permitting symbol appear in π. It is plain to see that the first condition is stronger than the second one. For every picture language L ⊆ V∗∗ and β ∈ {s, w}, we define: rcβ (L, P, F ) = {π ∈ L | rcβ (π; P, F ) = true}. We now introduce the concept of an accepting network of evolutionary picture processors with filtered connections (ANEPPFC for short). An ANEPPFC is a 9-tuple Γ = (V, U, G, R, N , α, β, xI , Out), where: – V and U are the input and network alphabet, respectively, V ⊆ U . – G = (XG , EG ) is an undirected graph without loops with the set of vertices XG and the set of edges EG . Each edge is given in the form of a binary set. G is called the underlying graph of the network. – R : XG −→ 2CSubU ∪2RSubU ∪2CDelU ∪2RDelU is a mapping which associates with each node the set of evolutionary rules that can be applied in that node. Note that each node is associated only with one type of evolutionary rules, namely for every x ∈ XG either R(x) ⊂ CSubU or R(x) ⊂ RSubU or R(x) ⊂ CDelU or R(x) ⊂ RDelU holds. – α : XG −→ {∗, ←, →, ↑, ↓}; α(x) gives the action mode of the rules of node x on the pictures existing in that node. – N : EG −→ 2U × 2U is a mapping which associates with each edge e ∈ EG the disjoint sets N (e) = (Pe , Fe ). – β : EG −→ {s, w} defines the filter type of an edge. – xI ∈ XG is the input node and Out ⊂ XG is the set of output nodes of Γ . We say that card(XG ) is the size of Γ . A configuration of an ANEPPFC Γ as U∗ above is a mapping C : XG −→ 2f ∗ which associates a finite set of pictures with every node of the graph. A configuration may be understood as the sets of pictures which are present in any node at a given moment. Given a picture (π) π ∈ V∗∗ , the initial configuration of Γ on π is defined by C0 (xI ) = {π} and (π) C0 (x) = ∅ for all x ∈ XG − {xI }. A configuration can change via either an evolutionary step or a communication step. When changing via an evolutionary step, each component C(x) of the configuration C is changed in accordance with the set of evolutionary rules Mx associated with the node x and the way of applying these rules α(x). Formally, we say that the configuration C is obtained in one evolutionary step from the configuration C, written as C =⇒ C , iff C (x) = Mx
α(x)
(C(x)) for all x ∈ XG .
When changing by a communication step, each node processor x ∈ XG sends one copy of each picture it has to every node processor y connected to x, provided it can pass the filter of the edge between x and y. It keeps no copy of these
76
P. Bottoni et al.
picture but receives all the pictures sent by any node processor z connected with x providing that they can pass the filter of the edge between x and z. Formally, we say that the configuration C is obtained in one communication step from configuration C, written as C C , iff C (x) = (C(x) \ ( rcβ({x,y}) (C(x), N ({x, y})))) ∪(
{x,y}∈EG
rcβ({x,y}) (C(y), N ({x, y})))
{x,y}∈EG
for all x ∈ XG . Let Γ be an ANEPPFC, the computation of Γ on an input picture π ∈ (π) (π) (π) (π) V∗∗ is a sequence of configurations C0 , C1 , C2 , . . ., where C0 is the initial (π) (π) (π) (π) configuration of Γ on π, C2i =⇒ C2i+1 and C2i+1 C2i+2 , ∀i ≥ 0. Note that configurations are changed by alternative steps. By the previous definitions, each (π) (π) configuration Ci is uniquely determined by Ci−1 . A computation is said to be weak (strong) accepting, if there exists a configuration in which the set of pictures existing in at least one output node (all output nodes) is non-empty. The picture language weakly (strongly) accepted by Γ is Lwa(sa) (Γ ) = {π ∈ V∗∗ | the computation of Γ on π is a weak (strong) accepting one}. In network theory, some types of underlying graphs are common like rings, stars, grids, etc. Networks of evolutionary strings processors, seen as language generating or accepting devices, having underlying graphs of these special forms have been considered in several papers, see, e.g., [12] for an early survey. On the other hand, the ANEPPs considered in [1] are also complete. Starting from the observation that every ANEPPFC can be immediately transformed into an equivalent ANEPPFC with a complete underlying graph (the edges that are to be added are associated with filters which make them useless), for the sake of simplicity we discuss in what follows ANEPPFCs with underlying graphs having useful edges only. Note that this is not always possible for ANEPPs. We denote by Lwa (AN EP P F C) and Lsa (AN EP P F C) the class of picture languages weakly and strongly accepted by ANEPPFCs, respectively.
3
Preliminary Results
The following two notions will be very useful in the sequel. If h is a one-toone mapping from U to W and Γ = (V, U, G, R, N , α, β, xI , Out), with G = (XG , EG ), is an ANEPPFC, then we denote by Γh the ANEPPFC Γh = (h(V ), h(U ), G, h(R), h(N ), α, β, xI , Out), where h(R(x)) = {h(a) → h(b)(X) | a → b(X) ∈ R(x)}, for any x ∈ XG and h(N (e)) = (h(Pe ), h(Fe )) for any e ∈ EG . We first establish a useful relationship between the classes Lwa (AN EP P F C) and Lsa (AN EP P F C). As it was expected, we have:
Networks of Evolutionary Picture Processors with Filtered Connections
77
Theorem 1. Lwa (AN EP P F C) ⊆ Lsa (AN EP P F C). Proof. Actually, we prove a bit more general result, namely that for every ANEPPFC Γ there exists an ANEPPFC Γ with one output node only and Lwa (Γ ) = Lwa (Γ ) = Lsa (Γ ). W.l.o.g. we assume that there is no edge connecting any two output nodes of Γ . We may further assume that each of these nodes is a substitution node containing all rules a → a(−) applied in the ∗ mode, for all symbols a in the working alphabet of Γ . In order to get Γ it suffices to choose one of the output nodes of Γ , consider it the only output node of Γ , and connect it to each output node of Γ . Each such connection is filtered by a weak filter with the set of permitting symbols formed by all symbols of Γ and an empty set of forbidding symbols. 2 We continue the series of preliminary results with two simple examples which lay the basis for further results. Example 1. Let L be the set of all pictures π ∈ V2∗ with identical rows over the alphabet V . The language L can be formally described as L = {π ∈ V2m | π(1, i) = π(2, i), i ∈ [m], m ≥ 1}. L can be weakly accepted by the following ANEPPFC with 2·card(V )+3 nodes, namely xI , xa , xa , for every a ∈ V , xdel , one output node only, namely xO , and the working alphabet U = V ∪ {Xa , Ya , Xa , Ya | a ∈ V }. The nodes, different than xO which has an empty set of rules, are defined as follows: Node R α xI {a → Xa (−), a → Xa (−) | a ∈ V } ↑ xa , a ∈ V {a → Ya (−)} ↓ xa , a ∈ V {a → Ya (−)} ↓ xdel {Xa → ε(|) | a ∈ V } ← Further, the edges of the underlying graph and the filters associated with them are defined in the following way: Edge P F β {xI , xa }, a ∈ V {Xa } U \ (V ∪ {Xa }) s {xa , xdel }, a ∈ V {Xa , Ya } U \ (V ∪ {Xa , Ya }) s {xdel , xI } V U \V w {xI , xa }, a ∈ V {Xa } U \ (V ∪ {Xa }) s {xa , xO }, a ∈ V {Xa , Ya } U \ {Xa , Ya } s Let us follow a computation of this network on an input picture π. In xI three situations are possible after the first evolutionary step: (i) an occurrence of some letter a on the first row of π is replaced by Xa , (ii) an occurrence of some letter a on the first row of π is replaced by Xa , and (iii) π remains unchanged. If π is left unchanged, then it is sent to xdel , where it still remains unchanged, and it is sent back to xI . We consider, the first non-trivial case, namely when an
78
P. Bottoni et al.
occurrence of some letter a on the first row of π is replaced by Xa . All these pictures (remember that if the first row of π contains more than one occurrence of a, then each such occurrence is replaced by Xa in different copies of π) are sent to xa . After the next evolutionary step two situations regarding each of these pictures are possible: (i) an occurrence of a on the last row of each picture, say ρ, is replaced by Ya , or (ii) ρ remains unchanged. Note that in the second case, ρ does not contains any a on its last row. If ρ remains unchanged, then it is sent back to xI and it either remains forever in xI , provided that a letter b = a is replaced by Xb , or it is sent back and forth between xI and xa . If an occurrence of a on the last row of ρ is replaced by Ya , then all these pictures are sent to xdel . Note that each of these pictures contains exactly one occurrence of Xa . In xdel one tries to delete the leftmost column of all these pictures provided that this column contains Xa . If this process is not successful, then the pictures will continue to go forth and back between xa and xdel . If the leftmost column of some picture is successfully deleted in xdel , then that picture can continue the computation in xI provided that it contains only letters from V . We now consider the case when an occurrence of some letter a on the first row of π is replaced by Xa in xI . In a similar way as that described above, all these pictures arrive in xa , where an occurrence of a on the last row of each picture is replaced by Ya and then only at most one picture can enter xO , that is the X picture a . By these explanations, it follows that every input picture with a Ya different number of rows than two cannot be accepted. 2 Clearly, the language of all pictures of size (n, 2), n ≥ 1, over a given alphabet V , where the two columns are identical can also be accepted by an ANEPPFC. The role of the next example is to show how two ANEPPFCs can be combined in order to form a new ANEPPFC. To this aim, we extend the network from Example 1 to accept the language of all pictures (of any size) having two identical rows. Example 2. Let L be the set of all pictures π ∈ V∗∗ with two identical rows over the alphabet V . The language L can be formally described as L = {π ∈ Vnm | ∃i, j ∈ N, 1 ≤ i = j ≤ n (π(i, k) = π(j, k)), k ∈ [m], n, m ≥ 1}. In what follows we assume that the same alphabet V is used in Examples 1 and 2. First, we construct the ANEPPFC Γ1 = (V, U1 , G1 , N1 , α1 , β1 , yI , yO ), G1 = (XG1 , EG1 ), of size 3 with the working alphabet U1 = V ∪ {¯ a | a ∈ V }, and the nodes of XG1 = {yI , ydel , yO } defined by: Node R α yI {b → ε(−) | b ∈ V } ∗ ydel {b → ε(−) | b ∈ V } ∗ yO {a → a ¯(−) | a ∈ V } ∗ The edges of EG1 together with the filters associated with them are defined by:
Networks of Evolutionary Picture Processors with Filtered Connections
79
Edge P F β1 {yI , ydel } V {¯ a|a∈V} w {yI , yO } V {¯ a|a∈V} w {ydel , yO } V {¯ a|a∈V} w The informal idea of the role of this network is the following one. In the nodes yI and ydel some nondeterministically chosen rows are repeatedly deleted from the pictures visiting these nodes several times. Note that a copy of any picture going out from ydel and yI may enter yO . As soon as a picture arrives in yO and an occurrence of a symbol a from that picture is replaced by a ¯, the picture remains blocked in this node, until all its symbols are replaced with their barred copies. We now consider the ANEPPFC Γ = (V, U, G, N, α, β, xI , xO ) from Example 1 and the one-to-one mapping h : U −→ {¯ a | a ∈ V } ∪ (U \ V ) defined by h(a) = a ¯, a ∈ V , and h(b) = b, b ∈ U \ V . Let Γ2 be the ANEPPFC obtained from Γh by replacing h(U ) with U1 ∪ U wherever h(U ) appears in the definition of parameters of Γh . We now connect yO of Γ1 with xI of Γ2 and impose that a picture cannot go out from yO unless all its symbols were substituted by barred copies. Furthermore, besides all symbols in V , the set of forbidding symbols of the filter on the edge {yO , xI } contains all symbols Xa¯ , Xa¯ , Ya¯ , Ya¯ for a ∈ V . We claim that the new network weakly accepts L. Indeed, the subnetwork Γ2 can start to work when it receives pictures having barred symbols only. By the above explanations, they must be pictures with only two rows that are barred copies of two rows randomly selected from the input picture. 2 In what follows, instead of giving all the details of how two networks are merged, as in Example 2, we simply say that the pictures processed by the network Γ1 are given as inputs to the network Γ2 suitably modified.
4
Comparison with Other Devices
In this section we compare the classes Lwa (AN EP P F C) and Lsa (AN EP P F C) of picture languages weakly and strongly accepted by ANEPPFCs, respectively, with L(LOC) and L(REC) denoting the classes of local and recognizable picture languages, respectively, see [7]. Theorem 2. Lwa (AN EP P F C) \ L(REC) = ∅. Proof. We first claim that the following language m L = {π ∈ V2n | n, m ≥ 1, (π(n, i) = π(n + 1, i)), ∀i ∈ [m]}
is not recognizable, provided that card(V ) ≥ 2. The proof is identical to that for the same statement in [1]. As work [1] is not accessible yet we give it here again. Clearly, L consists of all pictures that can be written in the form π1 π2 , where π1 , π2 are pictures of the same size and the last row of π1 is equal to the first row of π2 . Assume that L is recognizable and let L = h(L ), where h is a projection from some alphabet U to V and L ⊆ U∗∗ is a local language. For two
80
P. Bottoni et al.
positive integers n, m, let L(n, m) be the subset of L formed by all pictures that can be written in the form π1 π2 with π1 , π2 as above but satisfying also the following two conditions: - both π1 and π2 are of size (n, m); - neither π1 nor π2 contains two consecutive identical rows. Therefore, there exists a subset L (n, m) of L such that L(n, m) = h(L (n, m)) for all n, m. Let m be fixed; as every set L(n, m) is not empty for all values of n, it follows that all sets L (n, m) are nonempty as well. Therefore, there are two pictures ρ ∈ L (n1 , m) and τ ∈ L (n2 , m), with n1 = n2 such that the stripe rectangle of size (2, m) consisting of the n1 -th and (n1 + 1)-th rows in ρ equals the stripe rectangle of size (2, m) consisting of the n2 -th and (n2 + 1)-th rows in τ . Consequently, both pictures obtained from ρ and τ by interchanging their first halves with each other are in L . However, the projection by h of any of these pictures is not in L, a contradiction. We now prove that the language m L = {π ∈ V2n | n, m ≥ 1, π(n, i) = π(n + 1, i), ∀i ∈ [m]}
is in Lwa (AN EP P F C) for any alphabet V . We give only the description of the network processing the input pictures until they are sent to the input node of the network from Example 1 suitably modified. The five nodes of this network are defined as follows: Node R α xI {a → X(−), a → a (−) | a ∈ V } ↑ x1 {a → Y (−) | a ∈ V } ↓ x2 {X → ε(−)} ↑ x3 {Y → ε(−)} ↓ x4 {a → a (−) | a ∈ V } ∗ We now define the edges of this network with the filters associated with them: Edge P F β1 {xI , x1 } {X} {a | a ∈ V } ∪ {Y } s {xI , x4 } {a | a ∈ V } {X, Y } w {x1 , x2 } {X, Y } {a | a ∈ V } s {x2 , x3 } {Y } {a | a ∈ V } ∪ {X} s {x3 , xI } V {a | a ∈ V } ∪ {X, Y } w The working mode of this network is rather simple. In the input node the first row of the picture is marked either for deletion (if a symbol of the first row was replaced by X) or for the checking phase. If the first row was marked for deletion, the picture goes to the node x1 where the last row is marked for deletion. When the picture contains X and Y it enters x2 . Note that when a picture enters x2 it may contains more than one occurrence of X on its first row but only one Y on its last row. The first and the last row are deleted in the nodes x2 and x3 , and the process resumes in the input node xI .
Networks of Evolutionary Picture Processors with Filtered Connections
81
Let us now see what happens with a picture marked for the checking phase in the input node. This picture enters nodes x4 . We connect this node with the input node of the network in Example 1 suitable modified and impose that a picture can enter the input node of this network only if all its symbols are primed copies. Note that in the process of changing all symbols into their primed copies the picture can enter xI several time. Pictures entering xI may either go back to x3 for continuing the computational process or remain in xI forever. 2 We do not know whether the inclusion L(REC) ⊂ Lwa (AN EP P F C) holds, however a large part of L(REC) is included in Lwa (AN EP P F C) as the next result states. We recall that the complement of any local language is recognizable [7]. Theorem 3. The complement of every local language can be weakly accepted by an ANEPPFC. Proof. We start with an informal argument such that the formal proof can be understood easily. The argument starts with the observation that one can construct a network that weakly accepts only a fixed picture of size (2, 2). Now, if L is a local language over the alphabet V defined by the set F of (2, 2)-tiles, then we consider the set F c of all (2, 2)-tiles over V that do not belong to F . This network is made up of mainly two disjoint subnetworks: one subnetwork weakly accepts all pictures of size (n, m), with n, m ≥ 2, in the complement of L, while the other subnetwork weakly accepts all pictures of size (1, n) and (n, 1) with n ≥ 1. As the construction of the latter network is pretty simple, we discuss here the former one in detail. The rough idea of the network weakly accepting all the pictures of size (n, m), with n, m ≥ 2, in the complement of L is the following one. It consists of a subnetwork that cuts an arbitrary subpicture of the input picture. This subpicture is sent to every subnetwork from a set of completely disjoint networks each one accepting exactly one picture from F c . Formally, we assume that F c has the tiles t1 , t2 , . . . tn for some n ≥ 1 and a b ti = i i , where ai , bi , ci , di ∈ V . The shape of this network is shown in Figure ci di 1 while its nodes are defined as follows: Node R α xI ∅ ∗ x1 {a → ε(−) | a ∈ V } ↑ x2 {a → ε(−) | a ∈ V } ↓ y1 {a → ε(|) | a ∈ V } ← y2 {a → ε(|) | a ∈ V } → zi1 , 1 ≤ i ≤ n {ai → a11 ↑ i (−)} 2 zi , 1 ≤ i ≤ n {bi → b12 ↑ i (−)} zi3 , 1 ≤ i ≤ n {ci → c21 (−)} ↓ i zi4 , 1 ≤ i ≤ n {di → d22 (−)} ↓ i zi5 , 1 ≤ i ≤ n {a11 → ε(|)} ← i ziout , 1 ≤ i ≤ n ∅ ∗
82
P. Bottoni et al.
x1
x2
y1
y2
xI
z11
z21
z31
zn1
z12
z22
z32
zn2
z13
z23
z33
zn3
z14
z24
z34
zn4
z15
z25
z35
zn5
z1out
z2out
z3out
znout
Fig. 1.
The role of the nodes defined above is as follows: – Nodes x1 and x2 delete the first and the last row of a picture, respectively. – Nodes y1 and y2 delete the leftmost and the rightmost row of a picture, respectively. – Nodes zi1 , zi2 , zi3 , zi4 , zi5 and ziout check whether or not a picture equals the tile ti , 1 ≤ i ≤ n.
Networks of Evolutionary Picture Processors with Filtered Connections
83
We now define the edges of this network with the filters associated with them: Edge P {xI , u}, u ∈ {x1 , x2 , y1 , y2 }∪ V {a11 i | ai 1 {zi | 1 ≤ i ≤ n} {zi1 , zi2 } {a11 i } 2 3 12 {zi , zi } {a11 , i bi } 12 21 {zi3 , zi4 } {a11 i , b i , ci } 4 5 11 12 21 22 {zi , zi } {ai , bi , ci , di } 22 {zi5 , ziout } {b12 i , di }
F β ∈ V, 1 ≤ i ≤ n} w {b12 i } {c21 i } {d22 i } V V
s s s s s
By the aforementioned explanations, it is rather easy to check that a computation of this network on a picture π leads to a non-empty node ziout if and only if π contains the tile ti . 2 We finish this work by pointing out a natural problem that regards the equality of the classes Lwa (AN EP P F C) and Lsa (AN EP P F C). Another attractive problem, in our view, concerns the relationships between these two classes and the classes L(LOC) and L(REC). Last but not least, a possible direct simulation of one model by another which is suggested by the results presented here will be in our focus of interest.
References 1. Bottoni, P., Labella, A., Mitrana, V., Sempere, J.: Networks of evolutionary picture processors (submitted) 2. Bottoni, P., Labella, A., Manea, F., Mitrana, V., Sempere, J.: Filter position in networks of evolutionary processors does not matter: a direct proof. In: The 15th International Meeting on DNA Computing and Molecular Programming (in press) 3. Dr˘ agoi, C., Manea, F., Mitrana, V.: Accepting networks of evolutionary processors with filtered connections. Journal of Universal Computer Science 13, 1598–1614 (2007) 4. Dr˘ agoi, C., Manea, F.: On the descriptional complexity of accepting networks of evolutionary processors with filtered connections. International Journal of Foundations of Computer Science 19, 1113–1132 (2008) 5. Errico, L., Jesshope, C.: Towards a new architecture for symbolic processing. In: Artificial Intelligence and Information-Control Systems of Robots 1994, pp. 31–40. World Scientific, Singapore (1994) 6. Giammarresi, D., Restivo, A.: Two-dimensional languages. In: [13], pp. 215–267 7. Giammarresi, D., Restivo, A.: Recognizable picture languages. Int. J. Pattern Recognition and Artificial Intelligence 6, 241–256 (1992) 8. Hillis, W.: The Connection Machine. MIT Press, Cambridge (1985) 9. Inoue, I., Takanami, I.: A survey of two-dimensional automata theory. In: Dassow, J., Kelemen, J. (eds.) IMYCS 1988. LNCS, vol. 381, pp. 72–91. Springer, Heidelberg (1989) 10. Margenstern, M., Mitrana, V., Jes´ us P´erez-J´ımenez, M.: Accepting hybrid networks of evolutionary processors. In: Ferretti, C., Mauri, G., Zandron, C. (eds.) DNA 2004. LNCS, vol. 3384, pp. 235–246. Springer, Heidelberg (2005)
84
P. Bottoni et al.
11. Manea, F., Martin-Vide, C., Mitrana, V.: On the size complexity of universal accepting hybrid networks of evolutionary processors. Mathematical Structures in Computer Science 17, 753–771 (2007) 12. Mart´ın-Vide, C., Mitrana, V.: Networks of evolutionary processors: results and perspectives. In: Molecular Computational Models: Unconventional Approaches, pp. 78–114. Idea Group Publishing, Hershey (2005) 13. Rozenberg, G., Salomaa, A. (eds.): Handbook of Formal Languages. Springer, Berlin (1997)
Mapping Computation with No Memory Serge Burckel1, Emeric Gioan2 , and Emmanuel Thom´e1 1 2
INRIA-LORIA, France CNRS-LIRMM, France
Abstract. We investigate the computation of mappings from a set S n to itself with in situ programs, that is using no extra variables than the input, and performing modifications of one component at a time. We consider several types of mappings and obtain effective computation and decomposition methods, together with upper bounds on the program length (number of assignments). Our technique is combinatorial and algebraic (graph coloration, partition ordering, modular arithmetics). For general mappings, we build a program with maximal length 5n−4, or 2n − 1 for bijective mappings. The length is reducible to 4n − 3 when |S| is a power of 2. This is the main combinatorial result of the paper, which can be stated equivalently in terms of multistage interconnection networks as: any mapping of {0, 1}n can be performed by a routing in a double n-dimensional Beneˇs network. Moreover, the maximal length is 2n − 1 for linear mappings when S is any field, or a quotient of an Euclidean domain (e.g. Z/sZ). In this case the assignments are also linear, thereby particularly efficient from the algorithmic viewpoint. The in situ trait of the programs constructed here applies to optimization of program and chip design with respect to the number of variables, since no extra writing memory is used. In a non formal way, our approach is to perform an arbitrary transformation of objects by successive elementary local transformations inside these objects only with respect to their successive states. Keywords: mapping computation, boolean mapping, linear mapping, memory optimization, processor optimization, program design, circuit design, multistage interconnection network, butterfly, rearrangeability.
1
Introduction
The mathematical definition of a mapping E : S n → S n can be thought of as the parallel computation of n assignment mappings S n → S performing the mapping E, either by modifying at the same time the n component variables, or mapping the n input component variables onto n separate output component variables. If one wants to compute sequentially the mapping E by modifying the components one by one and using no other memory than the input variables whose final values owerwite the initial values, one necessarily needs to transform the n mappings S n → S in a suitable way. We call in situ computation this way of computing a mapping, and we prove that it is always possible with a C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 85–97, 2009. c Springer-Verlag Berlin Heidelberg 2009
86
S. Burckel, E. Gioan, and E. Thom´e
number of assignments linear with respect to n and a small factor depending on the mapping type. The impact of these results should be both practical and theoretical. To be formal and to avoid confusions, let us already state a definition. For the ease of the exposition, we fix for the whole paper a finite set S of cardinal s = |S|, a strictly positive integer n and a mapping E : S n → S n . Definition 1. An in situ program Π of a mapping E : S n → S n is a finite sequence (f (1) , i(1) ), (f (2) , i(2) ), ..., (f (m) , i(m) ) of assignments where f (k) : S n → S and i(k) ∈ {1, ..., n}, such that every transformation X = (x1 , ..., xn ) → E(X) is computed by the sequence of successive modifications X := (x1 , ..., xi(k) −1 , f (k) (X), xi(k) +1 , ..., xn ),
k = 1, 2, ..., m
where f (k) modifies only the i(k) −th component of X. In other words, every assignment (f (k) , i(k) ) of an in situ program performs the elementary operation xi(k) := f (k) (x1 , ..., xn ). The length of Π is the number m. The signature of Π is the sequence i(1) , i(2) , ..., i(m) . All in situ programs considered throughout this paper operate on consecutive components, traversing the list of all indices, possibly several times in forward or backward order. Thus program signatures will all be of type: 1, 2, ..., n − 1, n, n − 1, ..., 2, 1, 2, ...n − 1, n, .... For ease of exposition, we shorten the above notations the following way: the mappings S n → S corresponding to assignments in the several traversals will be simply distinguished by different letters, e.g. fi denotes the mapping affecting the variable xi on the first traversal, gi the one affecting xi on the second traversal, and so on, providing an in situ program denoted f1 , f2 , ..., fn−1 , fn , gn−1 , ..., g2 , g1 , .... For instance, a program f1 , f2 , g1 on S 2 represents the sequence of operations: x1 := f1 (x1 , x2 ), x2 := f2 (x1 , x2 ), x1 := g1 (x1 , x2 ). As a preliminary example, consider the mapping E : {0, 1}2 → {0, 1}2 defined by E(x1 , x2 ) = (x2 , x1 ) consisting in the exchange of two boolean variables. A basic program computing E is: x := x1 , x1 := x2 , x2 := x . An in situ program f1 , f2 , g1 of E avoids the use of the extra variable x , with f1 (x1 , x2 ) = f2 (x1 , x2 ) = g1 (x1 , x2 ) = x1 ⊕ x2 . Our results can be seen as a far reaching generalization of this classical computational trick. The motivations for this work will now be detailed. They are of three types : technological, combinatorial and algorithmic. First, a permanent challenge in computer science consists in increasing the performances of computations and the speed of processors. A computer decomposes a computation in elementary operations on elementary objects. For instance, a 32 bits processor can only perform operations on 32 bits, and any
Mapping Computation with No Memory
87
transformation of a data structure must be decomposed in successive operations on 32 bits. Then, as shown in the above example on the exchange of the contents of two registers, the usual solution to ensure the completeness of the computation is to make copies from the initial data. But this solution can generate some memory errors when the structures are too large, or at least decrease the performances of the computations. Indeed, such operations involving several registers in a micro-processor, through a compiler or an electronic circuit, will have to make copies of some registers in the cache memory or in RAM, with a loss of speed, or to duplicate signals in the chip design itself, with an extra power consumption. On the contrary, the theoretical solution provided by in situ computation would avoid the technological problems alluded to, and hence increase the performance. We point out that theoretical and combinatorial approaches such as ours are found fruitful in the context of chip design in many electronic oriented publications, see for instance [10] for further references. A short note on our methods intended for an electronic specialist audience has already been published [4]. Further research in this direction (also related to algorithmic questions, see below) would be to develop applications in software (compilers) and hardware (chip design). From the combinatorial viewpoint, the assignments, which are mappings S n → S, can be considered under various formalisms. For example, in multistage interconnection networks, an assignment is regarded as a set of edges in a bipartite graph between S n and S n where an edge corresponds to the modification of the concerned component. Multistage interconnection networks have been an active research area over the past forty years. All the results of the paper can be translated in this context, since making successive modifications of consecutive components of X ∈ S n is equivalent to routing a butterfly network (i.e. a suitably ordered hypercube) when S = {0, 1}, or a generalized butterfly network with greater degree for an arbitrary finite set S (see Section 2). In the boolean case, the existence of an in situ program with 2n − 1 assignments for a bijective mapping is equivalent to the well known [2] rearrangeability of the Beneˇs network (i.e. of two opposite butterflies), that is: routing a Beneˇs network can perform any permutation of the input vertices to the output vertices. Rearrangeability is a powerful tool in network theory. And we mention that butterfly-type structures also appear naturally in recursive computation, for example in the implementation of the well-known FFT algorithm [7], see [9]. First, we state such a rearrangeability result extended to an arbitrary finite set S (see Theorem 1, which is presumably not new). Next, we address the problem of routing a general arbitrary mapping instead of a permutation, which is a non-trivial and new extension. A general result is obtained involving 5n − 4 mappings (see Corollary 2). Then, the main combinatorial result of the paper, on boolean mappings (see Theorem 3), proposes a more involved answer to this problem. An equivalent statement is the following: any mapping of {0, 1}n is performed by a routing in a double n-dimensional Beneˇs network.
88
S. Burckel, E. Gioan, and E. Thom´e
From the algorithmic viewpoint, building assignments whose number is linear in n to perform a mapping of S n to itself is satisfying in the following sense. If the input data is an arbitrary mapping E : S n → S n with |S| = s, given as a table of n×sn values, then the output data is a linear number of mappings S n → S whose total size is a constant times the size of the input data. This means that the in situ program of E has the same size as the definition of E by its components, up to a multiplicative constant. This complexity bound is essentially of theoretical interest, since in terms of effective technological applications, it may be difficult to deal with tables of n×sn values for large n. Hence, it is interesting to deal with an input data given by algebraic expressions of restricted size, like polynomials of bounded degree for instance, and compare the complexity of the assignments in the output data with the input one. This general question (also related to the number of gates in a chip design) is motivating for further research (examples are given in [4]). Here, we prove that, in the linear case, i.e. if the input is given by polynomials with degree at most 1, with respect to any suitable algebraic structure for S (e.g. any field, or Z/sZ), then the assignments are in number 2n − 1 and overall are also linear (see Theorem 4). Hence, we still obtain a program whose size is proportional to the restricted size of the input mapping. This result generalizes to a large extent the result in [6] obtained for linear mappings on the binary field. We will also discuss the complexity of the algorithms that build the in situ programs, which is not the same complexity problem. In the linear case, the decomposition method takes O(n3 ) steps. This paper is organized as follows. Section 2 investigates the link between in situ programs (as defined by definition 1) and multistage interconnection networks. Subsequent sections of the paper give reformulations of the presented results in both settings. In Section 3, we prove that every bijective, resp. general, mapping E on S n is computed by a sequence of 2n− 1, resp. 5n− 4, assignments. In Section 4, we improve the bound 5n − 4 to 4n − 3 in the case S = {0, 1}. In Section 5, we consider a set S with an algebraic suitable ring structure. We prove that every linear mapping E on S n is computed by a sequence of 2n − 1 linear assignments.
2
Multistage Interconnection Networks
A multistage interconnection network, or MIN for short, is a directed graph whose set of vertices is a finite number of copies S1n , S2n , . . . , Skn of S n , called n columns, and whose edges join elements of Sin towards some elements of Si+1 for 1 ≤ i < k. Then routing a MIN is specifying one outgoing edge from each vertex of Sin for 1 ≤ i < k. A mapping E of S n is performed by a routing of a MIN if for each element X ∈ S1n there is a directed path using specified edges from X to E(X) ∈ Skn . The gluing of two MINs M, M is the MIN M |M obtained by identifying the last column of M and the first column of M .
Mapping Computation with No Memory x 3 x 2 x 1 x1:=f1(x)
x2:=f2(x)
x3:=f3(x)
x2:=g2(x)
89
x1:=g1(x)
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
1
0
0
1
0
0
1
0
1
0
0
1
0
0
1
0
0
1
0
0
1
0
0
1
0
0
1
1
0
1
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
0
1
0
0
1
0
0
1
0
0
1
0
0
1
0
0
1
0
1
1
0
1
1
0
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
0
1
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
assignment network
butterfly
reverse butterfly Benes network
Fig. 1.
The assignment network Ai is the MIN with two columns whose edges join (x1 , . . . , xn ) to (x1 , . . . , xi−1 , e, xi+1 , . . . , xn ) for an arbitrary e ∈ S. Hence each vertex has degree s =| S |. With notations of Definition 1, given an assignment (f (k) , i(k) ) in an in situ program, we naturally define a routing of Ai(k) by specifying the edge between X = (x1 , . . . , xn ) and (x1 , ..., xi(k) −1 , f (k) (X), xi(k) +1 , ..., xn ). Hence, the modifications made by the assignments of the program are represented by this routing in the columns of this (s) (s) MIN. Denote Rn the MIN A1 |A2 | . . . |An and Bn the MIN An | . . . |A2 |A1 . The (2) usual butterfly, also called indirect binary cube, stands here as Bn . The Beneˇs (2) (2) network is the network obtained from Rn |Bn by replacing the two consecutive assignment networks An by a single one. Note that this last reduction is not part of the usual definition, however it is more convenient here since two successive assignments on a same component can always be replaced with a single one. Note also that the historical definition of a Beneˇs network [2] is not in terms of butterflies, but that ours is topologically equivalent thanks to classical results (see [1] and [3] for instance), and hence they are equivalent in terms of mappings performed. From the above definitions, an in situ program of signature i(1) , . . . , i(m) corresponds to a routing in Ai(1) | . . . |Ai(m) . Figure 1 gives an example for the Beneˇs network, with corresponding in situ program f1 , f2 , f3 , g2 , g1 (with shortened notation). Routing this network is exactly specifying these mappings.
3
Bijective and General Mappings on Finite Sets
The classical property of the Beneˇs network is that it is rearrangeable, that is for any permutation of {0, 1}n, there exists a routing performing the permutation (note that a routing performs a permutation when it defines disjoint directed paths). This result corresponds to the particular case S = {0, 1} of the next theorem, providing the rearrangeability property for a Beneˇs-type network with out-degree generalized from 2 to s. This generalization is presumably not new but the authors did not find such a statement in the literature.
90
S. Burckel, E. Gioan, and E. Thom´e
Theorem 1. Let E be a bijective mapping on S n . There exists an in situ pro(s) (s) gram for E of length 2n − 1 and signature 1 . . . n . . . 1. Equivalently, Rn |Bn has a routing performing E. Proof. Observe that one can permute the ordering of the variables in the above statement and obtain in situ programs with other signatures. We build such an in situ program fn , fn−1 , . . . , f2 , f1 , g2 , . . . , gn−1 , gn for E by induction on n. For n = 1, it is obvious since X := E(X) is computed by the program x1 := f1 (x1 ) with f1 = E. Assume n > 1. Let G = (X, Y, A) be the bipartite multi-edges graph defined by: X = Y = S n−1 , and (x, y) ∈ X × Y is in A with label (xn , yn ) ∈ S 2 , if and only if E(x, xn ) = (y, yn ). Since E is bijective, any vertex of G has exactly degree s = |S|. Then the edges of G are colorable with the s elements of S (see [8]). Now, define s mappings E 0 , E 1 , . . . , E s−1 on S n−1 and two mappings fn , gn from S n to S as follow. For each color i ∈ S and every edge (x, y) with color i and label (xn , yn ), define: E i (x) = y, fn (x, xn ) = i, and gn (y, i) = yn . So, after the first step of the program and until the step before last, the component xn equals a color i. Any mapping E i being bijective on S n−1 is i i computed by induction in 2(n − 1) − 1 steps: fn−1 , . . . , f2i , f1i , g2i , . . . , gn−1 . n−1 i Now, define for every i ∈ S and x ∈ S : fn−1 (x, i) = fn−1 (x), ..., f1 (x, i) = i f1i (x), g2 (x, i) = g2i (x), ..., gn−1 (x, i) = gn−1 (x). After the step before last, we have x = y. And after the last step, we have xn = yn . Observe that the computational complexity of our decomposition algorithm for building an in situ program for a bijective mapping E on {0, 1}n given by a table of t = n.2n boolean entries is in DT IM E(t.log(t)). Indeed, defining E0 , E1 takes n.2n steps. Then, each Ei is decomposed in Ei0 , Ei1 in (n − 1).2n−1 steps, and so on... The total number of steps is bounded by n.2n + 2.(n − 1).2n−1 + 4.(n − 2).2n−2 + ... + 2n−1 .1.21 < 2n .n2 . Corollary 1. If Π is an in situ program of a bijection E on {0, 1}n , then the reversed sequence of assignments is an in situ program of the inverse bijection E −1 . Proof. First, we show that operations in the program Π are necessarily of the form xi := xi + h(x1 , .., xi−1 , xi+1 , ..., xn ). One can assume without loss of generality that i = 1. Let x1 := f (x1 , ..., xn ) be an operation of Π. Denote h(x2 , . . . , xn ) = f (0, x2 , . . . , xn ). We necessarily have f (1, x2 , . . . , xn ) = 1 + h(x2 , . . . , xn ). Otherwise two different vectors would map to the same image. This yields f (x1 , . . . , xn ) = x1 + h(x2 , . . . , xn ). As a consequence, performing the operations in reverse order will compute the inverse bijection E −1 . Now, in order to build a program for a general mapping E on S n , for which different vectors may have same images, we will use a special kind of mappings on S n , that can be computed with n assignments. Definition 2. Denote [sn ] the interval of integers [0, . . . , sn − 1]. The index of a vector (x1 , x2 , . . . , xn ) is the integer x1 + s.x2 + · · · + sn−1 .xn of [sn ]. For
Mapping Computation with No Memory
91
every i ∈ [sn ], denote by Xi the vector of index i. The distance of two vectors Xa , Xb is the integer Δ(Xa , Xb ) = |b − a|. A mapping I on S n is distancecompatible if for every x, y ∈ S n , Δ(I(x), I(y)) ≤ Δ(x, y), which is equivalent to Δ(I(Xa ), I(Xa+1 )) ≤ 1 for every a with 0 ≤ a < sn − 1. Proposition 1. Every distance-compatible mapping I on S n is computed by an in situ program p1 , p2 , . . . , pn . Hence, for I(x1 , . . . , xn ) = (y1 , . . . , yn ) and for each i = 1, 2, . . . , n: pi (y1 , . . . , yi−1 , xi , . . . , xn ) = yi . Proof. Since each component is modified one time, necessarily each function pi must give its correct final value to each component xi . It remains to prove that this unique possible method is correct, that is the mappings pi are well defined by the property above (note that this definition is partial, but sufficient for computing the image of any x). Assume that p1 , ..., pi are well defined. Assume that, after step i, two different vectors x, x are given the same image by the process whereas their final expected images I(x) and I(x ) were different. The components xj , j > i, of x and x have not been modified yet. Hence, they are equal and we deduce Δ(x, x ) < si . On the other hand, the components yj , j ≤ i, of I(x) and I(x ) are equal but I(x) = I(x ). Hence Δ(I(x), I(x )) ≥ si : a contradiction. So pi+1 is also well defined by the property above. Definition 3. We call partition-sequence of S n a sequence P = (P0 , P1 , . . . , Pk ) of subsets of S n such that the non-empty ones form a partition of S n . Then, we denote by IP the mapping on S n which maps X0 , . . . , Xsn −1 respectively to |P0 |
|P1 |
|Pk |
X 0 , . . . , X0 , X 1 , . . . , X 1 , . . . , X k , . . . , X k . Observe that IP is well defined since the sum of sizes of the subsets equals sn , and that IP depends only on the sizes of the subsets and their ordering. Observe also that if no subset is empty, then IP is distance-compatible since, by construction, Δ(I(Xa ), I(Xa+1 )) ≤ 1 for every a. Let E be a mapping on S n , and P = (P0 , P1 , . . . , Pk ) be a partition-sequence of S n whose underlying partition of S n is given by the inverse images of E: if Pi = ∅, then Pi = E −1 (yi ) for some yi ∈ S n . Then, a P -factorisation of E is a triple of mappings (F, I, G) on S n where: G is bijective and maps Pi to I −1 (Xi ); I is the mapping IP ; and F maps Xi to yi and is arbitrarily completed to be bijective. By construction E = F ◦ I ◦ G. Using this construction with no empty subset in the sequence P , we obtain the following theorem, which significantly improves the result of [5] where boolean mappings on {0, 1}n are computed in n2 steps.
92
S. Burckel, E. Gioan, and E. Thom´e
Theorem 2. For every finite set S, every mapping E on S n is computed by an in situ program of signature 1 . . . n . . . 1 . . . n . . . 1 . . . n and length 5n − 4. (s) (s) (s) (s) (s) Equivalently, Rn |Bn |Rn |Bn |Rn has a routing performing E. Proof. Consider any P -factorisation (F, I, G) of E with no empty subset in the sequence P . Then the mapping I is distance compatible. By Theorem 1, G (resp. F ) can be computed by a program of signature 1 . . . n . . . 1 (resp. n . . . 1 . . . n). By Proposition 1, I is computed by a program of signature 1 . . . n. By composition and contracting two successive assignments of the same variable in one, E is computed by a sequence of 5n − 4 assignments of signature 1 . . . n . . . 1 . . . n . . . 1 . . . n. Remark. To end this section, let us remark that, due to the fact that successive assignments operate on consecutive components, successive assignements of type S mn → S can be grouped in assignments of fewer variables on a larger base set S m defining successive mappings S mn → S m : fnm , . . . , fn.(m−1)+1 , . . . , fm , . . . f2 , f1 , g2 , . . . , gm , . . . , gn.(m−1)+1 , . . . , gnm . f˜n
f˜1
g ˜n
Hence, for instance, the case S = {0, 1}m can be reduced to the case S = {0, 1}. This is a particular case of the register integrability property described in [4].
4
General Mappings on the Boolean Set
In this section, we will fix S = {0, 1}. The more involved method for general boolean mappings is a refinement of the method for general mappings on finite sets and provides a smaller number of assignments. It is valid when S = {0, 1}, and, by extension, when S = {0, 1}m. We still use a P -factorisation (F, I, G) but the sequence P will possibly contain empty sets, and will be suitably ordered with respect to the sizes of its elements, in order to satisfy some boolean arithmetic properties. So doing, the intermediate mapping I = IP will have the property that its composition with the first n steps of the in situ program of the bijection F can also be computed with n assignments. Lemma 1. Every sequence of 2n non negative integers whose sum is 2n can be ordered in a block-sequence [v0 , v1 , . . . , v2n −1 ] such that, for every i = 0 . . . n, the sum of values in consecutive blocks of size 2i is a multiple of 2i , that is, for all 0 ≤ j < 2n−i : vl = 0[2i ]. j2i ≤l<(j+1)2i
Proof. The ordering is built inductively. Begin at level i = 0 with 2n blocks of size 1 having each value in the sequence. At level i + 1, form consecutive pairs of blocks [B, B ] that have values v, v of same parity and define the value of this new block to be (v + v )/2. Each new level doubles the size of blocks and divides their number by 2. The construction is valid since the sum of values of blocks at level i is 2n−i .
Mapping Computation with No Memory
93
Example. We illustrate below the process described in the proof of Lemma 1 (n = 4 and each block has its value as an exponent): [4]4 , [1]1 , [1]1 , [1]1 , [1]1 , [1]1 , [1]1 , [3]3 , [3]3 , [0]0 , [0]0 , [0]0 , [0]0 , [0]0 , [0]0 , [0]0 [4, 0]2 , [1, 1]1 , [1, 1]1 , [1, 1]1 , [3, 3]3 , [0, 0]0 , [0, 0]0 , [0, 0]0 [4, 0, 0, 0]1, [1, 1, 3, 3]2, [1, 1, 1, 1]1, [0, 0, 0, 0]0 [4, 0, 0, 0, 1, 1, 1, 1]1, [1, 1, 3, 3, 0, 0, 0, 0]1 [4, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 3, 0, 0, 0, 0]1 Definition 4. For a vector (x1 , . . . , xn ), we call prefix of order k, resp. suffix of order k, the vector (x1 , . . . , xk ), resp. (xk , . . . , xn ). A mapping I of {0, 1}n is called suffix-compatible if, for every 1 ≤ k ≤ n, if two vectors X, X have same suffixes of order k, then their images I(X), I(X ) also have same suffixes of order k. Lemma 2. Let P = (P0 , P1 , . . . , P2n −1 ) be a partition-sequence of {0, 1}n such that [|P0 |, |P1 |, . . . , |P2n −1 |] is a block-sequence. Then the mapping IP on {0, 1}n is suffix-compatible. Proof. The sketch of the proof is the following. First, define the j-th block of level i of {0, 1}n as the set of vectors with index j2i ≤ l < (j + 1)2i . Observe that the inverse image by IP of a block is a union of consectutive blocks of same level. The result follows. Let us now detail the proof. For 0 ≤ i ≤ n and j ∈ [2n−i ], define the j-th block at level i of {0, 1}n as Vi,j = {Xl : l ∈ [j2i , (j + 1)2i − 1]}. (i) First, we prove that, for every i, j as above, there exists k, k ∈ [2n−i ], such that IP−1 (Vi,j ) = Vi,l . k≤l≤k
Let us call interval of {0, 1}n the set of vectors Xl for l belonging to an interval n of [2n ]. First, notice that the inverse image by IP of an interval of {0, 1} is an −1 n interval of {0, 1} . By definition of IP , we have IP (Vi,j ) = j2i ≤l<(j+1)2i vl . Remark that IP−1 (Vi,j ) may be empty, when vl = 0 for all l ∈ [j2i , (j + 1)2i ]. Since [v0 , . . . , v2n −1 ] is a block sequence, we have j2i ≤l<(j+1)2i vl = 0 mod 2i . Hence, IP−1 (Vi,j ) = 0 mod 2i . For a fixed i, we prove the result by induction on j. If j = 0 then IP−1 (Vi,0 ) = k.2i for some k ∈ [2n−i ]. If IP−1 (Vi,0 ) is not empty, then it is an interval of {0, 1}n containing (0, ..., 0) by
definition of IP . Since this interval has a size k.2i multiple i of 2 , it is of the form 0≤l≤k Vi,l .
If the property is true for all l with 0 ≤ l < j, then IP−1 0≤l<j Vi,l ) = −1
I (Vi,j ) = k.2i for some k ∈ [2n−i ], we must have Vi,l . Since P 0≤l≤j
IP−1 0≤l≤j Vi,l ) = 0≤l≤j +k Vi,l , hence IP−1 (Vi,j ) = j
94
S. Burckel, E. Gioan, and E. Thom´e
Assume a = (a1 , ..., an ) and b = (b1 , ..., bn ) have same suffix of order i. For all l ≥ i we have al = bl . Let c ∈ S n be defined by cn = an = bn , . . . , ci = ai = bi , ck−1 = 0, . . . , c1 = 0. Let φ(x) denote the index of vector x. We have φ(c) = 0 mod 2i−1 , that is φ(c) = j.2i−1 for some j ∈ [2n−i+1 ]. And φ(a) and φ(b) belong to the same interval [j.2i−1 , (j + 1).2i−1 − 1] whose elements have same components for l ≥ i. That is a and b belong to Vi−1,j . By (i), the inverse images of intervals of type Vi−1,k by IP are unions of such consecutive intervals. Hence the image of an interval Vi−1,j by Ip is an interval contained in an interval Vi−1,k for some k ∈ [2n−i+1 ]. Hence IP (a) and IP (b) have same components l ≥ i. Proposition 2. Let I be a suffix-compatible mapping. Let B be a bijective mapping on {0, 1}n computed by a program b1 , . . . , bn . The mapping B ◦ I is computed by a program p1 , p2 , . . . , pn . Hence, for B ◦ I(x1 , . . . , xn ) = (y1 , . . . , yn ): pi (y1 , . . . , yi−1 , xi , . . . , xn ) = yi . Proof. Just as for Proposition 1, assume that p1 , ..., pi are well defined by the necessary property above, and that, after step i, two different vectors x, x are given the same image by the process whereas their final expected images y = B ◦ I(x) and y = B ◦ I(x ) were different (hence I(x) = I(x )). By construction, y, y have a same prefix P of order i and x, x have a same suffix Q of order i + 1. Moreover, since I is suffix-compatible, the vectors I(x), I(x ) also have a same suffix R of order i + 1. Let Bi be the mapping computed by b1 , . . . , bi . We obtain that Bi (I(x)) = Bi (I(x )) = (P, R). Since Bi is necessarily bijective, then I(x) = I(x ): a contradiction. Now, given a mapping E of S n , using a P -factorisation of E for a sequence P whose sequence of cardinalities is a block-sequence, we can improve the result of Section 3. Theorem 3. Every mapping E on {0, 1}n is computed by an in situ program of length 4n − 3 and signature 1 . . . n . . . 1 . . . n . . . 1. Equivalently, the gluing of two Beneˇs networks has a routing performing E. Proof. Let (F, I, G) be a P -factorisation of E for a sequence P = (P0 , P1 , . . . , P2n −1 ) such that [|P0 |, |P1 |, . . . , |P2n −1 |] is a block-sequence (it exists thanks to Lemma 1). By Theorem 1, G (resp. F ) can be computed by a program of signature 1 . . . n . . . 1 (resp. 1 . . . n . . . 1). By Lemma 2, the mapping I = IP on {0, 1}n is suffix-compatible. Call B the mapping computed by the n first assignments b1 , ..., bn of the program of F . By Proposition 2, B ◦ I is also computed by a program of signature 1 . . . n. Then, by composition and contracting two successive assignments of the same variable in one, E is computed by a sequence of 4n − 3 assignments of signature 1 . . . n . . . 1 . . . n . . . 1. Example. Figure 2 gives an example for the construction of this section. The elements of {0, 1}3 are grouped by the bijection G at column 6, accordingly with the block sequence [1, 3, 2, 2] induced by E −1 . Then, at column 9 all elements
Mapping Computation with No Memory
95
000
000
000
000
000
000
000
000
000
000
000
001
001
001
001
001
001
001
001
001
001
001
010
010
010
010
010
010
010
010
010
010
010
011
011
011
011
011
011
011
011
011
011
011
100
100
100
100
100
100
100
100
100
100
100
101
101
101
101
101
101
101
101
101
101
101
110
110
110
110
110
110
110
110
110
110
110
111
111
111
111
111
111
111
111
111
111
111
reduced in one
B G
I F
I
Fig. 2.
with same final image have been given a same image by B ◦ I. At last, the second part of the bijection F allows to finalize the mapping E. Remark. Finally, to illustrate the importance of block-sequences and of S = {0, 1} for this section, let us give two small significant examples. First, consider the partition-sequence P = ({00}, {10, 01}, {11}) of {0, 1}2 whose sequence of cardinalities (1, 2, 1, 0) is not a block-sequence. The mapping IP is not suffix-compatible, since IP (01) = 10 and IP (11) = 01 have distinct x2 coordinate whereas 01 and 11 have same x2 coordinate. Second, the result of Lemma 1 building a block-sequence does not generalize to arbitrary S. For instance, with s = 3, and the integer values 1,2,2,4 whose sum equal 32 , one cannot find [a, b, c] within these values such that a + b + c = 0[3].
5
Linear Mappings on Suitable Ring Powers
This last section takes advantage of the structure provided by linear mappings S n → S n . The results of Section 3 show that O(n) assignments are sufficient to compute such a mapping. Here, we achieve a stronger result: the number of required mappings is bounded by 2n − 1, and all intermediary assignments are linear. In [6], a similar result is obtained in the particular case of linear boolean mappings. Here, S only needs to be a (non-necessarily finite) quotient of an Euclidean domain R by an ideal I. Classical examples for S are: any field (the result of this paragraph for S being a field is easier, since most technicalities can be skipped), the rings Z/sZ, or K[x]/(P ) for some polynomial P with coefficients in a field K. In the sequel, S is assumed to satisfy this property; R and I are defined accordingly, and S ∗ denotes the invertible elements of S. Lemma 3. Let x1 , . . . , xn be coprime elements of R. Let i0 ∈ [1 . . . n]. There exists multipliers λ1 , . . . , λn such that λi0 = 1, and i λi xi ∈ S ∗ .
96
S. Burckel, E. Gioan, and E. Thom´e
Proof. This a consequence of the Chinese Remainder Theorem. We treat the case where the ideal I is generated by a prime power pv . If xi0 is itself coprime to p, the result holds with λi = δii0 . Otherwise, the integers xi being coprime, there exists an integer i1 (p) such that xi1 (p) is coprime to p. Therefore xi0 +xi1 (p) i (p)
is coprime to p, hence we may set λi = δii0 + δi 1
.
Theorem 4. Every linear mapping E on S n is computed by an in situ program of length 2n − 1 and signature 1, 2, ..., n, n − 1, ..., 1 made of linear assignments. Furthermore, if E is bijective, then the inverse mapping E −1 is computed by the in situ program defined by the sequence of assignments in reversed order together with the following transformation: [xi := A(xi ) + F ] → [xi := A−1 (xi − F )]. Proof. The proof proceeds by induction. Let M be a matrix representing a mapping which leaves the first k − 1 variables unchanged (we initially have k = 1 for the starting matrix). Hence the first k − 1 rows of M equal those of the identity matrix. We explore the possibility of rewriting M as a product Lk M Rk , where the first k rows of M match those of the identity matrix. Let g be the greatest common divisor of (arbitrary representatives in R of) the coefficients of column k in M . A favorable situation is when mk,k is in gS ∗ . Should this not be the case, let us see how we can transform the matrix to reach this situation unconditionally. Assume then for a moment that mk,k ∈ / gS ∗ . Lemma 3 ∗ gives multipliers λ1 , . . . , λn such that λ m,k ∈ gS , with the additional constraint that λk = 1. Let us now denote by T the n × n matrix defined by ti,j = δij for i = k, and tk,j = λj . Clearly T is an invertible assignment matrix, and the product T ∗ M has a coefficient at position (k, k) which is in gS ∗ . Now assume mk,k ∈ gS ∗ . Let G be the diagonal matrix having Gk,k = g as the only diagonal entry not equal to 1. Let M = M G−1 (M has coefficients in R because g is the g.c.d. of column k). We have mk,k ∈ S ∗ . We form an assignment matrix U defined by ui,j = δij for i = k, and uk,j = mk,j . The matrix U is an invertible assignment matrix (its determinant is mk,k ). The k first rows of the matrix M = M ∗ U −1 match the k first rows of In , and we have M = T −1 × M × (U G). Our goal is therefore reached with Lk = T −1 and Rk = U G. Repeating the procedure, our input matrix is rewritten as a product L1 L2 . . . Ln−1 Rn . . . R1 , where all matrices are assignment matrices. No left multiplier Ln is needed for the last step. Finally, the determinant of M is invertible if and only if all the matrices Rk are invertible, hence the reversibility for bijective mappings. We digress briefly on the computational complexity of building the in situ programs for the linear mappings considered here. The matrix operations performed here all have complexity O(n2 ) because of the special shape of the assignment matrices. Therefore, the overall computational complexity of the decomposition is O(n3 ). The procedure above can be illustrated by a small example. Assume we want to decompose the mapping in Z/12Z given by the matrix
Mapping Computation with No Memory
M=
45 64
97
.
Our multiplication, which gives first step
is the left 1 −1 −2 1 M= . 0 1 64 Then, the common divisor 2 can be set aside, and the matrix U appears:
1 −1 −1 1 20 10 −1 1 20 M= = 0 1 4 0 1 7 01 0 1 3
−3
11 10 −2 1 11 10 10 1 M= = 01 −3 7 01 01 97 01 This corresponds to the following sequence of assignments: x1 := 10x1 + x2 ;
x2 := 9x1 + 7x2 ;
x1 := x1 + x2 .
References 1. Agrawal, D.P.: Graph theoretical analysis and design of multistage interconnection networks. IEEE Trans. Computers C32, 637–648 (1983) 2. Beneˇs, V.E.: Optimal Rearrangeable Multistage Connecting Networks. Bell System Technical J. 43, 1641–1656 (1964) 3. Bermond, J.C., Fourneau, J.M., Jean-Marie, A.: A graph theoretical approach to equivalence of multi-stage interconnection networks. Discrete Applied Maths. 22, 201–214 (1988) 4. Burckel, S., Gioan, E.: In situ design of register operations. In: IEEE Proceedings of ISVLSI 2008 (2008) 5. Burckel, S., Morillon, M.: Quadratic Sequential Computations. Theory of Computing Systems 37(4), 519–525 (2004) 6. Burckel, S., Morillon, M.: Sequential Computation of Linear Boolean Mappings. Theoretical Computer Science serie A 314, 287–292 (2004) 7. Cooley, J.W., Tukey, J.W.: An algorithm for the machine calculation of complex Fourier series. Math. Comput. 19, 297–301 (1965) 8. K¨ onig, D.: Uber Graphen und ihre Anwendung auf Determinantentheorie und Mengenlhere. Math. Ann. 77, 453–465 (1916) 9. Nussbaumer, H.J.: Fast Fourier transform and convolution algorithms, 2nd edn. Springer Series in Information Sciences, vol. 2. Springer, Heidelberg (1982) 10. Ravikumar, C.P., Aggarwal, R., Sharma, C.: A graph theoretic approach for register file based synthesis. In: Proceedings of VLSID 1997, Tenth International Conference on VLSI Design (1997)
Real Computable Manifolds and Homotopy Groups Wesley Calvert1, and Russell Miller2, 1
Department of Mathematics and Statistics Murray State University Murray, KY 42071 U.S.A.
[email protected] http://campus.murraystate.edu/academic/faculty/wesley.calvert 2 Queens College of CUNY 65-30 Kissena Blvd., Flushing, NY 11367 USA and The CUNY Graduate Center 365 Fifth Avenue, New York, NY 10016 USA
[email protected] http://qcpages.qc.cuny.edu/~rmiller
Abstract. Using the model of real computability developed by Blum, Cucker, Shub, and Smale, we investigate the difficulty of determining the answers to several basic topological questions about manifolds. We state definitions of real-computable manifold and of real-computable paths in such manifolds, and show that, while BSS machines cannot in general decide such questions as nullhomotopy and simple connectedness for such structures, there are nevertheless real-computable presentations of paths and homotopy equivalence classes under which such computations are possible. Keywords: Computability, Blum-Shub-Smale computability, homotopy, manifold.
1
Introduction
A notable shortcoming of the standard (Turing) model of computation is that it does not produce a theory of effectiveness relevant to uncountable structures. Since these structures are a routine part of the practice of pure and applied mathematics, a growing body of literature has addressed effective mathematics on uncountable structures (see, for instance [1,7,8,9,12,15,17,18]). In addition to
The first author was partially supported by Grant #13397 from the Templeton Foundation. The corresponding author was partially supported by Grant # 13397 from the Templeton Foundation, and by Grants # 69723-00 38 and 61467-00 39 from The City University of New York PSC-CUNY Research Award Program. Both authors acknowledge useful suggestions from several anonymous referees.
C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 98–109, 2009. c Springer-Verlag Berlin Heidelberg 2009
Real Computable Manifolds and Homotopy Groups
99
all of these, there is a large literature which we shall not review here on computable analysis, which has its own large arsenal of approaches to effectiveness on geometric structures. The present paper will begin to describe the use of one of the proposed models for uncountable structures to explore the effective homotopy theory of manifolds. In [2], Blum, Shub, and Smale introduced a notion of computation based on full-precision real arithmetic, which received its canonical form in [1]. Let R∞ be the set of finite sequences of elements from R, and R∞ the bi-infinite direct sum R. i∈Z
Definition 1. A machine M over R is a finite connected directed graph, containing five types of nodes: input, computation, branch, shift, and output, with the following properties: 1. The unique input node has no incoming edges and only one outgoing edge. 2. Each computation and shift node has exactly one output edge and possibly several input branches. 3. Each output node has no output edges and possibly several input edges. 4. Each branch node η has exactly two output edges (labeled 0η and 1η ) and possibly several input edges. 5. Associated with the input node is a linear map gI : R∞ → R∞ . 6. Associated with each computation node η is a rational function gη : R∞ → R∞ . 7. Associated with each branch node η is a polynomial function hη : R∞ → R. 8. Associated with each shift node is a map ση ∈ {σl , σr }, where σl (x)i = xi+1 and σr (x)i = xi−1 . 9. Associated with each output node η is a linear map Oη : R∞ → R∞ . Each machine computes a partial function from R∞ to R∞ in the natural way. Such a function is said to be R-computable. There is a list ϕe of all R-computable functions, indexed by finite tuples e from R∞ , such that each ϕe may be computed uniformly (on any input) from its index e. In the present paper, we will explore manifolds which are given effectively (in the sense of R-computation). In the remainder of the present section, we will describe this sense of effectiveness exactly, and will recall some relevant definitions from topology. In section 2, we will describe some ineffectiveness results in homotopy theory: that nullhomotopy and simple-connectedness are both undecidable. In section 3, we will show that certain important standard computations — notably the computation of the fundamental group — are still, modulo the difficulties in section 2, computable. Definition 2. A real-computable d-manifold M consists of real-computable i, j, j , k, the inclusion functions, satisfying the following conditions for all m, n ∈ ω. – If i(m, n) ↓= 1, then ϕj(m,n) is a total real-computable homeomorphism from Rd into Rd , and ϕj (m,n) = ϕ−1 j(m,n) , and k(m, n) ↓= k(n, m) ↓= m.
100
W. Calvert and R. Miller
– If i(m, n) ↓= 0, then k(m, n) ↓= k(n, m) ↓∈ ω with i(k(m, n), m) = 1 = i(k(m, n), n) and for all p ∈ ω, if i(p, m) = i(p, n) = 1, then i(p, k(m, n)) = 1, and for all q ∈ ω, if i(m, q) = i(n, q) = 1, then i(k(m, n), q) = 1 with range(ϕj(m,q) ) ∩ range(ϕj(n,q) ) = range(ϕj(k(m,n),q) ). – If i(m, n) ∈ / {0, 1}, then i(m, n) ↓= i(n, m) ↓= −1, and (∀p ∈ ω)[i(p, m) = 1 or i(p, n) = 1], and for all q ∈ ω, if i(m, q) and i(n, q) both lie in {0, 1}, then range(ϕj(k(m,q),q) ) ∩ range(ϕj(k(n,q),q) ) = ∅. – For all q ∈ ω, if i(m, n) = i(n, q) = 1, then i(m, q) = 1 and ϕj(n,q) ◦ ϕj(m,n) = ϕj(m,q) . Here we explain how these abstract conditions are to be understood. First, each natural number m represents a chart Um for the manifold M , which is to say, a nonempty open subset of M homeomorphic to Rd via some map αm : Um → Rd . In fact, though, we do not give this homeomorphism, since we do not wish to attempt to present the points in the manifold globally in an effective way. Instead we simply understand Rd to represent the chart Um , and understand the manifold M to be the union of this countable collection of charts. The meat of the definition lies in the inclusion functions, which describe the inclusion relations among the charts. For each m and n, i(m, n) equals 1, 0, or −1, according as either Um ⊆ Un , or ∅ Um ∩ Un Um , or Um ∩ Un = ∅, and the conditions translate as follows. First, if i(m, n) = 1, then j(m, n) is the index for a real-computable map from Rd into Rd which describes the inclusion map Um → Un , in the sense that α−1 n ◦ ϕj(m,n) ◦ αm is the inclusion map. Moreover, we also have an index j (m, n) for its inverse. If i(m, n) = 0, then Um ⊆ Un , but the two charts have nonempty intersection Uk(m,n) . (Notice that this implies that our collection of charts must be closed under finite intersection, and that the intersection of two charts must be connected.) The conditions ensure that Uk(m,n) contains every other chart Up which is a subset of both Um and Un , and also that if a chart Uq contains both Um and Un , then it must contain Uk(m,n) , which must be the intersection of Um with Un within Uq . Finally, if i(m, n) = −1, then the conditions ensure that Um ∩ Un does not contain any other Up , and that for any Uq intersecting both Um and Un , we have Um ∩ Un = ∅ within Uq . The last condition is the obvious rule for composition of inclusion maps: if Um ⊆ Un ⊆ Uq , then −1 −1 α−1 q ◦ ϕj(m,q) ◦ αm = (αq ◦ ϕj(n,q) ◦ αn ) ◦ (αn ◦ ϕj(m,n) ◦ αm ).
Real Computable Manifolds and Homotopy Groups
101
An earlier version of this definition indexed the charts by finite tuples x ∈ R∞ of real numbers, with the condition that the indices must be precisely the tuples from some fixed real-computable subset of R∞ . This allowed the possibility of an uncountable collection of charts, and also allowed those charts to be enumerated in a far less effective way. Since most definitions of manifold require the manifold to be covered by a countable collection of charts, we feel that Definition 2 reflects the general topological situation more accurately. (Since the property of being covered by countably many charts is equivalent to that of having a countable basis, manifolds having these properties are often called second-countable manifolds in the literature.) It also gives a more precise enumeration of the charts, allowing us greater ability to search through the charts to find the one we need, and this permits us to prove stronger theorems about our real-computable manifolds, at the cost of excluding those which are not second-countable or whose presentations are insufficiently effective to fit our definition. We regard the strength of our results as a solid justification for our choice of the stronger definition. Our definition of manifold is also strict in requiring that the intersection of any two charts must be another chart (or else empty), and hence must be connected. For manifolds in general this is not usually required, but on the other hand, it is possible to take a manifold in which the intersection of two charts need not be connected and to produce a new, finer cover of it by charts whose pairwise intersections are always connected. We leave open the question of how effectively such a transformation of the cover can be accomplished. Our definition does facilitate the decidability of homotopy for certain specific classes of computable paths, a question which we conjecture is not decidable in the more general context. This conjecture would imply that a general cover cannot always be effectively converted into a cover with pairwise intersections all connected. Our definition of manifold is quite abstract, in the sense that it essentially ignores the intended underlying topological space M entirely, giving a set of conditions on the charts (each of which is a copy of Rd ), rather than the corresponding conditions on the space M itself. We refer the reader to [24, p. 30, Example 8] for a noneffective precursor to this definition. That example also provides a condition on the charts which is equivalent to connectedness of M : Definition 3. The real-computable manifold M is connected if there is no proper nonempty subset S of ω such that – – – –
whenever whenever whenever whenever
i(m, n) = 0 i(m, n) = 0 i(m, n) = 1 i(m, n) = 1
with with with with
m, n ∈ S, we also have k(m, n) ∈ S; and m, n ∈ / S, we also have k(m, n) ∈ / S; and m ∈ S, we also have n ∈ S; and m∈ / S, we also have n ∈ / S.
If M is not connected, then we define its connected components to be the maximal subsets of ω satisfying all four of the above properties. (Intuitively, the connected components of M are the unions of the charts corresponding to these maximal subsets.) Another reasonable variation on our definition would require the enumeration of the charts to terminate; that is, that the sequence of Um be only finitely long.
102
W. Calvert and R. Miller
This would, no doubt, bring the study closer to the intuition of the classical problems, in which one wants the manifold not only to be given, but to have been given, in a perfective aspect. Even here there are still undecidable problems to be considered: our Theorem 7 suggests this, as did earlier and well-known work of Markov [16]. However, much of this study is likely to be not of computability, but of complexity. This is, no doubt, an interesting study (it has been pursued in the more limited context of affine and projective varieties; see [20,6,5,4]), but not the one we choose to pursue here. Classically, a path in a manifold M is a continuous map of the closed unit interval into M . A path is said to be a loop if and only if its endpoints coincide. Two paths p1 and p2 are said to be homotopic if there is a continuous map h : I × I → M such that h(t, 0) = p1 (t) and h(t, 1) = p2 (t). The class of loops in M up to homotopy equivalence forms a group under concatenation, called the fundamental group, or π1 (M ). A loop in the identity class is said to be nullhomotopic. A manifold M such that π1 (M ) is trivial is said to be simply connected. Since we hope for a broad audience for the present paper, we offer the torus T 2 = S 1 × S 1 as an example. There are many loops which are nullhomotopic on T 2 , for instance the very small ones which do not wrap around either the hole in the middle or the tube running through T 2 . The fundamental group is Abelian, and is freely generated by a loop that runs once around the hole and a loop that runs once around the tube. More detailed background on these issues can be found in [13]. With our abstract definition, we are forced into a more involved definition of path. Definition 4. A path in a real-computable manifold M , with inclusion functions i, j, and k, consists of a pair of functions g : [0, 1] → ω and h : [0, 1] → Rd such that there exists a finite sequence 0 = t0 < t1 < · · · < tn = 1 of real numbers such that, for all m < n: – g [tm , tm+1 ) is constant, with g(1) = g(tn−1 ); and – h [tm , tm+1 ) is continuous (and right-continuous at tm ), and h is also leftcontinuous at 1; and – i(g(tm ), g(tm+1 )) ∈ {0, 1}; and lim
x→t− m+1
ϕj(k(g(tm ),g(tm+1 )),g(tm+1 )) (ϕ−1 j(k(g(tm ),g(tm+1 )),g(tm )) (h(x))) = h(tm+1 ).
If g and h are both real-computable functions, then we call f a computable path. If g(0) = g(1) and h(0) = h(1), then the path is a loop. The intuition here is that the tm are values at which the path switches from one chart to another. Of course, they are not uniquely defined, but by compactness of [0, 1], we need only finitely many such points to express the entire path. We do not require any such sequence of points to be computable. Of course, any finite sequence of real numbers is immediately real-computable, but for an infinite collection of paths pc , indexed by c in some real-computable set C, we will call the collection computable if there is a single real-computable p satisfying
Real Computable Manifolds and Homotopy Groups
103
p(c, x) = pc (x), and strongly computable if an appropriate n and t1 < · · · < tn−1 for each pc can be computed uniformly in c. Weyl himself accepted the difficulty of carrying out homotopy theory on manifolds defined in this way as a drawback of this definition. He noted that Weil’s criticism [23] of the introduction of homology via the Eilenberg-Steenrod axioms applied also to this definition of a manifold. In essence, Sections 2 and 3 of the present paper argue the two sides of this criticism. Weil claims that ”triangulation is a quite trivial matter,” and gives the structure of the fundamental group. This may be contrasted with a more abstract presentation, like the definition above, in which the computation of the fundamental group — in the views of both Weil and Weyl — is presumably more difficult. A much more typical approach, especially in algebraic topology, is to replace a manifold with some combinatorial structure — a triangulation, a simplicial complex, a CW complex, or something similar. This is certainly the approach taken in much of the literature on applying classical computation to decision problems in topology [3,16,19,10,21,11,14]. Indeed, this approach was necessary there: while the combinatorial structures could be countable (and even discrete), at least for a reasonably well-behaved manifold, the manifolds themselves were uncountable, and thus inaccessible to direct computation by Turing machines. Thus, the classical results on computation of properties of manifolds somehow implicitly assume Weil’s claim that “triangulation is a quite trivial matter.” The problem of how one gets the combinatorial representation of the space is, at least, put outside the question of computing invariants. One understanding of Section 2 is that triangulation — at least, when starting with a manifold in the way we have defined it — is quite difficult. On the other hand, one understanding of Section 3 is that once one can do that, the computation of the fundamental group is indeed possible. Our notation mirrors that of Turing computability, in that we index realcomputable functions (effectively) as ϕe , where e is allowed to range over R∞ . Of course, the programs of such functions are finite, but they are allowed to use finitely many real parameters within those programs, yielding 2ω -many such programs. This precludes procedures which simultaneously run all real-computable functions on an input (let alone on all possible inputs), but diagonalization arguments are often still possible. We have a real-computability version of Kleene’s Recursion Theorem. Theorem 5 (Recursion Theorem). For each real-computable function f with domain R∞ , there exists an x ∈ R∞ such that ϕx = ϕf (x) . Both this theorem and its proof are very similar to Kleene’s original theorem for Turing computability; see for example [22, II.3.1]. Indeed, the proof there also adapts to show, in our context, that the tuple x can be real-computed uniformly from an index e such that f = ϕe .
104
2
W. Calvert and R. Miller
The Undecidability of Nullhomotopy and Simple Connectedness
Although this section is dedicated to proofs of undecidability, it will be useful for us to begin with a positive result about paths through computable manifolds. Lemma 1. Every loop f in a computable manifold M is homotopic to a computable loop f there. Indeed, such an f can be computed by a real-computable function whose only real parameters are the base point of f and the parameters of the inclusion functions defining M . Proof. Let f = g, h be the original loop, with 0 = t0 < t1 < · · · < tn = 1 as described in Definition 4. We first give the intuition for the proof, without which the details would be baffling. Each segment h [tm , tm+1 ] of the loop f lies within a single chart Ug(tm ) , which is simply connected, being homeomorphic to Rd . Within Ug(0) ∩ Ug(t1 ) we pick an arbitrary point whose coordinates in Ug(0) are all rational, and we define our computable loop f to begin with a line segment (in the Ug(0) coordinates) from h(0) to this point, given linearly in the variable t ∈ [0, t1 ]. Continuing from this point, we add a new line segment (in the Ug(t1 ) coordinates) from there to a rational point in Ug(t1 ) ∩ Ug(t2 ) , and so on, with the last line segment going from a point in Ug(tn−2 ) ∩ Ug(tn−1 ) back to the base point in Ug(1) = Ug(0) . By simple connectedness of each Ug(tm ) and each Uk(g(tm ),g(tm+1 )) = Ug(tm ) ∩ Ug(tm+1 ) , this path f is homotopic to the original f . Notice that n and the points t1 , . . . , tn−1 are not given to us in any uniform way. However, since each Ug(tm ) ∩ Ug(tm+1 ) is open, its preimage under f is also open, and so we may assume that the points tm have all been chosen (nonuniformly) to be rational. Now define g = g, which is clearly real-computable since g is piecewise constant. The key to the proof is our program for computing h, the second component of the computable loop f . Using the density of Qd in Rd , we start by selecting a point x1 in Qd ∩ range(ϕj(k(g(t0 ),g(t1 )),g(t0 )) ), and defining h [t0 , t1 ) to be the linear function from x0 = h(0) to x1 . Next, define h(t1 ) to equal ϕj(k(g(t0 ),g(t1 )),g(t1 )) (ϕ−1 j(k(g(t0 ),g(t1 )),g(t0 )) (x1 )). Since x1 = limt→t− h(t), this allows f to satisfy the continuity requirement 1
in the definition of path. Moreover, h(t1 ) can be computed with no new real parameters: we use i, j, k, the base point x0 , and the rational point x1 . We then continue inductively, picking an arbitrary point xm+1 ∈ Qd ∩ range(ϕj(k(g(tm ),g(tm+1 )),g(tm )) ), and defining h [tm , tm+1 ) to be the linear function from h(tm ) to this point, then defining h(tm+1 ) to equal ϕj(k(g(tm ),g(tm+1 )),g(tm+1 )) (ϕ−1 j(k(g(tm ),g(tm+1 )),g(tm )) (xm )). When we reach the case m + 1 = n, of course, tm+1 = 1, so we no longer pick a rational point, but simply define xn = h(tn ) = h(0), and let h [tn−1 , tn ] be
Real Computable Manifolds and Homotopy Groups
105
the linear function from h(tn−1 ) to h(tn ). Thus we really do define a loop in M . Moreover, each line segment in the computable path f is homotopic to the corresponding segment f [tm , tm+1 ], since each Ug(tm ) is simply connected. This proves Lemma 1. Theorem 6. Let M be any real-computable manifold which is connected but not simply connected. Then nullhomotopy of real-computable loops in M is not realdecidable: there is no real-computable function ψ such that for every index c of a computable loop f = ϕc in M , ψ(c) halts with output 1 if f is nullhomotopic in M , but halts with output 0 if f is not nullhomotopic in M . Of course, the converse is trivial: if M is simply connected, then nullhomotopy is decidable. Also, the hypothesis of connectedness of M is only to simplify the proof; for arbitrary M , any connected component M can be presented as a real-computable manifold, and if M is not simply connected, then the theorem applies to M , hence gives the same result for M . Proof. By assumption there is a loop in M , say with base point n, p, which is not nullhomotopic. By Lemma 1, it is homotopic to a computable loop f = g, h with the same base point. Using Theorem 5, the Recursion Theorem for real computability, for any real-computable ψ, we define a computable function ϕe which “knows its own index e” and can feed that index to ψ: ⎧ s 2s+1 −1 ⎨ f ((t − 1)2s+1 + 2), if t ∈ [ 2 2−1 s , 2s+1 ) ϕe (t) = & ψ(e) ↓= 1 in exactly s steps ⎩ n, p, if not. The “if not” case automatically includes t = 1, so this ϕe is a computable loop, and is the constant loop n, p (hence nullhomotopic) unless ψ(e) ↓= 1. If convergence to 1 happens in exactly s steps, then ϕe is homotopic to f , since s 2s+1 −1 on the interval [ 2 2−1 s , 2s+1 ] it copies the entire loop f , while staying constant everywhere else. Because f is not nullhomotopic, neither is this ϕe . Thus ψ does not correctly decide nullhomotopy of ϕe . Indeed, the use of the Recursion Theorem is effective, so we may compute, uniformly in an index for ψ, the index e of the counterexample ϕe produced above. It was important, in the foregoing proof, that the index e for the path ϕe did not need to include the finite sequence 0 = t0 < t1 < · · · < tn = 1 whose existence is required by Definition 4. To give such a sequence, we would have been forced to choose n at some finite stage, thereby closing off the path and giving up our strategy of waiting out ψ until it made up its mind about the value of ψ(e). In the proof, this sequence still exists, but it is not computable from e. Theorem 7. Simple connectedness of real-computable manifolds is not decidable by any real-computable function. Specifically, there is no real-computable ψ such that for every real-computable M given by inclusion functions i = ϕc , j = ϕd , j = ϕd , and k = ϕe , ψ(c, d, d , e) converges to 1 if M is simply connected, and converges to 0 if M is not simply connected.
106
W. Calvert and R. Miller
Proof. Again the Recursion Theorem is key. Fixing any real-computable ψ, we define our parameters c, etc., so that they start out by giving a basic nonsimply-connected manifold, with U0 ∩ U1 = U3 , U0 ∩ U2 = U4 , U1 ∩ U2 = U5 , and all other intersections empty. In particular, U0 ∩ U1 ∩ U2 = U3 ∩ U2 = ∅, so ∪m≤5 Um is not simply connected. Then the program given by our parameters bides its time while running ψ on input c, d, d , e. If there is a stage s at which this computation halts and outputs 0, then our program adds a new chart Us containing all of ∪m≤5 Um , thus making M simply connected. If there is no such s, then we never add any more new charts. So ψ does not decide simple connectedness of this M . We remark that a stronger statement is possible: simple connectedness is not decidable by any function of the form lims θ(c, d, d , e, s) with θ real-computable. (By analogy to Turing computability, we might say that no real-Δ02 function decides simple connectedness.) One sees this by noting that in addition to the diagonalization strategy described above, we can extend a simply connected finite union of charts to a larger union which is not simply connected. So it is possible for M to flip back and forth every time θ changes its guess about the simple connectedness of M , forcing lims θ to diverge.
3
Determining the Fundamental Group
A reasonable objection to the results of the previous section is that they somehow involve either a path no one would choose in computing a fundamental group or a manifold whose fundamental group no one would care to know. The present section will show that we can (non-uniformly) identify a system of loops, complete up to homotopy, which are free of the pathologies identified in the previous section, and that from such a system we can compute a presentation of the fundamental group. Theorem 8. Let M be an R-computable manifold. Then there exists an Rcomputable function SM , defined on the naturals, such that the set {SM (n) : n ∈ ω} consists of a set of indices for loops, and contains exactly one representative from each homotopy equivalence type. Proof. Fix a nice base point in M , such as the origin 0 in the chart U0 . The fundamental group π1 (M ) is countable, and using Lemma 1, we may (nonuniformly) choose a set of representatives for the homotopy-equivalence classes, all with this base point 0, 0, such that each can be real-computed uniformly from a single code number in ω (coding two finite sequences of rational numbers, namely tm m≤n and xm m≤n in the proof of Lemma 1, along with the n itself) using only the parameters of the inclusion functions for M . (The base point is now all rational.) Consequently, there exists a single additional real parameter, encoding all these natural numbers, using which a Blum-Shub-Smale machine can accept any input n ∈ ω and output the n-th of these representatives of the homotopy classes. That is, this machine computes precisely a function SM as described in Theorem 8.
Real Computable Manifolds and Homotopy Groups
107
In [3], Brown proved that it was possible, from a presentation of a manifold as a finite simplicial complex, to compute a presentation for each of the homotopy groups of the manifold, including π1 . The following is a similar result (although the proof is quite different), showing that from the data SM — analogous to a triangulation — we can pass to a presentation of π1 . As was observed in the earlier discussion from Weil and Weyl, here we have (at least superficially) a good deal less information than is given by presenting the manifold as a simplicial complex. Proposition 1. For every real-computable manifold M , with SM as in Theorem 8, there exists a real-computable function cM : ω × ω → ω which, on any input u, v, outputs the unique w such that SM (u) ∗ SM (v) SM (w). Proof. Since we can search through all w ∈ ω by dovetailing, it suffices to give a BSS machine which halts on input u, v, w iff SM (u) ∗ SM (v) SM (w). Here we present such a machine. Notice that if F is a homotopy between two loops, then F itself has compact image in a manifold M , and therefore is contained within the union of finitely many charts in M . Due to space limitations, we will content ourselves here with pointing out the key to the inductive argument, which is as follows. Let α and β be paths in M from point a to point b. Assume that a ∈ Um ∩ Up and b ∈ Un ∩ Up , and that β lies entirely within Up , while α has an initial segment contained in Um and the remainder contained in Un . We claim that α β within the submanifold (Um ∪ Un ∪ Up ) iff Um ∩ Un ∩ Up = ∅. The forward direction is essentially topology, of course, and we omit the details here. For the converse, suppose there exists a point c ∈ Um ∩ Un ∩ Up , and let γ be a path from a to x lying within Um ∩ Up , and δ a path from x to b within Un ∩ Up . (This is possible because Um ∩ Up = Uk(m,p) is homeomorphic to Rd , hence path-connected. Our presentation of M with all pairwise intersections of charts simply connected constitutes a very strong presentation!) Also, fix t such that α(t) ∈ Um ∩ Un , and let θ be a path from x to α(t) lying within Um ∩ Un . Then α (α [0, t]) ∗ θ−1 ∗ θ ∗ (α [t, 1]) γ ∗ δ since γ and (α [0, t] ∗ θ−1 ) both lie within Um , hence are homotopic, and likewise δ and (θ ∗ α [t, 1]). On the other hand, (γ ∗ δ) is contained within Up , hence is homotopic to β. This proves α β. The subsequent inductive argument essentially involves proving that every homotopy can be viewed as a finite string of such operations, deforming the original path α into an α which goes through the same sequence of charts, up to a change by one (either one old chart replaced by two new ones, or two old ones replaced by one new one, in the sequence of charts intersected by α ). The crucial point about our presentations of loops from Lemma 1, therefore, as used in Theorem 8, is that for each loop, we know a sequence of charts containing that loop (including the order in which the loop intersects those charts). Of course, this sequence is not at all unique, but we need only know one such sequence for each of our representatives SM (u), and all that information was encoded into
108
W. Calvert and R. Miller
a single real parameter used in computing SM . Moreover, that parameter also provides the same information about the concatenation (SM (u) ∗ SM (v)) of any two of those representatives. Of course, for arbitrary m and n, the inclusion function i for M tells us whether Um ∩ Un = ∅: just check whether i(m, n) = −1. Therefore, we may search through increasingly large finite sets of charts, and increasingly long finite perturbations of a given concatenation (SM (u)∗SM (v) through those charts, and if indeed (SM (u) ∗ SM (v)) SM (w), then eventually we will find a sequence of charts and paths through those charts to prove it. On the other hand, since SM maps ω (or an initial segment, when π1 (M ) is finite) bijectively onto π1 (M ), there is exactly one SM (w) for which we will ever find such a proof, and when we have found it, we know that (SM (u) ∗ SM (v)) SM (w). Corollary 1. Let M be an R-computable manifold. There is a uniform procedure to pass from an index for SM to indices for a real-computable presentation of the group π1 (M ) and for computing its word problem.
References 1. Blum, L., Cucker, F., Shub, M., Smale, S.: Complexity and Real Computation. Springer, Heidelberg (1997) 2. Blum, L., Shub, M., Smale, S.: On a theory of computation and complexity over the real numbers. Bulletin of the American Mathematical Society (New Series) 21, 1–46 (1989) 3. Brown, E.H.: Computability of Postnikov Complexes. Annals of Mathematics 65, 1–20 (1957) 4. B¨ urgisser, P., Cucker, F., Jacob´e de Naurois, P.: The complexity of semilinear problems in succinct representation. Computational Complexity 15, 197–235 (2006) 5. B¨ urgisser, P., Cucker, F., Lotz, M.: The complexity to compute the Euler characteristic of complex Varieties. Comptes Rendus Math´ematique, Acad´emie des Sciences, Paris 339, 371–376 (2004) 6. B¨ urgisser, P., Lotz, M.: The complexity of computing the Hilbert polynomial of smooth equidimensional complex projective varieties. Foundations of Computational Mathematics 7, 51–86 (2007) 7. Calvert, W.: On three notions of effective computation over R. To appear in Logic Journal of the IGPL 8. Calvert, W., Porter, J.E.: Some results on R-computable structures (preprint, 2009) 9. . L. Erxov Opredelimost i Viqislimost , Sibirska Xkola Algebry i Logiki (Nauqna Kniga 1996) 10. Haken, W.: Theorie der Normalfl¨ achen. Acta Mathematica 105, 245–375 (1961) 11. Haken, W.: Ein Verfahren zur Aufspaltung einer 3-Mannigfaltigkeit in irruduzible 3-Mannigfaltigkeiten. Matematische Zeitschrift 76, 427–467 (1961) 12. Hamkins, J.D., Miller, R., Seabold, D., Warner, S.: An introduction to infinite time computable model theory. In: Cooper, S.B., L¨ owe, B., Sorbi, A. (eds.) New Computational Paradigms, pp. 521–557. Springer, Heidelberg (2008) 13. Hatcher, A.: Algebraic Topology. Cambridge University Press, Cambridge (2001) 14. Hemion, G.: On the classification of homeomorphisms of 2-manifolds and the classification of 3-manifolds. Acta Mathematica 142, 123–155 (1979)
Real Computable Manifolds and Homotopy Groups
109
15. Hjorth, G., Khoussainov, B., Montalban, A., Nies, A.: From automatic structures to Borel structures (preprint, 2008) 16. Markov, A.: Unsolvability of certain problems in topology. Doklady Akademii Nauk SSSR 123, 978–980 (1958) 17. Miller, R.: Locally computable structures. In: Cooper, S.B., L¨ owe, B., Sorbi, A. (eds.) CiE 2007. LNCS, vol. 4497, pp. 575–584. Springer, Heidelberg (2007) 18. Morozov , A.S.: lementarnye podmodeli parametrizuemyh modele i. Sibirski i Matematiqeski i urnal 47, 595–612 (2006) 19. Nabutovsky, A., Weinberger, S.: Algorithmic aspects of homeomorphism problems. In: Tel Aviv Topology Conference (1998). Contemporary Mathematics, vol. 231, pp. 245–250. American Mathematical Society, Providence (1999) 20. Scheiblechner, P.: On the complexity of deciding connectedness and computing Betti numbers of a complex algebraic variety. Journal of Complexity 23, 359–397 (2007) 21. Schubert, H.: Bestimmung ber Primfaktorzerlegung von Verkettungen. Mathematische Zeitschrift 76, 116–148 (1961) 22. Soare, R.I.: Recursively Enumerable Sets and Degrees. Springer, New York (1987) 23. Weil, A.: Review of Introduction to the theory of algebraic functions of one variable, by C. Chevalley. Bulletin of the American Mathematical Society 57, 384–398 (1951) 24. Weyl, H.: The concept of a Riemann surface, 3rd edn. Addison-Wesley, Reading (1955)
Distributed Quantum Programming Ellie D’Hondt and Yves Vandriessche Vrije Universiteit Brussel, Belgium
[email protected] [email protected]
Abstract. In this paper we explore the structure and applicability of the Distributed Measurement Calculus (DMC), a formal assembly language for distributed measurement-based quantum computations. We describe its syntax and semantics, both operational and denotational, and state several properties that are crucial to the practical usability of our language, such as equivalence of our semantics, as well as compositionality and context-freeness of DMC programs. We show how to put these properties to use by constructing a composite program that implements distributed controlled operations, and demonstrate that the semantics of this program does not change under the various composition operations. Our formal model is meant to be the basis of a virtual machine for distributed quantum computations, where programming execution no longer needs to be analysed by hand, while at the same time formal properties may be relied upon. Several insights on how to move towards this virtual level are given.
1
Introduction
During the last decennia, quantum information has managed to become a significant field of research in the exact and applied sciences. Although it is a relatively new discipline one can currently discern several sub-disciplines such as quantum cryptography, information theory, computability, error correction, fault tolerance, computations and of course there is also the experimental research on the construction of quantum computers [NC00]. Nevertheless, the development of quantum information as a proper computational domain of computer science is lagging behind. Indeed there is no such thing as a quantum computational paradigm. By this we mean a framework in which quantum problems can be expressed and solved in terms of data structures, algorithms, techniques such as abstraction, all of these wrapped up in an associated programming language. Paradigm building has proved to be an extremely useful approach in computer science. It has led to theoretically equal but practically very different programming frameworks, such as functional, imperative, logic and object-oriented programming. For this reason we expect this approach to be crucial also in developing quantum programming paradigms. The first step in paradigm building is to construct a low-level quantum programming language and determine its properties. By low-level we mean that we need to define syntactical expressions for each physically allowed quantum C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 110–124, 2009. c Springer-Verlag Berlin Heidelberg 2009
Distributed Quantum Programming
111
operation: preparation, unitary transformation, measurement, combined with classical control expressions if so desired. The syntax in its own is not the goal, but rather a means by which to facilitate investigations with computer science techniques. First, we need to determine the functionality of a quantum program, its semantics. The most obvious way to do this is the operational semantics, the most practical is the denotational semantics. While in the former a program’s meaning is given as a sequence of state-changing operations, in the latter it is instead a mathematical object. Paramount is linking both, so that one can use whichever in future analyses. Through a programming language’s semantics one can investigate notions such as composition and context-freeness. These properties are crucial when one wants to build more complex programs. Indeed, they allow the semantics of these larger programs to be built up from that of smaller components using rules for composition, rather than having to be determined from scratch. While these properties may seem obvious, computer science is littered with examples where they were mistakenly taken to be true, leading to problems in programming language development (see for example [BA81]). Recent advances in quantum communication and cryptographic computations motivate the need for a programming paradigm centred on distributed quantum computations. In a distributed system one has concurrently acting agents in separated locations, operating locally on a quantum state, which may be entangled over agents, and coordinating their actions via communication. Formal frameworks for distributed quantum computation have only very recently begun to appear. Typically, these are a combination of classical process theory, which formalises notions of concurrency and communication, the quantum circuit model, i.e. local operations are unitary transformations of an agent’s qubits, and given initial shared entanglement. First, there is the work in [LJ04, JL05], which is directly built upon classical process calculi. While this model profits from being closely related to existing classical models, the disadvantage is that it is hard to focus on quantum behaviour. A different approach is advanced in the model known as communicating quantum processes or CQP [GN04, GNP05], where the typical communication primitives of process calculi are combined with computational primitives from QPL [Sel03]. The basic model of CQP is more transparent. This model serves as a basis for the development of formal verification techniques, in particular for proving the security of larger scale quantum communication systems. In related work, a probabilistic model-checking tool built upon an existing automated verification component is developed [GNP05]. There is also the work in [AM05], which is specifically tailored to security issues in cryptographic protocols. In our work, however, we are much more interested in the expressiveness of quantum distributed computations and the behavioural properties of distributed primitives. In a way, we take the inverse approach, assuming that computations are well-defined and investigating what programming concepts are at work, instead of the other way around. While the fact that formal verification tools for distributed quantum computation are currently under development may suggest that a mature distributed paradigm already exists, this is actually not the case. Distributed protocols are
112
E. D’Hondt and Y. Vandriessche
still very much conceived on intuition, and there is no good notion or formalisation of the programming concepts that are at work. We therefore require adequate formal tools with which to explore and evolve the distributed quantum computing paradigm. In this paper we explore the structure and applicability of the Distributed Measurement Calculus (DMC) [D’H05, DDKP05], a formal assembly language for distributed measurement-based quantum computations. We describe its syntax and semantics, both operational and denotational, and state several properties that are crucial to the practical usability of our language, such as equivalence of our semantics, as well as compositionality and context-freeness of DMC programs. We show how to put these properties to use by constructing a composite program that implements distributed controlled operations, and demonstrate that the semantics of this program does not change under the various composition operations. We base ourselves on the measurement calculus [DKP07], a low-level quantum programming language for measurementbased quantum computations from which we explore the distributed paradigm. Next to the obvious advantage of starting from a proper formal framework, measurement-based models are well-suited as a starting point for distributed quantum computations because they are inherently distributed. What is important here is that the well-known physical framework of quantum computation is ported to an equivalent computer science framework, opening up the field towards investigations from this branch of science as well. The structure of this paper is as follows. In the next section we discuss the syntax of our language. Next, Sec. 3 covers the semantics of DMC and lists its properties. Sec. 4 applies the previous to a concrete example, a composite protocol implementing distributed controlled gates. We discuss future developments, in particular the construction of a virtual machine for DMC, in Sec. 5. Some basic knowledge of quantum computation is assumed; for the reader not familiar with the domain we refer to the excellent [NC00]. Our approach in this article is to explain the notions of the model by example, rather than providing a series of formal definitions which are hard to interpret and for which space it too limited. However, we stress that the model is a rigourous one, and, while this paper is a stand-alone document, refer the interested reader to [D’H05, DDKP05] for complete definitions.
2
Syntax
The language we propose is, broadly speaking, an assembly language for distributed measurement-based quantum computations. It is an assembly language in that it provides syntax only for the most basic operations while at the same time being universal. It is measurement-based as we build our language on top of the measurement calculus (MC) [DKP07], an assembly language for measurement-based quantum computations. The latter depart from the usual circuit-based approach to quantum computing, where unitary transformations are the driving force of computations. While measurement operations were long
Distributed Quantum Programming
113
seen as a necessary but disruptive part of quantum computing, in algorithms such as teleportation they act as an essential part of the computation. This gave rise to models where the computation is steered by pre-established generic entanglement combined with measurements, such as the one-way quantum computer [RBB03]. Because measurements are inherently probabilistic, correction operations are required that are conditionally applied depending on previous measurement outcomes, thus rendering the computation deterministic. All of this is nicely captured in the measurement calculus. For this reason, as well as the inherent distributive aspect of measurement-based models, MC is an ideal basis from which to develop our language. We describe our language model in three layers. The base layer consists of MC patterns, which describe local quantum computations. These are combined with distribution primitives into the notion of agents in the middle layer. Finally, agents and their shared entanglement resources are bundled into networks in the top layer. Patterns. In MC a pattern is defined by a sequence of commands together with sets of qubits for working, input and output memory. As an example consider the following pattern, which implements the Hadamard operation, which we explain below, H(1, 2) := ({1, 2}, {1}, {2}, X2s1 M1X E12 ) . (1) All qubits are uniquely identified using numbers. The first argument denotes that the pattern has a computation space of two qubits, referenced by 1 and 2. The next two arguments specify the pattern’s inputs and outputs. Working qubits that are not input qubits are initialised to |+ = |0 + |1. The last argument is the pattern’s command sequence, a list of operations taken from a basic set and executed from right to left, analogous to matrix applications. Subscripts denote qubit arguments of the operation, while corrections are conditionally executed depending on their superscript. Concretely, one runs the pattern H by preparing the first qubit in some input state |ψ and the second in state |+, then entangling both qubits with the controlled-Z operation1 to obtain CZ12 (|ψ ⊗ |+) (syntax: E12 ). Next, the first qubit is measured in the {|+, |−} basis (syntax: M1X ), where |− = |0 − |1. Finally, an X correction is applied on the output qubit if the measurement outcome was s1 (syntax: X2s1 ). Here s1 defines a signal – simply 0 or 1 – coming from the X-basis measurement on qubit 1 in M1X . If the signal is 0, the operation is not performed. Measurements are considered to be destructive, which is why qubit 1 does not appear in the output set. A general pattern is denoted P(V, I, O, A), with computation space V , inputs I and outputs O (together called the pattern type), and command sequence A that consists of entanglements Eij , measurements t [Miα ]s , or corrections Xis or Zis , where i, j ∈ V , α ∈ [0, 2π] and s, t ∈ Z2 . Allowed measurements are those in the XY -plane of the Bloch sphere, and are specified by the angle α (M1X is actually syntactic sugar for M10 ). Measurement angles may also be conditioned 1
A controlled-Z operation on two qubits applies the Z operation to the second qubit provided the first is set to 1.
114
E. D’Hondt and Y. Vandriessche
by signals, written t [Miα ]s , with (−1)s α+tπ being the actual measurement angle. The four basic instructions together with signal conditioning suffice to make the model universal [RBB03, DKP07]. Patterns can be combined into larger ones to create arbitrary quantum computations. For example, here is the pattern to create a 3-fold GHZ-state |000 + |111, GHZ123 = ({1, 2, ˆ 2, 3, ˆ 3}, ·, {1, 2, 3}, H(ˆ3, 3)E2ˆ3 H(ˆ2, 2)E1ˆ2 ) ,
(2)
where ˆ 2 and ˆ 3 are working qubits. MC is equipped with a powerful standardisation theorem which provides a procedure for bringing any pattern, such as the one above, into EM C-form, i.e. with entanglements first and corrections last. This is important from an experimental implementation perspective, and also corresponds nicely with the typical structure of a distributed quantum protocol where one starts out with a shared entanglement resource. In fact within MC we can already express distributed computations such as teleportation, ({1, 2, 3}, {1}, {3}, X3s2 Z3s1 M2X M1X E12 E23 ) .
(3)
While the pattern describes the intended computation, we find no notion of separate parties participating in the teleportation, and neither of the required communication between them. Purely by convention, and because everybody knows the protocol, we can say that qubits 1 and 2 belong to Alice and qubit 3 to Bob. It is still hard to see if and what both parties have to communicate, e.g. Bob needs s1 and s2 but has no access to qubits 1 and 2, thus Alice needs to perform the measurements and communicate the results to Bob. We want this information to be explicit and obvious in the language, which in turn makes it easier to describe and reason about distributed quantum programs. To see that this is important, try to identify what is implemented with the following distributed protocol, ({0, ¯ 0, 1, ¯ 1, 2, ¯ 2}, ·, {0, 1, 2}, Z2s¯2 Z1s¯1 Z0s¯0 M¯0GHZ ¯ 0 E1¯ 1 E2¯ 2) . 1¯ 2 E0¯
(4)
Here M GHZ is a pattern for GHZ-measurement. Note that pattern (2) implements the unitary transformation between the diagonal basis and the GHZ-basis n {|i + |i}2i=0−1 . Hence a GHZ-measurement is executed by applying the inverse pattern followed by a measurement in the diagonal basis. We will get back to this pattern in Sec. 4. Agents. An agent embodies a single computation node running in isolation in a distributed algorithm, i.e. a processor or a party such as Alice or Bob. Each agent has a local command sequence, which operates on a set of resources contained within its environment. Agent instructions are either measurement patterns or communication primitives. For example, the teleportation pattern (3) really needs the following agent definitions for Alice and Bob, respectively, A : {1, 2}.c!s2 .c!s1 .M2X M1X E12
and B : {3}.X3s2 Z3s1 .c?s2 .c?s1 .
(5)
Distributed Quantum Programming
115
As we can see an agent definition consists of a type in curly braces, which specifies what qubits an agent owns, and an instruction sequence. Next to local quantum operations, written in MC language, we specify the exchange of the signals s1 and s2 between Alice and Bob via the communication primitives c? and c!. What is missing here as compared to pattern (3) is the prior shared entanglement E23 , as indeed it is impossible to factorize this part of the protocol into agent definitions. There is no other option than to specify shared entanglement separately in the network definition for the full protocol, as we shall see below. Of course the qubits are still local to the agents – as reflected in the type – only their description is not. Formally, an agent is defined by an expression A(i, o) : Q.E, where the type Q is a set of qubit references and E is a finite instruction sequence composed of pattern command sequences A, classical message reception c?s and sending c!s, where s is a signal, and quantum reception qc?q and sending qc!q, where q is a qubit reference. Corresponding communication actions are synchronised, meaning that an agent executing a receive will pause its program until the required agent has sent a message on the same channel and vice versa. Classical inputs i and outputs o are used in protocols such as superdense coding, and are not mentioned when there are none. Also, working qubits required by patterns are initialised to |+ as before and are not specified in the type Q. Networks. A network of agents consists of several agents that execute their command sequence concurrently. Typically, quantum resources are shared between agents – indeed most distributed quantum protocols benefit from some type of shared entanglement being present prior to the start of the protocol. We have no way of splitting the representation of these states over agent definitions, and instead have to specify agents separately in a network’s definition. This is why a network specification is more than just a collection of agent definitions, a feature specific to quantum concurrent frameworks and absent in classical concurrency. To keep track of how a shared resource is distributed each agent’s type Q specifies which qubits of a shared resource are local to that agent. At this point we can finally write down the full teleportation protocol, including all relevant distributed aspects. T P := A : {1, 2}.c!s2 .c!s1 .M2X M1X E12 | B : {3}.X3s2 Z3s1 .c?s2 .c?s1
(6)
E23 Analogous to process algebraic notation we use a vertical bar | to separate concurrently executing agents. Shared network resources are specified after the double bar . For teleportation this is the state E23 , which was produced and handed out to Alice and Bob prior to the execution of the protocol. If so desired the establishment of shared resources can itself be seen as a distributed protocol involving a server agent polled for entanglement services. We now likewise lift the pattern given in (4) to a distributed setting, obtaining the following
116
E. D’Hondt and Y. Vandriessche
ES := L : {¯ 0, ¯ 1, ¯ 2}.c0 !s¯0 .c1 !s¯1 .c2 !s¯2 .M¯0GHZ . ¯ 1¯ 2 x
| A0 : {0}.Z0 ¯0 .c0 ?x¯0 | A1 : {1}.Z1x¯1 .c1 ?x¯1
(7)
x {2}.Z2 ¯2 .c2 ?x¯2
| A2 : E0¯0 E1¯1 E2¯2
This is the the entanglement swapping protocol for three agents [ZZHE93, BVK98], which produces a GHZ-state shared between A0 , A1 and A2 . Because the resulting GHZ state is in the diagonal basis we have Z rather than X corrections in the network specification. General networks are denoted N = |i Ai (ii , oi ) : Qi .Ei σ. For simplicity, we assume that networks of agents satisfy a number of definiteness conditions which ensure that the computation is well-defined. For example, an agent may only operate on qubits he owns, and every communication event needs to have a corresponding dual event in the network. Of course these issues are important but we are glossing over them here as we assume checking these occurs in a pre-compilation step rather than at runtime. Our extensions to the measurement calculus have made distributed notions explicit. We can now see directly from a protocol specification what agents have to communicate to whom as well as which assumptions are made about non-local entanglement resources. Also, because each agent’s instructions are expressed separately, we do not impose any particular execution order for local quantum operations. This makes it clear which parts of the protocols can and cannot run concurrently.
3
Semantics
In the previous section we established the syntax of DMC. The next step is to establish the meaning of a program written down in this language, i.e. its semantics. Formal semantics is a means of assigning objects to chunks of code so that one can reason with these objects rather than with the code itself. In this section we set up an operational as well as a denotational semantics for DMC programs and, with this in hand, state some important properties of our framework. Definition. A network’s operational semantics reflects how it affects the state of a distributed system on which the network is run. That is, we associate with each agent a local state (quantum and classical), and specify how the network specification updates these. Since we always have to take the shared entanglement resources into account the operational semantics does not decompose into state transformers for each of the agents separately. On top of this a crucial ingredient of the semantics specifies how quantum resources move throughout the system. Concurrency is not really an issue for the semantics because, due to the linearity of quantum mechanics, the order in which local operations are applied
Distributed Quantum Programming
117
is unimportant. Hence we pick an order arbitrarily and derive the semantics for this case. Concretely, the operational semantics of a network is found by collapsing individual small-step semantical rules into one transition system. The small-step rules for distributed networks consist of a number of quantum mechanical rules – corresponding to measurement pattern commands – and a number of communication rules. These affect the global quantum state (EM C commands), the local resources (quantum communication), and the local memory (M commands and classical communication). Since measurement is probabilistic, so are the small-step rules. The formal semantics of measurement pattern commands is well established [DKP07, D’H05], and just needs to be lifted to the DMC setting. We elaborate here the semantics of typically distributed concepts introduced in the previous section. The formal semantics of MC relies on the component Γ , the outcome map, which contains a number of bindings from signal names to measurement outcomes. In DMC the outcome map is lifted to a local agent memory recording also the values of classical messages. Concretely, a classical communication event between two agents has the following semantics, given that Γb , the local memory of Bob, evaluates the name y to the value v, A : (Qa , Γa ).Ea .c?x | B : (Qb , Γb ).Eb .c!y =⇒ A : (Qa , Γa [x ↓ v]).Ea | B : (Qb , Γb ).Eb
.
(8)
Here Γa [x ↓ v] means that we assign a new binding of x to v in the local memory of Alice. These rules are typically much harder to read and write down formally than to apply concretely. What we are saying here is that if a classical communication takes place, the value is looked up by the sending agent, and received and bound to a new name by the receiving agent, after which the computation (Ea and Eb ) continues. Sending and receiving qubits over a quantum channel changes the types Q of the agents involved. An agent sending a qubit can no longer perform any operations on it, therefore the corresponding qubit reference is removed from Q, while it is added to the receiving agent. Formally, the rule for the exchange of a qubit with reference i is given by A : (Qa , Γa ).Ea .qc?i | B : (Qb , Γb ).Eb .qc!i =⇒ A : (Qa ∪ {i}, Γa ).Ea | B : (Qb \{i}, Γb).Eb .
(9)
It goes without saying that the way in which the actual communication of a qubit is implemented is more intricate than this simple rule. However, by providing quantum communication as primitive syntax we are precisely choosing not to get into these implementation matters. Both rules mentioned here do not affect the global quantum state, which is why it is not mentioned. This is not the case for the small-step semantics for pattern commands, which moreover may be probabilistic. The full small-step semantics can be found in [D’H05, DDKP05]. We obtain the operational semantics by defining computation paths in the usual way and gathering all small steps in a computation path in one big step from initial to final state in that path. As such the operational semantics of
118
E. D’Hondt and Y. Vandriessche
a quantum distributed network is essentially a probabilistic transition system (PTS). However, since resource allocation is crucial, we have to augment this PTS with information on how qubits move throughout the network. This is formalised as a type signature. We denote the operational semantics of a network N by N op . For example, the operational semantics of T P is given by the deterministic transition system T P op : ({1}, ·) → (·, {3}) . ρ1 =⇒ ρ3 ,
(10)
where ρ is the density matrix specifying the input quantum state to be teleported and subscripts indicate qubit systems. The operational semantics of the ES network given in (7) is also deterministic. D ESop : (·, ·, ·, ·) → (·, {0}, {1}, {2}) . 0 =⇒ GHZ012 ,
(11)
where the superscript D denotes that the resulting state is in the diagonal basis. Note that we only write real quantum inputs in the type while not mentioning entanglement resources. The good thing about operational semantics is that in principle it can be derived automatically by induction on the small-step rules. Denotational semantics is a second means of assigning a formal meaning to a chunk of code, this time by way of mathematical objects. If we look at the skeleton of a distributed protocol, i.e. the equivalent non-distributed pattern, we find a multi-local probabilistic quantum operation, which is mathematically represented by (a special type of) completely positive map (CPM). Since protocols with different distribution of resources are observationally different, we have to pair this CPM with a function mapping input to output resources, formally represented by a type signature. We denote this type of semantics by N de for a network N . For example, the denotational semantics of T P is given by the map T P de : ({1}, ·) → (·, {3}) . I , (12) i.e. T P implements the identity map from qubit 1 to qubit 3. Here we see the importance of the type signature in specifying the semantics. The subtle difference between both types of semantics becomes more apparent once one starts investigating more complex protocols involving mixed states and probabilistic semantics. As we see from the examples both types of semantics are quite similar, and indeed we have the following result, which we state without proof. Proposition 1. There is a precise correspondence between the operational and the denotational semantics of networks of agents, that is to say ∀N1 , N2 : N1 ≡op N2 ⇐⇒ N1 ≡de N2 .
(13)
Two networks are semantically equivalent if they have the same semantics.2 While the equivalence between semantics may seem obvious (certainly from the 2
For example, one can prove that qubit communication between two agents is semantically equivalent to the teleportation network.
Distributed Quantum Programming
119
example), it is crucial to prove this statement formally, as it allows one to switch between semantics where appropriate without giving the issue further thought. We note that in general this equivalence is not guaranteed. Building larger protocols. With syntax and semantics in hand we can now consider constructing larger networks from smaller components. We consider parallel as well as sequential composition of networks, denoted by ⊗ and ◦ respectively. These operations are defined in the obvious way so we will not spell out concrete definitions here. Suffice to say that one needs to pay attention to agent as well as qubit names to ensure that networks are connected as desired. More importantly we need to make sure that these forms of composition are consistent with the semantics, as is indeed the case. Proposition 2. The semantics of networks is compositional, i.e. N2 ◦ N1 = N2 ◦ N1 . N1 ⊗ N2 = N2 ⊗ N1
(14) (15)
Here we have a first application of Prop. 1, as first we do not need to specify which type of semantics we mean in the statement of Prop. 2 , and second we can choose the most convenient semantics for the proof, which is the denotational semantics. While the compositions on the left hand side are at the level of agent and network definitions, the composition of network semantics on the right hand side is a functional one at the level of type signatures, PTS’s and CPMs. For the full proof we refer to [D’H05]; an example is given in Sec. 4. A second important notion when constructing larger protocols, closely related to compositionality, is that of contexts. Informally speaking a context is a program with a “hole” in which a network specification can be inserted, typically denoted C[·]. On some occasions, one finds that programs that are considered equivalent in isolation no longer behave in the same way when placed within the context of a larger program. This is particularly the case in concurrent systems. A historical example is the Brock-Ackerman anomaly [BA81], by which it was realised that simple input-output behaviour is not enough to reason about equivalence of concurrent systems. In our framework contexts C[N ] are given by arbitrary network compositions C in which our network N is placed. What is different with ordinary compositionality is that the quantum resources of the network N are no longer considered to be independent of those of its context. Indeed in Prop. 2 quantum resources are considered to be provided independently, such that composite networks operate on disentangled inputs. While this is sensible when each of the networks operate in isolation, it is less so when a network is only one factor in a complex compositional structure. Hence we first need to show that our semantics is independent of so-called entanglement contexts. This is a consequence of the following proposition, which we state here without proof. Proposition 3. Suppose L : ρA −→ ρB = k Lk ρA L†k is a completely positive map. Then for all quantum states ρAC applying L to the A-part of ρAC results in ρBC = (Lk ⊗ IC )ρAC (L†k ⊗ IC ). (16) k
120
E. D’Hondt and Y. Vandriessche
The proof, though easy, is not trivial. Using this proposition and compositionality we have the following important result. Corollary 1. Equivalence holds in arbitrary contexts, that is, if N1 ≡ N2 , then for all network contexts C[·] we have that C[N1 ] ≡ C[N2 ].
4
Applications
We now show how all of the formal ingredients can be put to use in a concrete example. The distributed primitive we will investigate is that of a distributed remotely controlled gate [YL05]. Near-future quantum computers are expected to have only a limited number of qubits per machine. Even in quantum simulating environments the current qubit limit is only about 36 [RMR+ 06]. Hence one can imagine that quantum computations need to proceed much like cluster computations today, with resources spread over different processors in order to make them feasible. One common situation would be where the central processor needs to execute a controlled operation with the target qubits spread over a group of agents. Following the ideas in [YL05], once we have a GHZ resource we can execute a distributed controlled gate. Calling the central processor L (for Leader), and assuming there are two subordinate processors A and B, the trick is to establish a shared control qubit between target agents, which is achieved through the share control (SC) protocol as follows, SC := L : {c, 0}.c1,2!s0 . M0X E0c . | A1 : {1}.X1x0 .c1 ?x0 | A2 : {2}.X2x0 .c2 ?x0
(17)
D GHZ012
Here qubit c is the input control qubit which is in the state α|0 + β|1. That the protocol indeed establishes its goal may be seen from its semantics, which can be derived unambiguously to be SCop : ({c}, ·, ·) → ({c}, {1}, {2}) (α|0 + β|1)c =⇒ (α|000 + β|111)c12 .
(18)
Once this type of shared entanglement is in place each target agent just has to execute a local controlled unitary gate with as control its qubit in the shared entanglement resource. Note that because we have context-independence of the semantics, target qubits may be entangled over different agents. However, in order for the distribution approach to be possible at all, the controlled unitary CU must have U = U1 ⊗ U2 where, U1 and U2 operate on a number of target qubits smaller or equal than the maximum available qubits for each agent. We see that the SC protocol requires GHZ entanglement. It is probably realistic to assume that in a quantum network each agent can ask for Bell-state entanglement with the central server. It is not so realistic to assume that groups
Distributed Quantum Programming
121
of agents can demand direct GHZ entanglement whenever they need it; rather, we expect GHZ entanglement to be produced via the entanglement swapping protocol. Note that, since we need GHZ entanglement between L, A1 and A2 , we need to compose L with A0 in the ES protocol as presented earlier in (7), that is x L := A0 ◦ L : {0, ¯ 0, ¯ 1, ¯ 2}.Z0 ¯0 .c1 !s¯1 .c2 !s¯2 .M¯0GHZ . (19) ¯ 1¯ 2 What we are actually doing here is composing the SC protocol with no shared resource with the ES protocol to establish the resource, and our semantics ensures that this is something we can do unambiguously. Indeed, we have SC ◦ ES = SC ◦ ES = ({c}, ·, ·) → ({c}, {1}, {2}) . (α|0 + β|1)c =⇒ (α|000 + β|111)c12 ,
(20)
with SC and ES given in (18) and (11) respectively. More agents. The networks that we defined for implementing the distributed remote gate protocol can be generalised to n agents. This requires generalised procedures for GHZ-measurement, entanglement swapping and establishing a shared control qubit. First, an n-fold GHZ state is produced by generalising the 3-GHZ-pattern given in (2). That is, through the pattern with no input qubits, output qubits {1, 2, . . . , n} and an event sequence interleaving E and H operations, as follows, GHZ1...n = H(ˆ n, n)E(n−1)ˆn . . . E3ˆ4 H(ˆ3, 3)E2ˆ3 H(ˆ2, 2)E1ˆ2 ,
(21)
where the hatted qubits are again working qubits. Again, a GHZ-measurement is executed by applying the inverse pattern followed by a diagonal-basis measurement. This leads to the pattern GHZ M1...n = Mˆ10 Mˆ20 . . . Mnˆ0 E1ˆ2 H(2, ˆ 2)E2ˆ3 H(3, ˆ 3)E3ˆ4 . . . E(n−1)ˆn H(n, n ˆ) ,
(22)
with input qubits the qubits {1, 2, . . . , n} to be measured and with no outcome qubits. Using this sub-pattern we can establish GHZ-entanglement between the leader L and agents A1 through to An by the generalised entanglement swapping protocol [ZZHE93, BVK98], which has the following network specification, x
GHZ ES := L : {0, ¯ 0, . . . , n ¯ }.Z0 ¯0 .(ci !s¯i )ni=1 .M¯0...¯ n x |ni=1 Ai : {i}.Zi ¯i .ci ?x¯i
⊗ni=0
(23)
Ei¯i .
This is just the generalisation of network (7) where we have merged agents L and A0 for the purpose of establishing a shared control qubit as before. The signal s = s¯0 . . . sn¯ corresponds to a projection on the GHZ-state |s + |s. This network has the following semantics, D ESop : (·, . . . , ·) → ({0}, {1}, . . . , {n}) . 0 =⇒ GHZ0...n .
(24)
122
E. D’Hondt and Y. Vandriessche
After establishing GHZ-entanglement between agents a shared control qubit is obtained through the following protocol. SC := L : {c, 0}.ci!s0 . M0X E0c . |ni=1 Ai : {i}.Xix0 .ci ?x0
(25)
D GHZ0...n
The semantics of this network is given by SCop : ({c}, ·, . . . , ·) → ({c}, {1}, . . . , {n}) (α|0 + β|1)c =⇒ (α|0⊗(n+1) + β|1⊗(n+1) )c1...n .
(26)
Control qubit c can now indirectly control unitary operations at the sites of all agents by having agent Ai execute a local pattern for a controlled unitary gate where the control is its qubit i and the targets are locally available qubits. Again, for this approach to be possible the controlled unitary CU must have U = U1 ⊗ . . . ⊗ Un where each of the sub-unitary Ui is executable by agent Ai .
5
Towards a Virtual Machine
In the above we describe a formal assembly language for distributed measurement-based quantum computations. DMC programs satisfy several properties crucial to the practical usability of the language, such as compositionality and context-freeness. We showed how to put these properties to use by implementing a composite program to control operations in a distributed setting, and demonstrated that the semantics does not change under the various composition operations. DMC was developed with expressiveness in mind, a crucial property when establishing the first layer in a distributed quantum programming paradigm. Indeed only through experimentation combined with abstraction can one hope to move towards a higher level in the language hierarchy. Our experiments, albeit on paper, prove that DMC is indeed capable of expressing more complicated programs and that the formal features are necessary and sufficient in determining their functionality. This is very different in flavour from earlier formal frameworks in this area [GN04, JL05], which are much more concerned with issues such as verification, and focus on providing tools such as type systems to facilitate investigations of this nature. While the elaboration of distributed controlled gates within DMC served as a proof-of-concept and was feasible for such a small example, of course these developments are only really useful when one thinks of DMC in terms of a quantum virtual machine (QVM). The benefits of having a QVM are many: as a first layer of a tiered quantum computation architecture [SAC+ 06], a platform for automated verification and model-checking, and maybe most importantly, a basis from which to develop higher-order distributed quantum computation languages through experimentation and abstraction. At a practical level, bringing the formal model into a virtual execution environment has the obvious benefits
Distributed Quantum Programming
123
of automating program execution and composition. Furthermore, low-level inspection during a pre-compilation step can automatically determine if code is well-defined and what agent qubit types are, rather than checking this information by hand in the current formal model. Finally, one can envision asynchronous communication between agents, which is more natural in an actual execution model, and is provided transparently in many classical models of computation such as the actor model. Of course implementing a quantum virtual machine is itself not free of problems. There is always the issue of the exponential explosion of the state space when simulating quantum computations. In addition, one cannot truly distribute the QVM as the representation of entangled states requires a shared memory infrastructure or something equivalent. This requires a quantum memory management in the line of the QRAM model [Kni96]. The measurement calculus’ standardisation procedure, while useful in a formal setting, is disastrous in an execution environment where the state explosion will limit the maximum number of qubits used in an already qubit-hungry measurement calculus. A quantum virtual machine for DMC, taking all these issues into consideration, is currently under development. In particular we are looking into parallel programming techniques as a way to speed up simulated quantum computations and facilitate experimentation.
Acknowledgements This work is based on earlier research with V. Danos, E. Kashefi and P. Panangaden. The first author is supported by the Flemish Fund for Scientific Research (FWO) and the second by the CRYPTASC project, funded by the Institute for the encouragement of Scientific Research and Innovation of Brussels (IRSIB/IWOIB).
References [AM05]
[BA81] [BVK98] [DDKP05]
[D’H05]
Ad˜ ao, P., Mateus, P.: A process algebra for reasoning about quantum security. In: Selinger, P. (ed.) Proceedings of the 3rd Workshop on Quantum Programming Languages (QPL 2004), pp. 3–20 (2005) Brock, J.D., Ackerman, W.B.: Scenarios: A model of non-determinate computation. Formalizations of Programming Concepts 107 (1981) Bose, S., Vedral, V., Knight, P.L.: Multiparticle generalization of entanglement swapping. Phys. Rev. A 57(2), 822–829 (1998) Danos, V., D’Hondt, E., Kashefi, E., Panangaden, P.: Distributed measurement-based quantum computation. In: Selinger, P. (ed.) Proceedings of the 3rd International Workshop on Quantum Programming Languages (QPL 2005). ENTCS, vol. 170, pp. 73–94 (2005); quantph/0506070 D’Hondt, E.: Distributed quantum computation – A measurement-based approach. PhD thesis, Vrije Universiteit Brussel (2005)
124
E. D’Hondt and Y. Vandriessche
[DKP07] [GN04]
[GNP05] [JL05]
[Kni96] [LJ04]
[NC00] [RBB03] [RMR+ 06] [SAC+ 06]
[Sel03] [YL05] [ZZHE93]
Danos, V., Kashefi, E., Panangaden, P.: The measurement calculus. Journal of the ACM 54(2) (2007); quant-ph/0704.1263v1 Gay, S.J., Nagarajan, R.: Communicating quantum processes. In: Selinger, P. (ed.) Proceedings of the 2nd Workshop on Quantum Programming Languages (QPL 2004), Turku, Finland. Turku Centre for Computer Science, TUCS General Publication No 33 (2004) Gay, S.J., Nagarajan, R., Papanikolaou, N.: Probabilistic model-checking of quantum protocols (2005) Jorrand, P., Lalire, M.: Toward a quantum process algebra. In: Proceedings of the first conference on computing frontiers, pp. 111–119. ACM Press, New York (2005) Knill, E.: Conventions for quantum pseudocode. Technical Report LAUR96-2724, Los Alamos National Laboratory (1996) Lalire, M., Jorrand, P.: A process algebraic approach to concurrent and distributed quantum computation: operational semantics. In: Selinger, P. (ed.) Proceedings of the 2nd Workshop on Quantum Programming Languages (QPL 2004), Turku, Finland. Turku Centre for Computer Science, TUCS General Publication No 33 (2004) Nielsen, M.A., Chuang, I.: Quantum computation and quantum information. Cambridge University Press, Cambridge (2000) Raussendorf, R., Browne, D.E., Briegel, H.J.: Measurement-based quantum computation on cluster states. Phys. Rev. A 68(2), 022312 (2003) De Raedt, K., Michielsen, K., De Raedt, H., Trieu, B., Arnold, G., Richter, M., Lippert, T., Watanabe, H., Ito, N.: Massive parallel quantum computer simulator. quant-ph/0608239 (2006) Svore, K.M., Aho, A.V., Cross, A.W., Chuang, I.L., Markov, I.L.: A layered software architecture for quantum computing design tools. IEEE Computer 39(1), 74–83 (2006) Selinger, P.: Towards a quantum programming language. Mathematical Structures in Computer Science (2003) (to appear) Yimsiriwattana, A., Lomonaco, S.J.: Generalized GHZ states and distributed quantum computing. AMS Contemporary Mathematics (2005) Zukowski, M., Zeilinger, A., Horne, M.A., Ekert, A.: Event-ready detectors. Bell experiment via entanglement swapping. Phys. Rev. Lett. 71(26), 4287–4290 (1993)
Foundations of Optical Encryption: Formal Modeling and Achieving Shannon Secrecy Giovanni Di Crescenzo1 , Ron Menendez1 , Shahab Etemad2 , and Janet Jackel2 1
Telcordia Technologies, Piscataway, NJ, USA {giovanni,rcm}@research.telcordia.com 2 Telcordia Technologies, Red Bank, NJ, USA
[email protected],
[email protected]
Abstract. Motivated by the recent emergence of ultra-high speed (e.g., 100Gb/s) optical networks, some researchers have recently started the study of optical encryption techniques that offer secrecy of information transfer over such networks. Despite significant attention to this problem, we are not aware of attempts made to define a formal cryptographic model for the study of such schemes. In this paper we fill this gap by proposing a formal model for the investigation of symmetric encryption with Shannon secrecy over a specific type of optical networks frequently studied in the related literature, where the security is imparted through all-optical signal processing. This model is then used to formally prove the Shannon secrecy of a construction obtained by carefully combining and improving ideas appeared in the optical network literature. In our construction the key stream rate is the same as the data stream rate, which is optimal for this level of security.
1
Introduction
The “One-Time Pad” [13] is a fundamental encryption scheme as it represents the ideal both in terms of security against eavesdroppers (i.e., it satisfies Shannon secrecy [11]) and in terms of computational efficiency (i.e., its simple XOR operation allows for high performance in encryption speed). Even in settings where Shannon secrecy is not required, the one-time pad is the basis for modes of operations of block ciphers, such as the widely used ‘counter mode’ [1], and its Shannon secrecy property is used to argue about the security of these block cipher modes of operation. Motivated by the ultra-high performance in data transfer over certain types of existing optical networks, researchers have recently studied the problem of encryption over such networks (see, e.g., [4,7,9,10] and references therein) that promises to offer ultra-high encryption speed (e.g., currently scalable to 100Gb/s, typically one order of magnitude faster than the fastest digital encryption counterpart). In particular, researchers are looking for ‘all-optical’ techniques that result in even faster encryption schemes than the one-time pad on digital networks (here, note that combining digital encryption via one-time pad with transmission over optical networks does not improve the speed of the one-time pad C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 125–142, 2009. c Springer-Verlag Berlin Heidelberg 2009
126
G. Di Crescenzo et al.
itself). While several interesting all-optical techniques have been proposed, the security of the resulting schemes is either not achieved or left as an open problem or analyzed with respect to very restricted attacks. Part of the problem is really the lack of a rigorous cryptographic model for the analysis of such schemes. In this paper we fill this gap by proposing a cryptographic model for symmetric encryption over a class of existing optical networks (specifically, using an optical code division multiple access (OCDMA) overlay over a wavelength division multiplexed (WDM) optical network). We then use this model to give the first optical symmetric encryption scheme that provably satisfies Shannon secrecy. Our construction is an improved variant of constructions implicit in previous work from the optical network literature (i.e., [4,7]), one important improvement being on the key stream rate that is decreased to being equal to the data stream rate (and thus, optimal). Instead, a natural use of previous techniques achieved a key stream rate at least twice slower than the data stream rate (which is especially less efficient at very high rates). We also note that certain mathematical abstractions and analysis in recent cryptanalysis of certain encryption schemes over such networks [6,5] were quite useful in our modeling process. Our construction can be considered as one analogue for optical networks of the well-known One-Time Pad. In fact, the secrecy proof of our construction eventually reduces to the secrecy proof of the One-time Pad, despite the two constructions being mathematically very different. We also note that recent developments [14] seem to enable the optical realization of the XOR logical operator, which thus provides an alternative approach to ours to realize One-Time Pad encryption over optical networks. Comparing with this latter approach, we note that our techniques achieve an encryption scheme of the same secrecy without need for new realization of optical components (in fact, by using the same optical technology as needed for OCDMA unencrypted communication), and thus remain of both theoretical and practical interest.
2
Encryption: Formal Notions and Definitions
We present a generalization of the notion of symmetric encryption for digital communication (accommodating streaming data and keys), a new notion of symmetric encryption for streaming optical communication, and secrecy notions for both types of encryptions. 2.1
Encryption of Streaming Digital Communication
We recall a version of the formal notion of symmetric encryption of digital communication, generalizing the notion from the cryptography literature so to accommodate encryption/decryption of data streams (thus, extending fixed-length messages), and usage of key streams (thus, extending fixed-length keys). Technically speaking, the generalization consists of using the scheme’s algorithms to encrypt/decrypt, at any atomic time interval, a fixed-length block of streaming
Foundations of Optical Encryption
127
data, using a fixed-length block of streaming key bits. The decryption correctness and secrecy requirements hold for each atomic time interval and are directly extended to hold for the entire data stream. We start by formally defining the data stream and the key stream, and then the algorithms in a symmetric encryption scheme for streaming digital communication. A time-dependent stream S(t) is a sequence of values S(t) = (s0 |s1 |s2 | · · ·) from some pre-defined set, where, for any i, it is understood that si is the value transmitted just before si+1 . We say that stream S(t) is a binary stream if si ∈ {0, 1}, for all i. The data stream M (t) is a binary stream denoted as M (t) = (m0 |m1 |m2 | · · ·), and the (t, n)-data block is the n-length subsequence (mj , . . . , mj+n−1 ) of M (t), for some j, which can be observed at a time interval having as center time t (from now on, for brevity, we will just say, at time t). Similarly, the ciphertext stream C(t) is defined as a binary stream denoted as C(t) = (c0 |c1 |c2 | · · ·), and the (t, q)ciphertext block is the q-length subsequence (cj , . . . , cj+q−1 ) of C(t), for some j, which can be observed at a time t. Finally, the key stream K(t) is a binary stream denoted as K(t) = (k0 |k1 |k2 | · · ·), where the (t, e)-key block is the e-length subsequence (kj , . . . , kj+e−1 ) of K(t), for some j, which can be observed at time t, and it is further assumed that each value ki is uniformly and independently chosen from {0, 1}. In the rest of the paper, we assume that the values n, e such that (t, n)data blocks and (t, e)-key blocks exist (i.e., are uniquely determined and reliably measured at time t), are fixed and known. Definition 1. A symmetric encryption scheme (for streaming digital communication) is formally defined as a pair (E,D) of algorithms with the following syntax and decryption correctness property. On input time t, a (t, e)-key block k (also called the key) and a (t, n)-data block m (also called the message), the encryption algorithm E returns a (t, q)-ciphertext block c, (also called the ciphertext). On input time t, key k, ciphertext c, the decryption algorithm D returns a string m ∈ {0, 1}n, or a special symbol ⊥, indicating failure in decryption. Then we say that the scheme (E,D) satisfies blockwise decryption correctness if for any (t, n)-data block m, any (t, e)-key block k, Prob [ k ← {0, 1}e; c ← E(t, k, m); m ← D(t, k, c) : m = m ] = 1, where c is a (t, q)-ciphertext block, m is potentially a (t, n)-data block, and the notation α ← A(x, y, . . .) denotes the random process of obtaining α as the output of the possibly probabilistic algorithm A when executed on input x, y, . . . and random coins (omitted in the notation). Common usage of such an encryption scheme is as follows. In a preliminary phase sender and receiver run a key generation procedure to obtain the same key stream K(t); later, given a data stream M (t) and key stream K(t), the sender can use algorithm E to encrypt a (t, n)-data block at any time t as a (t, q)-ciphertext block. Upon obtaining the ciphertext stream C(t), and based on key stream K(t), the receiver derives the (t, q)-ciphertext block c and uses algorithm D to decrypt it and obtain the sender’s (t, n)-data block m at time t. A pictorial description is given in part (A) of Figure 1.
128
G. Di Crescenzo et al.
Fig. 1. Models for streaming encrypted digital and unencrypted optical communication
We note that the above blockwise decryption correctness notion only seems to capture a ‘snapshot’ of the encryption lifecycle, by referring to a small time interval in which a data block from the data stream is encrypted using a key block from the key stream. This is indeed a less general (but simpler to work with) variant of a more natural decryption correctness notion, saying that the receiver correctly recovers the entire data stream (without necessarily restricting the correctness of decryption of a given ciphertext block to the use of only one associated data block). In the rest of this subsection, we define this notion, called (plain) decryption correctness, and we show that it is implied by the above blockwise decryption correctness notion. Definition 2. We say that the encryption scheme (E,D) satisfies decryption correctness if for any data stream M (t) and any uniformly distributed key stream K(t), it holds that Prob [ C(t) ← E(K(t), M (t)); M (t) ← D(K(t), C(t)) : M (t) = M (t) ] = 1, where the notation α ← A(x, y, . . .) denotes the random process of obtaining α as the output of the possibly probabilistic algorithm A when executed on input x, y, . . . and random coins (omitted in the notation), and the probability is taken over the space defined by the uniform distribution of K(t) and any additional random coins (omitted in the notation) possibly used by E,D. The relationship between the two presented decryption correctness notions is easily seen. Specifically, we start by noting that decryption correctness (as from Definition 2) requires that the decryption performed by algorithm D is valid for
Foundations of Optical Encryption
129
the entire key stream K(t) and data stream M (t). Then, we note that a (t, n)data block m and a (t, e)-key block k are the next unused values obtained from the data stream M (t) and the key stream K(t), respectively, at time t. Now, if blockwise decryption correctness (as from Definition 1) holds, then each data block m encrypted using key block k and algorithm E is correctly decrypted using k and algorithm D. Because this fact holds at each time t, and m, k are the next unused values from the two streams, then the entire data stream M (t) encrypted using the key stream K(t) and algorithm E is decrypted using the key stream K(t) and algorithm D. This implies that (E,D) satisfies the (plain) decryption correctness notion. This proves the following Proposition 1. Let (E,D) be an encryption scheme for streaming digital communication. If (E,D) satisfies blockwise decryption correctness, as from Definition 1, then it satisfies decryption correctness, as from Definition 2. In the rest of the paper, to simplify the presentation, we will only consider blockwise decryption correctness. A similar simplification is performed on the secrecy property of encryption schemes for both streaming digital and streaming optical communication, which are formally defined in Section 2.3. 2.2
Encryption of Streaming Optical Communication
This section introduces our cryptographic model for all-optical encryption with Shannon secrecy, by defining the algorithms involved, the applicable decryption correctness and secrecy notions, and basic relationships with digital encryption. Optical Communication. For simplicity, we use the shorthand ‘optical communication’ for communication using OCDM networks. In such networks, information is typically represented in terms of time-dependent streams; thus, a transmitted signal will be a stream σ(t) = (σ0 |σ1 |σ2 | · · ·). In such optical communication systems, the OCDM-technique (see, e.g., [8]) is used to split a single optical fiber into n communication channels that share the waveband by concurrently using up to w wavelengths, for some parameters n, w. Each channel is used to transmit an independent data stream from the same sender or even possibly by a different sender. The orthogonal OCDM encoding/decoding technique (see, e.g., chapter 5 of [8]) is typically used to allow both aggregation of the n data streams into a single optical fiber, and reliable recovery of each data stream at the receiving end, as we now explain. Each of the n data streams δ1 (t), . . . , δn (t) is processed using a different w-length codeword and combined into a single signal σ(t). Upon receiving σ(t), using the j-th codeword, it is possible to recover the j-th data stream δj (t) and nullify the effect of the other data streams δ1 (t), . . . , δj−1 (t), δj+1 (t), . . . , δn (t) (thanks to the orthogonality of the codewords used). Our model for reliable optical communication intends to capture the multiple methods that one can design to achieve orthogonal encoding and decoding, as in the above discussion. Formally, we define an optical communication scheme (OpEncode,OpDecode) as a pair with the following syntax and properties. Given as input n data streams
130
G. Di Crescenzo et al.
D1 (t), . . . , Dn (t), the optical encoding function OpEncode returns an optical signal S(t). On input the optical signal S(t) and an index j ∈ {1, . . . , n}, the optical decoding function OpDecode returns a stream R(t), or a special symbol ⊥, indicating failure in decoding. We say that the optical scheme (OpEncode,OpDecode) satisfies decryption correctness if for any j ∈ {1, . . . , n}, it holds that the received stream R(t) is equal to the j-th data stream Dj (t). In the encryption and decryption lifecycle, two more types of streams are involved: the codeword streams Cij (t), for i = 1, . . . , w and j = 1, . . . , n, and the intercode phase shifts stream F (t). By using data blocks δj , ρ, χij , φ, σ associated with streams Dj (t), R(t), Cij (t), F (t), S(t), respectively, we can define blockwise decryption correctness as done for streaming digital encryption. Specifically, we say that the optical scheme (OpEncode,OpDecode) satisfies blockwise decryption correctness if for any j ∈ {1, . . . , n}, it holds that ρ = δj , where following [6,7], ρ is obtained, mathematically speaking, as in the following steps (associated with the functioning of the optical communication scheme): 1. 2. 3. 4.
((χi1 , . . . , χin )i=1,...,w ) = OpEncode(n, w, t, δ1 , . . . , δn ) for i = 1, . . . , w, fi = c/λi n w σ = j=1 i=1 cos(fi · t + χij + φj ) ρ = OpDecode(n, w, t, j, σ).
Here, λi is the i-th wavelength used, fi is the i-th wavelength’s frequency, c is the speed of light, χi1 , . . . , χin ∈ [0, π]w are the n codewords used, φ1 , . . . , φn ∈ [0, 2π] are the intercode phase shifts associated to these codewords that are due to laser frequency and temperature fluctuations resulting from the aggregation process of the n data streams into a single optical fiber, and we assume that n ≤ w. The above steps can be described in more detail as follows: step 1 consists of the optical encoding function processing each of the n data streams; steps 2 and 3 consist of the aggregation of the n encoded data streams into a single signal σ(t); and step 4 consists of the receiver’s decoding of the j-th data stream from σ(t). The reader interested in details on the optical transforms underlying such steps is referred, for instance, to [6,5,4,9]. In particular, note that with respect to step 2 a mode-locked laser can be used to generate a coherent stable combination of uniformly spaced optical frequencies fi , for i = 1, . . . , w. Moreover, with respect to step 3, the total optical electric field σ is the optical summation of the outputs of n spectral phase encoders, where each such encoder output is subject to an arbitrary optical phase shift φj prior to summation, and within each of the n spectral phase encoders, encoder j modifies the phase of the i-th frequency in accordance with χij . A pictorial description of the optical communication model can be found in part (B) of Figure 1. As for streaming digital encryption, we note that for optical communication schemes, the blockwise decryption correctness notion implies the decryption correctness notion. Optical Encryption. For simplicity, we use the shorthand ‘optical encryption’ for symmetric encryption using an OCDM optical network. Here, we will consider three main types of streams: plaintext data streams, ciphertext data streams and
Foundations of Optical Encryption
131
key streams, all being introduced, unless otherwise specified, in the system at the same rate, defined as the as number of stream symbols per second. The formal definition of an optical encryption scheme is obtained with the following extensions to the above defined optical communication scheme. First, the optical encoding and decoding functions are expanded into key-based, optical encrypting and decrypting functions. A second extension is that we consider the multiple approaches to schedule the plaintext data stream into the n concurrent pseudo-data streams that are input to the optical encrypting function. This is achieved via a key-based optical scheduling function. Optical Encryption: Formal description and correctness. Formally, an optical (symmetric) encryption scheme is a triple (Schedule,OpEncrypt,OpDecrypt) with the following syntax and properties. On input a (plaintext) data block from the data stream M (t) and a key block from the key stream K(t), the optical scheduling function Schedule returns n pseudo-data bits, each corresponding to a pseudodata stream Dj (t), for j = 1 . . . , n. On input n pseudo-data bits δ1 , . . . , δn , and a key block from the key stream K(t), the optical encrypting function OpEncrypt returns a ciphertext block from the ciphertext signal σ(t). On input a ciphertext block from the optical ciphertext signal σ(t), an index j ∈ {1, . . . , n}, and a key block from the key stream K(t), the optical decrypting function OpDecrypt returns a data block ρ from the data stream R(t), or a special symbol ⊥, indicating failure in decoding. We say that the optical scheme (Schedule,OpEncrypt,OpDecrypt) satisfies decryption correctness if with probability 1 the stream R(t) decrypted by the receiver is equal to the plaintext stream M (t). We then say that the optical scheme (Schedule,OpEncrypt,OpDecrypt) satisfies blockwise decryption correctness if for any j = 1, . . . , n, it holds that with probability 1 the data bit ρ from stream R(t) decrypted by the receiver using (t, e)-key block k is equal to the j-th bit in the (t, n)-data block m from data stream M (t), where, following [6,7,9], ρ is obtained, mathematically speaking, as in the following steps (associated with the functioning of the optical encryption scheme): 1. 2. 3. 4. 5.
(δ1 , . . . , δn ) = Schedule(n, w, t, k, m) ((χi1 , . . . , χin )i=1,...,n ) = OpEncrypt(n, w, e, t, k, δ1 , . . . , δn ) for i = 1, . . . , w, fi = c/λi σ = nj=1 w i=1 cos(fi · t + χij + φj ) ρ = OpDecrypt(n, w, e, t, j, k, σ).
Note that the above steps can be described similarly as in the optical communication case, the main differences being the following two. First, step 1 consists of the optical scheduling function associating a data block from a plaintext stream and a key block from a key stream to n pseudo-data blocks being part of “pseudodata streams”; this modeling choice is motivated by the fact that any optical encryption scheme would take advantage of the inherent parallelism of optical communication. Second, in steps 2 and 5 functions OpEncrypt, OpDecrypt also takes as input key block k from key stream K(t); this modeling choice is due to the fact that any optical symmetric encryption scheme would need sender and
132
G. Di Crescenzo et al.
Fig. 2. Model for encrypted streaming optical communication
receiver to share a secret key, just as in digital symmetric encryption schemes. As for streaming digital encryption and optical communication, we note that for optical encryption schemes, the blockwise decryption correctness notion implies the decryption correctness notion. A pictorial description of our optical encryption model can be found in Figure 2. 2.3
Secrecy Requirements for Encryption Notions
We consider the formal definitions of two classical secrecy notions for digital encryption schemes, namely, Shannon secrecy and perfect secrecy, and extend them to optical encryption schemes. Preliminary Notations. When eavesdropping the ciphertext signal σ(t), an adversary can apply optical ‘beat detection’ techniques (see, e.g., [6,5,10] for details) to recover a per-wavelength decomposition of the ciphertext signal. Formally, an adversary can (deterministically) recover, the quantity ρi =
n
cos(χij + φj ), for i = 1, . . . , w,
j=1
as a decomposition of the ciphertext σ. Also, given ρ1 , . . . , ρn , the adversary can reconstruct σ using a similar process, if needed. The above definitions apply to streams but are immediately generalized to stream blocks. Using blocks, and assuming that χij ∈ {0, π}, the cosine function is mapping χij ∈ {0, π} to a value χij ∈ {1, −1}, and this equality can be rewritten in matrix notation as Rw×1 =
Foundations of Optical Encryption
133
Cw×n · Fn×1 , where Rw×1 = (ρ1 , . . . , ρw )T , Cw×n = {χij }i=1,...,w;j=1,...,n , and Fn×1 = (cos(φ1 ), . . . , cos(φn ))T . This notation will be very helpful in the proofs of our optical encryption schemes. Shannon secrecy. We say that an optical (symmetric) encryption scheme satisfies Shannon secrecy if for any time t, it holds that Prob [ M (t)|S(t) ] = Prob [ M (t) ] , where the first probability is over the random choices made while generating data stream M (t), ciphertext stream S(t) and key stream K(t), and the second probability is over the (arbitrary) distribution used to generate the plaintext data stream M (t). Because of the above considerations on the adversary’s eavesdropping power, we can restate this definition and say that an optical (symmetric) encryption scheme satisfies (ρ-conditioned) Shannon secrecy if for any data stream M (t) and any ρ1 (t), . . . , ρn (t), it holds that Prob [ M (t)|ρ1 (t), . . . , ρn (t) ] = Prob [ M (t) ] , where the probability spaces are defined as before. As done previously for the decryption correctness requirement, we actually consider a slightly stronger definition where the encryption algorithm is independently applied to each data block and key block from the respective streams, and the equality of the probabilities is defined to hold for each block of the considered streams (and thus holds for the entire streams), rather than only for the entire streams. Specifically, we say that the scheme satisfies ρ-conditioned, blockwise Shannon secrecy if for any time t, any (t, n)-data block m and any (t, e)-key block k, it holds that Prob [ k ← {0, 1}e; σ ← E(t, k, m); {ρi }ni=1 ← bd(σ) : m|{ρi }ni=1 ] = Prob [ m ] , where the probability spaces are defined as before and the function bd computes optical beat detection, as described above. Intuitively, this definition says that the a-priori distribution of data block m encrypted at time t remains the same when its value is conditioned by the values of the per-wavelength decompositions ρ1 , . . . , ρn of the encrypted signal block σ. Perfect secrecy. We also say that an optical (symmetric) encryption scheme satisfies perfect secrecy if for any two different plaintext data streams M1 (t), M2 (t), it holds that Prob [ S(t)|M1 (t) ] = Prob [ S(t)|M2 (t) ] , where the first (resp., second) probability is over the random choices made while generating data stream M1 (t) (resp., M2 (t)), ciphertext stream S(t) and the shared key stream K(t). By again using the above considerations on the adversary’s eavesdropping power, we can equivalently say that an optical (symmetric) encryption scheme satisfies (ρ-conditioned) perfect secrecy if it holds that Prob [ ρ1 (t), . . . , ρn (t)|M1 (t) ] = Prob [ ρ1 (t), . . . , ρn (t)|M2 (t) ] , where the probability spaces are defined as before. As for decryption correctness and Shannon secrecy, we have an additional, slightly stronger, definition, where we say that the scheme satisfies ρ-conditioned, blockwise perfect secrecy if for any time t, any (t, n)-data blocks mj and any (t, e)-key block k, it holds that p1 = p2 , where, for j = 1, 2, it holds that pj = Prob [ k ← {0, 1}e; cj ← E(t, k, mj ); {ρi }ni=1 ← bd(cj ) : {ρi }ni=1 |mj ] ,
134
G. Di Crescenzo et al.
where the probability spaces are defined as before. Intuitively, this definition says that the per-wavelength decompositions ρ1 , . . . , ρn associated with the ciphertext block, and recovered from the signal by the eavesdropper, are equally distributed, whether they were generated from an encryption of m1 or of m2 , and for any two distinct data blocks m1 , m2 from distinct data streams. In the rest of the paper, we will use this latter definition of perfect secrecy. Relationship between secrecy notions. We recall two well-known results for digital encryption: (1) Shannon secrecy and perfect secrecy are equivalent; (2) Shannon secrecy implies that the key is at least as long as the plaintext [11]. We now show that both facts hold for optical encryption as well. To see this fact, we first show a relationship between optical and digital encryption schemes. Specifically, by replacing the optical scheduling, encrypting and decrypting functions of an optical encryption scheme with equivalent boolean circuits, we obtain a digital encryption scheme (for streaming communication, as defined in Section 2) that is syntactically equivalent, and thus satisfies Shannon secrecy if so did the original optical encryption scheme. Formally, we have the following Proposition 2. Let OpES = (Schedule, OpEncrypt, OpDecrypt) be a optical symmetric encryption scheme satisfying Shannon secrecy for which the (mathematical abstraction of) functions Schedule, OpEncrypt, OpDecrypt can be computed by polynomial-time (in a common security parameter) circuits. There exists a digital encryption scheme DigES = (KG, Enc, Dec) such that: 1. OpES satisfies (ρ-conditioned) Shannon secrecy (resp., blockwise Shannon secrecy) if and only if DigES satisfies Shannon secrecy (resp., blockwise Shannon secrecy); 2. OpES satisfies (ρ-conditioned) Shannon secrecy (resp., blockwise Shannon secrecy) if and only if DigES satisfies Shannon secrecy (resp., blockwise Shannon secrecy); 3. the data stream rate in OpES is the same as in DigES; 4. the key stream rate in OpES is the same as in DigES. Combining facts (1),(2) (resp., fact (3), (4)) in Proposition 2 with the above fact (1) (resp., fact (2)) about digital encryption, we obtain the equivalence of the optical versions of Shannon and perfect secrecy (resp., the lower bound on the key-stream rate for optical encryption). Formally, we obtain the following Proposition 3. Let OpES = (Schedule, OpEncrypt, OpDecrypt) be a optical symmetric encryption scheme as in Proposition 2. We have that: 1. OpES satisfies (ρ-conditioned) Shannon secrecy (resp., blockwise Shannon secrecy) if and only if it satisfies (ρ-conditioned) perfect secrecy (resp., blockwise perfect secrecy); 2. the key stream rate of OpES is at least as high as its data stream rate.
Foundations of Optical Encryption
135
Given the above propositions, a natural goal to focus on is that of designing a symmetric encryption scheme for optical networks that satisfies blockwise decryption correctness and blockwise Shannon secrecy. As already mentioned, the One-Time Pad is a well-known digital encryption scheme satisfying Shannon secrecy. An approach for realizing an encryption scheme with Shannon secrecy over optical networks could be the following: the encryption algorithm first uses a digital component to pre-compute a ciphertext as done in the one-time pad encryption algorithm and then sends it via the optical communication scheme described above (the decryption algorithm is similarly defined). This approach, although successful in returning a scheme with Shannon secrecy, results in a scheme with encryption speed still comparable to the digital scheme, thus neglecting the ultra-high speed guarantees provided by optical communication. This is why the optical network literature turned to all-optical encryption schemes, hoping to find schemes that can provide both desirable security and speed guarantees. Thus, in the rest of the paper, we concentrate on designing an all-optical symmetric encryption scheme, possibly scalable to ultra-high speed (e.g., currently, 100Gb/s), that provably satisfies blockwise decryption correctness and blockwise Shannon secrecy.
3
All-Optical Encryption with Perfect Secrecy
In this section we describe an optical encryption scheme based on a number of all-optical techniques, and achieving provable Shannon secrecy by means of a ‘random phase shifting’ technique. Overall, the scheme is obtained as an improved variant of some schemes studied in the optical network literature (see, e.g., [4,7,5]) but never proved to have security guarantees in a formal model. Designing and analyzing variants of schemes based on the random phase shifting technique is non-trivial. For instance, in [5] a variant where a fixed-length key is used instead of a key stream is showed to be subject to cryptanalitic attacks. Moreover, similar schemes in [4,7], when generalized to have a streaming key, use a key stream with a rate twice as fast as the data stream rate, which may be quite wasteful in practice. Instead, our variant satisfies Shannon secrecy and has a rate as fast as the data stream rate, which is optimal due to Proposition 3. We start with an informal description of the ideas behind our construction, then give a formal description of the optical encryption scheme, and prove its perfect secrecy property. An informal description. We first describe how this scheme achieves reliable optical communication; i.e., how it chooses codewords to allow encoding and reliable decoding of multiple data streams of elements in {0, 1}. One popular choice for an orthogonal encoding matrix is the Hadamard matrix, defined for all positive integers u ≥ 1, with the following recursion: 1 1 Hu Hu H2 = H2u = , for u ≥ 1. 1 −1 Hu −Hu
136
G. Di Crescenzo et al.
Rows of this matrix can be used as codewords in the following way: if the j-th row is used as a codeword to transmit one data bit, wavelength i is being sent with phase (1 − hij )π/2, where hij denotes the entry in the j-th row and i-th column of the symmetric matrix Hw , where w = 2n. Then this scheme uses the j-th row (resp., (n + j)-th row) of H2n as a codeword to transmit the next bit from the j-th pseudo-data stream if this bit is = 0 (resp., is = 1). To actually encrypt all of these n pseudo-data bits, a key block k is used to apply a random (from {0, π}) phase shift to wavelength i on any of the n data bits, for i = n + 1, . . . , 2n. The i-th wavelength, for i = 1, . . . , n, remains unchanged as it does not carry actual data information. Finally, to encrypt a single plaintext data block m, the optical scheduling algorithm simply splits m into n separate pseudo-data bits δ1 , . . . , δn , and then encrypts these n bits using H2n and the phase shifts from key block k as just described. The decryption function generates phase shifts from the same key block just as done in the encryption function. Then, this function removes the phase shifts from the signal and recovers any one of the n pseudo-data bits by applying the appropriate codeword from the Hadamard matrix H2n . This codeword singles out the contribution from the desired pseudo-data bit on the signal and nullifies the contribution from all others, thanks to the orthogonality property. Briefly speaking, the perfect secrecy of the scheme follows thanks to the random phase shifts from key block k. These can be shown to produce some random multiplication effect on the eavesdropped signal, which, in turn, can be shown to have an effect equivalent to the bitwise logical XOR operation between the data block and the key block, similarly as for the one-time pad digital encryption scheme. Thus, the perfect secrecy of the proposed optical encryption scheme can be reduced to the (well-known) perfect security of the one-time pad, despite the two constructions being mathematically very different. A formal description. To define our optical encryption scheme, we formally specify three optical functions Schedule, OpEncode, OpDecode. In the process, we mention an example all-optical realization of each of these functions. (See, for instance, [6,5,4,9], for more details on this aspect). Function Schedule. On input values for parameters n, w such that n ≥ 1 and w = 2n, the current time t, a key block k and an n-length plaintext data block m, this function simply splits m equally into δ1 , . . . , δn , as follows: first, it writes m as m = m1 | · · · |mn , and then it sets δj = mj , for j = 1, . . . , n. While this function has an all-optical realization, the digital equivalent realization, using an inverse multiplexer, is just as fast (and, in fact, more practical). Function OpEncrypt. This function takes as input values for parameters n, w, e such that n ≥ 1, w = 2n and e = n, the current time t, an e-bit key block k, and pseudo-data bits δ1 , . . . , δn . Given these inputs, this function returns, for i = 1, . . . , w and j = 1, . . . , n, the value χij = ki +2π δij . Here, the symbol +2π denotes sum modulo 2π, the quantity ki is computed as = 0 if 1 ≤ i ≤ n and as = π · ki ∈ {0, π} if n + 1 ≤ i ≤ 2n, and the quantity δij is computed as (1 − hiq )π/2, where hiq is the entry of the Hadamard matrix H2n in the q-th row
Foundations of Optical Encryption
137
and i-th column, q being set as follows: q = j if δj = 0 or q = n+ j if δj = 1. This function could be implemented using an array of (optical) phase modulators. Function OpDecrypt. This function takes as input values for parameters n, w, e such that n ≥ 1, w = 2n, and e = n, the current an index j ∈ {1, . . . , n}, ntime t, w an e-bit key block k and the signal σ = j=1 i=1 cos(fi · t + χij + φj ). Given these inputs, this function returns bit ρ, computed as follows. First, this function computes (σ1 , . . . , σw ), where, for i = 1, . . . , w, it holds that σi = nj=1 cos(χij + φj ). Then, the contribution from the key block is removed n by computing, for i = 1, . . . , w, the quantities σi · cos(ki ) = j=1 cos(δij + φj ). Finally, the bit sent on the j -th pseudo-data stream will be =0 (resp., =1) if the w quantity i=1 hiq · (σi · cos(ki )), for q = j (resp., for q = n + j ) is different from 0 and j ≤ n (resp., j > n). If, instead, this quantity is equal to 0, the function returns ⊥, as a failure in decryption. In practice, where it is more appropriate to assume non-continuous measurements, the latter test can be replaced by a natural approximate version which merely tests if this quantity is significantly different or significantly close to 0, for appropriate distance parameters. In practice, measurements can at best be very frequent (but not continuously so) and thus an approximation is needed. Measurement questions are very well studied in the optical network literature and dealt with using conventional digital thresholding techniques. In this paper we assume that these issues are addressed in practical implementations, and keep the perfect version of our test, without adding futher complications to our construction. The steps in this function can be implemented using an optical demultiplexer, an optical homodyne, an optical modulator, and an array of optical phase shifters. Properties of the scheme. In what follows, we show four properties of our optical encryption scheme (Schedule, OpEncrypt, OpDecrypt): first, we show that all functions are computed optically; second, our scheme is potentially scalable to ultra-high speed, third, we show that it satisfies our (stronger) notion of decryption correctness; finally, we show that it satisfies our (stronger) notion of perfect secrecy. All-optical computation. Our proposed scheme is all-optical, in that all three defined functions are computable optically. In fact, this specific claim is not entirely new and can be derived from arguments in [7,6], some of which recalled in Section 2 when discussing the definitions of optical communication and optical encryption, and later when presenting our construction. In particular, function OpEncrypt can be optically realized using an array of phase modulators, and function OpDecrypt can be optically realized using a demultiplexer, a homodyne, a modulator, and an array of phase shifters. We stress that this is only an example all-optical realization. On one hand, many other realizations are possible (see, e.g., [7,3]); on the other hand, in practice, optical communication and encryption design chooses realizations that suitably optimize various performance metrics, including financial cost. Potential ultra-high speed scalability. Modern optical phase modulators can operate at data stream rate of up to 40Gb/s but transporting a composite data
138
G. Di Crescenzo et al.
stream rate of 100Gb/s does not require optical phase modulators that operate at the composite data rate. In the present scheme, the composite data is decomposed by inverse multiplexing into n parallel channels, each of which operates at a data stream rate of 100/n Gb/s. The system transports a parallel block of data at this lower rate. The optical phase modulators in the dynamic scrambler would only be updated at the block rate, 100/n Gb/s and not at the composite data stream rate. As an example, a 16-channel system (16 codes operating in parallel) can transports 16-bit data blocks at a rate of 1.6Gb/s, which is well within the modulation capabilities of optical phase modulators. Recent experimental demonstrations have made use of optical phase modulation [12] as the primary data modulators (not as the modulators of a dynamic scrambler). These data modulators provided a differential quadrature phase shift keying (DQPSK) signal transporting 10Gb/s (the individual phase modulators themselves within the DQPSK modulator were operated at 5Gb/s). Blockwise decryption correctness. Briefly speaking, the blockwise decryption correctness of our encryption scheme (Schedule, OpEncrypt, OpDecrypt) follows by combining the following main ideas: (1) the decoding correctness of an optical communication scheme that uses the Hadamard matrix H2n as an encoding/decoding matrix; (2) the orthogonality of matrix K ·H2n is preserved, when K is a diagonal matrix; (3) the fact that orthogonal encoding/decoding implies that a value computed by function OpDecrypt is nonzero if δj (t) is correctly recovered or 0 otherwise, regardless of the value of the intercode phase shifts φj (t). More formally, we now show that the scheme satisfies blockwise decryption correctness. First of all, we note that on input n, w, t, k, m, our function Schedule sets δj equal to the j-th bit of the n-bit data block m, for j = 1, . . . , n. Then, we note that on input n, w, e, t, k, δ1 , . . . , δn , our function OpEncrypt returns the tuple ((χi1 , . . . , χin )i=1,...,n ) such that χij = ki +2π δij , where the two quantities ki , δij are computed as follows. First, ki = Ii∈[1,n] · π · ki ∈ {0, π}, where Ii∈[1,n] = 1 if 1 ≤ i ≤ n and 0 otherwise. Second, δij = (1 − hi,j+n·δj )π/2, where hi,j+n·δj is the entry of the Hadamard matrix H2n in the (j + n·δj )-th row and i-th column. Thus, we can write χij = (Ii∈[1,n] · π · ki ) + (1 − hi,j+n·δj )π/2. At this point, values fi and σ are computed as in the decryption correctness experiment in Section 2, and the bit ρ is computedby our function OpDecrypt as n follows. On input n, w, e, t, j , k, σ, the value σi = j=1 cos(χij +φj ) is computed for i = 1, . . . , w. Note that for i = n + 1, . . . , 2n, the value σi can be written as σi =
n
cos((π · ki ) + (1 − hi,j+n·δj )π/2 + φj )
j=1
= cos(π · ki ) ·
n
cos(1 − hi,j+n·δj )π/2 + φj )
j=1 Then, note that our function OpDecrypt computes σ i · cos(ki ), which is σi when n i = 1, . . . , n, and, when i = n+1, . . . , 2n, is equal to j=1 cos(1−hi,j+n·δj )π/2+ n φj ) = hi,j+n·δj · j=1 cos(φj ), as for these values of i, it holds that cos2 (ki ) = 1.
Foundations of Optical Encryption
139
w Finally, i=1 hi,j · (σi · cos(ki )), which is then equal to n OpDecrypt computes n· j=1 cos(φj ) > 0 when j = j+n·δj (in which case the function returns ρ = δj ) or 0 otherwise (in which case the function returns ρ =⊥), by the orthogonality of the matrix H2n . Perfect secrecy. To prove that the scheme satisfies the Shannon secrecy property, we need to prove that, at any time t, it holds that Prob [ m(t)|ρ1 (t), . . . , ρn (t) ] = Prob [ m(t) ], where the first probability is over the random choice of the key stream k(t) and any arbitrary distribution D used to generate the plaintext data stream m(t), and the second probability is over D alone. Towards that goal, we can rewrite the ciphertext signal obtained by the eavesdropping adversary. Specifically, after performing optical beat detection, the adversary n obtains a vector (ρ1 , . . . , ρw ), where, for i = 1, . . . , w, each ρi is defined as j=1 cos(χi,j + φj ) and can be rewritten as: ρi =
n
cos(χij + φj ) =
j=1
n
cos(ki + δij + φj ),
j=1
the latter equality being obtained by expanding χij . When i = 1, . . . , n, using ki = 0, we further have n ρi = cos(δij + φj ). j=1
ki
When i = n + 1, . . . , 2n, using = π · ki with ki ∈ {0, 1}, and the derivation of δij from the Hadamard matrix H2n , we further have ρi = (cos(ki )) ·
n
cos(δij + φj )
j=1
= (cos(ki )) ·
n
((1 − hiq )/2) · cos(φj ),
j=1
where hiq (t) is the entry of the Hadamard matrix H2n in the q-th row and i-th column, q being set as follows: q = j if δj = 0 or q = n + j if δj = 1. The final expression obtained for ρi , for i = 1, . . . , w, can be rewritten in matrix notation as Rw×1 = Kw×w · Cw×n · Fn×1 , where Rw×1 = (ρ1 , . . . , ρw )T ∈ [0, 2π]w , Fn×1 = (φ1 , . . . , φn )T ∈ [0, 2π]w , K is a diagonal matrix with the first n diagonal elements = 1 and the second n diagonal elements in {−1, 1} and Cw×n is a submatrix of H2n (with elements in {−1, 1}) chosen according to the values (δ1 , . . . , δn ). Now, note the following two facts: (1) for any plaintext matrix Cw×n and intercode phase shift vector Fn×1 , the product C · F is a w × 1 matrix; (2) Kw×w is a diagonal matrix with the first n component equal to 1 and the remaining n components equal to random and independent entries in {1, −1}. Also, consider
140
G. Di Crescenzo et al.
a single bit b taken from m, and assume that δj = b for some j ∈ {1, . . . , n}: if b = 0 (resp., 1) then algorithm OpEncrypt uses the j-th row (resp., (n + j)th row) from H2n as a codeword to compute χij . However, the multiplication Kw×w · Cw×n · Fn×1 has the effect of multiplying such row by k which perfectly randomizes b from the adversary’s viewpoint. More formally, we have the equality Kw×w · Cw×n = [Ku Hn Kl P Hn ]T , where Ku is a diagonal matrix with entries (1, . . . , 1), Kl is a diagonal matrix with entries (1 − 2k1 , . . . , 1 − 2k2n ) ∈ {1, −1}n, P is a diagonal matrix with entries (1 − 2δ1 , . . . , 1 − 2δn ), where (δ1 , . . . , δn ) ∈ {0, 1}n. Thus, we can also write Kw×w · Cw×n = [Hn P Hn ]T , where P is a diagonal matrix with entries (1−2δ1)(1−2k1 ), . . . , (1−2δn)(1−2kn ). Note that each entry (1 − 2δj )(1 − 2kj ) is equal to entry (1 − 2 ∗ (δj ⊕ kj )), for j = 1, . . . , n. This shows that matrix P = Kl P is equal to a single matrix P with diagonal entries (1 − 2 ∗ (δj ⊕ kj )), for j = 1, . . . , n, and thus encrypting bit δj from the j-th pseudo-data stream is equivalent to sending bit δj ⊕ kj , for j = 1, . . . , n. The latter is, in turn, equivalent to a one-time pad encryption of δj using kj as the random pad. Thus, both the blockwise Shannon secrecy property and the blockwise perfect secrecy property of this encryption scheme follow from the same properties of the one-time pad (that is, even without invoking the equivalence between blockwise Shannon secrecy and blockwise perfect secrecy from Proposition 2). We obtain the following Theorem 1. The described triple (Schedule, OpEncrypt, OpDecrypt) is an optical encryption scheme that satisfies blockwise decryption correctness and blockwise Shannon secrecy.
4
Conclusions
We have introduced a formal model for the design and analysis of symmetric encryption schemes over a specific type of optical networks (OCDM overlays over WDM networks, or, more briefly, OCDMA networks). We presented a symmetric encryption scheme that satisfies perfect/Shannon secrecy, has an all-optical realization, and is scalable to ultra-high speed (e.g., 100Gb/s). This scheme can be seen as an all-optical analogue of the well-known One-Time Pad encryption scheme over digital networks. The One-Time Pad was introduced in the early 20-th century, and in the last 30+ years, with modern cryptography, the amount of interest and research in encryption considerably increased. In particular, due to efficiency considerations (i.e., it is expensive to generate a perfectly random key stream at data stream rate) research on symmetric encryption over digital networks investigated symmetric encryption schemes with short keys shared between sender and receiver, thus developing new and currently very active research areas in cryptography, including the design and cryptanalysis of block ciphers
Foundations of Optical Encryption
141
and modes of operations. Analogously, we consider a major open problem to design a symmetric encryption scheme over OCDMA networks where sender and receiver share a short key. A preliminary approach towards solving this problem was suggested in [2,3], where, however, the secrecy property depends on still not demonstrated optical network assumptions and technologies. Acknowledgements. We thank Paul Prucnal and Sharon Goldberg for interesting and useful discussions. This work was supported in part by SPAWAR contract N66001-07-2010. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of DARPA.
References 1. Bellovin, S., Blaze, M.: Cryptographic Modes of Operation for the Internet. In: 2nd NIST Workshop on Modes of Operation (2001) 2. Di Crescenzo, G., Menendez, R., Etemad, S.: OCDM-based Photonic Encryption with Provable Security Guarantees. In: Proceedings of Optical Fiber Communication and the National Fiber Optic Engineers Conference, OFC/NFOEC (February 2008) 3. Etemad, S., Agarwal, A., Banwell, T., Di Crescenzo, G., Jackel, J., Menendez, R., Toliver, P.: An Overlay Photonic Layer Security Approach Scalable to 100 Gb/s. IEEE Communications Magazine 46(8), 32–39 (2008) 4. Etemad, S., Agarwal, A., Banwell, T., Jackel, J., Menendez, R., Toliver, P.: OCDMBased Photonic Layer “Security” Scalable to 100 Gb/s for Existing WDM Networks. Journal of Optical Networking 6(7), 948–976 (2007) 5. Goldberg, S., Menendez, R., Prucnal, P.: Towards a Cryptanalysis of SpectralPhase Encoded OCDMA with Phase-Scrambling. In: Proceedings of Optical Fiber Communication and the National Fiber Optic Engineers Conference, OFC/NFOEC (April 2007) 6. Goldberg, S.: Towards a Cryptanalysis of Spectral-Phase Encoded OCDMA with Phase-Scrambling. TR-771-06. Princeton University, Princeton (2006) 7. Menendez, R., Toliver, P., Galli, S., Agarwal, A., Banwell, T., Jackel, J., Young, J., Etemad, S.: Network Applications of Cascaded Passive Code Translation for WDM-Compatible Spectrally Phase Encoded Optical CDMA. IEEE J. of Lightwave Technology 23, 3219–3231 (2005) 8. Prucnal, P. (ed.): Optical Code Division Multiple Access: Fundamentals and Applications. CRC Press, Boca Raton (2005) 9. Shake, T.: Security performance of optical CDMA against eavesdropping. Journal of Lightwave Technology 23(2), 655–670 (2005) 10. Shake, T.: Confidentiality performance of spectral-phase-encoded optical CDMA. Journal of Lightwave Technology 23(4), 1652–1666 (2005) 11. Shannon, C.: Communication Theory of Secrecy Systems. Bell System Technical Journal 28(4), 656–715 (1949) 12. Toliver, T., Agarwal, A., Banwell, T., Menendez, R., Jackel, J., Etemad, S.: Demonstration of High Spectral Efficiency Coherent OCDM using DQPSK, FEC, and Integrated Ring Resonator-based Spectral Phase Encoder/Decoders. In: Proceedings of Optical Fiber Communication and the National Fiber Optic Engineers Conference, OFC/NFOEC 2007 (March 2007)
142
G. Di Crescenzo et al.
13. Vernam, G.: Secret Signaling Systems. United States Patent (July 1919) 14. Wang, Z., Huang, Y., Deng, Y., Chang, J., Prucnal, P.: Optical Encryption with OCDMA Code Swapping Using All-Optical XOR Logic Gate. IEEE Photonics Technology Letters 21(7) (April 2009)
Random Number Selection in Self-assembly David Doty1 , Jack H. Lutz1, , Matthew J. Patitz1 , Scott M. Summers1, , and Damien Woods2, 1
Department of Computer Science, Iowa State University, Ames, IA 50011, USA {ddoty,lutz,mpatitz,summers}@cs.iastate.edu 2 Department of Computer Science & Artificial Intelligence, University of Seville, Spain
[email protected]
Abstract. We investigate methods for exploiting nondeterminism inherent within the Tile Assembly Model in order to generate uniform random numbers. Namely, given an integer range {0, . . . , n − 1}, we exhibit methods for randomly selecting a number within that range. We present three constructions exhibiting a trade-off between space requirements and closeness to uniformity. The first selector selects a random number with probability Θ(1/n) using O(log 2 n) tiles. The second selector takes a user-specified parameter that guarantees the probabilities are arbitrarily close to uniform, at the cost of additional space. The third selector selects a random number with probability exactly 1/n, and uses no more space than the first selector with high probability, but uses potentially unbounded space.
1
Introduction
The development of DNA tile self-assembly has moved nanotechnology closer to the goal of engineering useful systems that assemble themselves from molecular components. Since Seeman’s pioneering work in the 1980s [17], many laboratory experiments have shown that DNA tiles can be designed to spontaneously assemble with one another into desired structures [16]. As physical and mathematical error-suppression techniques improve [3, 6, 11, 18, 20, 23], this molecular programming of matter will become practical at ever larger scales. The Tile Assembly Model, developed by Winfree [15, 22], is a mathematical model of DNA tile self-assembly that enables us to explore the potentialities and limitations of this kind of molecular programming. The model deliberately oversimplifies the physical realities of self-assembly, but Winfree proved that it
This research was supported in part by National Science Foundation Grants 0652569 and 0728806 and by the Spanish Ministry of Education and Science (MEC) and the European Regional Development Fund (ERDF) under project TIN2005-08832-C03-02. This author’s research was supported in part by NSF-IGERT Training Project in Computational Molecular Biology Grant number DGE-0504304. Supported by Junta de Andaluc´ıa grant TIC-581.
C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 143–157, 2009. © Springer-Verlag Berlin Heidelberg 2009
144
D. Doty et al.
is Turing universal [22]. This implies that self-assembly can be algorithmically directed. The simplicity of the Tile Assembly Model allows us to focus on the interactions between computation and geometry that are characteristic of algorithmic self-assembly [15, 19, 10, 9, 13, 12, 14, 2, 1, 4]. One prominent feature of self-assembly is its inherent nondeterminism, and the Tile Assembly Model represents this well. At any given time, there may be many locations where a tile might attach itself to the growing assembly, and, even at a single location, there may be more than one type of tile that can attach itself. When we are designing a tile assembly system that is supposed to result in a specified terminal assembly, regardless of the particular sequence in which tiles attach themselves, this nondeterminism is a conceptual difficulty that we overcome with tools like local determinism [19] and modularity [9]. In other situations, such as when we are using randomized algorithms to reduce the number of tile types required for a self-assembly [7,5] or when we are simulating a system that is itself nondeterministic, the Tile Assembly Model’s nondeterminism is a programming resource. This paper concerns the problem of using the nondeterminism inherent in selfassembly to implement a nondeterministic choice among an arbitrary number of options. That is, we consider the problem of designing a tile assembly system that, given a positive integer n, chooses an integer r ∈ {0, . . . , n − 1}. As stated so far, this problem is not interesting. We simply count down from n − 1 to 0, tossing a “coin” (implemented by having either one of two tiles attach at a suitable location) after each decrement to decide whether to stop or keep counting down. This solves the logical problem of nondeterministic choice, but, if n is large and the “coins” are fair and independent, it is nearly certain that r will be much larger than 0. This is not satisfactory if we want to use the nondeterministic choice for a randomized algorithm or a useful simulation. So our actual problem treats nondeterminism probabilistically. We assume that, at each time and location in self-assembly, all the tile types than can attach at that location are equally likely to do so, and that the “choices” made at different locations are independent. We then seek to design a tile assembly system that, given a positive integer n (represented in binary as a seed assembly), chooses an integer r ∈ {0, . . . , n − 1} in such a way that the outcomes r = 0, r = 1, . . . , r = n − 1 are all equally likely, or nearly so. (We are not constructing pseudorandom generators in the sense of complexity theory or cryptography. Pseudorandom generators expand a short, truly random “seed” into a longer pseudorandom string. Our random number selectors use at least as much randomness as they produce.) We present three solutions to this problem. Our first random number selector has 324 tile types and uses only O(log2 n) space to select the number r, but the probabilities are only Θ(uniform), in the sense that the probability that r is 1 selected is between 2n and n2 . Our second random number selector has 821 tile types and takes as input both n and a user-supplied precision parameter t. The probability that it selects
Random Number Selection in Self-assembly
145
r is then between n1 − 1t and n1 + 1t . This is very nearly uniform if t n, but this added uniformity comes at a price, namely that the selector uses O(t2 ) space. Our third selector has 100 tile types and selects r with probability exactly n1 . With high probability it uses only as much space as our first selector, but there is no absolute bound on the space that it takes. (This selector is a self-assembly implementation of von Neumann’s rejection method [8, 21].) We expect each of these random number selectors to be useful in some selfassemblies. Taken together, our selectors suggest that there is a tradeoff between how uniform a random number selector is and how much space it takes. We conjecture that this tradeoff is real, and not merely an artifact of our constructions. Proving or disproving this conjecture is an open problem.
2
The Tile Assembly Model
This section provides a very brief overview of the TAM. See [22, 15, 14, 10] for other developments of the model. Our notation is that of [10]. We work in the 2-dimensional discrete space Z2 . We write U2 for the set of all unit vectors, i.e., vectors of length 1 in Z2 . Intuitively, a tile type t is a unit square that can be translated, but not rotated, having a well-defined “side u” for each u ∈ U2 . Each side u of t has a “glue” of “color” colt (u) - a string over some fixed alphabet Σ - and “strength” strt (u) - a natural number - specified by its type t. Two tiles t and t that are placed at the points a and a + u respectively, bind with strength strt (u) if and only if (colt (u) , strt (u)) = (colt (−u) , strt (−u)). Given a set T of tile types, an assembly is a partial function α : Z2 T , with locations are which α is undefined interpreted to mean empty space. An assembly is τ -stable, where τ ∈ N, if it cannot be broken up into smaller assemblies without breaking bonds whose strengths sum to at least τ . Self-assembly begins with a seed assembly σ : Z2 T and proceeds asynchronously and nondeterministically, with tiles adsorbing one at a time to the existing assembly in any manner that preserves stability at all times. A tile assembly system (TAS) is an ordered triple T = (T, σ, τ ), where T is a finite set of tile types, σ is a seed assembly with finite domain, and τ is the temperature. Note that for all TAS’s in this paper, τ = 2. An assembly sequence in a TAS T = (T, σ, τ ) is a (possibly infinite) sequence α = (αi | 0 ≤ i < k) of assemblies in which α0 = σ and each αi+1 is obtained from αi by the “τ -stable” addition of a single tile. Throughout this paper, tiles are depicted as squares whose various sides either contain zero, one or two “notches,” indicating whether the glue strengths on these
A
Fig. 1. Example tile
146
D. Doty et al.
sides are 0, 1, or 2, respectively. Thus, for example, a tile of the type shown in Figure 1 has glue of strength 0 on the left and bottom, a glue of strength 2 on the right and finally a glue of strength 1 on the top. This tile also has a label ‘A’, which plays no formal role but may aid our understanding and discussion of the construction. We intentionally omit glue labels in all of our figures.
3
A Θ(Uniform) Selector
The first selector that we implement chooses a number at random between s ∈ N (“start”) and e ∈ Z+ (“end”), where s < e and both are encoded in binary in the seed as shown in the bottom row of Figure 2. The construction is shown in Figure 2. The tile set implements the random binary search algorithm Selector. It is written such that each numbered line corresponds exactly to a row in Figure 2. The identifier ¢, wherever it appears, indicates the result of a fair coin flip, with result H or T . Each evaluation of ¢ is independent of the others. Selector({s, . . . , e}) 1 s ← s + 1 2 while s < e 3 do sum ← s + e 4 mid ← sum >> 1 divide sum by 2 by bit shifting 5 if ¢ = H then s ← mid + 1 choose right subinterval else e ← mid choose left subinterval 6 s ← s + 1 7 if ¢ = H then return s else return e Figure 2 depicts a selector that randomly chooses an integer between s and e, such that, letting n = |{s, . . . , e}|, we have 12 · n1 ≤ Pr(a) ≤ 2 · n1 for each a ∈ {s, . . . , e}. The bottom row encodes s and e in binary. Note that the direction of growth can be inferred from the binding strengths. Each gray row is a comparison row whose result indicates whether the binary search is complete. The rows between each adjacent pair of gray rows implement the main loop of the random binary search. The interval {s, . . . , e} is subdivided into two subintervals, with the left subinterval always chosen to be one larger if {s, . . . , e} has an odd number of elements. One of the subintervals is randomly chosen to become the new interval, by replacing either s or e with a value near their midpoint. When {s, . . . , e} has either 1 or 2 elements, the loop terminates, and one of s or e is randomly chosen. Theorem 1. For all n ∈ N and r ∈ {1, . . . , n}, 1 1 1 2 ≤ log n+1 ≤ Pr[Selector(1, n) = r] ≤ log n < 2n n 2 2 2 2
Random Number Selection in Self-assembly
147
Proof. Let 2i−1 < n ≤ 2i , i ∈ N. Immediately after k coin flips we are working within one of 2k subintervals of [1, n] that are non-overlapping and cover all of [1, n]. The leftmost subinterval, denoted [1, nk ], has maximal size (number of elements) out of the 2k sub-intervals, which can be shown by the following simple inductive argument. For k = 1, we have two sub-intervals and the leftmost is maximal since 1+n 1+n ≥n− . (1) 2 2 If we assume that the leftmost interval [1, nk ] is maximal at flip k, then by letting n = nk in the inequality (1), the leftmost interval is maximal at flip k + 1. So a maximal length sequence of coin flips, over all such valid sequences, is given by a sequence of 1’s (we choose the left sub-interval at each coin flip). We
Compare s’ to e
1
0
0
0
0,1
1,0
1,0
1,0
Randomly pick s or e
Repeat until s’≥ e
Compare s’ to e
mid = sum >> 1
Compare s’ to e
Input row
0,1
1,0
1,1
1,1
1 0,1
0 1,0
0 1,1
0 1,1
0,1
1,0
1,1
1,1
0 0,1
1 0,0
1 0,1
0 1,1
1 0,1
1 0,0
0 0,1
0 1,1
0,1
0,0
0,1
1,1
0 0,1
0 0,0
1 0,1
0 1,1
0,1
0,0
0,1
1,1
s
Compute s’ = s + 1 Randomly set: s = mid + 1 e = mid
If s’< e, then sum = s + e
Compute s’ = s + 1
e
Fig. 2. Θ(uniform) selector
{Pr ½} {Pr ½}
148
D. Doty et al.
next show that this maximal number of coin flips is no more than log2 n + 1. The leftmost interval [1, nk ] has size nk = =
1 + nk−1 2 nk−1 2 nk−1 +1 2
=
n
k−1
(2)
2
nk−1 even nk−1 odd
(3)
Assuming that nk is odd for all k (to give an upperbound on the number of flips), we have nlog n+1 = 1. This gives 1 ≤ Pr[Selector(1, n) = r]. 2log2 n+1 Similarly, using (1), it can be shown that at flip k, the rightmost subinterval is of minimal size over all 2k possible subintervals. A lowerbound of log2 n on the number of flips is found when nk is even for all k in (3), and this lowerbound is reached when n = 2i , i ∈ N. Thus Pr[Selector(1, n) = r] ≤
1 2log2 n
.
Unfortunately,the bounds of Theorem 1 are tight, in the sense that for certain n and r ∈ {0, . . . , n − 1}, Pr[r] can be nearly twice or half of n1 . The asymmetry of the interval sizes is what prevents the tile set from achieving perfect uniformity. Intuitively, if the left subinterval has length l and the right has length l + 1, l+1 then we should pick the right with probability 2l+1 , as opposed to 12 as our algorithm does. It may seem at first glance that by randomly selecting which interval is larger, we could smooth out the probabilities and approach a uniform distribution in the limit as the interval size approaches infinity. However, this does not work. Roughly speaking, selecting r from {0, . . . , n−1} n using this method, we can express Pr[r] = ≈log pi , where each pi represents i=1 the probability that r is in the subinterval picked during the ith stage. If n is a power of 2, then each pi will be 12 , and the selector (both that just described and the selector constructed earlier in this section) will select r with probability exactly n1 . If n is not a power of 2, then at most one of the pi ’s will be unequal to 12 ; this will occur precisely at the stage when the interval length is odd and r is the middle element, which can happen at most once in the course of the algorithm. In the case of r = 1 or r = n − 2, when this occurs, the interval will have length 3, so pi will be equal to 12 , when in fact it ought to be 23 to achieve uniformity. Therefore, no matter how large n is, r = 1 will be selected with probability a constant factor away from uniform. In the next section we introduce a random selector that allows the user to control the desired closeness to uniformity as a parameter, trading off space for error in approximating uniformity.
Random Number Selection in Self-assembly
4
149
A Controllable-Error Selector
In this section, we implement the self-assembly version of a random number generator whose deviation from uniform can be controlled by a user-specified parameter. More precisely, given an upper bound n ∈ N, and a precision parameter t ∈ N, the tile system generates a random number r ∈ {0, . . . n − 1} with probability approaching n1 as t → ∞. We first outline the algorithm. The following algorithm is one of the more intuitive methods of generating a random number from an arbitrary range, using flips of an unbiased coin, although the number is not generated with perfect uniformity. MSB stands for most significant bit, and LSB stands for least significant bit. Controllable-Selector(n,t) 1 Uniformly at random choose m ∈ {0, . . . , t − 1} 2 return Mod (m, n) Mod(m,n) compute m mod n in binary 1 Line up MSBs of m and n by shifting n to the left sm ← the integer represented by the log n + 1 MSBs of m (“small m”) 2 while n’s LSB lies to the left of m’s LSB do if sm ≥ n 3 then sm ← sm − n concatenate the bit of m to the right of n’s LSB to the end of sm 4 shift n one bit to the right relative to sm and m 5 if sm ≥ n 6 then sm ← sm − n 7 return sm As before, we have generally numbered the lines corresponding to rows in the tile assembly. However, in this case, lines 2 and 4 are implemented in the same row, since it is possible to shift n to the right by one bit and simultaneously compare it to sm. This occurs on all comparisons except for the first check of the loop condition, immediately after n has been shifted left to line it up with the MSB of m. Also, line 3 represents the row that subtracts sm − n if sm ≥ n, or simply copies sm otherwise, although the copying does not appear as an explicit line in the pseudocode. Finally, line 1 is actually implemented as a series of rows as shown in Figure 4, but we express it as a single instruction in the pseudocode. Our construction takes as inputs two positive integers, n and t , which we encode in a seed row. Choosing t so that t = 24t −1 means that the construction executes the procedure Controllable-Selector(n,t).1 The construction first grows a number of rows upward, each having a width one greater than the 1
If t = 24t −1 for some t ∈ N, choose t so that t ≤ 24t −1 . This achieves the bound on the probability that we derive for t, while using asymptotically the same amount of space.
150
D. Doty et al.
0/1 0
0/1 0
A
B A
0/1 0
0/1 0
0/1 0
0/1 0
0/1 1
0/1 0
0/1 1
0/1 0
If so, randomly generate 4t - 1 bits
0,1
0,0
0,1
0,0
Is t = 0?
“Filler” tiles
B A
0/1 0
B A
Repeat until t = 0
B A
B A
0,1
0,0
1,1
0,0
Is t = 0?
D
0,1
0,0
1,1
0,0
Decrement the bits of t by 1
A
0,1
0,0
1,1
1,0
Seed row
t
n
Fig. 3. The first stage of the construction
previous, until a row having a width of exactly 4t − 1 is formed. Finally, the top most row assembles in which, at each location, one of exactly two tile types is randomly selected to bind. This effectively generates a random number m in the set 0, . . . 24t −1 − 1 with a uniform distribution. Then, the subsequent rows to attach implement step 2 in Controllable-Selector. The resulting modulus is encoded in the top most row of the construction and is the number r. We now present a more detailed discussion of this construction. The tile assembly system can be thought of as assembling in three logical stages. First Stage: In the initial stage, our goal is to take as input n and t , and (uni
formly) produce a random number, say m, in the range 0, . . . 24t −1 − 1 . We will then feed the numbers m and n to the second stage of the construction. Our input is encoded in a seed row whose length k is the greater of log n + 1 and log t + 1. The seed row is the bottom most row in Figure 3. 1. On top of the seed row, we use a (zig-zagging) Rothemund-Winfree binary subtractor [15] that counts down from t while “blindly” passing the value of n up through the subsequent rows. This gives us a k by 2t + 1 rectangle. 2. We use filler tiles (labeled ‘A’, ‘B’ and “Filler” tiles in Figure 3) to selfassemble a right-triangle to the left of the rectangle that was built in the previous step. 3. (line 1 of the pseudocode for Controllable-Selector) The top most row of the construction is 4t − 1 tiles long and self-assembles from right to left such that, for each of the 4t − 1 locations in the row, there are two possible tile types that can attach - one tile representing a 0 and the other a 1. The choice of each tile that attaches in this row can be
Random Number Selection in Self-assembly
0,1
0,0
0,1
0,0
1
0
0
0
0
1
1
151
Continue shifting the bits of n to the left until the MSB of n is in the leftmost column
0,0
0,0
0,0
0,0
1,0
0,1
0,0
0,1
0,0
1
1
0,0
0,0
0,0
0,0
1,0
0,1
0,0
0,1
0,0
1
1
If yes, then do another shift
0,0
0,0
0,0
0,0
1,0
0,0
0,1
0,0
0,1
1,0
1
Can the bits of n be shifted once more?
0,0
0,0
0,0
0,0
1,0
0,0
0,1
0,0
0,1
1,0
1
Shift the bits of n once to the left
0,0
0,0
0,0
0,0
1,0
0,0
0,0
0,1
0,0
1,1
1,0
“Request” the bits of n be shifted once to the left
0,0
0,0
0,0
0,0
1,0
0,0
0,0
0,1
0,0
1,1
1,0
Randomly chosen bits of m along with n
m
n
Fig. 4. The second stage of the construction
made independently of its predecessor (i.e., the tile immediately to its right). This results in the generation of a random number m in the range 4t −1 0, . . . 2 − 1 with uniform distribution. The top of the last row of the initial stage of the construction encodes (as output) the number n (the “lower” bits in each tile), along with the number m (the randomly chosen “upper” bits in each tile). Note that we allow leading zeros in both m and n. Second Stage: (Line 1 of the pseudocode for Mod) The second stage of the construction takes as input m and n (output from the previous stage), and shifts (all of the bits of) n to the left so that the most significant 1 of n lines up with the MSB of m. 1. Every other row (starting with the first row) in this stage of the construction sends a “request-a-shift” signal from left-to-right only if the most significant 1 of n does not line up with the MSB of m. For example, the second (from the bottom most) row in Figure 4 self-assembles left-to-right and carries the first request-a-shift signal. 2. On top of each row that carries a request-a-shift signal, a row selfassembles right-to-left in which each bit of n is shifted once to the left. The third (from the bottom most) row in Figure 4 is the first row that carries out a shift operation. For shift rows, as self-assembly proceeds right-to-left, the position of the most significant 1 of n is compared with
152
D. Doty et al.
the MSB of m, and if they line up, then a subsequent request-a-shift signal is not sent. It is at this point that the third, and final stage of the construction is carried out. Third Stage: The third stage of the construction performs the task of calculating m mod n (step 2 in Controllable-Selector) and then (as a final step) self-assembles a row which represents only that value as the final output of the construction. The third stage begins with a row of tiles which encode the values of m and n such that the most significant 1 of n lines up with the MSB of m. Throughout this discussion, “small m” will refer to the bits of m that begin with the leftmost and continue right to the location of the rightmost bit of n in that row (these positions are represented by the dark colored tiles in Figure 5). The third stage proceeds as follows. 1. (line 2 of the pseudocode for Mod) Self-assemble a row from left-to-right which performs an initial comparison of the values of “small m” and n.
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0,1
1,0
1,1
1,0
Final row that extracts the bits of the randomly generated number “small” m is less than n and their LSBs are aligned
Continue subtracting n from “small” m
0
0
0
0
0
0,1
1,0
1,1
0,0
1
1
Subtract n from “small” m
0
0
0
0
1
0,1
0,0
0,1
0,0
1
1
This time “small” m is at least n
0
0,1
0,0
0,1
1,0
0
0
0
0
1
1
Shift n once to the right and do a comparison against “small” m
0,1
0,0
0,1
0,0
1
0
0
0
0
1
1
Since n > “small m”, request the bits of n to be shifted once to the right
0,1
0,0
0,1
0,0
1
0
0
0
0
1
1
Do an initial comparison of “small m” and n
“small” m = 0 n = 10
Fig. 5. The third stage of the construction The “direction” of self-assembly for each row is either right-to-left or left-to-right (as noted in parentheses)
Random Number Selection in Self-assembly
153
2. (line 3 of the pseudocode for Mod) Self-assemble the next row from right to left which performs one of the following functions based on the comparison from the previous step. (a) If n > “small m,” send a signal requesting that (all of the bits of) n be shifted one position to the right. (b) Else, subtract the value of n from “small m” request to shift n. Note that this will result in a new value of “small m.” 3. (line 4 of the pseudocode for Mod) Now the construction self-assembles a row from left-to-right which shifts the value of n one position to the right (shifting 0 bits in from the left) and keeping the current value of “small m” in the same position. Note that this row also performs a comparison against the newly shifted value of n and the current value of “small m.” The latter will now extend one bit further to the right than it previously did. 4. (lines 2 and 4 of the pseudocode for Mod) The construction continues the self-assembly of rows which perform the previous two steps in a loop until the value of n has shifted far enough to the right so that its LSB is aligned with that of m. 5. (line 6 of the pseudocode for Mod) Only if the last comparison resulted in n < “small m,” the construction self-assembles the necessary rows to do one more subtraction of n from “small m,” and a final comparison (as done above). 6. (line 7 of the pseudocode for Mod) The remaining value of “small m” now represents the result of m mod n. The final step in the third stage of the construction self-assembles a row from right-to-left which represents only that remainder, and thus the final output, r ∈ {0, . . . , n − 1}. Theorem 2. For all n ∈ N, and r ∈ {0, . . . , n − 1}, 1 t→∞ n Proof. Fix t ∈ N. Note that, by a trivial counting argument, there are either
t t or ways to choose a number congruent to r (modulo n) from the set n n {0, . . . , t − 1}, whence t lim Pr [Controllable-Selector(n, t) = r] =
Pr [Controllable-Selector(n, t) = r] ≤
n
t +1 ≤ t 1 1 = + . n t t n
Similarly, we have Pr [Controllable-Selector(n, t) = r] ≥
1 1 − . n t
154
D. Doty et al.
It follows, by the Squeeze theorem, that lim Pr [Controllable-Selector(n, t) = r] =
t→∞
5
1 . n
An Exactly Uniform Selector
Even though the selector of Section 4 asymptotically approaches a uniform distribution as the precision parameter t grows to infinity, for certain n it deviates slightly from uniform. In this section we outline a construction of a random number selector with the property that it selects a random number in the range {0, . . . , n − 1} with probability exactly n1 . The catch is that while the selector has a very low expected number of tiles that need to be used, with some small probability, an unbounded number of tiles could be required, making this selector unsuitable for applications in which space constraints must absolutely be enforced. The construction is shown in Figure 6. The tile set implements the following algorithm. The random element r is generated by selecting t bits uniformly and independently at random, where t is the length of the binary expansion of n.
Is r ≥ n?
0
1
0
0
1 1
0 1
1 0
1 0
1 0
0 1
1 0
1 0
Return first r
Pick a new r
Repeat until r
Is r ≥ n?
Is r ≥ n?
Input row: n
1 1
0 1
1 0
1 0
1 1
0 1
1 0
1 0
1 1
0 1
1 1
1 0
1 1
0 1
1 1
1 0
1
0
1
1
Fig. 6. The uniform selector
If so, pick a new r
Randomly select bits r
Random Number Selection in Self-assembly
155
Uniform-Selector(n) 1 r ← random element of {0, 1, . . . , 2log n+1 − 1} 2 while r ≥ n 3 do r ← random element of {0, 1, . . . , 2log n+1 − 1} 4 return r The selector chooses r between 0 and the next power of 2 above n and outputs r if r < n. The selector will use a small number of rows with high probability, but may potentially usean unbounded number of rows. Since the element of 0, 1, . . . , 2log n+1 − 1 is selected with uniform probability, then conditioned on that element being less than n, the probability of each element r ∈ {0, . . . , n − 1} is equal, i.e., n1 . Furthermore, since the next power of two greater than n is at most 2n, the probability that r ≥ n is at most 12 , whence the expected number of iterations i is a geometric random variable with expected value at most 2, subject to the tail bound, for all k ∈ N, Pr[i > k] ≤ 2−k . Since two rows are used per iteration, so allowing, for instance, 100 rows (plus the two for the seed and final row) ensures that sufficient room will exist to generate r with probability at least 1 − 2−50 .
6
Conclusion
We have introduced random number selectors in the Tile Assembly Model, powered by the randomness inherent in nondeterministic tile sets. They allow for a more algorithmic control of randomness than by hard-coding probabilities by fixed tile concentrations. The third selector is not entirely unlike the procedure used to generate random integers from random bits used in many standard libraries; for instance, the method Random.nextInt in the Java standard library. Why then have we bothered to describe the first two selectors, which are provably different from uniform? In a programming language, a “ZPP” algorithm that almost certainly takes a small amount of time, but may rarely use more time, is not a problem except perhaps in critical real-time systems. However, in a tile assembly system, consisting of possibly billions of tiles, the presence of even a single region that uses too much space will destroy the correctness of the entire assembly. In such situations, it may be preferable to guarantee that space bounds are adhered to at the cost of a slight deviation from uniformity.
References 1. Adleman, L., Cheng, Q., Goel, A., Huang, M.-D.: Running time and program size for self-assembled squares. In: STOC 2001: Proceedings of the thirty-third annual ACM Symposium on Theory of Computing, pp. 740–748. ACM, New York (2001) 2. Becker, F., Rapaport, I., R´emila, E.: Self-assembling classes of shapes with a minimum number of tiles, and in optimal time. In: Arun-Kumar, S., Garg, N. (eds.) FSTTCS 2006. LNCS, vol. 4337, pp. 45–56. Springer, Heidelberg (2006)
156
D. Doty et al.
3. Chen, H.-L., Goel, A.: Error free self-assembly with error prone tiles. In: Proceedings of the 10th International Meeting on DNA Based Computers (2004) 4. Demaine, E.D., Demaine, M.L., Fekete, S.P., Ishaque, M., Rafalin, E., Schweller, R.T., Souvaine, D.L.: Staged self-assembly: nanomanufacture of arbitrary shapes with O(1) glues. Natural Computing 7(3), 347–370 (2008) 5. Doty, D.: Randomized self-assembly for exact shapes, Tech. Report 0901.1849, Computing Research Repository (2009) 6. Fujibayashi, K., Zhang, D.Y., Winfree, E., Murata, S.: Error suppression mechanisms for dna tile self-assembly and their simulation. Natural Computing (to appear) 7. Kao, M.-Y., Schweller, R.T.: Randomized self-assembly for approximate shapes. In: Aceto, L., Damg˚ ard, I., Goldberg, L.A., Halld´ orsson, M.M., Ing´ olfsd´ ottir, A., Walukiewicz, I. (eds.) ICALP 2008, Part I. LNCS, vol. 5125, pp. 370–384. Springer, Heidelberg (2008) 8. Knuth, D.E.: The art of computer programming. Seminumerical algorithms, vol. 2. Addison-Wesley, Reading (1997) 9. Lathrop, J.I., Lutz, J.H., Patitz, M.J., Summers, S.M.: Computability and complexity in self-assembly. In: Beckmann, A., Dimitracopoulos, C., L¨ owe, B. (eds.) CiE 2008. LNCS, vol. 5028, pp. 349–358. Springer, Heidelberg (2008) 10. Lathrop, J.I., Lutz, J.H., Summers, S.M.: Strict self-assembly of discrete Sierpinski triangles. Theoretical Computer Science 410, 384–405 (2009) 11. Majumder, U., LaBean, T.H., Reif, J.H.: Activatable tiles: Compact, robust programmable assembly and other applications. In: Garzon, M.H., Yan, H. (eds.) DNA 2007. LNCS, vol. 4848, pp. 15–25. Springer, Heidelberg (2008) 12. Patitz, M.J., Summers, S.M.: Self-assembly of decidable sets. In: Calude, C.S., Costa, J.F., Freund, R., Oswald, M., Rozenberg, G. (eds.) UC 2008. LNCS, vol. 5204, pp. 206–219. Springer, Heidelberg (2008) 13. Patitz, M.J., Summers, S.M.: Self-assembly of discrete self-similar fractals (extended abstract). In: Proceedings of The Fourteenth International Meeting on DNA Computing, Prague, Czech Republic, June 2-6 (2008) (to appear) 14. Rothemund, P.W.K.: Theory and experiments in algorithmic self-assembly, Ph.D. thesis, University of Southern California (December 2001) 15. Rothemund, P.W.K., Winfree, E.: The program-size complexity of self-assembled squares (extended abstract). In: STOC 2000: Proceedings of the thirty-second annual ACM Symposium on Theory of Computing, pp. 459–468. ACM, New York (2000) 16. Rothemund, P.W.K., Papadakis, N., Winfree, E.: Algorithmic self-assembly of dna sierpinski triangles. PLoS Biology 2(12) (2004) 17. Seeman, N.C.: Nucleic-acid junctions and lattices. Journal of Theoretical Biology 99, 237–247 (1982) 18. Soloveichik, D., Winfree, E.: Complexity of compact proofreading for self-assembled patterns. In: Carbone, A., Pierce, N.A. (eds.) DNA 2005. LNCS, vol. 3892, pp. 305– 324. Springer, Heidelberg (2006) 19. Soloveichik, D., Winfree, E.: Complexity of self-assembled shapes. SIAM Journal on Computing 36(6), 1544–1569 (2007) 20. LaBean, T.H., Majumder, U., Sahu, S., Reif, J.H.: Design and simulation of selfrepairing DNA lattices. In: Mao, C., Yokomori, T. (eds.) DNA12. LNCS, vol. 4287, pp. 195–214. Springer, Heidelberg (2006) 21. von Neumann, J.: Various techniques for use in connection with random digits. In: von Neumann’s Collected Works, vol. 5, pp. 768–770. Pergamon, Oxford (1963)
Random Number Selection in Self-assembly
157
22. Winfree, E.: Algorithmic self-assembly of DNA, Ph.D. thesis, California Institute of Technology (June 1998) 23. Winfree, E., Bekbolatov, R.: Proofreading tile sets: Error correction for algorithmic self-assembly. In: Chen, J., Reif, J.H. (eds.) DNA 2003. LNCS, vol. 2943, pp. 126– 144. Springer, Heidelberg (2004)
Abstract Geometrical Computation and Computable Analysis J´erˆome Durand-Lose Laboratoire d’Informatique Fondamentale d’Orl´eans, Universit´e d’Orl´eans, ´ B.P. 6759, F-45067 ORLEANS Cedex 2, France
[email protected] http://www.univ-orleans.fr/lifo/Members/Jerome.Durand-Lose
Abstract. Extended Signal machines are proven able to compute any computable function in the understanding of recursive/computable analysis (CA), here type-2 Turing machines (T2-TM) with signed binary encoding. This relies on an intermediate representation of any real number as an integer (in signed binary) plus an exact value in (−1, 1) which allows to have only finitely many signals present outside of the computation. Extracting a (signed) bit, improving the precision by one bit and iterating the T2-TM only involve standard signal machines. For exact CA-computations, T2-TM have to deal with an infinite entry and to run through infinitely many iterations to produce an infinite output. This infinite duration can be provided by constructions emulating the black hole model of computation on an extended signal machine. Extracting/encoding an infinite sequence of bits is achieved as the limit of the approximation process with a careful handling of accumulations and singularities. Keywords: Analog computation, Abstract geometrical computation, Computable analysis, Signal machine, Type-2 Turing machine.
1
Introduction
Classical computability deals with integers, finite sequences of letters, and more generally up to countably many discrete values. Does this mean that Analysis and Engineering are totally disconnected from computations? That physical simulation is impossible in silicon? Of course not, this is done everyday. Dealing with real values is handled in various ways: fixed approximation (π is 3.14), formal manipulation (π is PI), unbounded approximation on demand (π is generated by a program that can provide extra digits at any time), interval arithmetics (π is included in [3.1, 3.2]). . . Following their definition as Cauchy sequences of rational numbers, real numbers can be encoded by infinite decreasing sequences of intervals with rational endpoints, such that their length tends to zero. The whole infinite sequence represents exactly one real at its intersection, but a finite prefix of the sequence is enough to get an approximation, the larger the prefix, the better the approximation. Rational endpoints allow exact coding C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 158–167, 2009. c Springer-Verlag Berlin Heidelberg 2009
Abstract Geometrical Computation and Computable Analysis
159
and manipulation of each interval in classical computation, so that the infinite sequence of intervals can be written as an infinite sequence of symbols. Functions over these infinite sequences provide functions on the reals. A Turing machine is used: the infinite entry is written on one tape and the output is expected on a write-once tape (extra working tapes are available). To entirely process the input and generate the whole output, an infinite number of iterations is needed, but in finitely many an approximation is generated. This approach, now called Computable Analysis (CA) was initiated by Turing [1936], then Grzegorczyk [1957] and is detailed in classical books [Ko, 1991, Weihrauch, 2000]. It was proven equivalent to a variation of Shannon’s General Purpose Analog Computer [Bournez et al., 2007]. Another approach to analog computing is to imagine that values and primitives are freely available which leads to the Blum, Shub and Smale (BSS) model [Blum et al., 1989]. In recent years, Abstract Geometrical Computation (AGC) has been developed and proven able to simulate the original BSS [Durand-Lose, 2007, 2008]. In the present paper, AGC is shown capable of carrying out any CA-computation. An intermediate representation of real numbers with finitely many signals is provided. This encoding allows to go and return between BSS-encoding and CA-encoding. Abstract Geometrical Computation is defined by dimensionless signals moving in an Euclidean (continuous) space in continuous time. To each signal corresponds a meta-signal which defines its speed. The number of meta-signals is finite. Existing signals are only modified when they collide: they are replaced by new signals according to their meta-signals and collision rules. A signal machine collects the definition of available meta-signals and collision rules. In previous works to implement the BSS-model, real numbers are encoded by the distance between two parallel signals (plus two more signals to encode the scale, i.e. distance 1). On one side, for CA, this is not so convenient since infinite sequences are expected. On the other side, in the AGC context, infinitely many signals would either occupy the whole infinite space or produce singularities (accumulation of signals in a configuration, static) or accumulations (of collisions in the space-time diagram, dynamic) — preventing the values from being moved around. These are very powerful yet dangerous artifacts. Special care has to be taken in defining the space-time diagram near them. A singularity lasts in the following configurations as long as signals are accumulating there. Anything colliding with it just gets absorbed. Unless a singularity is generated, an accumulation results in one signal (always the same). More complex rules can be devised to handle singularities and accumulations — but are not used here — so as to emulate the (nested) black hole model of computation [Hogarth, 1994, Etesi and N´emeti, 2002, Durand-Lose, 2006, 2009] (with the use of folding structures) as well as to achieve exact multiplication of real numbers to simulate the BSS model [Durand-Lose, 2008]. To avoid handling infinitely many signals outside of CA-computations, an intermediate representation is used. A real number x is encoded by n + ε where
160
J. Durand-Lose
n is an integer and −1 < ε < 1; n is encoded in signed binary and ε as a distance between two signals (a pair of signals somewhere in the configuration amounts for distance 1). The encoding used for CA implementation is signed binary with symbols 1, 0, 1 plus a decimal point. To go forth and back between the encodings, n is encoded as a sequence of signed bits (and thus does not have to be taken care of) and the first approximation is (n − 1, n + 1). Then the approximation 3a+b a+3b a+b goes by steps: the interval (a, b) is replaced by (a, a+b 2 ), ( 4 , 4 ) and ( 2 , b) that corresponds to 1, 0 and 1 respectively. (Of course, intervals overlap and the infinite sequence is not unique.) All the geometric constructions to encode and to decode are presented. The presentation of the implementation of Turing machines (TM) is only illustrated; it is quite straightforward and already done in [Durand-Lose, 2009]. Type-2 TM need infinitely many iterations to complete a computation. To get the results in finite duration, TM and input are embedded into a folding structure as in [Durand-Lose, 2006, 2009]. The output is an infinite convoy of signals, bringing forth singularities. It is shown how this can be handled and used to produce the exact intermediate representation. Definitions of AGC and CA are gathered in Section 2. Section 3 concentrates on approximation, i.e. the intermediate representation as well as how to get/add bits, and the simulation of Turing machines. Section 4 deals with exact computation in finite duration. Section 5 concludes this paper.
2 2.1
Definitions Abstract Geometrical Computation
A signal machine (SM) is defined by (M, S, R) where M (meta-signals) is a finite set, S (speeds) a mapping from M to R, and R (collision rules) a function from the subsets of M of cardinality at least two into subsets of M (all these sets are composed of meta-signals of distinct speeds). A signal machine is extended if some meta-signal μ❄ is distinguished to be used as the result of an accumulation. Each instance of a meta-signal is a signal located on the real axis. The mapping S assigns speeds to signals. A collision rule, ρ− →ρ+ , defines what emerges (ρ+ ⊆ M ) from the collision of two or more signals (ρ− ⊆ M ). Since R is a function, SM are deterministic. The extended value set, V , is the union of M and R plus three symbols: for void, ❄ for accumulation, and ✺ for singularity. A configuration, c, is a mapping from R to M ∪ R ∪ {} such that the set { x ∈ R | c(x) = } is finite. An extended configuration, is a mapping from R to V such that all and only accumulation points of { x ∈ R | c(x) = , ✺ } have the value ✺. The locations of the ✺ are thus defined in a static way: they only depend on the configuration and not on the dynamics. A (resp. extended) space-time diagram is a mapping from an interval of R (representing the time) into (resp. extended) configurations. A signal corresponding to a meta-signal μ at a position x, i.e. c(x) = μ, is moving uniformly with constant speed S(μ). A signal must start (resp. end) in the initial (resp. final) configuration or in a collision. At a ρ− →ρ+ collision, signals corresponding to
Abstract Geometrical Computation and Computable Analysis
161
the meta-signals in ρ− (resp. ρ+ ) must end (resp. start) and no other signal should be present. There is a ❄ if and only if there is no ✺ and collisions are accumulating (from before, this one is dynamic). A ❄ immediately turns into a (regular) μ❄ signal, so that a μ❄ signal can also result from an accumulation. Continuation rules could be designed to distinguish more cases, but this is useless here. Space-time diagrams are represented with time increasing upward. The traces of signals are line segments whose directions are defined by (S(.), 1) (1 is the temporal coordinate) so that the speed is the inverse of the slope. Collisions correspond to the common extremities of these segments. 2.2
Computable Analysis
A type-2 Turing machine (T2-TM) is a regular Turing machine (TM) such that the entry is an infinite sequence of symbols written on a read-only tape. The output is also expected to be an infinite sequence of symbols written on a write once tape (each cell can only be written once). The TM has an extra work tape on which it can freely read and write. It needs infinitely many iterations to read a whole input and write a whole output, but after finitely many iterations, a finite part of the entry is read and a finite part of the output is generated. Since the output is write-once, anything written never changes and it converges to the infinite output according to the prefix topology. To link this machinery to analysis, a representation of real numbers by infinite sequences should be provided. The larger the prefix of the representation is read, the more should be known on the encoded real number x, ultimately x should be perfectly known and distinguished from any other real number. The standard representation of a real number x is by any decreasing sequence of open intervals with rational ends such that their intersection reduces to {x}. The infinite sequence is then just the self-delimiting concatenation of the naming of the intervals. In the present paper, an equivalent representation is used. Let Σ = {•, 1, 0, 1}, the signed binary representation, ρsb :⊆ Σ ω −→ R, (from [Weihrauch, 2000, Def 7.2.4 p. 206]) is defined only for infinite sequences with only one dot (•) by: n0 •d1 d2 d3 . . . dn . . . −→ νsb (n0 ) +
di i∈N
2i
where n0 ∈ {1, 0, 1}∗ , di ∈ {1, 0, 1} and νsb is a naming of natural integers n+1 signed in base 2 (1 representing −1). Only the open intervals In,k = ( n−1 2k , 2k ) (n, k ∈ N) are considered; this family of intervals generates the usual topology on R.
3
Approximation
This section deals with finite run of T2-TM. After defining the intermediate representation of real numbers and the extraction of signed bits, TM implementation is
162
J. Durand-Lose
presented. The section ends with approximating the intermediate representation from a sequence of signed bits. 3.1
Intermediate Representation and Decoding
In the signed binary representation, there are finitely many symbols before the dot and then an infinite sequence of symbols in {1, 0, 1}. The first part, including the dot, is encoded by signals, one signal for each symbol. The second part represents a real number, ε, in (−1, 1) as a signed binary infinite sequence. This number is represented in AGC, by the distance between two signals (there exist two signals somewhere representing the scale, i.e. their distance is 1). The integral part is represented by parallel vertical signals (1, 0 or 1) that get transformed into 1L , 0L or 1L on receiving get (the signal sent to extract the next bit). The dot is treated similarly. These are not addressed in this paper. The two signals to represent ε are zero and e. More signals are present: one, half, half and one at position respectively −1, − 12 , 12 and 1 (position 0 is the one of zero). Signal e is between one and one, it might be superposed with half or zero, in such a case a different meta-signal is used (these technical details are omitted from now on). Signed bits are extracted one after the other and companion signals are prepared for next extraction: one, half, zero, half and one are scaled by one half and e is translated in order to correspond to the remainder. The structure on Fig. 1(a) is used for this. The three main cases are represented on Fig. 1 where signal zero (in the middle) and the one handling e are drawn with thick lines. If −1 < ε < − 21n then the extracted bit is 1 (signal 1L exits on the left) and ε is replaced by ε+ 21n (e is shifted by the distance from one to half). If − 21n < ε < 21n then the extracted bit is 0 (signal 0L ) and ε is kept (e is not shifted). Except for the geometric construction, the last case is symmetric to the first one. Arbitrarily, if − 12 < x < 0, then the extracted bit is 0 although it could have been 1, similarly for 0 < x < 12 . There is no room in the paper to detail all the meta-signals and rules. The corrections of the various constructions rely on simple geometry. All have been checked and implemented in Java to generate the pictures. 1L
0L
(a) empty structure
(b) −1 < ε < − 12
(c) − 12 < ε <
e
e
e
one
half
zero
half
ge t one
1L
1 2
Fig. 1. Extracting a single signed bit
(d)
1 2
<ε<1
Abstract Geometrical Computation and Computable Analysis
3.2
163
Computable Analysis
A type-2 Turing machine is nothing but a regular TM that is supposed never to halt with two special purpose tapes: one initially totally filled — input — and one for writing once — output. On the input tape, the head cannot change the read symbol nor move left (i.e. back to the start). On the output tape, the head either rewrites the blank symbol or moves right. In the transition table, transitions that read on the input can be clearly identified. Reading is replaced by sending a get signal to the intermediate structure and waiting for the signed bit. The same is done with writing, in this case, signals encoding signed bits are sent on the side but no acknowledge/returned value is expected (next subsection presents how to deal with them). Implementing a TM in AGC has already been done in Durand-Lose [2009]. One work tape is enough; read and write operations are carried out by signals sent on the side (an answer is expected for reading). The simulation cannot be used straightaway because on an infinite run, the tape might extend infinitely, so that with previous construction, the room used for the tape becomes infinite. Since space is continuous, it is pretty easy to put less and less space between signals amounting for the cells of the tape. Indeed, a geometric decreasing is used so that each signal is half the distance from the last than the distance to the last from the previous one. This is illustrated on Fig. 2 with the first iterations of a TM, the initial implementation and the one within bounded space. These signals might go accumulating if the head is moving right forever. But in a proper CA-computation, it is not the case: there must be infinitely many readings and each one needs signals to go forth and back from the tape to the intermediate structure. Since this distance is bounded away from zero, each reading requires a minimal time. There is no accumulation whatsoever in a q1 b b c a #
q1
a
#
q1
q1
a
c
q1 b b c # b
q1
a c
q1 b b b # q1
# b
b c
q1
q1 b c b #
q1
q0 b c # q0 b b q0
# b a
q0
q0 a b
q0
b
c
(a) TM computation (b) [Durand-Lose, 2009, Fig. 6] (c) finite space version (with more transitions) Fig. 2. Simulation of a Turing machine
164
J. Durand-Lose
normal computation. A bounded space is used by the T2-TM simulation and the encoded real number. There is always finitely many signals in any configuration. In case of multiple input (for example for an addition), it is easy to set one after the other on the right and to have a distinct get for each entry. 3.3
Approximating the Intermediate Representation
Since only approximation is concerned in this Section, only a tightening bound on ε is generated. The first bits for the integral part are encoded as they are in a geometric positioning to ensure that they remain in a bounded space. Only the fractional part needs careful attention. At start, there are five signals to encode −1, − 12 , 0, 12 , and 1 at their correct relative positions (obtained for example by copying) and the approximation is up to 1. The problem is then to locate the position of e: it is somewhere between signals one and one. Each incoming bit allows to scale down the interval. Figure 3 shows the three cases. For exact values, next section considers infinite incoming sequences of signed bits in bounded space. Considering an incoming finite sequence of signed bits or
1
(a) for 1
0
1
(b) for 0
(c) for 1
Fig. 3. Tightening the intermediate representation
(a) for 0 0 0 0 0 0
(b) for 1 1 1 1 1 1
✺
(c) for 1 1 1 1 1 0
(d) for 1 1 1 1 1 0 1 1 1 1 1 0 . . .
Fig. 4. Management of three finite convoys and an infinite one
Abstract Geometrical Computation and Computable Analysis
165
convoy, the tightening for one bit should not mess with the one of another bit so delays have to be provided. Delaying is done by replacing the incoming signals by null speed signals (recording the bits). This replacement is carried out by some toggle signal. When the delay has elapsed, another toggle signal is sent to restore their movement. The first toggle is launched when the first remaining signal (the new one) is generated, the second toggle at the second one (the new half) as illustrated on Fig. 4 where an extra signal is added on the right to stop the toggles.
4 4.1
Exact Computation Folding and Extended Signal Machines
Except for the output signals, the Type-2 Turing machine and the input use a bounded portion of space during the whole computation. There exist constructions to fold into a bounded space and bounded time a spatially bounded infinite time computation. They can be used to fold the computation without interfering with the output signals: by running through the collision rules and cancelling any action that the folding structure would have on them, they become insensible to the folding. Inside the structure, the computation is scaled down, generating an infinite acceleration (used to emulate the black hole in Durand-Lose [2006, 2009]). This way in finite time, the whole infinite output is generated and exits the structure as displayed on Fig. 5. Inside the folding structure, the Turing machine has an infinite time ahead of it. The structure preserves ratios in the understanding that there are infinitely many pieces at different scales that reform the original space-time diagram after rescaling and translating. This means that even though the intermediate representation suffers multiple rescaling, it still generates the same infinite sequence, and the TM the same output. The output is an infinite convoy in bounded space. This uses the extended context. There is a companion singularity ✺ (on the top of it).
✺
set
Folding structure
TM Fig. 5. Global structure
x
166
4.2
J. Durand-Lose
CA-Representation to Intermediate Representation
Considering the whole structure: no accumulation ❄ results from the folding structure nor from any “turn” from the infinite convoy because each time in the configuration, infinitely many signals accumulate there; so ✺ prevents ❄ even though collisions are accumulating. The intermediate structure also produces an accumulation of collisions; but this time, there is no signal around it. So that one ❄ is generated and immediately turns to μ❄ . This μ❄ is located exactly where e should be and the speed of μ❄ is chosen null. This is illustrated on figures 4(d) and 5. A signal set is sent to turn μ❄ into e so that the two signals are distinct. Sending this signal is not complicated. Indeed the space-time location of the last accumulation is bounded easily: the ✺ path starts from the top of the folding structure (this location is known from construction), then the movement of the infinite convoy is the sum of a left translation and the sum of a geometric series.
5
Conclusion
Theorem 1. With a proper handling of accumulations of collisions and of signals, it is possible to compute any function of computable analysis. Moreover, even if the computation involves infinitely many signals present simultaneously in a bounded space, there are finitely many signals in the initial and final configurations. There is no hidden oracle. Although speeds may be any real and thus encode information, only a few integral values are used. And apart from intermediate representation of ε, the distance between signals are also proportional with rational ratio. Nevertheless such “extra information” could be provided to compute at different level of CA-hierarchies. Not only does the intermediate representation use finitely many signals, but is also almost directly reusable to do analog computation in the Blum-ShubSmale understanding (as presented in [Durand-Lose, 2007, 2008]). This leads to consider even more powerful analog computational system since CA and BSS are not comparable, e.g. analytic machines [Chadzelek and Hotz, 1999]. It should also be possible to use higher order accumulation to hyper-compute as is done for the BSS model in Durand-Lose [2009] and to do some real hypercomputing [Ziegler, 2007] (although, just by being able to do linear BSS computation without the extended context, or with the intermediate representation, it can already compute the sign in finite time!).
References Blum, L., Shub, M., Smale, S.: On a theory of computation and complexity over the real numbers: NP-completeness, recursive functions and universal machines. Bull. Amer. Math. Soc. 21(1), 1–46 (1989)
Abstract Geometrical Computation and Computable Analysis
167
Bournez, O., Campagnolo, M.L., Gra¸ca, D.S., Hainry, E.: Polynomial differential equations compute all real computable functions on computable compact intervals. Journal of Complexity 23(3), 317–335 (2007) Chadzelek, T., Hotz, G.: Analytic machines. Theoret. Comp. Sci. 219(1-2), 151–167 (1999) Durand-Lose, J.: Abstract geometrical computation 1: Embedding black hole computations with rational numbers. Fund. Inf. 74(4), 491–510 (2006) Durand-Lose, J.: Abstract geometrical computation and the linear Blum, Shub and Smale model. In: Cooper, S.B., L¨ owe, B., Sorbi, A. (eds.) CiE 2007. LNCS, vol. 4497, pp. 238–247. Springer, Heidelberg (2007) Durand-Lose, J.: Abstract geometrical computation with accumulations: Beyond the Blum, Shub and Smale model. In: Beckmann, A., Dimitracopoulos, C., L¨ owe, B. (eds.) Logic and Theory of Algorithms, 4th Conf. Computability in Europe (CiE 2008) (abstracts and extended abstracts of unpublished papers), pp. 107–116. University of Athens (2008) Durand-Lose, J.: Abstract geometrical computation 3: Black holes for classical and analog computing. Nat. Comput (2009), doi:10.1007/s11047-009-9117-0 Etesi, G., N´emeti, I.: Non-Turing computations via Malament-Hogarth space-times. Int. J. Theor. Phys. 41(2), 341–370 (2002); gr-qc/0104023 Grzegorczyk, A.: On the definitions of computable real continuous functions. Fund. Math. 44, 61–77 (1957) Hogarth, M.L.: Non-Turing computers and non-Turing computability. In: Biennial Meeting of the Philosophy of Science Association, pp. 126–138 (1994) Ko, K.-I.: Computational Complexity of Real Functions. Birkh¨ auser, Basel (1991) Turing, A.M.: On computable numbers, with an application to the entscheidungsproblem. Proceedings of the London Mathematical Society 42(2), 230–265 (1936) Weihrauch, K.: Introduction to computable analysis. Texts in Theoretical computer science. Springer, Berlin (2000) Ziegler, M. (Short) survey of real hypercomputation. In: Cooper, S.B., L¨ owe, B., Sorbi, A. (eds.) CiE 2007. LNCS, vol. 4497, pp. 809–824. Springer, Heidelberg (2007)
Descriptional Complexity of Tissue-Like P Systems with Cell Division Daniel D´ıaz-Pernil1, Pilar Gallego-Ortiz2, Miguel A. Guti´errez-Naranjo2, Mario J. P´erez-Jim´enez2, and Agust´ın Riscos-N´ un ˜ ez1 1
Research Group on Computational Topology and Applied Mathematics Department of Applied Mathematics I
[email protected] 2 Research Group on Natural Computing Department of Computer Science and Artificial Intelligence University of Sevilla Avda, Reina Mercedes s/n, 41012, Sevilla, Spain
[email protected], {magutier,marper,ariscosn}@us.es
Abstract. In this paper we address the problem of describing the complexity of the evolution of a tissue-like P system with cell division. In the computations of such systems the number of (parallel) steps is not sufficient to evaluate the complexity. Following this consideration, Sevilla Carpets were introduced as a tool to describe the space-time complexity of P systems. Sevilla Carpets have already been used to compare two different solutions of the Subset Sum problem (both designed in the framework of P systems with active membranes) running on the same instance. In this paper we extend the comparison to the framework of tissue-like P systems with cell division.
1
Introduction
Comparing two cellular designs that solve the same problem is not an easy task, as there are many ingredients to be taken into account. Moreover, in the case of P systems where the number of membranes increases along the computation, the problem of describing the complexity of the computational process becomes specially hard. The complexity in time (number of parallel cellular steps) of these solutions is polynomial, but it is clear that the time is not the unique variable that we need to consider in order to evaluate the complexity of the process. This fact has been observed previously in the literature of P systems. The first paper related to this issue was [1], where Ciobanu, P˘aun and S¸tef˘anescu presented a new way to describe the complexity of a computation in a P system. The socalled Sevilla Carpet was introduced as an extension of the notion of Szilard language from grammars to the case when several rules are used at the same time. In [4], the problem was revisited, introducing new parameters for the study of the descriptive complexity of P systems. Besides, several examples of a graphical C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 168–178, 2009. c Springer-Verlag Berlin Heidelberg 2009
Descriptional Complexity of Tissue-Like P Systems with Cell Division
169
representation were provided, and the utility of these parameters for comparing different solutions to a given problem was discussed. In that paper two different solutions of the Subset Sum problem, running on the same instance, were compared by using these parameters. In this paper we adapt Sevilla Carpets to tissue-like models, in order to describe the complexity of their computations. Note that given two Sevilla Carpets corresponding to P systems from different models designed to solve a decision problem, we can obtain detailed information about two single computations, but this is not enough to compare the efficiency of the two models in general. Nonetheless, the numerical parameters obtained from these two Sevilla Carpets can give us some hints to compare the corresponding designs of solutions to the problem. The paper is organized as follows. In Section 2 we recall the definition of tissue-like P systems with cell division. In Section 3 we revisit the definition of Sevilla Carpets and its associated parameters. Section 4 shows a comparison among two different solutions to the Subset Sum problem in the framework of P systems with active membranes and one solution designed with tissue-like P systems with cell division, all of them running on the same instance. Some final remarks are also provided.
2
Tissue-Like P Systems with Cell Division
Tissue-like P systems with cell division is a well-established P system model presented by Gh. P˘ aun et al. in [8]. In this section we briefly recall its main features. The biological inspiration for this model is that alive tissues are not static network of cells, since cells are duplicated via mitosis in a natural way. Formally, a tissue-like P system with cell division of degree q ≥ 1 is a tuple of the form Π = (Γ, E, w1 , . . . , wq , R, i0 ), where: 1. Γ is a finite alphabet, whose symbols will be called objects. 2. E ⊆ Γ . 3. w1 , . . . , wq are strings over Γ representing the multisets of objects associated with the cells in the initial configuration. 4. R is a finite set of rules of the following form: (a) Communication rules: (i, u/v, j), for i, j ∈ {0, 1, 2, . . . , q}, i = j, u, v ∈ Γ ∗. (b) Division rules: [a]i → [b]i [c]i , where i ∈ {1, 2, . . . , q} and a, b, c ∈ Γ . 5. i0 ∈ {0, 1, 2, . . . , q}. A tissue-like P system with cell division of degree q ≥ 1 can be seen as a set of q cells (each one consisting of an elementary membrane) labelled by 1, 2, . . . , q. We will use 0 to refer to the label of the environment, and i0 denotes the output region (which can be the region inside a cell or the environment).
170
D. D´ıaz-Pernil et al.
The communication rules determine a virtual graph, where the nodes are the cells and the edges indicate if it is possible for pairs of cells to communicate directly. This is a dynamical graph, because new nodes can appear produced by the application of division rules. The strings w1 , . . . , wq describe the multisets of objects initially placed in the q cells of the system. We interpret that E ⊆ Γ is the set of objects placed in the environment, each one of them in an arbitrary large amount of copies. The communication rule (i, u/v, j) can be applied over two cells i and j such that u is contained in cell i and v is contained in cell j. The application of this rule means that the objects of the multisets represented by u and v are interchanged between the two cells. Note that either i or j can be equal to 0 and in this case the objects are interchanged between one cell and the environment. The division rule [a]i → [b]i [c]i is applied over a cell i containing object a. The application of this rule divides this cell into two new cells with the same label. All the objects in the original cell are replicated and copied in each of the new cells, with the exception of the object a, which is replaced by the object b in the first one and by c in the other one. Rules are used as usual in the framework of membrane computing, that is, in a maximally parallel way (a universal clock is considered). In one step, each object in a membrane can only be used for one rule (non-deterministically chosen when there are several possibilities), but any object which can participate in a rule of any form must do it, i.e, in each step we apply a maximal set of rules. This way of applying rules has only one restriction when a cell is divided, the division rule is the only one which is applied for that cell in that step; the objects inside that cell cannot be communicated in that step. The main features of this model, from the computational point of view, are that cells have no polarizations (the contrary holds in the cell-like model of P systems with active membranes); the cells obtained by division have the same labels as the original cell and if a cell is divided, its interaction with other cells or with the environment is blocked during the mitosis process. In some sense, this means that while a cell is dividing it closes the communication channels with other cells and with the environment. 2.1
Recognizer Tissue-Like P Systems with Cell Division
Complexity classes within Membrane Computing have been usually studied in the framework of decision problems. Let us recall that a decision problem is a pair (IX , θX ) where IX is a language over a finite alphabet (whose elements are called instances) and θX is a total boolean function over IX . In order to study the computational efficiency for solving NP-complete decision problems, a special class of tissue P systems with cell division is introduced in [8]: recognizer tissue P systems. The key idea of such recognizer systems is the same one as from recognizer P systems with cell-like structure. Recognizer cell-like P systems were introduced in [10] and they are the natural framework to study and solve decision problems within Membrane Computing, since deciding whether an instance of a given problem has an affirmative or
Descriptional Complexity of Tissue-Like P Systems with Cell Division
171
negative answer is equivalent to deciding if a string belongs or not to the language associated with the problem. In the literature, recognizer cell-like P systems are associated with P systems with input in a natural way. The data encoding to an instance of the decision problem has to be provided to the P system in order to compute the appropriate answer. This is done by codifying each instance as a multiset placed in an input membrane. The output of the computation (yes or no) is sent to the environment, in the last step of the computation. In this way, cell-like P systems with input and external output are devices which can be seen as black boxes, in the sense that the user provides the data before the computation starts, and then waits outside the P system until it sends to the environment the output in the last step of the computation. A recognizer tissue-like P system with cell division of degree q ≥ 1 is a tuple Π = (Γ, Σ, E, w1 , . . . , wq , R, iin , i0 ) where – (Γ, E, w1 , . . . , wq , R, i0 ) is a tissue-like P system with cell division of degree q ≥ 1 (as defined in the previous section), i0 = env and w1 , . . . , wq strings over Γ \ Σ. – The working alphabet Γ has two distinguished objects yes and no, present in at least one copy in some initial multisets w1 , . . . , wq , but not present in E. – Σ is an (input) alphabet strictly contained in Γ . – iin ∈ {1, . . . , q} is the input cell. – All computations halt. – If C is a computation of Π, then either the object yes or the object no (but not both) must have been released into the environment, and only in the last step of the computation. The computations of the system Π with input w ∈ Σ ∗ start from a configuration of the form (w1 , w2 , . . . , wiin w, . . . , wq ; E), that is, after adding the multiset w to the contents of the input cell iin . We say that the multiset w is recognized by Π if and only if the object yes is sent to the environment, in the last step of the corresponding computation. We say that C is an accepting computation (respectively, rejecting computation) if the object yes (respectively, no) appears in the environment associated to the corresponding halting configuration of C. Definition 1. We say that a decision problem X = (IX , θX ) is solvable in polynomial time by a family Π = {Π(n) : n ∈ N} of recognizer tissue-like P systems with cell division if the following holds: • The family Π is polynomially uniform by Turing machines, that is, there exists a deterministic Turing machine working in polynomial time which constructs the system Π(n) from n ∈ N. • There exists a pair (cod, s) of polynomial-time computable functions over IX (called a polynomial encoding of IX in Π) such that:
172
D. D´ıaz-Pernil et al.
− for each instance u ∈ IX , s(u) is a natural number and cod(u) is an input multiset of the system Π(s(u)); − the family Π is polynomially bounded with regard to (X, cod, s), that is, there exists a polynomial function p, such that for each u ∈ IX every computation of Π(s(u)) with input cod(u) is halting and, moreover, it performs at most p(|u|) steps; − the family Π is sound with regard to (X, cod, s), that is, for each u ∈ IX , if there exists an accepting computation of Π(s(u)) with input cod(u), then θX (u) = 1; − the family Π is complete with regard to (X, cod, s), that is, for each u ∈ IX , if θX (u) = 1, then every computation of Π(s(u)) with input cod(u) is an accepting one. In the above definition we have defined every P system Π(n) to be confluent, in the following sense: every computation of a system with the same input multiset must always give the same answer.
3
Sevilla Carpets
Sevilla Carpets were presented in [1] as an extension of the Szilard language, which consists of all strings of rule labels describing correct derivations in a given grammar (see e.g., [6,7] or [11]). The Szilard language is usually defined for grammars in the Chomsky hierarchy where only a single rule is used in each derivation step, so a derivation can be represented as the string of the labels of the rules used in the derivation (the labelling is supposed to be one-to-one). Sevilla Carpets are a Szilard-way to describe a computation in a P system. The main difference is that a multiset of rules can be used in each evolution step of a P system. In [1] a bidimensional writing is proposed to describe a computation of a P system. The (Sevilla) Carpet associated with a computation of a P system is a table with the time on the horizontal axis and the rules explicitly mentioned along the vertical axis; then, for each rule, in each step, a piece of information is given. Depending on the amount of information given to describe the evolution, Ciobanu, P˘ aun and S¸tef˘anescu propose five variants for the Sevilla Carpets: 1. Specifying in each time unit for each membrane whether at least one rule was used in its region or not; 2. Specifying in each time unit for each rule whether it was used or not; 3. Mentioning in each time unit the number of applications of each rule; this is 0 when the rule is not used and can be arbitrarily large when the rules are dealing with arbitrarily large multisets; 4. We can also distinguish three cases: that a rule cannot be used, that a rule can be used but it is not because of the nondeterministic choice and that a rule is actually used; 5. A further possibility is to assign a cost to each rule, and to multiply the number of times a rule is used with its cost. They also propose two parameters (weight and surface) to study Sevilla Carpets. In [4] two new parameters (height and average weight) were proposed.
Descriptional Complexity of Tissue-Like P Systems with Cell Division
3.1
173
Parameters for the Descriptive Complexity
Many times we will not be interested only in the number of cellular steps of the computation, but also in other type of resources required to perform the computation. Specially if we want to implement in silico a P system, we need to be careful with the number of times that a rule is applied, maybe with the number of membranes and/or the number of objects present in a given configuration. In order to describe the complexity of the computation, the following parameters are proposed: – Weight: It is defined in [1] as the sum of all the elements in the carpet, i.e., as the total number of applications of rules along the computation. The application of a rule has a cost and the weight measures the total cost of the computation. – Surface: It is the multiplication of the number of steps by the total number of the rules used by the P system. It can be considered as the potential size of the computation. From a computational point of view we are not only interested on P systems which halt in a small number of steps, but in P systems which use a small amount of resources. The surface measures the resources used in the design of the P system. Graphically, it represents the surface where the Sevilla Carpet lies on. – Height: It is the maximum number of applications of any rule in a step along the computation. Graphically, it represents the highest point reached by the Sevilla Carpet. – Average Weight: It is calculated by dividing the weight to the surface of the Sevilla Carpet. This concept provides a relation between both parameters which gives an index on how the P system exploits its massive parallelism.
4
Comparing the Solutions
In this section we compare three cellular solutions to the Subset Sum problem: Two of them in the framework of P systems with active membranes and the third one in the framework of tissue-like P systems with cell division. The Subset Sum problem is the following one: Given a finite set A, a weight function, w : A → N, and a constant k ∈ N, determine whether or not there exists a subset B ⊆ A such that w(B) = k. Two uniform families of P systems with active membranes solving the Subset Sum were presented in [4]. A tuple (n, (w1 , . . . , wn ), k) is used in all three solutions to represent an instance of the problem, where n stands for the size of A = {a1 , . . . , an }, wi = w(ai ), and k is the constant given as input for the problem. All the solutions are based on a brute force algorithm implemented in the framework of P systems with active membranes. The idea of the design can be divided into several stages: – Generation stage: for every subset of A, a membrane is generated via membrane division.
174
D. D´ıaz-Pernil et al.
– Weight calculation stage: in each membrane the weight of the associated subset is calculated. This stage will take place in parallel with the previous one. – Checking stage: in each membrane it is checked whether or not the weight of its associated subset is exactly k. This stage cannot start in a membrane before the previous ones are over in that membrane. – Output stage: when the previous stage has been completed in all membranes, the system sends out the answer to the environment. The first family can be found in [9]. Let us recall that the instance u = (n, (w1 , . . . , wn ), k) is processed by the P system Π1 (n, k) with input the mulwn 1 w2 tiset xw 1 x2 . . . xn . This design depends on the two constants that are given as input in the problem: n and k. It consists of 5n+5k+18 evolution rules, and if an appropriate input multiset is introduced inside membrane e before starting the computation, the system will stop and output an answer in 2n + 2k + 6 steps (if the answer is N o) or in 2n + 2k + 5 steps (if the answer is Y es). The second family is inspired by the previous one. Some modifications were made following the design presented in [3]. In this solution the instance u = (n, (w1 , . . . , wn ), k) is processed by the P system Π2 (n) with input the multiset wn 1 w2 xw 1 x2 . . . xn . The above design depends only on one of the constants that are given as input in the problem: n. It is quite similar to the previous one, the difference lies in the checking stage and the answer stage. In this case we avoid the use of counters that require knowing the constant k. The number of evolution rules is 5n + 41, and the number of steps of the computation depends on the concrete instance that we need to solve, but it is linearly bounded. For the study of the Sevilla Carpet in tissue-like P systems with cell division we take the computation of one P system of the family presented in [2]. In that paper a uniform family of tissue-like P systems with cell division solving the Subset Sum problem was presented. The Subset Sum problem was solved in a linear time by a family of recognizer tissue-like P systems with cell division. We compare these solutions with the solution described in [2], where the number of rules for a set A = {a1 , . . . , an } of size n is n · log(k + 1) + 5n + 2 log(k +1) +3 log n +26 ∈ O(n·log k) and the number of steps is n+ log n + log(k + 1) + 10 if the answer is Yes, and n + log n + log(k + 1) + 12 if the answer is No. 4.1
Descriptive Complexity
We present some detailed statistics about the previous designs, trying to compare them on a more general basis than just looking the number of steps that the computation performs. Following this scheme, we present the Sevilla Carpets associated with the computations of the three different solutions to the Subset Sum problem working on the same instance: u = (6, (2, 3, 4, 8, 14, 5), 15). That
Descriptional Complexity of Tissue-Like P Systems with Cell Division
175
0
45
10
40
20 35
30 40
30
50
25
60 20
70 Rules
80
15 90
Steps
10
100 5
110 120
0
Fig. 1. Sevilla Carpet for solution 1
is, n = 6, k = 15 and the list of weights is w1 = 2, w2 = 3, w3 = 4, w4 = 8, w5 = 14, w6 = 5. The P system Π1 (6, 15) has 123 evolution rules. The P system Π1 (6, 15) stops at step 46 and sends an object Y es to the environment. The weight of the Sevilla Carpet (the total number of rule applications along the computation) is 7597. The height of the Sevilla Carpet (the maximal number of times that a rule is applied in one evolution step) is 281 and it is reached at Step 10. The surface of the Sevilla Carpet is 5658. The average weight of the Sevilla Carpet is 1.3427. The P system Π2 (6) has 66 evolution rules. The P system Π2 (6) stops at step 51 and sends an object Y es to the environment.
Rules Steps Surface Weight Height Average Weight
Cell-like Tissue-like Sol. 1 Sol.2 Sol. 3 123 66 97 46 51 24 5658 3366 2328 7597 9491 6592 281 281 755 1.3427 2.8197 2.8316
The weight of the Sevilla Carpet is 9491. The height of the Sevilla Carpet is 281 and it is reached at step 10. The surface of the Sevilla Carpet is 3366. The average weight of the Sevilla Carpet is 2.8197.
176
D. D´ıaz-Pernil et al.
0 10 20 30 Rules
40 50 60
10
0
50
40
30
20
Steps
Fig. 2. Sevilla Carpet for solution 2
25 20 0
15 10
20
30
10 40 Rules
50
60
70
Steps
5 80
90
0
Fig. 3. Sevilla Carpet for solution 3
Finally, the solution with tissue-like P systems with cell division has 97 rules and 95 of them are applied in this computation. The P system stops at step 24. The surface of the Sevilla Carpet is 2328 and its weight is 6592. The height is 755 and it is reached at step 18. The average weight of the Sevilla Carpet is 2.8316. The following table shows the parameters of all three solutions: As far as the number of rules is concerned, we can observe that the second solution is the most compact. From a designer point of view, it is interesting
Descriptional Complexity of Tissue-Like P Systems with Cell Division
177
to get designs as “short” as possible, minimizing the number of rules of the P systems. If we consider the number of (parallel) steps as a complexity measure to compare the designs, then we conclude that the third solution is better than the other ones, since it needs less steps. Another relevant computational parameter is the weight of the Sevilla Carpet, that measures the total number of rules that have been applied along the computation. If we assign a cost to each application of a rule, then we can say that Solution 2 is the most expensive, while Solution 3 is the cheapest. Nonetheless, the key point of a design of a solution in Membrane Computing is the use of the massive parallelism. As pointed out in [5], a bad design of a P system consists of a P system which does not exploit its parallelism, that is, working as a sequential machine: in each step only one object evolve in one membrane whereas the remaining objects do not evolve. On the other hand, a good design consists of a P system in which a huge amount of objects are evolving simultaneously in all membranes. If both P systems perform the same task, it is obvious that the second one is a better design that the first one. In this line, the fact that the average weight of Solution 1 is smaller than the average weights of Solutions 2 and 3 can be interpreted saying that the latter designs make a better use of the parallelism in P systems than the first one. To sum up, according to the parameters corresponding to the computations of the three solutions running on the chosen instance, Solutions 2 and 3 are similar regarding the average weight, but the tissue-like approach is overall the best choice.
5
Conclusions and Future Work
It is important to remark that these are not asymptotical comparisons, as we focus only on the data corresponding to one instance. Indeed, due to the exponential number of membranes created during the generation stage, we believe that considering another instance with a greater size will stress the differences between the design based only on n and the other one, based on n and k. The bound on the size of the instances that can be studied is imposed by the necessity to use a P systems simulator to obtain the detailed description of the computation: number of rules, number of cellular steps, and number of times that the rules are applied in each step.
Acknowledgments The authors acknowledge the support of the project TIN2006-13425 of the Ministerio de Educaci´ on y Ciencia of Spain, cofinanced by FEDER funds, and the support of the Project of Excellence with Investigador de Reconocida Val´ıa of the Junta de Andaluc´ıa, grant P08-TIC-04200.
178
D. D´ıaz-Pernil et al.
References 1. Ciobanu, G., P˘ aun, G., S ¸ tef˘ anescu, G.: Sevilla Carpets Associated with P Systems. In: Cavaliere, M., Mart´ın–Vide, C., P˘ aun, G. (eds.) Proceedings of the Brainstorming Week on Membrane Computing, Tarragona, Spain, Report RGML 26/03, pp. 135–140 (2003) 2. D´ıaz-Pernil, D., Guti´errez-Naranjo, M.A., P´erez-Jim´enez, M.J., Riscos-N´ un ˜ez, A.: Solving Subset Sum in Linear Time by Using Tissue P Systems with Cell Division. ´ In: Mira, J., Alvarez, J.R. (eds.) IWINAC 2007. LNCS, vol. 4527, pp. 170–179. Springer, Heidelberg (2007) 3. Guti´errez-Naranjo, M.A., P´erez-Jim´enez, M.J., Riscos-N´ un ˜ez, A.: Towards a programming language in cellular computing. Electronic Notes in Theoretical Computer Science 123, 93–110 (2005) 4. Guti´errez-Naranjo, M.A., P´erez-Jim´enez, M.J., Riscos-N´ un ˜ez, A.: On Descriptive Complexity of P Systems. In: Mauri, G., P˘ aun, G., Jes´ us P´erez-J´ımenez, M., Rozenberg, G., Salomaa, A. (eds.) WMC 2004. LNCS, vol. 3365, pp. 320–330. Springer, Heidelberg (2005) 5. Guti´errez-Naranjo, M.A., P´erez-Jim´enez, M.J., Riscos-N´ un ˜ez, A.: On the Degree of Parallelism in Membrane Systems. Theoretical Computer Science 372(2-3), 183– 195 (2007) 6. M¨ akinen, E.: A Bibliography on Szilard Languages, Dept. of Computer and Information Sciences, University of Tampere, http://www.cs.uta.fi/reports/pdf/Szilard.pdf 7. Mateescu, A., Salomaa, A.: Aspects of Classical Language Theory. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, vol. 1. Springer, Heidelberg (1997) 8. P˘ aun, G., P´erez-Jim´enez, M.J., Riscos-N´ un ˜ez, A.: Tissue P System with cell division. International Journal of Computers, Communications & Control 3(3), 295– 303 (2008) 9. P´erez-Jim´enez, M.J., Riscos-N´ un ˜ez, A.: Solving the Subset Sum Problem by Active Membranes. New Generation Computing 23(4), 367–384 (2005) 10. P´erez-Jim´enez, M.J., Romero-Jim´enez, A., Sancho-Caparrini, F.: A polynomial complexity class in P systems using membrane division. In: Csuhaj-Varj´ u, E., Kintala, C., Wotschke, D., Vaszyl, G. (eds.) Proceedings of the 5th Workshop on Descriptional Complexity of Formal Systems, DCFS 2003, pp. 284–294 (2003) 11. Salomaa, A.: Formal Languages. Academic Press, New York (1973)
Computing Domains of Attraction for Planar Dynamics Daniel S. Gra¸ca1,2 and Ning Zhong3 1
DM/FCT, Universidade do Algarve, C. Gambelas, 8005-139 Faro, Portugal
[email protected] 2 SQIG/Instituto de Telecomunica¸co ˜es, Lisbon, Portugal 3 DMS, University of Cincinnati, Cincinnati, OH 45221-0025, U.S.A.
[email protected]
Abstract. In this note we investigate the problem of computing the domain of attraction of a flow on R2 for a given attractor. We consider an operator that takes two inputs, the description of the flow and a cover of the attractors, and outputs the domain of attraction for the given attractor. We show that: (i) if we consider only (structurally) stable systems, the operator is (strictly semi-)computable; (ii) if we allow all systems defined by C 1 -functions, the operator is not (semi-)computable. We also address the problem of computing limit cycles on these systems.
Many problems about dynamical systems (DSs) are concerned with their long term behavior. For example, given some trajectory, where will it end up? Which are the invariant sets of a DS? Which are its attractors? Recently, with the advent of increasingly powerful digital computers, numerous new ideas and concepts related to these question have appeared (e.g. sensitive dependence on initial conditions, chaos, strange attractors, Mandelbrot set). However it is interesting to note that the computer, while being an invaluable tool to get some intuition about a DS, is rarely used to prove results. Usually the formal analysis of DSs is done analytically (but often relies on information provided by numerical simulations), using heavy mathematics with little reliance on the computer. A notable exception is the proof that the Lorenz strange attractor exists and is robust under small perturbations [1], [2]. One of the reasons for this phenomenon is that computers introduce truncation errors which, in conjunction with other properties such as sensitive dependency on initial conditions, is likely to produce simulated trajectories that cannot be proved accurate. Of course, there are many results exhibiting that these simulations are valuable; the foremost of such results is perhaps the Shadowing Lemma [3], [4]. However the accuracy of a particular simulation, especially when we are interested in global properties, can usually be put into question. In this paper we deal with a particular type of the problems mentioned above: is it possible to conceive a computer program that, given an input that describes a dynamical system (DS) as well as an attractor of this DS, computes (rigourously) the basin of attraction of the given attractor? C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 179–190, 2009. c Springer-Verlag Berlin Heidelberg 2009
180
D.S. Gra¸ca and N. Zhong
Since there are many open questions about general classes of dynamical system, we restrict ourselves to a well-studied case, the continuous-time DS defined on the plane R2 by x = f (x), (1) where f : R2 → R2 and t is the independent variable. Some techniques introduced on this paper are based on [5]. They are essentially adaption and enhancements, that allow to correct some results of [5].
1
Differential Equations
Here we give a summary of results concerning the ODE (1). For more details, the reader is referred to [6], [7], [8]. Definition 1. Let φ(t, x0 ) denote the solution of (1) corresponding to the initial condition x(0) = x0 . The function φ(·, x0 ) : R2 → R2 is called a solution curve, trajectory, or orbit of (1) through the point x0 . 1. A point y is called an equilibrium point of (1) if f (y) = 0. An equilibrium point y0 is called hyperbolic if none of the eigenvalues of the gradient matrix Df (y0 ) of f at y0 has zero real part. 2. An equilibrium point x0 of (1) is called stable if for any ε > 0, there exists a δ > 0 such that |φ(t, x˜) − x0 | < ε for all t ≥ 0, provided |˜ x − x0 | < δ. Furthermore, x0 is called asymptotically stable if it is stable and there exists a (fixed) δ0 > 0 such that limt→∞ φ(t, x˜) = x0 for all x ˜ satisfying |˜ x − x0 | < δ0 . Given a trajectory Γx0 = φ(·, x0 ), we define the positive half-trajectory as Γx+0 = {φ(t, x0 )|t ≥ 0}. When the context is clear, we often drop the subscript x0 and write simply Γ and Γ + . It is not difficult to see that if x0 is an equilibrium point of (1), then φ(t, x0 ) = x0 for all t ≥ 0. It is also known that if all eigenvalues of Df (x0 ) of an hyperbolic equilibrium point x0 are negative, then x0 is asymptotically stable; in this case x0 is called a sink. While many results about the long term dynamics of (1) focus on fixed points, especially hyperbolic ones, since this is the easiest case to tackle, fixed points are not the sole objects to which trajectories converge as we now will see. Definition 2. 1. A point p ∈ Rn is an ω-limit point of the trajectory φ(·, x) of the system (1) if there is a sequence tn → ∞ such that limn→∞ φ(tn , x) = p. Definition 3. The set of all ω-limit points of the trajectory Γ is called the ωlimit set of Γ ; written as ω(Γ ) or ω(x) if Γ = φ(·, x). Definition 4. A cycle or periodic orbit of (1) is any closed solution curve of (1) which is not an equilibrium point. A cycle Υ is stable if for each ε > 0 there is a neighborhood U of Υ such that for all x ∈ U , d(Γx+ , Υ ) < ε. A cycle Υ is asymptotically stable (we also say that Υ is a limit cycle) if for all points x0 in some neighborhood U of Υ one has limt→∞ d(φ(t, x0 ), Υ ) = 0.
Computing Domains of Attraction for Planar Dynamics
181
We can define hyperbolic limit cycles in terms of characteristics exponents (see [8, Section 3.5]), in a way similar to Definition 1. However, to avoid technical issues that are not relevant to our discussion, we simply state one of their properties (see [8, Section 3.5]): in a suitable neighborhood, the convergence rate to the hyperbolic limit cycle is exponential (∼ e−λt , for λ > 0). Definition 5. A set A ⊆ R2 is invariant if φ(t, x) ∈ A for all t ∈ [0, +∞) and x ∈ A. If A is a closed invariant set, its domain of attraction (or basin of attraction) is the set {x ∈ R2 : ω(x) ⊆ A}. Domains of attraction are separated by curves in R2 (stable manifolds - see [7, p. 34]) and therefore are open sets. The following result can be found in e.g. [8]. Proposition 1 (Poincar´ e-Bendixson). Suppose that f ∈ C 1 (E), where E ⊆ n R is open and (1) has a trajectory Γ such that Γ + is contained in a compact F ⊆ E. Then if ω(Γ ) contains no singularity of (1), ω(Γ ) is a periodic orbit of (1). For this paper it will be of special relevance to consider structurally stable DSs. A dynamical system defined by (1) is structurally stable if for any vector field g close to f , the vector fields f and g are topologically equivalent (see [6], [8] for further details). In practice this means that if we perturb the system (1) by a small amount, the resulting DS will still be close to the one defined by (1). According to Peixoto’s theorem (see e.g. [8]) if M ⊆ R2 is a compact, then the set of structurally stable vector fields in C 1 (M ) is an open, dense subset of C 1 (M ). It can be proved (see e.g. [8]) that the only limit sets for a structurally stable DS defined on a compact M ⊆ R2 are hyperbolic equilibrium points and hyperbolic limit cycles, and that these appear in a finite number. We now need estimates on the error committed on the computation of a trajectory when the system is perturbed. Let x be a solution of the equation (1). Let y be a solution of the ODE y = g(y). The following result is classical and can be found in e.g. [6] Lemma 1. In the above conditions, and supposing that x and y are defined on a region D where f and g satisfy a Lipschitz condition, with Lipschitz constant L, then on D x(t) − y(t) ≤ x(0) − y(0) eLt +
ε Lt (e − 1), L
provided f − g ≤ ε there. 2 We also set up the following notation. A trajectory φ : R+ 0 → R is a solution of the differential inclusion x ∈ fε (x),
182
D.S. Gra¸ca and N. Zhong
where fε is a set valued function defined by fε (x) = B(f (x), ε) (the ball of center f (x) and radius ε) if φ (t) ∈ fε (φ(t)) almost everywhere. See [9], [10] for further details on differential inclusions.
2
Computable Analysis
This section introduces concepts and results from computable analysis. Although computable analysis can be adapted to other topological spaces, here we restrict it to Rn , which is our case of interest. For more details the reader is referred to [11], [12], [13]. The idea underlying computable analysis to compute over a set A is to encode each element a of A into a countable sequence of symbols, called ρ-name. Each sequence must encode at most an element of A. From this point of view, we can forget the set A, and work only over sequences of symbols. Usually each sequence should converge to an element a: the more elements we have from a sequence encoding a, the more precisely we can pinpoint a. To compute with the sequences, we use Type-2 machines, which are similar to Turing machines, but (i) have a read-only tape, where the input (i.e. the sequence encoding it) is written; (ii) have a write-only output tape, where the head cannot move back and the sequence encoding the output is written. At any finite amount of time we can halt the computation, and we will have a partial result on the output tape. The more time we wait, the more accurate this result will be. We now introduce notions of computability over Rn . Definition 6. 1. A sequence {rn } of rational numbers is called a ρ-name of a real number x if there are three functions a, b and c from N to N such b(n) that for all n ∈ N, rn = (−1)a(n) c(n)+1 and |rn − x| ≤
1 . 2n
(2)
2. A double sequence {rn,k }n,k∈N of rational numbers is called a ρ-name for a sequence {xn }n∈N of real numbers if there are three computable functions b(k,n) a, b, c from N2 to N such that, for all k, n ∈ N, rn,k = (−1)a(k,n) c(k,n)+1 and |rn,k − xn | ≤
1 . 2k
3. A real number x (a sequence {xn }n∈N of real numbers) is called computable if it has a computable ρ-name, i.e. there is a Type-2 machine that computes the ρ-name without any input. The notion of the ρ-name can be extended to points in Rl as follows: a sequence {(r1n , r2n , . . . , rln )}n∈N of rational vectors is called a ρ-name of x = (x1 , x2 , . . . , xl ) ∈ Rl if {rjn }n∈N is a ρ-name of xj , 1 ≤ j ≤ l. Having ρ-names, we can define computable functions.
Computing Domains of Attraction for Planar Dynamics
183
Definition 7. Let A, B be sets, where ρ-names can be defined for elements of A and B. A function f : A → B is computable if there is a Type-2 machine such that on any ρ-name of x ∈ A, the machine computes as output a ρ-name of f (x) ∈ B. Next we present a notion of computability for open and closed subsets of Rl (cf. [13], Definition 5.1.15). We implicitly use ρ-names. For instance, to obtain names of open subsets of Rn , we note that the set of rational balls B(a, r) = {x ∈ Rl : |x − a| < r} where a, r ∈ Q is a basis for the standard topology over Rn . Depending on the ρ-names used, we obtain different notions of computability. We omit further details for reasons of space. Definition 8. 1. An open set E ⊆ Rl is called recursively enumerable (r.e. for short) open if there are computable sequences {an } and {rn }, an ∈ E and rn ∈ Q such that E = ∪∞ n=0 B(an , rn ). Without loss of generality one can also assume that for any n ∈ N, the closure of B(an , rn ), denoted as B(an , rn ), is contained in E, where B(an , rn ) = {x ∈ Rl : |x − an | < rn }. 2. A closed subset K ⊆ Rl is called r.e. closed if there exist computable sequences {bn } and {sn }, bn ∈ Ql and sn ∈ Q, such that {B(bn , sn )}n∈N lists all rational open balls intersecting K. 3. An open set E ⊆ Rl is called computable (or recursive) if E is r.e. open and its complement E c is r.e. closed. Similarly, a closed set K ⊆ Rl is called computable (or recursive) if K is r.e. closed and its complement K c is r.e. open. When dealing with open sets in Rn , we identify a special case of computability, that we call semi-computability. Let O(Rn ) = {O|O ⊆ Rn is open in the standard topology}. Definition 9. A function f : A → O(Rn ) is called semi-computable if there is a Type-2 machine such that on any ρ-name of x ∈ A, the machine computes as output two sequences {an } and {rn }, an ∈ Rn and rn ∈ Q such that f (x) = ∪∞ n=0 B(an , rn ). Without loss of generality one can also assume that for any n ∈ N, the closure of B(an , rn ) is contained in f (x). We call this function semi-computable because we can tell in a finite amount of time if a point belongs to f (x), but we have to wait an infinite amount of time to know that it does not belong to f (x). Before closing this section, we present some useful results from [14]. Recall that a function f : E → Rm , E ⊆ Rl , is said to be locally Lipschitz on E if it satisfies a Lipschitz condition on every compact set V ⊂ E. The following definition gives a computable analysis analog of this condition.
184
D.S. Gra¸ca and N. Zhong
l Definition 10. Let E = ∪∞ n=0 B(an , rn ) ⊆ R , where B(an , rn ) ⊆ E, be a r.e. m open set. A function f : E → R is called effectively locally Lipschitz on E if there exists a computable sequence {Kn } of positive integers such that
|f (x) − f (y)| ≤ Kn |x − y| whenever x, y ∈ B(an , rn ). The following result is from [14]. Theorem 1. Assume that f : E → Rm is a computable function in C 1 (E) (meaning that both f and its derivative f are computable). Then f is effectively locally Lipschitz on E.
3
Results
In this section we show that domains of attraction of (1) for hyperbolic attractors can be computed from the former for C 1 -computable functions f (meaning that both f and Df are computable). We also extend a result of Zhong [15] for the case of R2 , showing that not only hyperbolic sinks have r.e. domains of attraction, but also hyperbolic limit cycles. Our results rely on the procedure introduced below. 3.1
Main Construction
The idea underlying the main construction is as follows. We pick an n ∈ N, construct a n × n square, and divide it into n4 smaller squares of size n1 × n1 . Next we replicate the dynamics of (1) over these small squares, obtaining a finite automata on which we can decide things in finite time. Then we increment n and the accuracy of the simulation, repeating this procedure indefinitely. In the limit we get the exact dynamics of (1), but in between we obtain correct partial results that allow us to compute domains of attraction for (1). The procedure is an adaptation (we restrict ourselves to differential equations and not inclusions) and extension (this construction works for unbounded domains) of a technique introduced in [5]. The construction. We consider only structurally stable systems. Therefore limit sets are limit cycles or equilibrium points. We will see later why this construction cannot be carried over to unstable systems. Suppose that our attractor is a computable fixed point x0 . We want to compute its domain of attraction. First pick an n = n0 ∈ N such that x0 ∈ Sn = (−n, n)2 . In general, we ought to iterate the algorithm by incrementing n, thus capturing more and more of the dynamics of (1) in each step. But for simplicity, we fix some n for now. Suppose, without loss of generality, that the distance of x0 to Sn (= complement of Sn ) is bigger than n1 . Let Ln ∈ N be a Lipschitz constant valid over Sn (Ln can be computed by Theorem 1). Now divide the big square Sn into smaller squares of size 2L1n n × 2L1n n (later we will see why we use the 2Ln factor). For simplicity, we call these squares n1 × n1 squares. Let
Computing Domains of Attraction for Planar Dynamics
185
s be a n1 × n1 square. Since f is computable, one can compute in finite time a rational polytope Ps,n (the polytope of directions) such that f (s) ⊂ Ps,n (Ps,n is an over-approximation) and dist(f (s), Ps,n ) < n1 , where dist(f (s), Ps,n ) is the Hausdorff distance between f (s) and Ps,n . Now we define a function Θ by the formula that, for each n1 × n1 square s, Θ(s) = As , where As is the collection of all n1 × n1 squares which are adjacent to one the faces of s (including the square s) and intersect with the following rational polytope Rs,n = {α + tPs,n |t ∈ R+ 0 , α is a face of s}.
(3)
(cf. Fig. 1)
Fig. 1. Flow from a
1 n
×
1 -square n
There is a special case to be dealt with (this differs from the paper [5], where it doesn’t deal with the case when the flow leaves the square Sn ): when α is part of the boundary of Sn (i.e. s is not completely surrounded by n1 × n1 squares). In this case, we check if the set (3) leaves the face α to go directly to the set Sn . If this is the case, proceed as before (don’t add n1 × n1 squares outside of Sn to the definition of Θ(s)) but mark s with some symbol, say ♣ (formally this equals to define a function over n1 × n1 squares). This ♣ indicates that the trajectory is incomplete from this point, since it leaves Sn . Given a n1 × n1 square s ⊆ Sn , its n-polygonal trajectory is T rajn (s) = ∞ ∪i=0 Θi (s) which can be computed in finite time by the following sketch of algorithm (remark that the number of n1 × n1 squares is finite): R0 = s Ri+1 = Θ(Ri ) We will have T rajn (s) = Rj for some j ∈ N. In any step, if Θ(Ri ) is marked with ♣, then mark s also with ♣ to indicate that T rajn (s) is incomplete (it goes out of the n × n square Sn ). The following lemma follows immediately from the previous construction. Lemma 2. Assume the conditions as above, let y ∈ s ⊆ Sn . If φ(t, y) ∈ Sn for all t ∈ [0, T ), where 0 ≤ T ≤ +∞, then
186
D.S. Gra¸ca and N. Zhong
1. {φ(t, y)|t ∈ [0, T )} ⊆ T rajn (s). 2. For each ε > 0 there exists n0 ≥ n such that T rajn0 (s) ⊆ {φ(t, s)|φ (t) ∈ fε (φ(t))}. Proof. The claim 1 is clear from the previous construction. For the claim 2, consider a n1 × n1 square s. Since s is a square of size √ 2 2Ln n
1 1 2Ln n × 2Ln n ,
two points A, B ∈ s are at most within distance ≤ Ln1 n . Since Ln is a Lipschitz constant, |f (A) − f (B)| ≤ n1 . This implies that the over-approximation rational polytope Ps,n of f (s) has diameter ≤ n2 . Therefore it suffices to use an n0 such that n20 ≤ ε to prove the second claim. Some simple facts can be obtained from this construction: Lemma 3. Assume the conditions as above: 1. Let γ ⊆ Sn be a limit cycle. If s intersects γ and γ ⊆ s then there is some i > 0 such that s ⊆ Θ(Ri − s). 2. If T raj(s) is not marked with ♣, then: (a) If T raj(s) doesn’t include a square containing the sink p, then s is not contained in the basin of attraction of p. (b) If T raj(s) doesn’t include a square intersecting a limit cycle γ, then s is not contained in the basin of attraction of γ. (c) If T raj(s) include just one square with an equilibrium point p, which is also a sink, and does not include any limit cycle, then s is in the basin of attraction of p. (d) If T raj(s) doesn’t include any square containing an equilibrium point p, and includes squares that intersect only one limit cycle γ, then s is in the basin of attraction of γ. 3. If E ⊆ Sn is a union of n1 × n1 squares such that T raj(E) is not marked with ♣ and T raj(E) = E then E contains an invariant set. Proof. For the claim 1, remark that the flow will leave s, but it will reenter s again. For the claim 2, it suffices to notice that (i) T raj(s) is an overapproximation of the real flow starting on s (this fact can also be used to prove the claim 3); (ii) since the flow doesn’t go to infinity (it is the case because T raj(s) is not marked with ♣), it must converge to a sink (s has non-empty interior, and therefore cannot be contained on the stable manifold of a saddle point) or to a limit cycle. 3.2
Results
This section introduces the main results. In general, it is not yet known whether the number of attractors in a given compact set can be decided effectively; this is due to the possibility of having unknown number of nested limit cycles with unknown sizes (an interesting problem would be to prove or disprove if this problem is undecidable). However, in practical applications, it is usually more important
Computing Domains of Attraction for Planar Dynamics
187
to know that a certain compact C indeed contains one or more attractors, and to determine the union of all domains of attraction for attractors in C. This is of interest, for example, to control theory. For instance, imagine that we are dealing with a nuclear reactor and want to decide which are the initial conditions that lead to a critical domain of operation (i.e. these are points to be avoided). We pick a compact set that covers all these critical situations and then determine the domain of attraction as described above within this compact set. Usually it is assumed that C is invariant, but this assumption is not necessary. The set C may have some parts to which the flow circulates before reaching attractors outside of C. This does not pose a problem and henceforth we do not assume that C is invariant. Nevertheless, the procedure of the previous subsection could be used to semi-decide if a set is invariant, as long as the flow enters the invariant set in a direction that is not tangent to the frontier of the set. We do not delve further in this subject since it is secondary to our objectives. Formally, let S(R2 ) be the set of C 1 structurally stable vector fields on R2 , f ∈ S(R2 ), and Af the class of compact sets A ⊆ R2 containing at least one hyperbolic attractor (in this case, hyperbolic sink or limit cycle) of (1) such that no limit set of (1) intersects simultaneously A and its complement. Note that S(R2 ) ⊆ C 1 (R2 ) and that functions in C 1 (R2 ) admit names, e.g. by means of rational polygonal functions over increasing rational cubes over R2 — see [13] for details. The following result shows that the operator that gives the basin of attraction for attractors in A, given dynamics of (1), is semi-computable. Theorem 2. Assume the conditions as above. The function F : {(A, f )|f ∈ S(R2 ), A ∈ Af } → O(R2 ) defined by F (A, f ) = union of the domains of attraction for attractors in A for (1) is semi-computable, but not computable. Proof. (Sketch) The fact that F is not computable follows from a result of Zhong [15], that shows that there is a C 1 function f such that (1) has a sink at the origin, which domain of attraction is not computable (if F is computable then this domain of attraction would be computable). For the semi-computability part, let x be an interior point of the domain of attraction of A. Suppose that the trajectory does not converge to the boundary of the domain of attraction (i.e. part of the boundary is not itself an attractor — we will see that this condition is of uttermost importance for the theorem to hold). Then the n-polygonal trajectory of a square s containing x will converge to a sink or limit cycle contained in the interior of A for n large enough (use Lemma 1, the fact that attractors inside A are stable, and the hypothesis that Γx+ does not converge to the boundary of the domain of attraction). As long as this does not happen (the flow converges to an equilibrium point outside A, flows outside the current box Sn , or converges towards a limit cycle — see below a sketch of how to obtain equilibrium points and limit cycles), do not list this square as being inside the basin of attraction of A. When it happens, list s. The previous result no longer is true if we allow all C 1 functions f , instead of only of those who give structurally stable systems.
188
D.S. Gra¸ca and N. Zhong
Fig. 2. Phase portrait for µ < 0 (left) and µ = 0 (right)
Theorem 3. Assume the conditions as above, the function F : {(Af , f )|f ∈ C 1 (R2 )} → O(R2 ) defined by F (A, f ) = domain of attraction of A for (1) is not semi-computable. Proof. Consider the following system, defined by polar coordinates r = −r (r2 − 1)2 − μ θ = 1 adapted from [8, p. 319, Example 2], which can easily be written in (x, y)coordinates. When μ < 0, the system has just one attractor, the fixed point 0 (see Fig. 2). When μ = 0, the point 0 still is a sink, but a cycle, with center at 0 and radius 1 appears (see Fig. 2). Therefore the domain of attraction of the √ sink at 0 is R2 for μ < 0, and {(x, y) ∈ R2 |x2 +y 2 < 1− μ} for μ ≥ 0. Therefore the map F is not continuous over its domain, and since computable functions are continuous [13], F cannot be computable (semi-computability is in essence computability with respect to ρ-names for open sets formed by a subbasis of the topology — so semi-computable functions are still continuous). It is not hard to see that our previous construction does not work when μ = 0 in the example of Fig. 2. Each time a square outside the cycle approaches the latter, it will eventually overlap the cycle and our square will overlap the domain of attraction of 0 and will falsely be drawn to this equilibrium. Therefore we cannot compute the domain of attraction of the cycle. As a corollary of Theorem 2, we obtain a result already stated in [15], but with a different proof and for structurally stable systems. Corollary 1. Assume the system (1) is structurally stable and that x0 is an hyperbolic sink. If f is computable, then the domain of attraction of x0 is an r.e. open set of R2 . We remark that the equilibrium points of (1) can be computed by computing the zeros of f (this is computable — see [13]). Those zeros whose eigenvalues of Df have all negative real part are the hyperbolic sinks. Moreover, given a compact set M ⊆ R2 not containing equilibrium points, we can decide whether
Computing Domains of Attraction for Planar Dynamics
189
or not it contains at least one limit cycle γ. To see this it suffices to apply the claim 1 of Lemma 3, for all squares s ⊆ M . At the beginning we may obtain the existence of possible cycles — these candidates are cycles of adjacent n1 × n1 squares (it might be the case that the cycle has just one n1 × n1 square — the case where the cycle is inside this square). If no limit cycle exists in M , after some time, with increasing n, we will be able to rule out the behavior described by the claim 1 of Lemma 3, and thus conclude that no cycle exists. If we see a pseudo-cycle inside a n1 × n1 squares, for n big enough the flow will enter the square in a narrow direction and will not reenter the square, the same happening with the polygonal flow, and we will then conclude at a certain point that no “small” cycle exists if none is present on this n1 × n1 square. On the other hand, if a cycle exists, we keep having cycles of n1 × n1 squares. But since the flow converges exponentially to the limit cycle, when the perturbation error on the flow is made small enough, the flow from s will not grow, and will hit s again in a “thinning cycle”. The argument is very sketchy; indeed, due to the page limit the details have to be omitted. The point is that we can compute hyperbolic limit cycles, the catch being that if the resolution is not enough at a given point, our approximation can consist in reality of 2 or more cycles very near to each other and that we where unable to distinguish. But if we use enough resolution, we will be able to separate limit cycles. Acknowledgments. D. Gra¸ca was partially supported by Funda¸c˜ ao para a Ciˆencia e a Tecnologia and EU FEDER POCTI/POCI via CLC, SQIG - Instituto de Telecomunica¸c˜oes and grant SFRH/BPD/39779/2007. DG was also attributed a Taft Research Collaboration grant which made possible a research visit to U. Cincinnati. N. Zhong was partially supported by a Charles Phelps Taft Research grant.
References 1. Tucker, W.: The Lorenz attractor exists. PhD thesis, Univ. Uppsala (1998) 2. Tucker, W.: The Lorenz attractor exists. In: C. R. Acad. Sci. Paris. Series I Mathematics, vol. 328, pp. 1197–1202 (1999) 3. Pilyugin, S.Y.: Shadowing in Dynamical Systems. Springer, Heidelberg (1999) 4. Grebogi, C., Poon, L., Sauer, T., Yorke, J., Auerbach, D.: Shadowability of chaotic dynamical systems. In: Handbook of Dynamical Systems, vol. 2, pp. 313–344. Elsevier, Amsterdam (2002) 5. Puri, A., Borkar, V., Varaiya, P.: Epsilon-approximation of differential inclusions. In: Proc. of the 34th IEEE Conference on Decision and Control, pp. 2892–2897 (1995) 6. Hirsch, M.W., Smale, S.: Differential Equations, Dynamical Systems, and Linear Algebra. Academic Press, London (1974) 7. Guckenheimer, J., Holmes, P.: Nonlinear Oscillations, Dynamical Systems, and Bifurcation of Vector Fields. Springer, Heidelberg (1983) 8. Perko, L.: Differential Equations and Dynamical Systems, 3rd edn. Springer, Heidelberg (2001)
190
D.S. Gra¸ca and N. Zhong
9. Deimling, K.: Multivalued differential equations. de Gruyter Series in Nonlinear Analysis and Applications, vol. 1. Walter de Gruyter & Co., Berlin (1984) 10. Aubin, J.P., Cellina, A.: Differential inclusions: Set-valued maps and viability theory. Grundlehren der Mathematischen Wissenschaften, vol. 364. Springer, Berlin (1984) 11. Pour-El, M.B., Richards, J.I.: Computability in Analysis and Physics. Springer, Heidelberg (1989) 12. Ko, K.I.: Computational Complexity of Real Functions. Birkh¨ auser, Basel (1991) 13. Weihrauch, K.: Computable Analysis: an Introduction. Springer, Heidelberg (2000) 14. Gra¸ca, D., Zhong, N., Buescu, J.: Computability, noncomputability and undecidability of maximal intervals of IVPs. Trans. Amer. Math. Soc. 361, 2913–2927 (2009) 15. Zhong, N.: Computational unsolvability of domain of attractions of nonlinear systems. Proc. Amer. Math. Soc. (to appear)
Approximating the Behaviours of Physarum polycephalum for the Construction and Minimisation of Synthetic Transport Networks Jeff Jones Centre for Unconventional Computing University of the West of England Bristol, BS16 1QY, UK
[email protected]
Abstract. The single celled organism Physarum polycephalum efficiently constructs and minimises dynamical nutrient transport networks resembling proximity graphs. We present a model multi-agent population which collectively approximates the network behaviours of Physarum. We demonstrate spontaneous transport network formation and evolution and show that the collective population also exhibits quasi-physical emergent properties, allowing the collective population to be considered as a virtual computing material - a synthetic plasmodium. This material is used as an unconventional method to approximate spatially represented geometry problems. We demonstrate three different methods for the construction, evolution and minimisation of Physarum-like transport networks which approximate Steiner trees, relative neighbourhood graphs, convex hulls and concave hulls. The results span the Toussaint hierarchy of proximity graphs, suggesting that the foraging and minimising behaviours of Physarum reflect interplay between maximising foraging area and minimising transport distance. The properties and behaviours of the synthetic virtual plasmodium may be useful in future physical instances of unconventional computing devices, and may also provide clues to the generation of emergent computation behaviours by Physarum.
1
Introduction
The single celled multinuclear myxomycete organism Physarum polycephalum has been the subject of recent research interest because it is capable of a number of complex distributed computing tasks which appear to transcend the properties of its simple component parts. The organism has a complex life cycle and the vegetative plasmodium stage - where repeated nuclear division forms a giant syncytium within a single membrane - exhibits extremely interesting adaptive pattern formation behaviours including distributed growth, movement, food foraging, nutrient transport, hazard avoidance, and network adaptation and maintenance. As Physarum has no nervous system, or indeed any specialised tissue types, the question arises as to how the organism achieves these tasks? C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 191–208, 2009. c Springer-Verlag Berlin Heidelberg 2009
192
J. Jones
During the plasmodium stage the organism is usually visible to the naked eye, its amorphous cytoplasm showing an amoeboid appearance. The plasmodium is a syncytium of nuclei within a cytoplasm comprised of a complex gel/sol network. Oscillations in the thickness of the membrane spontaneously appear with approximately 2 minutes duration [1]. The spatial and temporal organisation of the oscillations has been shown to be extremely complex [2]. The protoplasm moves backwards and forwards within the plasmodium in a characteristic manner known as shuttle-streaming. The plasmodium is able to sense local concentration gradients and the presence of nutrient gradients appears to alter the structure of external membrane areas. The softening of the outer membrane causes a flux of protoplasm towards the general direction of the gradient in response to internal pressure changes caused by the local thickness oscillations. The strong coupling between membrane contraction and streaming movement is caused by the incompressibility of the fluid requiring a constant volume - the weakening of the membrane appears to provide an outlet for the pressure. The active zone of the plasmodium surges towards nearby food sources showing strong inertial movement, engulfing and digesting them. Although the growth patterns differ depending on nutrient availability and growth substrate properties [3],[4], the growth front typically moves outwards with a fine mesh-like, almost uniform, connectivity at the actively growing region, with an adaptive coarsening of connectivity towards the origin. When the plasmodium has located and engulfed nearby food sources, protoplasmic veins appear within the plasmodium, connecting the food sources. The purpose of the veins is to transport protoplasm amongst the distributed extremes of the organism. The effect is to both maximise foraging area (during the foraging stage) and to minimise nutrient transport distance by the formation of the protoplasmic veins, whilst at the same time maintaining a fault tolerant network connectivity that is resilient to damage to any particular part [5]. The relative simplicity of the cell and the distributed nature of its control system make Physarum a suitable subject for research into distributed computation substrates. In recent years there has been a wealth of research into its computational abilities, prompted by Nakagaki et al. who initially reported the ability of Physarum to solve path planning problems [6]. Subsequent research has confirmed and broadened the range of abilities to spatial representations of various graph problems [7], [8], [9], combinatorial optimisation problems [10], construction of logic gates [11] and logical machines [12], and as a means to achieve distributed robotic control [13] and robotic amoebic movement [14]. In this paper we concentrate on the ability of Physarum to construct and evolve transport networks. Nakagaki et al. demonstrated that when a dense plasmodium network is presented with multiple food sources, the plasmodium adapts its transport network to cover the food sources and minimise network length [5]. The topology of the networks was most often a combination of the minimum Steiner tree and extra cyclic connections between the nodes which maintained connectivity in response to random tube disconnection. Adamatzky demonstrated that, when inoculated at a single node (food source), the plasmodium can grow and connect to the
Approximating the Behaviours of Physarum polycephalum
193
remaining nodes to form a spanning tree [9]. The growing plasmodium, when inoculated simultaneously from all nodes, can construct a Voronoi tessellation (due to the fact that the separate growing plasmodia are initially reluctant to fuse) [15]. Shirakawa et al. also found that the tube network formed from growth at all nodes approximates the Delaunay triangulation [8] and Adamatzky suggested that a growing plasmodium follows the Toussaint hierarchy of proximity graphs (Networks whose construction is based on notions of closeness and locality, see [16] and [17] for a description of families of proximity graphs), initially creating a spanning tree (single node inoculation) and increasing the connectivity through growth to finally approximate the Delaunay triangulation [18].
2
Previous Modelling of Physarum Behaviour
Tero et al. have suggested that protoplasmic flux through the network veins may be cause the physical basis for evolution of the transport network: given flux through two paths, the shorter path will receive more sol flux. By generating an autocatalytic canalisation mechanism to reward veins with greater flux (by thickening/widening them) and to apply a cost to veins with less flux (these veins become thinner), shorter and thicker veins begin to predominate as the network evolves. This approach was used for the mathematical model of Physarum network behaviour to solve path planning problems [19]. The starting point for the model of Tero et al. is a randomly connected protoplasmic tube network, surrounding a number of food sources (network nodes) which act as sources and sinks of flux. This corresponds to an area completely covered by the plasmodium before addition of food sources to initiate network minimisation. By beginning with a complete network this method, although successful in generating impressive solutions to network problems, sidesteps the issue of initial network formation. Gunji et al. introduced a cellular automaton (CA) model which considered both plasmodial growth and amoeboid movement [20]. Their model placed importance on the transformation of hardness/softness at the membrane and the internal transport of material from the membrane resulting in movement and network adaptation. The model was also able to approximate instances of maze path planning and coarse approximations of the Steiner tree problem. Takamatsu’s hexagonal CA [4] is an early stage model initially concerned with mimicking the growth patterns displayed under differing nutrient concentrations and substrate hardness. The patterns reflect experimental results well but do not (at least at this stage - oscillatory behaviour is in development) show adaptation as the plasmodium grows. Hickey and Noriega adapted a classical ant algorithm to modify a decision tree in their representation of Physarum behaviour in a simple path planning problem [21]. Their algorithm (as with many implementations of ant algorithms) transformed the spatial area into a graph representation and provided broadly similar results to path optimisation by Physarum. Although not concerned with Physarum at the time, the growth of a plasmodium from a single node to create a spanning tree appears similar to the behaviour of a neural growth algorithm by Adamatzky [22].
194
J. Jones
Current attempts at modelling Physarum often compartmentalise different behaviours in an attempt to simplify the huge overall modelling task, for example providing different representations and mechanisms for growth, movement, internal oscillations and network adaptation. As yet there is no single model that completely encapsulates Physarum behaviour (and this is only considering the plasmodium stage of the life cycle). The different modelling approaches also have different implementations - from the purely spatial CA models, to mathematical representations of flux canalisation, oscillatory behaviour [23],[24], and path length. In this paper, we present a simple particle population model of multi-agent behaviour which collectively behaves as a virtual ‘material’ that approximates some of the properties and behaviours seen in the plasmodium, and which can then be exploited for unconventional computing implementations of geometry problems. Although the aim of this research is to develop a Physarum-like virtual computing material, it is also hoped that the properties and behaviours of such a material may provide some insights into the role of emergent behaviours in the complex abilities seen in the organism itself.
3
A Multi-agent Model of a Virtual Plasmodium
The model is based on simple particle behaviours that were used in [25] to generate emergent transport networks. The model extends previous work which explored passive particle swarm approximations of reaction-diffusion (RD) computing. By passive we mean a particle (agent) population which responds to the diffusive environment but which does not alter the diffusive environment. It was shown that a passive swarm approach could generate solutions to spatially represented geometry problems (such as skeletonisation, path planning and Voronoi diagram approximation) with dynamically changing datasets [26]. This paper extends the swarm behaviours to include active approaches to RD computing - the swarm population not only senses but modifies the diffusive environment (for a comparison of the passive and active approaches see [27]). The model is computationally very simple, using distributed local sensory behaviours, but approximates some of the complex phenomena observed in Physarum. A single agent particle, and an aggregation of particles, is related to the Physarum plasmodium in the following way: We conceptualise and simplify the plasmodium syncytium as an aggregate of identical component parts (formed by repeated nuclei division). Each ‘part’ represents a hypothetical unit of gel/sol interaction. Gel refers to the relatively stiff sponge-like matrix composed of actin-myosin fibres and sol refers to the protoplasmic solution which flows within the matrix. In Physarum the resistance provided by the gel matrix to the flow of sol, and the spontaneous contraction of the actin-myosin fibres, results in changes in thickness of the plasmodium due to hydrostatic pressure and a rhythmic streaming flow of sol throughout the matrix. Ultimately a complex set of distributed oscillations (of sol flux and plasmodium thickness) is observed.
Approximating the Behaviours of Physarum polycephalum
195
Fig. 1. Agent particle sensory behaviour and agent particle morphology
In the particle model the production and flow of sol is provided by the movement of the agents and the resistance of the gel matrix is provided by the agent-agent sensory coupling and the agent-agent collisions (one can imagine a tightly crowded population within a room, with restricted movements). The morphology of each agent is shown in Fig. 1. The agent ‘body’ occupies a single cell in a discrete lattice and each cell corresponds to a pixel in a digitised greyscale image. The greyscale values of the image correspond to the environment habitat of the population (specific grey levels representing empty space, boundaries, food sources and hazards, where appropriate). The agent has three sensors which sample the environment values at some distance away (SO - sensor offset distance, in pixels) from the agent. This offset sensor morphology generates significant sensory local coupling between the agent population (the sensory input of one agent can be affected by the actions of a nearby agent). The cohesion of this aggregate ‘crowd’ is ensured by the fact that there is mutual attraction to the stimuli deposited by the agent population. The population adopts autocrine chemotaxis behaviours (meaning that the agents both secrete and sense approximations of the same chemoattractant, so the actions of the agents can also affect their behaviour). One significant simplification with respect to the real organism is that both food sources and the changes in flux of internal protoplasm are represented by the same diffusing chemoattractant substance. The built in lag between the agent particle movement (a simplistic approximation of actin/myosin contraction movement) and the production and diffusion of protoplasmic sol flux results in complex emergent population behaviours. Collective movement, shape minimisation and internal oscillations of the plasmodium are emergent properties of the aggregate behaviour of the agent population and are not explicitly coded into the agent algorithm. Directional orientation and movement of the plasmodium is generated by coupling the emergent mass behaviours with chemoattraction to local food source stimuli. In the sensory stage of the algorithm, the agents sense the concentration of stimuli in the chemoattractant map from three forward oriented sensors. At each scheduler step the agents orient themselves towards the strongest chemoattractant source by rotating left or right, depending on the source of the stimuli. Note that the agent behaviour is very simple and is explicitly forward biased - the agent does not contemplate its current position - there is an implicit emphasis on forward movement. There is significant interplay between the sensor arm angle (SA) and the rotation angle (RA) parameters. When the two parameters are equal (both 45◦ ),
196
J. Jones
the effect on network formation is to contract the initial network that emerges. If RA<SA the contraction behaviour is increased. If, however, RA>SA then spontaneous branching will appear during the network formation. The branching occurs because the larger rotation angle places an agent’s sensors outside the area of the chemoattractant trail path that the agent was following. The RA and SA parameters can be used to tune the network behaviour towards minimisation or towards high connectivity. A parametric investigation of different RA vs SA values has recently been completed (submitted) and it was found that the patterning abilities of the networks is equivalent to classical models of reaction-diffusion patterning processes, including spotted, striped, labyrinthine and reticular patterning. After the sensory stage is completed the scheduler executes the motor stage where each agent attempts to move forward in its current direction (represented by an internal state from 0-360◦). If the new site is not occupied, the agent moves to the new site and deposits chemoattractant trail onto the chemoattractant map at the new location (arbitrary units). If the agent cannot move forwards successfully then no deposition is made to the chemoattractant map. Inertial movement for each agent is also possible, resulting in the spontaneous emergence of spatial oscillations within the population. The inertial behaviour provides scope for amoebic movement and external control but for space reasons is not considered in this paper. The agent population is updated in a random order for both the sensory and motor stages to avoid any influence from sequential positional updates. Each sensory and motor update, combined with environmental diffusion and degradation of chemoattractant is considered as one scheduler step. For the particle approximation of Physarum plasmodium synthetic environments were created for the model organism. A population (%p, where p is the percentage of environment size in pixels) of mobile agents is created. A twodimensional discrete map represents the environment configuration. Chemoattractant food source stimuli whose positions are stored in the problem configuration map are projected to a coupled map (the chemoattractant map) at every step of the scheduler. The strength of the chemoattractant stimuli (in arbitrary units) can be adjusted with a weighting parameter. The chemoattractant stimuli are diffused by means of a simple 3x3 mean filter kernel. The diffusing chemoattractant values may be damped to maintain a relatively steep diffusion gradient away from the food source. The diffusion gradient corresponds to the strength of the nutrient substrate of the plasmodium’s environment (for example the different growth patterns seen in damp filter paper and agar substrates). Differences in the stimulus strength and stimulus area (the size of food source), affect both the steepness, and propagation distance of the diffusion gradient and affect the growth patterns of the synthetic plasmodium. The experiments on the model plasmodium were designed and configured to reflect ‘wet’ experiments reported in experiments with the organism by Adamatzky in [18]. The food sources correspond to the oat flake positions used in the wet experiments1 and are indicated as small dark spots. The plasmodium/agent flux is indicated as 1
The author is grateful to Andrew Adamatzky for providing the source data node positions for the proximity graph experiments.
Approximating the Behaviours of Physarum polycephalum
197
Fig. 2. Environment and agent parameters and scheduler operation
rough textured areas where darker areas correspond to greater chemoattractant concentration. The behaviour of the scheduler during an experimental run is shown in Fig. 2 along with a list of model parameters and their typical values. 3.1
Formation and Evolution of Dynamic Transport Networks
Without the presence of pre-existing chemoattractant stimuli, the particle population quickly self-assembles into network structures. The networks are dynamical (composed of the changing movement of particles) and evolve over time in a complex manner (Fig. 3). The networks paths undergo substantial modification - the initially fine meshwork evolves into patterns of paths and lacunae. The thickness of the paths, and scale of the network features, is related to the sensor offset (SO) parameter. Larger values of SO generate thicker, coarser paths with larger features (not shown). The smaller lacunae gradually close by sphincter-like contraction: two meeting network paths merge together in a zip-like manner and, because the shorter path results in greater flow, the circular paths close and the network adapts to the new configurations. With the non-inertial motor behaviour and default agent settings (SA 22.5◦ , RA 45◦ ) the closure of lacunae continues until new branch-like processes sprout from existing paths (final two images in Fig. 3). These branches cross pre-existing lacunae and merge with the network flow on the other side by anastomosis. The changing network configurations continue indefinitely (although occasionally with temporary periods of stability). When both RA and SA are equal to 45◦ , the spontaneous branching behaviour does not occur and the closure of lacunae continues until a minimal surface is reached. With periodic boundary conditions (diffusion continues across the boundary of the lattice to the opposite edge) this surface connects all sides of the two-dimensional (toroidal) environment which, when tiled, approximates a hexagonal pattern, known to be the minimal connectivity in two-dimensions [28] (Fig. 4).
198
J. Jones
Fig. 3. Spontaneous formation and dynamical evolution of transport networks. Lattice 200 × 200, %p15, RA45◦ , SA22.5◦ , SO 9 Images taken at: 2, 22, 99, 175, 367, 512, 1740 and 4151 scheduler steps.
Fig. 4. Stable minimising network with periodic boundary conditions approximates hexagonal tiling. Left to Right: Evolution and condensation of network from initial random state. Final figure (bottom right) is a tiled version of penultimate figure, indicating honeycomb tiled pattern.
When boundary conditions are fixed, i.e. when the diffusing chemoattractant is absorbed at the edges of the two dimensional lattice, the network condensation continues until a solid mass is formed. This mass evolves into a minimal circular shape (Fig. 5). When a larger population is used the mass takes the form of a sheet-like structure, resembling the giant plasmodium of Physarum. The sheet mostly consists of immobile agents (agents that cannot deposit chemoattractant as there is little free movement) and most of the movement occurs at the border of the sheet. There are, however, small regularly spaced areas within the sheet where movement occurs. These vacancy ‘islands’ are small vacant spaces where agents may move. The islands are dissipative and mobile and appear to be related to the sensor offset scale of the agent particles. As the scale of the particle sensor coupling increases (SO parameter), the number of vacancy islands falls.
Approximating the Behaviours of Physarum polycephalum
199
Fig. 5. Formation of plasmodial sheet structure from condensation of fixed boundary emergent transport networks. Top Row, left to right: Network evolution over time: %p = 20 agent particle trails, RA45◦ , SA 45◦ , SO 9 Bottom Row, left to right: Stable vacancy island patterns (dark spots) at SO: 9, 13, 19, 23, 28 and 38.
3.2
Mechanisms and Motifs of Network Self-assembly
When the population is initialised, the diffusing chemoattractant deposited by the initially random movement attracts nearby agents. The local activation of nearby agents creates an autocatalytic amplification of trail on the path which the agents move along. The positive feedback nature of the attraction also results in a negative feedback response: areas that have lower population densities have less chemoattractant and therefore are less likely to attract particles. The result is that the paths become self-reinforcing. This only explains the initial network formation, however. The dynamical evolution of the network (closing of lacunae and shortening of paths) is due to the fact that agent-agent collisions result in random changes in orientation. Instead of being deadlock when agents collide, the particles can easily slide past each other. The inner areas of a cyclic connection are not encumbered by the spokes of the network paths feeding the cycle. Chemoattractant flux is also naturally greater in the inside of a cycle due to the smaller diameter. As agents move inwards towards areas of greater flux the radius becomes even smaller and flow increases until finally the cycle is closed. The complex behaviour of the networks is also due to the fact that there are a constant number of particles within the network. When one cycle closes, the mass of particles which was contained within the cycle is now free to migrate to other parts of the network. The introduction of new particle flux into different parts of the network affects the long term network structure. Also of note is the facts that the flow along the networks is bi-directional - different agents migrate across network paths in both directions simultaneously. Schematic illustrations of the network flows are shown in Fig. 6. The agents appear to adopt a polar alignment with the ‘head’ of the agent facing the inside of the network paths and plasmodial sheets. The polar alignment of the agents appears to mimic, at least superficially, the selfassembly of lipid molecules into lipid vesicles. The self-organising features of the particle networks may provide a useful model of recent experiments by Lobovkina et al. in the self-assembly and automatic reconfiguration in lipid nanotube networks [29]. As with the lipid nanotube networks the collective agent behaviours
200
J. Jones
Fig. 6. Illustration of agent particle flow motifs in self-assembled networks. Left to Right: Bi-directional network path, minimising ‘zipper’ path motif, closing of lacuna cycle, plasmodial sheet mesh. Note that the zipper is closed in the downwards direction even with bi-directional flow.
appear to approximate the evolution of soap films and adhere to Plateau’s laws for two-dimensional foams in terms of branching junctions (only ‘Y’ shaped junctions persist) and branch angles (120◦ angular symmetry at stabilised junctions).
4
Network Evolution around Chemoattractant Sources
The mechanisms that guide self-assembly and evolution of the networks may be harnessed for computational means by providing external sources of chemoattractant. These sources attract and anchor the condensing networks. Three methods may be utilised which loosely correspond to different methods of inoculation of the Physarum plasmodium. These methods are filamentous condensation (FC: formation of a spatially distributed network from random seed points), filamentous foraging (FF: network initialised at food source nodes), and plasmodial shrinkage (PS: network evolution by shrinkage of a plasmodial sheet). After using simple exemplar network configurations and discussing methods of altering network structure we adopt the food source node positions used by Adamatzky [18] who found that Physarum networks followed the upper part of the Toussaint hierarchy of proximity graphs when inoculated at all nodes simultaneously. Given that Physarum plasmodium can perform network optimisation problems; does the synthetic virtual plasmodium also possess such capabilities? 4.1
Filamentous Condensation Method - (FC)
A relatively small population (%p 2) is initialised at random locations and orientations. A transport network emerges and the network becomes ‘snagged’ on the food sources due to attraction to the chemoattractant gradients emitted from the nodes. The evolution of the network continues with the constraints of the food sources affecting the topology. As the network seeks to maximise flow, cycles within the network are closed and curved paths tightened. The final configuration of the network shows the minimal transport path length, characteristic of the Steiner tree (Fig. 7, top row).
Approximating the Behaviours of Physarum polycephalum
201
Fig. 7. Three methods of initialising virtual plasmodium for network minimisation problems. Top row: FC method (Lattice 200 × 200, RA45◦ , SA45◦ , SO9, %p2) Middle row: FF method (Lattice 254 × 170, RA 45◦ , SA Initially 22.5◦ then 45◦ , SO 9, %p2) Bottom row: PS method (Lattice 300 × 300, RA 45◦ , SA 45◦ , SO 9, %p 50).
4.2
Filamentous Foraging Method - (FF)
In this method the population is initialised from the food source node positions. A fixed population size was used (a method to grow and shrink the population size in response to environmental conditions is in development) and the particles were released onto the food sources gradually as space became available. The network patterns formed depended on the sensor angle (SA) parameter (Rotation Angle was fixed at 45◦ ). When SA was low (11.25-22.5◦) fine branching networks were formed with constantly changing topologies. These network shapes approximated the Delaunay Triangulation graph (Fig. 7, middle row, first two columns). When SA was 45◦ , minimising networks were formed, towards Steiner tree structures (remaining columns). 4.3
Plasmodial Shrinkage Method - (PS)
Instead of seeding and condensing a network around the chemoattractant stimuli points it is possible to use the stimuli to deform a pre-existing plasmodial sheet. The approach used is based on the behaviour of the Physarum plasmodium which, after initial coverage of the environment, shrinks to form networks of transport veins connecting the food sources. The plasmodial shrinkage method populates the environment with a very large number of agent particles (%p=50 in a 300×300 lattice: 45,000 agents) to ensure that the network forms a solid sheet structure. As the experiment progresses agent particles, chosen at random, are removed from the environment. Agents are never re-admitted to the environment once removed. The probability of agent removal was set to 0.00025 for each agent at every scheduler step. At early stages of the experiment (when the population was high) the removal rate is relatively high. As the population size decreased so did the rate of removal. As the agent particles are randomly removed, the sheet dynamically deforms and reconfigures itself (Fig. 7, bottom row), influenced by the strong gradients of
202
J. Jones
the pre-pattern stimuli (corresponding to Physarum food sources). The relatively slow rate of particle removal ensures that the tension in the sheet is uniformly distributed and that particle flux can adapt in time to the changing environment (faster rates of removal results in the spontaneous formation of cyclic areas - the sheet deformation is unbalanced resulting in a tearing of the sheet and holes being formed). The sheet maintains a minimal area as it shrinks and the final result approximates a minimum spanning tree. 4.4
Adjusting Network Evolution Using Tension Mechanisms
In the three methods discussed above, the evolution of the networks is affected by the attraction of the particles to each other, and to the network nodes (chemoattractant sources). If the concentration of chemoattractant at the network nodes is less than the amount secreted by the particles, the nodes have no influence on the network evolution (which continues to a circular mass). If the concentration is much greater at the nodes, the particles preferentially seek the node sources and the emergent tension forces (especially in the plasmodial sheet) become more apparent. This method can be also be used to ‘unzip’ Steiner points in network paths (Fig. 8). If the force is too large the network paths may tear apart as the agents migrate to the nodes. Reducing the tension (by decreasing node concentration) causes the Steiner points to re-form as the network relaxes, and reducing network tension may also be used to close network cycles otherwise trapped by an external arrangement of nodes.
Fig. 8. Increasing node chemoattractant concentration increases tension effects and alters network configuration. Left: A three node network with Steiner point adapts to remove Steiner point when node chemoattractant concentration is increased. Particle positions on top row, chemoattractant nodes and trail paths on bottom row. Right: Plasmodial sheet under low tension (left) adapts its shape to increase in tension (right) caused by increase in node chemoattractant concentration.
5
Spatially Represented Geometry Problems and the Virtual Plasmodium
Fig. 9 shows results utilising the minimisation behaviours of the virtual plasmodium to tackle network optimisation problems. Fixed population sizes were used and the population behaviour was initialised with highly foraging (branching) behaviour (SA<45◦ and RA=45◦ ). This reduces differences caused by random
Approximating the Behaviours of Physarum polycephalum
203
Fig. 9. Applying virtual plasmodium to network minimisation problems and illustrating the traversal down the Toussaint hierarchy. Three separate datasets shown: D1, D2 and D3. Top Row of Each Dataset: Original node points, convex hull (CH), Delaunay Triangulation (DTN), Gabriel Graph (GG), Relative Neighbourhood Graph (RNG), Minimum Spanning Tree (MST), Steiner Minimum Tree (SMT) Bottom Row of Each Dataset: Example snapshots from multi-agent population approximation of: Concave Hull (see text), Convex Hull, DTN, GG, RNG, MST, SMT.
variations in agent initialisation positions. To induce minimisation behaviour SA was increased to 45◦ , stopping new network branching and minimising the network by surface tension effects. It should be noted that the network configurations shown in the image snapshots pertaining to the traversal of the Toussaint hierarchy are transient in nature and part of a continuum of minimisation evolution - the images were selected by the author manually as a visual aid to relate to the movement down the hierarchy. During the foraging stage, the networks are initially very chaotic with very frequent changes in topology. Some of the network paths during this stage are very thin indeed and do not persist for a long time, whereas others persist and grow thicker over time. This behaviour was also
204
J. Jones
Fig. 10. Complex networks are minimised by the virtual plasmodium to approximate the Relative Neighbourhood Graph. Left to Right: Source nodes, initial network configuration (DTN), final network configuration, network overlaid to RNG.
observed by Adamatzky in the construction of the higher (RNG>GG>DTN) stages of the hierarchy. Also of note is the fact that the changes in network topology were greater in the areas near the perimeter of the points, the interior of the network (with a greater number of nearby nodes) was more stable. As the minimisation progresses the number of cyclic connections (and network length) is reduced and the synthetic plasmodium adapts to the changing configuration of the network until a final stable configuration is reached. All three methods were assessed for each dataset, each method showing differences in network minimisation. For the D1 dataset when using both the FF and FC approaches, the final structure was typically the MST, and for D2 and D3 the final network structure typically had one and two cycles respectively. When using the PS method the final structure was a tree, typically approximating variations of the SMT (which could be further ‘tightened’ to obtain the MST). For networks with a large number of nodes it would be expected that the minimisation would not naturally continue to a tree structure because the arrangement of large number of nodes would prevent cyclic closure across large distances. To assess how far down the Toussaint hierarchy the minimisation would naturally progress, a synthetic plasmodium network was initialised with a large number of nodes in the topology of the DTN. The network began to minimise by closing cyclic areas and the final state was closest in appearance to the RNG (Fig. 10), supporting the hypothesis that network minimisation in biological transport networks is a compromise between network length and network resilience. The convex hull approximation (the smallest convex polygon enclosing a set of points where all points are on the boundary or interior of the polygon) was achieved by initialising agents in a circular ring outside the datasets and applying a strong tension (via high node chemoattractant deposition) to the network. As the network contracts it is ‘snagged’ at the outer nodes and the stable pattern reveals the convex hull. The concave hull is related to the convex hull and is commonly defined as the minimum region (or footprint [30]) occupied by a set of points, which cannot, in some cases, be represented correctly by the convex hull [31] (for example, a set of points arranged to form the capital letter ‘C’ would not be correctly represented by the convex hull because the gap in the
Approximating the Behaviours of Physarum polycephalum
205
letter would be closed). The virtual plasmodium approximates the concave hull when all of the particles are within the region of the data source nodes. The approximation is achieved by the plasmodial shrinkage method and the shape of the concave hull approximation can be adjusted by changing the node tension and/or agent sensory scale length.
6
Conclusions and Scope for Further Work
We have presented an agent-based particle model whose interactions produce complex emergent behaviours resulting in a synthetic virtual material which approximates some of the behaviours of the the plasmodium of Physarum polycephalum. Different mechanisms of initialising, manipulating and controlling the pattern formation behaviours of the substance were discussed. The virtual plasmodium was used to construct and evolve complex transport networks and to perform spatially represented approximations of computational geometry problems. It is known through the work of Nakagaki [5] that Physarum generates and evolves networks which exhibit properties of short network length and tolerance to random disconnection. We also found evidence to support previous research by Adamatzky [18] which stated that Physarum networks traversed the Toussaint hierarchy of proximity graphs during its foraging and minimising behaviour. Since Physarum is not aware that it traverses the family of proximity graphs, what could be the reason for the differing network behaviours during the foraging and minimising stages? One possible explanation is that the difference between foraging and minimising behaviours reflects on the relationship between area and distance. In the foraging stage area coverage must be maximised to find suitable food sources (whose locations are, of course, unknown to the plasmodium). In the minimisation stage, however, increased area represents more metabolic work to transport nutrients and so the minimisation of network distance becomes most important. The Plasmodial Shrinkage method presents a particularly interesting interface between the fuzzy boundary of area and distance. In reality this hypothetical switch between two modes of operation is under distributed control in the real plasmodium, rather than the simplistic choice seen in the model, and different areas of the plasmodium may even behave in different modes simultaneously. Both model and the real organism have flux as the basis for behaviours. They differ in that the model does not explicitly represent the tube structures through which the protoplasmic flux occurs. There is also no explicit definition of the molecular entities to which the particles might relate. This is partially due to the simplifying nature of the model and partly due to the fact that the internal mechanisms by which Physarum generates its emergent behaviours are not well understood, even though the component parts are. Given such unknown factors we adopt a synthetic approach where an attempt is made to synthesise similar emergent behaviours from the bottom-up without constraining rules. Although this only proves the sufficiency of the model to generate the similar behaviours (and not necessarily the actual cause) the model adheres to the low-level notions
206
J. Jones
of very simple components and local sensory and motor interactions which also constrain the real organism. The model and the real organism are also different in that the network configurations in the model are not encumbered by the debris (for example fragments of old protoplasmic tube) which affects Physarum (although this can be minimised, as in the case of growing the organism on a water substrate, [32]). The model does, however, share its most important feature with the real organism: the complex behaviours (network formation, evolution and minimisation) are collective, distributed and emergent properties which cannot be reduced to the specified particle behaviours. Although space constraints restrict detailed discussion, further work is in development which encompasses other abilities such as inertial movement, spontaneous distributed oscillations, amoebic movement and indirect external control of the virtual plasmodium behaviour. We aim to couple these features with biologically plausible growth behaviours to provide a model which may provide some insights into the behaviour of Physarum and provide possibilities for Physarum inspired computing and robotic devices.
References 1. Takagi, S., Ueda, T.: Emergence and transitions of dynamic patterns of thickness oscillation of the plasmodium of the true slime mold physarum polycephalum. Physica D: Nonlinear Phenomena 237, 180–188 (2007) 2. Takamatsu, A.: Spontaneous switching among multiple spatio-temporal patterns in three-oscillator systems constructed with oscillatory cells of true slime mold. Physica D: Nonlinear Phenomena 223, 180–188 (2006) 3. Adamatzky, A., De Lacy Costello, B., Shirakawa, T.: Universal computation with limited resources: Belousov-zhabotinsky and physarum computers. International Journal of Bifurcation and Chaos 18, 2373–2389 (2008) 4. Takamatsu, A., Takaba, E., Takizawa, G.: Environment-dependent morphology in plasmodium of true slime mold physarum polycephalum and a network growth model. Journal of Theoretical Biology 256, 29–44 (2009) 5. Nakagaki, T., Kobayashi, R., Nishiura, Y., Ueda, T.: Obtaining multiple separate food sources: behavioural intelligence in the physarum plasmodium. Proceedings of the Royal Society B: Biological Sciences 271, 2305–2310 (2004) 6. Nakagaki, T., Yamada, H., Toth, A.: Maze-solving by an amoeboid organism. Nature 407, 470 (2000) 7. Nakagaki, T., Yamada, H., Hara, M.: Smart network solutions in an amoeboid organism. Biophysical Chemistry 107, 1–5 (2004) 8. Shirakawa, T., Adamatzky, A., Gunji, Y., Miyake, Y.: On simultaneous construction of voronoi diagram and delaunay triangulation by physarum polycephalum. International Journal of Bifurcation and Chaos (2008) (in press) 9. Adamatzky, A.: Growing spanning trees in plasmodium machines. Kybernetes 37, 258–264 (2008) 10. Aono, M., Hara, M.: Amoeba-based nonequilibrium neurocomputer utilizing fluctuations and instability. In: Akl, S.G., Calude, C.S., Dinneen, M.J., Rozenberg, G., Wareham, H.T. (eds.) UC 2007. LNCS, vol. 4618, pp. 41–54. Springer, Heidelberg (2007)
Approximating the Behaviours of Physarum polycephalum
207
11. Tsuda, S., Aono, M., Gunji, Y.: Robust and emergent physarum logical-computing. BioSystems 73, 45–55 (2004) 12. Adamatzky, A.: Physarum machine: Implementation of a kolmogorov-uspensky machine on a biological substrate. Parallel Processing Letters 17, 455–467 (2007) 13. Tsuda, S., Zauner, K., Gunji, Y.: Robot control with biological cells. BioSystems 87, 215–223 (2007) 14. Ishiguro, A., Shimizu, M., Kawakatsu, T.: A modular robot that exhibits amoebic locomotion. Robotics and Autonomous Systems 54, 641–650 (2006) 15. Shirakawa, T., Gunji, Y.: Computation of voronoi diagram and collision-free path using the plasmodium of physarum polycephalum. International journal of Unconventional Computing (2008) (in press) 16. Toussaint, G.T.: The relative neighbourhood graph of a finite planar set. Pattern Recognition 12, 261–268 (1980) 17. Jaromczyk, J.W., Toussaint, G.T.: Relative neighborhood graphs and their relatives. Proceedings of the IEEE 80:99 80, 1502–1517 (1992) 18. Adamatzky, A.: Developing proximity graphs by physarum polycephalum: Does the plasmodium follow toussaint hierarchy? Parallel Processing Letters (2008) (in press) 19. Tero, A., Kobayashi, R., Nakagaki, T.: A mathematical model for adaptive transport network in path finding by true slime mold. Journal of Theoretical Biology 244, 553–564 (2007) 20. Gunji, Y.P., Shirakawa, T., Niizato, T., Haruna, T.: Minimal model of a cell connecting amoebic motion and adaptive transport networks. Journal of Theoretical Biology 253, 659–667 (2008) 21. Hickey, D.S., Noriega, L.A.: Relationship between structure and information processing in physarum polycephalum. International Journal of Modelling, Identification and Control 4, 348–356 (2008) 22. Adamatzky, A.: Neural algorithm for constructing minimum spanning tree of a finite planar set. Neural Networks World 6, 335–339 (1991) 23. Kobayashi, R., Tero, A., Nakagaki, T.: Mathematical model for rhythmic protoplasmic movement in the true slime mold. Journal of Mathematical Biology 53, 273–286 (2006) 24. Nakagaki, T., Yamada, H., Ito, M.: Reaction diffusion advection model for pattern formation of rhythmic contraction in a giant amoeboid cell of the physarum plasmodium. Journal of Theoretical Biology 197, 497–506 (1999) 25. Jones, J.: The emergence and dynamical evolution of complex transport networks from simple low-level behaviours. International journal of Unconventional Computing (2008) (in press) 26. Jones, J.: An emergent pattern formation approach to dynamic spatial problems via quantitative front propagation and particle chemotaxis. International Journal of Unconventional Computing 4, 1–34 (2008) 27. Jones, J.: Passive vs active approaches in particle approximations of reactiondiffusion computing. Int. Journal of Nanotechnology and Molecular Computation 1, 37–63 (2009) 28. Hales, T.: The honeycomb conjecture. Discrete and Computational Geometry 25, 1–22 (2001) 29. Lobovkina, T., Dommersnes, P.G., Tiourine, S., Joanny, J.F., Orwar, O.: Shape optimization in lipid nanotube networks. The European Physical Journal E-Soft Matter 26, 295–300 (2008)
208
J. Jones
30. Galton, A., Duckham, M.: What is the region occupied by a set of points? In: Raubal, M., Miller, H.J., Frank, A.U., Goodchild, M.F. (eds.) GIScience 2006. LNCS, vol. 4197, pp. 81–98. Springer, Heidelberg (2006) 31. Duckham, M., Kulik, L., Worboys, M., Galton, A.: Efficient generation of simple polygons for characterizing the shape of a set of points in the plane. Pattern Recognition 41, 3224–3236 (2008) 32. Adamatzky, A., Jones, J.: Towards physarum robots: computing and manipulating on water surface. Journal of Bionic Engineering 5, 348–357 (2008)
Simulation of Neurocomputing Based on Photophobic Reactions of Euglena: Toward Microbe–Based Neural Network Computing Kazunari Ozasa, Masashi Aono, Mizuo Maeda, and Masahiko Hara RIKEN (The Institute of Physical and Chemical Research), 2-1 Hirosawa, Wako, Saitama 351-0198, Japan
[email protected]
Abstract. In order to develop an adaptive computing system, we investigate microscopic optical feedback to a group of microbes (Euglena gracilis in this study) with a neural network algorithm, expecting that the unique characteristics of microbes, especially their strategies to survive/adapt against unfavorable environmental stimuli, will explicitly determine the temporal evolution of the microbe-based feedback system. The photophobic reactions of Euglena are extracted from experiments, and built in the Monte-Carlo simulation of a microbe-based neurocomputing. The simulation revealed a good performance of Euglena-based neurocomputing. Dynamic transition among the solutions is discussed from the viewpoint of feedback instability. Keywords: Microbe, Euglena gracilis, Feedback instability, Neural network, Oscillation, Neurocomputing simulation.
1 Introduction Adaptation and exploration are keywords for new generation computing, since the explosive increase of information in modern society proceeds beyond the limit of conventional programming, where numerous input information/signals have to be processed by deterministic manners. For an example, solving network-traffic problem [1,2] in the conventional computation requires a huge case-conditions (if ... then ...) in programming as the number of combination of signals on the network increases. For dynamic changes in network traffics, since the changes are basically unpredictable, the conventional programming and computation are mostly unrealistic, or at least, they can work but only with frequent updating. Neural network computing has a high potential to deal with such problems since it automatically searches a solution as a local minimum of network energy [3-5], even when the signals are dynamically changed. Major defects of neural network computing are the solution obtained may not be a global minimum (lack of multiple-solution-search capability), weight matrix in the algorithm cannot be tuned automatically (adaptability-less), and essentially for inorganic devices, it does not search a solution beyond the boundary conditions imposed (exploring-less). C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 209–218, 2009. © Springer-Verlag Berlin Heidelberg 2009
210
K. Ozasa et al.
On the other hand, almost all ordinal animals or even some microbes (protists) show the capability to choose alternatives, adaptability to environments, and exploring ability to obtain foods. If we can incorporate such abilities of living biomaterials into information processing, the limitations of conventional neurocomputing listed above may be overcome. The best way to incorporate biomaterials (microbes, practically) into information processing must be bio-to-physical feedback system, where the actions of biomaterials are sensed by and fed to a physical computer, and then computer-processed signals are fed back to biomaterials as stimuli. We expect that the unique characteristics of microbes, especially their strategies to survive/adapt against unfavorable environmental stimuli, will explicitly determine the temporal evolution of the microbe-based feedback system, and therefore, adaptive, self-learning, and/or exploring information processing is realized. A unicellular amoeba (true slime mold Physarum) has been investigated extensively for such purposes [6-8]. Aono et al. have reported the information processing in a feedback system with neural network algorithm [9,10], although the response of amoeba seems very slow. In this report, we describe the simulation of neurocomputing as the first step toward microscopic optical feedback system incorporating a group of microbes (Euglena gracilis, in this study) with a neural network algorithm. Euglena exhibits photophobic reactions [11,12] in a time scale of second, which is suitable for feedback control by light irradiation. The essential characteristic of Euglena-based neurocomputing compared to the amoeba case is the lack of explicit interactions among the individuals in the group of Euglena. A part of one unit cell of amoeba has interaction with the other remote part of the cell through gel flow in the cell body. In contrast, a part of Euglena group has no interaction/communication with the other remote parts of the Euglena group. The aim of this study is to elucidate whether the scheme of amoeba-based neurocomputing can work well with a group of discrete microbes. In order to focus on the essential feedback characteristics, we perform the Monte-Carlo simulation of a microbe-based neurocomputing, incorporating the photophobic reactions of Euglena extracted from real experiments.
2 Experimental Setup and Results The optical feedback system (Fig. 1) was composed with an optical microscope (BX51, Olympus), CMOS camera (Moticam2000, Shimadzu), liquid crystal (LC) projector (LP-XU87, Sanyo), and feedback control PC (MG75H, Fujitsu). A glassbottom dish with a group of Euglena (typically 50-100 cells/mm2) was placed on the microscope stage. The light pattern from the LC projector was focused on the dish from its bottom through a lens (ML3X, Mitsutoyo). The full size image projected on the dish was 2.6 x 1.9 mm (1024 x 768 pixel) with optical intensity of 460 mW/cm2 (white, 500 nm equivalent). The photophobic reactions of Euglena were monitored through the CMOS camera attached on the microscope with 10X objective lens, and recorded by PC. The configuration setup of experiments from LC projector output to 10X objective lens is shown in Fig. 1b. The photophobic reactions of Euglena depend on the color (wavelength) of the irradiated light as well as the light intensity [11,12]. The red or green light from the LC projector does not induce the photophobic reactions of Euglena. Therefore, the intensity of irradiated light is represented as a power of blue light from the projector (500 nm equivalent).
Simulation of Neurocomputing Based on Photophobic Reactions of Euglena
211
Fig. 1. (a, Top) Illustration of feedback system in this study. (b, Bottom) A picture of experimental setup (LC projector, optics, and microscope stage with a dish).
Figure 2a shows the traces of Euglena movement observed with dark/bright areas. The blue light intensity of bright area was 110 mW/cm2, while that of dark area was 0.46 mW/cm2. Twelve digitized images of Euglena were superimposed with 0.85 s intervals in Fig. 2a. Euglena swims mostly straightforward in the dark with a wide variety of speed (5-130 µm/s m/s). In contrast, they stop swimming forward in the light but rotate at the site continuously. Many of Euglena changes the shape from rod-like to ball-like, when they are illuminated strong lights. Figure 2b shows the temporal change of Euglena swimming speed in dark/bright, obtained by tracing the speeds of some typical Euglena. In the experiments, an ultraviolet light (364nm, 34 mW/cm2) was turn on and off repeatedly with 10 s durations. The speeds of translational motion of Euglena are reduced by the light within 100200 ms to approximately one tenth of the original speed in the dark. After several seconds irradiation, most of the Euglena shrivels into ball-like shapes. The recovery
212
K. Ozasa et al.
Fig. 2. Experimental results. (a, Top) Traces of Euglena movement observed with dark/bright areas (left side dark, right side bright). Twelve digitized images of Euglena were superimposed with 0.85s intervals. The indication of direction of movement is given aside. Scale bar indicates 200 µm. m. (b, Middle) Temporal evolution of Euglena swimming speed observed in a light on/off experiment. (c, Bottom) Traced of Euglena movement in a 8-branch confinement pattern. Scale bar indicates 200 µm. m.
Simulation of Neurocomputing Based on Photophobic Reactions of Euglena
213
of the swimming speed is not as quick as the light-induced speed reduction. Since they have to recover their own rod-like shapes before start swimming, it may take a couple of seconds before swimming. The traces of Euglena motion in a confinement structure are given in Fig. 1c. Euglena changes the swimming direction when it encounters the barriers. The resulted direction change seems to be described by the cosine law. We also observed exceptional cases that some Euglena continue swimming even in the light with/without occasional direction changes, that some change swimming direction before entering the bright area, and that some take more than 20 s before recovering the original swimming speed when they back into the dark. These exceptions/variations are to be attributed to the personality of each Euglena, and may be important/potential in developing the microbe-based neurocomputing.
3 Simulation of Neurocomputing In order to figure out the ideal feedback characteristics in Euglena-based neural network computing, we simulate the behaviors of optical feedback system with neural network algorithm, where the photophobic reactions of Euglena observed in the experiments are simplified and incorporated. The incorporated photophobic reactions of Euglena are as followings. (1) Euglena swim straightforwardly in the dark with a constant speed. Speed variation among the cells is included in the simulation. They do not collide with each other. (2) They turn randomly (cosine law involved) when they encounter the barriers. (3) They reduce their speeds in the light to one tenth of the original speed in the dark. (4) They turn randomly and continuously in the dark. (5) They tend escape from the light slowly (a little bit more chance to turn to the dark). Upon these conditions, Euglena movements are simulated with Monte Carlo manner. Neural network algorithm implemented in the simulation was the same as that performed in amoeba-based feedback experiments [9,10]. A group of Euglena was placed at around the center of 16-branch confinement structure (Fig. 3b) at the beginning. The distance in the 16-branch structure between the edge of a branch and that of the opposite branch was 500. The initial Euglena speeds were selected randomly in a range of 0 to 11.3 with random directions. As simulation proceeds, they move according to the simplified rules described above, and enter to (or go out from) branches by chance. The status of Euglena in a certain branch j is evaluated as the sum of absolute velocities of Euglena inside the branch j, namely branch momentum xj. The momentum xj was processed with modified Hopfield-Tank model [3,4] to obtain the feedback signal yi for branch i. The feedback signal yi is 0 or 1, which corresponds to light irradiation (1 for light on) to the branch i. The light irradiation to branch i induces the simplified photophobic reactions on Euglena in the branch. The modified Hopfield-Tank model is described as Eq. 1, with weight matrix wij, time step Δt, sigmoid function σ(x), step function f(x), and parameters b, c, θ.
yi (t + Δt ) = f (∑ j wijσ ( x j (t )))
(1)
σ ( x ) = 1/(1 + exp( − b ( x − c )))
(2)
N
214
K. Ozasa et al.
f (x ) =
1 when x > θ
(3)
0 otherwise A 4-city traveling salesman problem [9,10] illustrated in Fig. 3a is mapped on the 16branch confinement pattern as shown in Fig. 3c. In Fig. 3c, the solution selected is (A1, B2, C3, D4), i.e., from A to B to C to D and return to A. This route has a total distance of 12. The weight in Eq. 1 is equal to the distances between cities, i.e., wij = distance (between choice i and j)
(4)
20 (between forbidden choice i and j) 0
(otherwise)
Fig. 3. Simulation. (a, Top left) Illustration of 4-city traveling salesman problem with distance figures. (b, Top right) 16-branch structure with Euglena at an early stage of the simulation. A set of alphabet and number specifies the city and visiting order. (c, Bottom left) One of the best solutions achieved in the simulation. The bright squares on the branch corners indicate that the corresponding branch lights are on at the moment. This picture corresponds to the solution (A1, B2, C3, D4). (d, Bottom right) One of the unacceptable solutions.
Simulation of Neurocomputing Based on Photophobic Reactions of Euglena
215
The example of forbidden choice is given in Fig. 3d. The simulation was performed 20000 steps in time, with a parameter set of b = 0.6/0.4/0.3, c = 6.0/9.0/12.0, θ = 0.5/0.5/0.5 for 100/150/200 Euglena. Multiple acceptable/unacceptable solutions were achieved in a single simulation. The acceptable solutions (total 24 patterns) were labeled as solution #1 to #24 (#1 to #8 are the best solutions, #9 to #16 are 2nd best, #17 to #24 are worst solutions). The major differences between Euglena-based case in this study from amoebabased case [9,10] are (1) the total value of variable xj is not preserved in Euglenabased case, since the value is reduced by light irradiation (the variable in amoeba case is the volume of amoeba, which is mostly preserved), (2) the value is not restricted among 0 and 1, (3) simulation proceeds with step by step synchronously, and most essentially (4) information of branch condition cannot be transferred to other Euglena outside the branch.
4 Results and Discussion The Figure 4 shows an example of branch momentum distribution (the sum of all branch momentum for all time steps) obtained in one single simulation. A lower peak at around 25 in branch momentum and higher at 3-4 correspond to the momentum of Euglena in the dark and in the light, respectively. The temporal evolution in the inset in Fig. 4 indicates that the branch momentum fluctuates considerably when the branch light is off. This fluctuation is caused by the change in the number of Euglena in the branch, i.e., frequent comings and goings of Euglena in the branch. At simulation step
Fig. 4. Simulation. Frequency distribution of branch momentum obtained as the sum of all branch momentums for all simulation steps. Temporal evolution of branch momentum during simulation is given in the inset together with branch status (light on/off).
216
K. Ozasa et al.
of 3400, 5100, and 15400, a high-speed oscillation of branch light on/off was observed. During the oscillation period, lights continue blinking on and off with one- or two-step cycle. The oscillation was sometimes global (or local), i.e., all (or not all) branch lights turn on/off at the same time with same phase. No anti-phase synchronization was observed, and no clear trend which and how many branches were involved in the local oscillation was detected. The oscillation is caused by the instability of feedback signal. When a branch momentum xi is reduced to one tenth when the branch light turns on. This large change occasionally induces the turn off of other branch j lights, and then the branch momentum xj for the next simulation step is increased ten times, since the suppressive effects of xi is removed. If Euglena in the branches j is more than that in the branch i, the change in branch momentums is enlarged and expanding to the other branches stimulatingly. When a certain acceptable solution was once achieved during the simulation, the branch status (light on/off) corresponding to the solution remained for some time steps before the branch status came to change. The numbers of time steps for a certain solution was summed up for each trial, and averaged for 20 independent trials. The frequency distribution obtained is shown in Fig. 4, for individual 20 simulations with 100 and 200 in the number of Euglena. For both cases, the best solutions #1 to #8 are achieved more frequently than 2nd best solutions (#9 to #16). The worse solutions (#17 to #24) were not effectively achieved. The occupation of time steps for the eight best solutions was 38% (61%) for 100 (200) Euglena. Higher occupation for 200 cells was derived from smaller fluctuation/momentum ratio due to the increase in Euglena number. The uniformity in frequency among the best solutions was reduced by the
Fig. 5. Simulation. Frequency distribution of solutions as the sum of steps with each solution for 20 trials. The number of Euglena was 100 or 200. An example of frequency distribution of solutions for a single trial is given in the inset for 100/200 Euglena.
Simulation of Neurocomputing Based on Photophobic Reactions of Euglena
217
Fig. 6. Simulation. Transition among the acceptable solutions observed in a simulation (above, 100 cells, and below, 200 cells). The simulations are the same ones shown in the inset in Fig. 5. The eight 2nd best and eight 3rd best (worse) solutions are unified into two (2nd and 3rd), and unacceptable solutions are unified into one (NG) in this figure.
increase in the cell number, as evidenced also by an example of frequency distribution of solutions for a single trial shown in the inset in Fig. 4. This indicates that the stability of each best solution is increased with cell number; in other words, the branch statuses of the best solutions remain for a longer time steps with cell number. Searching various solutions in a single trial is one of the most essential characteristics found in amoeba-based [9,10] and Euglena-based (this study) neurocomputings. In amoeba-based neurocomputing, natural and self-sustaining oscillation of amoeba body plays important roles for the transition from one solution (local minimum) to another. In Euglena-based neurocomputing, feedback instability induces the global/local oscillation of external stimulus (light on/off), and correspondingly, the oscillation of Euglena swimming speed, for a certain period. Figure 6 shows transition among the acceptable solutions observed in simulations with 100/200 cells. The sustaining global oscillation occurred at 12400 and ended at 13900 in time step for 200 cells simulation shown in Fig. 6. The two major best solutions achieved before 12400 step were (A8, B1, C2, D4) and (A8, B4, C2, D1), whereas two major after the global oscillation were (A4, B8, C1, D2) and (A1, B8, C4, D2). These two sets of solutions can be switched by swapping two branch statuses, while transition between the sets requires total change of branch statuses. This reveals that the global oscillation in Euglena-based neurocomputing induces a dramatic perturbation in the feedback system and contributes to multiple-solution-search capability. The photophobic characteristics of Euglena built in the simulation were simplified and limited. The living Euglena will show their other natures in a real optical feedback system, such as adaptation to light, chemical emission, personality, nutrition dependence, and growth/aging. The success in the Euglena-based feedback simulation therefore
218
K. Ozasa et al.
suggests a possibility that adaptive, self-learning, and exploring/enterprising neurocomputation may be realized by employing Euglena in an optical feedback system.
5 Conclusion Simulation of Euglena-based neural network computing has been performed with incorporating the photophobic reactions of Euglena experimentally observed. The simulation revealed that Euglena-based neurocomputing can be achieved by taking branch momentums as the variables in the modified Hopfield-Tank model. Global/local feedback instability takes place occasionally in the simulation, which contributes to multiple-solution-search capability. This research has proved that a group of Euglena is one of the suitable biomaterials for microbe-based neural network computing. Acknowledgments. The authors would like to thank greatly Mr. Kengo Suzuki and Ms. Sharbanee Mitra at Euglena Co., Ltd., (http://euglena.jp/) for Euglena cells and suggestive information on their nature. They acknowledge financial support for this study by the Ministry of Education, Science, Sports and Culture, Grant-in-Aid for Scientific Research (B), 21360192, 2009-2012.
References 1. Whittakera, J., Garsidea, S., Lindveldb, K.: Tracking and predicting a network traffic process. Int. J. Forecasting 13, 51–61 (1997) 2. Jozsa, B.G., Makai, M.: On the solution of reroute sequence planning problem in MPLS networks. Comput. Networks 42, 199–210 (2003) 3. Hopfield, J.J., Tank, D.W.: Computing with Neural Circuits: A model. Science 233, 625– 633 (1986) 4. Wasserman, P.D.: Neural Computing: Theory and Practice. Van Nostrand Reinhold Co., New York (1989) 5. Egmont-Petersen, M., Ridder, D., Handels, H.: Image processing with neural networks - a review. Pattern Recognition 35, 2279–2301 (2002) 6. Nakagaki, T., Yamada, H., Toth, A.: Intelligence: Maze-Solving by an Amoeboid Organism. Nature 407, 470–470 (2000) 7. Takamatsu, A., Fujii, T., Endo, I.: Time Delay Effect in a Living Coupled Oscillator System with the Plasmodium of Physarum Polycephalum. Phys. Rev. Lett. 85, 2026–2029 (2000) 8. Aono, M., Gunji, Y.-P.: Beyond Input-Output Computings: Error-Driven Emergence with Parallel No-Distributed Slime Mold Computer. BioSystems 71, 257–287 (2003) 9. Aono, M., Hara, M., Aihara, K.: Amoeba-based Neurocomputing with Chaotic Dynamics. Commum. ACM 50, 69–72 (2007) 10. Aono, M., Hirata, Y., Hara, M., Aihara, K.: Amoeba-based Chaotic Neurocomputing: Combinatorial Optimization by Coupled Biological Oscillators. New Generation Computing 27, 129–157 (2009) 11. Diehn, B.: Phototaxis and Sensory Transduction in Euglena. Science 181, 1009–1015 (1973) 12. Creutz, C., Colombetti, G., Diehn, B.: Photophobic Behavioral Responses of Euglena in a Light Intensity Gradient and the Kinetics of Photoreceptor Pigment Interconversions. Photochem. Photobiol. 27, 611–616 (1978)
Reasoning about Entanglement and Separability in Quantum Higher-Order Functions Fr´ed´eric Prost1 and Chaouki Zerrari2 1
2
Grenoble Universit´e, LIG, France
[email protected] VERIMAG, Grenoble Universit´e, France
[email protected]
Abstract. We present a logical approach to the separability analysis issue for a functional quantum computation language. This logic is inspired by previous works on logical analysis of aliasing for imperative functional programs. Both analyses share similarities notably because they are highly non-compositional. Nevertheless, the intrisic non determinism of quantum computation has a large impact on the definitions of the semantics and the validity of logical assertions. To the knowledge of the authors, it is the first proposal of an entanglement/separability analysis for a functional quantum programming language with higher-order functions.
1
Introduction
The aim of high level programming language is to provide a sufficiently high level of abstraction in order both to avoid unnecessary burden coming from technical details and to provide useful mental guidelines for the programmer. Quantum computation [NC00] is still in its prime and quantum programing languages remain in need for such abstractions. Functional quantum programing languages have been proposed and offer ways to handle the no-cloning axiom via linear λcalculi [vT04, SV05]. In [AG05] is developed QML in which a purely quantum control expression is introduced in order to represent quantum superposition in programming terms. Entanglement management is another key point of quantum programming. Indeed without entanglement it is possible to efficiently simulate quantum computations on a classical computer [Vid03]. First steps to deal with entanglement, and its dual: separability, have been done in [Per07] in which a type system is provided in order to approximate the entanglement relation of an array of quantum bits, and in [Per08] in which abstract interpretation technique is used. Quantum bits entanglement analysis shares some similarities with variables name aliasing analysis. Indeed, aliasing analyses are complicated since an action on a variable of a given name may have repercussions on another variable having a different name. The same kind of problems occur between two entangled quantum bits : if one quantum bit is measured then the other one can be affected. In both cases there is a compositionality issue: it is hard to state anything about C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 219–235, 2009. c Springer-Verlag Berlin Heidelberg 2009
220
F. Prost and C. Zerrari
a program without any knowledge of its context. It seems therefore sensible to try to adapt known aliasing analysis techniques to the quantum setting. Let us illustrate this idea by a simple example (formally studied in example 1). Suppose that 4 qubits, x, y, z, t are in a state such that x, t are entangled, y, z are entangled, but that {x, t} is separable from {y, z}. Now, application of a control not operator on x, y, may entangle z, t as a side effect (note that even if x, y are measured afterward z, t may remain entangled). Thus, if we consider a quantum program P : let u, v = (Cnot y, x) in (meas u), (meas v) we would like to be able to state properties on the entanglement relation between z, t. The problem is that neither z or t occur in the text of the program. In this paper we follow the idea developed in [BHY05] and adapt it for entanglement/separability analysis in a functional quantum programing language with higher order functions. The idea is to be able to infer judgment of the form: {C}P : u{C } where P is a quantum program, C, C are logical statements about the entanglement/separability relations of quantum bits used by the program, u is an anchor used as the logical counterpart of P in C . The intuitive meaning of such a formula is the following : if the program P is evaluated in a context such that C is satisfied, then C will be satisfied after the evaluation of P . The work of [BHY05] has to be adapted in a non deterministic setting, making the semantics and soundness of the logic radically different. Our results are a strict improvement over [Per07], and a over [Per08], in which only first order functions are considered. Due to space limitations omitted proofs and extensive technical definitions may be found in [PZ08].
2
Separability and Entanglement
A n qubits register is represented by a normalized vector in a Hilbert 2n dimension space that is the tensorial product of n dimension 2 Hilbert spaces on C2 . Each 2 dimension subspace represents a qubit. For a given vector, written |ϕ, qubits can be either entangled or separable. Definition 1 (Entanglement, Separability). Consider |ϕ a n qubits register. ϕ is separable if it is possible to partition the n qubits in two non empty sets A, B, two states |ϕA and |ϕB describing A and B qubits, such that |ϕ = |ϕA ⊗ |ϕB , where |ϕA and |ϕB , otherwise it is said to be entangled. By extension, two qubits q, q are separable if and only if there exists a partition A, B, two states |ϕA and |ϕB describing A and B qubits, such that |ϕ = |ϕA ⊗ |ϕB , with q ∈ A and q ∈ B. Otherwise q, q are entangled. Definition 2 (Entanglement relation). Let a n qubits register be represented by |ϕ. The entanglement relation of |ϕ, E(|ϕ), over qubits of the register is defined as follows: (x, y) ∈ E(|ϕ) if and only if x and y are entangled. The entanglement relation is obviously an equivalence relation.
Reasoning about Entanglement and Separability
3
221
λQ L a Functional Quantum Computing Language
We use a variant of Selinger and Valiron’s λ-calculus [SV05] as programming language with a fixed set of quantum gates without losing expressivity. We also supposed a fixed number of quantum bits, therefore there are no new operators creating new quantum bits during computation. Indeed, as shown in [Pro07] name generation triggers nontrivial technical problems. Therefore, in the following we suppose the number of quantum bit registers fixed although non specified and refer to it as n. 3.1
Syntax and Types
Definition 3 (Terms and types). λQ L terms and types are inductively defined by: M ::= x | qi | 1 | 0 | λx:σ.N | (M N ) | M, N | (πi N ) | if M then N else P | meas | Cnot | H | T σ ::= B | B◦ | σ → τ | σ ⊗ τ where x denotes names of element of a countable set of variables. qi , where i ∈ {1..n} are constant names that are used as reference in an actual quantum bit array. 1, 0 are standard boolean constant. (πi N ) with i ∈ {1, 2} is the projection operator. Terms of the third line are quantum primitives respectively for measure and the three quantum gates Conditional not, Hadamard and phase. We only have two base types B for bits and B◦ for quantum bits, arrow and product types are standard ones. Note that if qi are constants, there can be quantum bits variable in λQ L . Consider for instance the following piece of code: (λx:B◦ .N if M then q1 else q2 ). After reduction x may eventually become either q1 or q2 in N , depending on the evaluation of M . In order to enforce the no-cloning axiom of quantum physics (see [NC00]), we adopt a linear typing discipline for pieces of code containing quantum bits. Therefore we have two typing contexts, one classical and the other one linear. Definition 4 (Context and typing judgments). Classical contexts are inductively defined by: Γ ::= · | Γ, x : σ where B◦ ∈ σ. Linear contexts by: Λ ::= · | Λ, x : σ where B◦ ∈ σ. Typing judgments are of the form: Γ ; Λ M : σ and shall be read as : under the classical typing context Γ , linear context Λ , the term M is well formed of type σ. As usual we require that classical and linear typing contexts are unambiguous. It means that when we write Γ, x : σ; Δ (resp. Γ ; Λ, y : τ ) x (resp. y) is implicitly supposed not to appear in Γ ; Λ (resp. Γ ; Λ). Similarly when we write Γ1 , Γ2 (resp. Λ1 , Λ2 ) we intend that Γ1 and Γ2 (resp. Λ1 and Λ2 ) are disjoint contexts. λQ L typing rules are standard and very close to the one of Barber’s DILL [Bar96] with the following differences: There is no dereliction rules, basicaly
222
F. Prost and C. Zerrari
because λQ L is only resource sensitive on the quantum bits, and there is no promotion rules for the same reason. In Fig. 1 we give λQ L typing rules. Notice that for arrow elimination there is a split of the linear context. From a typing perspective, quantum gates are typed as identity functions (and behave like identity from a term evaluation point of view as can be seen in the operational semantics 7).
Γ;· 1 : B
[AxT ]
Γ;x : σ x : σ
[V arQ]
Γ ; Λ qi : B◦
[AxQ]
Γ;· M : σ [W kg] Γ, x : τ ; · M : σ
Γ;· 0 : B
[AxF ]
Γ, x : σ; · x : σ
[V ar]
Γ;Λ M : τ [W kgL] Γ ; Λ, x : σ M : τ Γ, x : τ, y : τ ; Λ M : σ [CT N ] Γ, z : τ ; Λ M [x := z; y := z] : σ Γ ; Λ1 M : σ → τ Γ ; Λ2 N : σ ◦ [→ E] Γ ; Λ1 , Λ2 (M N ) : τ Γ, x : σ; Λ M : τ Γ ; Λ, x : σ M : τ [→ I] [→◦ I] Γ ; Λ λx:σ.M : σ → τ Γ ; Λ λx:σ.M : B◦ → τ Γ ; Λ1 M : τ Γ ; Λ2 N : σ Γ ; Λ M : τ1 ⊗ τ2 [⊗I] [⊗Ei ] Γ ; Λ1 , Λ2 M, N : τ ⊗ σ Γ ; Λ (πi M ) : τi
i ∈ {1, 2}
Γ ; Λ1 M : B Γ ; Λ2 N : τ Γ ; Λ2 P : τ [IF I] Γ ; Λ1 , Λ2 if M then N else P : τ Γ ; Λ M : B◦ Γ ; Λ M : B◦ [HAD] [P HA] ◦ Γ;Λ H M : B Γ ; Λ T M : B◦ Γ ; Λ M : B◦ Γ ; Λ M : B◦ ⊗ B ◦ [M EAS] [CN OT ] Γ ; Λ meas M : B Γ ; Λ Cnot M : B◦ ⊗ B◦ Fig. 1. λQ L typing rules Q λQ L is a standard simply typed λ-calculus with two base types. λL is linear ◦ on terms of type containing B . Thus, it ensures the no-cloning property of quantum physics (e.g. [NC00]).
3.2
Operational Semantics
Quantum particularities have strong implications in the design of a quantum programming language. First, since quantum bits may be entangled together it is not possible to textually represent individual quantum bits as a normalized vector of C2 . We use |1 and |0 as base. Therefore, a quantum program manipulating n quantum bits is represented as a quantum state of a Hilbert space C2n and constants of type B◦ are pointers to this quantum state. Moreover, quantum
Reasoning about Entanglement and Separability
223
operators modify this state introducing imperative actions. As a consequence an evaluation order has to be set in order to keep some kind of confluence. Moreover, λQ L reductions are probabilistic. Indeed, quantum mechanics properties induce an inherent probabilistic behavior when measuring the state of a quantum bit. Q Definition 5 (λQ L state). Let Γ ; Λ M : σ. A λL state is a couple [|ϕ, M ] where |ϕ is a normalized vector of C2n Hilbert space and M a λQ L term.
An example of λQ L state of size n = 2 is the following: [|ϕ, (λq:B◦ .if (meas q1 ) then 1 else (meas (T q)) q2 )] where |ϕ =
√1 (|0 2
√ 5 3 |1) q1 is the quantum bit denoted by √ represented by 23 |0+ 35 |1. This program measures
+ |1) ⊗ ( 23 |0 +
and q2 the one q1 , then regarding the result, which is either 1 or 0 with 1/2 probability, it measures q2 or gives back 1. Thus the value computed by this piece of code is 1 with probability 7/9 and 0 with probability 2/9. See definition 7 for the precise definition of the operational semantics. √1 (|0+|1) 2
We consider call by value reduction rules. Values are defined as usual. Definition 6 (Values). Values of λQ L are inductively defined by: U, V ::= x | 1 | 0 | qi | λx:σ.M | V, V | (F V ) Where F is one of the following operators πi , T, H, Cnot, meas Definition 7 (Quantum reductions). We define a probabilistic reduction be tween λQ L states as: [|ϕ, M ] →p [|ϕ , M ]. It has to be read: [|ϕ, M ] reduces to [|ϕ , M ] with probability p. Reduction rules are given in Fig. 2. We only give quantum rules. Functional rules are standard (see for instance [Pie02]) call by value and do not change probabilities. [|ϕ, (T qi )] →1 [Ti (|ϕ), qi ]
[P HS]
[|ϕ, (H qi )] →1 [Hi (|ϕ), qi ]
[α|ϕ0 + β|ϕ1 , (meas qi )] →|α|2 [|ϕ0 , 1] [α|ϕ0 + β|ϕ1 , (meas qi )] →|β|2 [|ϕ1 , 0]
[M EF ] [M ET ]
[|ϕ, (Cnot qi , qj )] →1 [Cnoti,j (|ϕ), qi , qj ]
[CN O]
Fig. 2. λQ L Operational semantics, quantum fragment
[HDR]
224
F. Prost and C. Zerrari
In rules [M ET ] and [M EF ], let |ϕ = α|ϕ0 + β|ϕ1 be normalized with 1 |ϕ1 = i = 1n αi |φ1 i ⊗ |1 ⊗ |ψi n 0 0 |ϕ0 = i = 1 βi |φi ⊗ |0 ⊗ |ψi where |1 and |0 is the ith quantum bit. Based on this reduction rules one can define reachable states, by considering the reflexive-transitive closure of →p . One has to compose probabilities along a reduction path. Therefore [|ϕ , M ] is reachable from [|ϕ , M ], if there is a non zero probability path between those states. More precisions can be found in [SV05]. Computation of a λQ L term starts from an initial state |ϕinit defined by conn−1
vention as follows: |ϕinit = |0 ⊗ . . . ⊗ |0 Proposition 1 (Subject Reduction). Let Γ, Λ M : τ and [ϕ, M ] →p [ϕ , M ], then Γ, Λ M : τ Proof. From the typing point of view λQ L is nothing more than a simply typed λ-calculus with constants for quantum bits manipulations. Note that T, H, Cnot act as identity functions (from the strict λ-calculus point of view). The measurement is simple to deal with since it only returns constant (hence typable in any contexts).
4
Entanglement Logic for λQ L
We present a static analysis of the entanglement relation during a quantum computation. The idea that we follow in this paper is to adapt the work [BHY05] to the quantum setting. The logic is in the style of Hoare [Hoa69] and leads to the following notation: {C}M :Γ ;Λ;Δ;τ u{C }, where C is a precondition, C is a post-condition, M is the subject and u is its anchor (the name used in C to denote M value). Intuitively it means that if C is satisfied, then after the evaluation of M , whose value is denoted by u in C , C is satisfied. Γ ; Λ is the typing context of M , τ is M type and Δ is the anchor typing context: it is used in orderto type anchors within assertions. Assertions state whether two quantum bits are entangled or not. Note that since separability is uncomputable (it trivially reduces to the halt problem since on can add Cnot(qi , qj ) as a last line of a program in such a way that qi and qj are entangled iff the computation stops), assertions are safe approximations: if an assertion states that two quantum bits are separable then they really are. If two quantum bits are stated entangled by an assertion, it is possible that they actually are not. 4.1
Assertions
Definition 8. Terms and assertions are defined by the following grammars:
Reasoning about Entanglement and Separability
225
e ::= u | qi | 1 | 0 | e, e | πi (e) C ::= u ↔ v | e | e = e | ¬C | C ∨ C | C ∧ C | C =⇒ C | ∀u : σ.C | ∃u : σ.C | {C}e1 • e2 = e3 {C } Where u, v are names from a countable set of anchor names. The idea is that every subterm of a program is identified in assertions by an anchor, which is simply a unique name. Note that the name of quantum bits are considered as ground terms. Assertion u ↔ v means that the quantum bit identified by u is possibly entangled with v. Notice that ¬u ↔ v means that it is certain that u and v are separable. u means that it is certain that the quantum bit is in a base state (it can be seen as α|b where b is either 1 or 0). Thus ¬ u means that u is possibly not in a base state (here the approximation works the other around). Assertion {C}e1 • e2 = e3 {C } is used to handle higher order functions. It is the evaluation formula. e3 binds its free occurrences in C . Following [BHY05], C, C are called internal pre/post conditions. The idea is that invocation of a function denoted by e1 with argument e2 under the condition that the initial assertion C is satisfied by the current quantum state evaluates in a new quantum state in which C is satisfied. The other assertions have their standard first order logic meaning. In the following we write T (resp. F) for the following tautology (resp. antilogy) u = u (resp ¬(u = u)). Notice that ∀ and ∃ binders are typed. Indeed, in this logic one has to bear in mind that names ultimately represent terms and thus can denote functions. Therefore we have a notion of well formedness for logical terms and assertions. Definition 9 (Assertion typing) – A logical term t is well typed of type τ in typing context Γ ; Λ; Δ, written Γ ; Λ; Δ t : τ . Rules are given in example in Fig. 3, in which i ∈ {1, 2}, and c being either 1 or 0.
Γ ; Λ; Δ c : B
[T Consc ]
(u : τ ) ∈ Γ ; Λ; Δ [T AsAx] [T AsQ] Γ ; Λ; Δ u : τ Γ ; Λ; Δ qi : B◦
Γ ; Λ; Δ e : τ Γ ; Λ; Δ e : τ [T As⊗] Γ ; Λ; Δ e, e : τ ⊗ τ
Γ ; Λ; Δ u : τ1 ⊗ τ2 [T Asπi ] Γ ; Λ; Δ πi (u) : τi
Fig. 3. Assertion terms typing
– An assertion C is well typed under context Γ ; Λ; Δ written Γ ; Λ; Δ C. Due to space limitation we give some rules in Fig. 4. We refer to [PZ08] for the complete set of rules.
226
F. Prost and C. Zerrari
Γ ; Λ; Δ e : B◦ [T As] Γ ; Λ; Δ e
Γ ; Λ; Δ e : τ Γ ; Λ; Δ e : τ [T As =] Γ ; Λ; Δ e = e
Γ ; Λ; Δ C Γ ; Λ; Δ C [T As∧] Γ ; Λ; Δ C ∧ C
Γ ; Λ; Δ C [T As∃] Γ ; (Λ; Δ) \ u : σ ∃u : σ.C
Γ ; Λ; Δ C Γ ; Λ; Δ e2 : σ Γ ; Λ; Δ, e3 : τ C Γ ; Λ; Δ e1 : σ → τ [T AsEV ] Γ ; Λ, Λ; Δ {C}e1 • e2 = e3{C } Fig. 4. Assertion typing
where (Λ; Δ) \ u : σ is the context Λ; Δ without u : σ. Assertion typing rules may be classified in two categories. The first one is the set of rules insuring correct use of names with respect to the type of the term denoted by them. It is done by rules [T As ↔] [T As ] [T As =] [T As∀] [T As∃] and [T AsEV ]. The second set of rules is used to structurally check formulas: [T As¬] [T As∧] [T As∨], and [T As =⇒ ]. 4.2
Semantics of Assertions
We now formalize the intuitive semantics of assertions. For this, we abstract the set of quantum bits to an abstract quantum state which is a safe approximation of both the entanglement relation and of the subset of quantum bits in a base state of the actual quantum state. Semantics of assertion is defined with relation to the abstract quantum state. Moreover, we develop an abstract operational semantics in order to abstractly execute λQ L programs on abstract quantum states. Abstract quantum state and abstract operational semantics. Let S = {q1 , . . . , qn }, denotes the set of quantum bits in the following of this section. The quantum state of S is described by a normalized vector of C2n : |ϕ. Definition 10 (Abstract quantum state). An abstract quantum state of S (AQS for short) is a tuple A = (R, P) where P ⊆ S and R is a partial equivalence relation on (S \ P) × (S \ P). Relation R is a PER since it describes an approximation of the entanglement relation and there is not much sens in talking about the entanglement of a quantum bit with itself. Indeed, because of the no-cloning property it is not possible to have programs p : B◦ ×B◦ → τ requiring two non entangled quantum bits and to build a correct term like (p qi , qi ). The equivalence class of a quantum bit q with relation to an abstract quantum state A = (R, P) is written q A . Definition 11 (AQS and quantum state adequacy). Let S be described by |ϕ and A = (R, P) an AQS of S. A is adequate with regards to |ϕ, written
Reasoning about Entanglement and Separability
227
A |= |ϕ, iff for every x, y ∈ S such that (x, y) ∈ R then x, y are separable w.r.t. |ϕ and for every x ∈ P then the measurement of x is deterministic. Suppose that S = {q1 , q2 , q3 } and |ϕ = 1/ (2)(|00 + |11) ⊗ |1 then A = ({(q1 , q2 ), (q2 , q1 )}, {q3 }) and A = ({(q1 , q2 ), (q2 , q1 ), (q2 , q3 ), (q3 , q2 ), (q3 , q1 ), (q1 , q3 )}, ∅). We have A |= |ϕ, because q3 is in a base state and q1 , q2 are separable from q3 . We also have A |= |ϕ. Indeed A is safe in stating that no quantum bit is in a base state (even if q3 actually is in base state) and stating that no quantum bits are separable. On the other hand B = ({(q1 , q2 ), (q2 , q1 )}, {q2 , q3 }) and B = (∅, {q3 }), are not adequate abstract quantum states with relation to |ϕ. B is not adequate since q2 is not in a base state, while B is not adequate because relatively to the PER of B, q1 , q2 are separable. We now give a new operational semantics of λQ L terms based on abstract quantum states transformation. Definition 12 (Abstract operational semantics). The abstract operational semantics of a term M such that Γ ; Λ M : τ is a relation over couples made of an AQS and a term : [A, M ] →Γ,Λ A [A , M ] Γ,Λ We write →A instead of →A when typing contexts play no role or can be inferred from the context. Reduction rules are the same ones as those of definition 7 for the functional part of the calculus where the quantum state is replaced with AQS. Rules for the quantum actions are given in Fig. 5. 1 is non deterministically 1 or 0, R\q is the equivalence relation such Where 0 i that if (x, y) ∈ R and x = qi or exclusive y = qi then (x, y) ∈ R \ qi otherwise (x, y) ∈ R \ qi , and where R · qi ↔ qj is the equivalence relation R in which the equivalence classes of qi , qj have been merged together. Note that since our system is normalizing the number of all possible abstract executions is finite. Hence, computable. [(R, P), (T qi )] →A [(R, P), qi ]
[P HSA ]
[(R, P), (H qi )] →A [(R, P \ {qi }), qi ]
[HDRA ]
[(R, P), (meas qi )] →A [(R \ qi , P ∪ {qi }), 1 0] [(R, P), (Cnot qi , qj )] →A [(R, P), qi , qj ]
[M ETA ]
[CN O1A ]if qi ∈ P
[(R, P), (Cnot qi , qj )] →A [(R · qi ↔ qj , P \ {qi , qj }), qi , qj ]
[CN O0A ]if qi ∈ P
Fig. 5. Abstract operational semantics, quantum actions
228
F. Prost and C. Zerrari
Definition 13 (Abstract program semantics). Consider an AQS A, the abstract semantics of program Γ ; Λ M : τ under A, written M ΓA;Λ , is the set of A such that [A, M ] →∗A [A , V ] where V is a value. Note that the abstract semantics of a program is a collecting semantics. It may explore branches that are never going to be used in actual computation. Indeed in the operational semantics measurement gives a non deterministic answer. Proposition 2. Let A |= |ϕ and Γ ; Λ M : τ . Suppose that [|ϕ, M ] →∗γ [|ϕ , V ] then there exists A |= |ϕ such that [A, M ] →∗A [A , V ]. Proof. The proof is done by induction on the number of steps of the reduction between [|ϕ, M ] and [|ϕ , V . The proposition is clearly true if there is 0 step since M = V , ϕ = ϕ and A = A proves the result. Now consider the last rule used. If this rule is one of the purely functional part of the calculus (see def. 7) the proposition follow directly from the induction hypothesis since the AQS is not changed. We thus have the following possibilities for the last rule: – It is [P HSA ]: If the qbit q on which phase is applied is a base state it can be written α|l with l being either 1 or 0. Thus Tq = expiπ/4 α, thus still a base state. Hence P remains unchanged. – It is [HDRA ]: if (R, P) |= ϕ, then (R, P \ {qi }) |= (Hi |ϕ) because of definition 11 since in (Hi |ϕ), any qj is in a non base state only if it is in a non base state in |ϕ. – It is [M ETA ]: After the measure the qubit vanishes. Moreover concrete measure probabilistically produces 1 or 0. Regarding the concrete result one can choose the appropriate value as result of the abstract measure, moreover the measured qubit is in a base state (hence the P ∪ {qi }). – It is [N EWA ]: then by definition |ϕ = |1 ⊗ |ϕ, hence quantum in a base state in ϕ remain in a base state in ϕ , moreover the new qubit is in a base state. – It is [CN O0A ]: If the two qubits qi = α|l, qj = β|l are in a base state then • If l = 1 then Cnot(α|1 ⊗ β|l ) = α|1 ⊗ β|¬l • If l = 0 then Cnot(α|0 ⊗ β|l ) = α|0 ⊗ β|l in both cases we obtain two separable qubits. If only qi = α |l is in a base state and qj = α|0 + β|1 is not. • If l = 1 then Cnot(α|1 ⊗ α|0 + β|1) = α |1 ⊗ β|1 + α|0 • If l = 0 then Cnot(α |1 ⊗ α|1 + β|0) = α |1 ⊗ α|1 + β|0) here also we obtain two separable qubits. Moreover in all cases qi remains in a base state. – It is [CN O1A ]: The property follows from induction hypothesis and from the fact that R and P are safe approximations. This result builds a bridge between the satisfaction of an assertion and the actual quantum state. Indeed, the validity of assertions is defined relatively to a quantum state which in turn is related to the actual quantum state by this result.
Reasoning about Entanglement and Separability
229
Semantics of entanglement assertions. We now give the semantics of a well typed assertion with relation to a concrete quantum state. It is done via an abstract quantum state which is adequate with regards to the concrete quantum state. Let |ϕ |= A, and Γ ; Λ; Δ C, then C is satisfied, written MΓ ;Λ;Δ |= C. Basically it amounts to check two properties : whether or not two quantum bits are in the same entanglement equivalence class and whether or not a particular quantum bit is in a base state. Definition 14 (Abstract observational equivalence). Suppose that Γ ; Λ M, M : τ . M and M are observationally equivalent, written M ≡Γ,Λ M , if A and only if for all context C[.] such that ·; · C[M ], C[M ] : B and for all AQS A we have C[M ]Γ,Λ = C[M ]Γ,Λ A A . The equivalence class of M w.r.t. observational equivalence is denoted by MAΓ,Λ , by extension we say that the type of this equivalence class is τ . Definition 15 (Abstract values). In assertion typing context Γ ; Λ; Δ, an abΓ ;Λ;Δ stract value vA,τ of type τ , where τ = σ ⊗ σ , with relation to context Γ ; Λ; Δ and AQS A = (R, P) is either an equivalence class of type τ for ≡Γ,Λ = B◦ , A , if τ or a pair (C, b) formed by an equivalence class C of R and a boolean b (the idea being that if b is true then the denoted qubit is in P). Γ ;Λ;Δ If τ = σ ⊗ σ , then vA,τ is a pair (v , v ) formed by abstract values of respective types σ , σ . The set of abstract values under an AQS A, typing context Γ ; Λ; Δ and for a Γ ;Λ;Δ type τ is written ΞA,τ . Abstract values are used to define the interpretation of free variables. Since in a given assertion typing context Γ ; Λ; Δ more than one type may occur we need to consider collections of abstract values of the different types that occur in Γ ; Λ; Δ : we write ΞΓ ;Λ;Δ the disjoint union of all ΞτΓ ;Λ;Δ for every τ in Γ ; Λ; Δ. Definition 16 (Models). A Γ ; Λ; Δ model is a tuple MΓ ;Λ;Δ = A, I, where A is an AQS, I is a map from variables defined in Γ ; Λ; Δ to ΞΓ ;Λ;Δ . Definition 17 (Model extensions). Let MΓ ;Λ;Δ = A, I be a model, then Γ ;Λ;Δ the model M written M·x : v = A, I , where v ∈ ΞA is defined as follows: ,τ the typing context of M is Γ ; Λ; Δ, x : τ . If the type of x is τ = σ ⊗ σ , then v is a couple made of abstract values v , v of respective type σ, σ . If the type of x is B◦ : if v = (C, 1) then A = (R ∪ C, P ∪ {x}), otherwise if v = (C, 0) then A = (R ∪ C, P ). If the type of x is σ = B◦ , then: I (y) = I(y) for all x =y and I (x) = v. Definition 18 (Term interpretation). Let MΓ,Λ = A, I, τ be a model, the A interpretation of a term is defined by: |[u|]M = I(u); |[qi]|M = (qi A , bA i ), where bi is 1 iff qi ∈ P with A = R, P; |[e, e |]M = [|M|]A , |[e ]|M . Definition 19 (Satisfaction). The satisfaction of an assertion C in the model M = A, I, is written M |= C, is inductively defined by the following rules:
230
F. Prost and C. Zerrari
— M |= u ↔ v if (π1 ([|u|]M ) = π1 ([|v|]M )). — M |= u if π2 ([|u|]M ) is 1. — M |= e1 = e2 if |[e2]|M = |[e1]|M . — M |= ¬C if |= does not satisfy C. — M |= C ∨ C if M |= C or M |= C . —M |= C ∧ C if M |= C and M |= C . — M |= C =⇒ C if M |= C implies M |= C . — M |= ∀u : σ.C if for Γ ;Λ;Δ all abstract values v ∈ ΞA,σ , and M = M · u : v, one has M |= C. — M |= ∃u : σ.C if there is an abstract value v such that if M = M · u : v, one has M |= C. — M |= {C}e1 • e2 = e3 {C } if for all models MΓ ;Λ;Δ = A , I such that MΓ ;Λ;Δ |= C, with the following conditions: Γ ; Λ; Δ e1 : σ → τ , and Γ ; Λ; Δ e2 : σ such that for all terms t1 , t2 such that |[ti]|M = |[ei]|M for i ∈ {1, 2} one has – [A, (t1 t2 )] →∗A [A , V ] – we have two sub-cases: 1) τ is B◦ and V = qi and M = M · e3 : (qi A , qi ∈ Γ ;Λ;Δ,e :τ 3 PA ). 2) τ is not B◦ and M · e3 : V A |= C 4.3
Judgments and Proof Rules
We now give rules to derive judgments of the form {C}M :Γ ;Λ;Δ;τ u{C }. Those judgments bind u in C , thus u cannot occur freely in C. u is an anchor that has to be seen as the logical counterpart of the value computed by M . There are two kinds of rules: the first one follow the structure of M , the second one are purely logical rules. Definition 20 (Language rules). Let Γ ; Λ M : τ , we define the judgment {C}M :Γ ;Λ;Δ;τ u{C } inductively. Rules are given in Fig. 6 Where in rule [HADJ ], if there exists C such that C ∧ u ≡ C the assertion C [¬ v] is C ∧ ¬ u otherwise it is C ¬ u. In [M EASJ ], the assertion C [−u] is C where all assertions containing u have been deleted. In [ABSJ ], C −x means that x does not occur freely in C. In [V ARJ ], C[u/x] is the assertion C where all free occurrences of x have been replaced by u. Judgment of the purely functional fragment are standard see [BHY05]. We have just modified the way to handle couples in order to ease manipulations, but we could have used projections instead of introducing two different names. Regarding the quantum fragment, rule [CN OT 1J ] has no influences over quantum entanglement since the first argument of the Cnot is in a base state. In rule [CN OT 2J ], C [u ↔ v], is C0 ∧ u ↔ v, with C0 is C where ¬(u ↔ v) has been removed. This rule introduces an entanglement between the two arguments of the Cnot operator. Notice that it is not useful to introduce all entanglement pairs introduced. Indeed, since the entanglement relation is an equivalence relation one can safely add to judgment (see logical rules that follow in def. 21, rule [promote]) statements for transitivity, reflexivity and symmetry of entanglement relation, for instance ∀x, y, z.x ↔ y ∧ y ↔ z =⇒ x ↔ z for transitivity. Indeed any abstract quantum state, by definition, validates those statements which will be implicitly supposed in the following. As we saw in the proof of proposition 2, the phase gate does not change the fact that a quantum bit is in a base state,
Reasoning about Entanglement and Separability
◦
231
◦
{C ∧ u}N :Γ ;Λ;Δ;B ⊗B u, v{C } [CN OT 1J ] {C ∧ u}(Cnot N ) :Γ ;Λ;Δ;B◦ ⊗B◦ u, v{C } ◦
◦
{C}N :Γ ;Λ;Δ;B ⊗B u, v{C } [CN OT 2J ] {C}(Cnot N ) :Γ ;Λ;Δ;B◦ ⊗B◦ u, v{C [∧u ↔ v]} ◦
◦
{C}N :Γ ;Λ;Δ;B v{C } {C}N :Γ ;Λ;Δ;B u{C } [HAD ] [P HASEJ ] J ◦ {C}(H N ) :Γ ;Λ;Δ;B v{C [¬v]} {C}(T N ) :Γ ;Λ;Δ,B◦ u{C }
{C[u/x]}x :Γ ;Λ;Δ,u:τ ;τ u{C}
[V ARJ ]
c ∈ {1, 0} [CON STJ ] {C[u/c]}c :Γ ;Λ;Δ,u:B;B u{C}
{C}M :Γ ;Λ;Δ Γ ; Λ; Δ; B◦ {u}C [M EASJ ] {C}meas M :Γ ;Λ;Δ,v:B;B v{C [−u] ∧ u} {C}M :Γ ;Λ;Δ;B b{C0 } {C0 [1/b]}N :Γ ;Λ;Δ;τ x{C } {C0 [0/b]}P :Γ ;Λ;Δ;τ x{C } [IFJ ] {C}if M then N else P :Γ ;Λ;Δ,u:τ ;τ u{C } {C}M :Γ ;Λ;Δ;σ→τ m{C0 } {C0 }N :Γ ;Λ;Δ;σ n{C1 ∧ {C1 }m • n = u{C }} [AP PJ ] {C}(M N ) :Γ ;Λ;Δ,u:τ ;τ u{C }
{C}λx:σ.M
{C −x ∧ C0 }M :Γ ;Λ;Δ;τ m{C } Γ [−x];Λ[−x];Δ,u:σ→τ ;σ→τ u{∀x.{C }u : 0
• x = m{C }}
[ABSJ ]
{C}M :Γ ;Λ;Δ;τ m{C0 } {C0 }N :Γ ;Λ;Δ;σ n{C [m/u, n/v]} [×J ] {C}M, N :Γ ;Λ;Δ,u:τ,v:σ;τ ⊗σ u, v{C ]} {C}M :Γ ;Λ;Δ;τ1 ⊗τ2 m{C [πi (m)/u]} i ∈ {1, 2} [πJ ]i {C}(πi M ) :Γ ;Λ;Δu:τi ;τi u{C } Fig. 6. Language rules
whereas the Hadamard gate may make him not in a base state, hence explaining the conclusions of rules [HADJ ] [P HASEJ ]. We now give purely logical rules. One may see them as an adapted version of standard first order logic sequent calculus.
232
F. Prost and C. Zerrari
Definition 21 (Logical rules) {C0 }V : u{C0 } C C0 {C}V : u{C }
C0 C
[LOGJ ]
{C}V : u{C } [promote] {C ∧ C0 }V : u{C ∧ C0 } {C ∧ C0 }V : u{C } [ =⇒ ELim] {C}V : u{C0 =⇒ C } {C}M : u{C0 =⇒ C } [∧Elim] {C ∧ C0 }V : u{C } {C1 }M : u{C} {C2 }M : u{C} [∨L] {C1 ∨ C2 }M : u{C} {C}M : u{C1 } {C}M : u{C2 } [∧R] {C}M : u{C1 ∧ C2 } {C}M : u{C −x } [∃L] {∃x.C}M : u{C } {C −x }M : u{C } [∀R] {C}M : u{∀x.C } where C C is the standard first order logic proof derivation (see e.g. [Smu68]), and C −x is an assertion in which x does not occur freely. We now give the soundness result relating Theorem 1 (Soundness). Suppose that {C}M :Γ ;Λ;Δ;τ u{C } is provable. Then for all model M = A, I, abstract quantum state A , abstract value v such that: Γ ;Λ;Δ 1) M |= C. 2) [A, M ] →∗A [A , V ]. 3) v ∈ ΞA . then M · u : v |= C . ,τ Proof. The proof is done by induction on judgment rules. The last judgment rule used can be either a logical or a language one. If it is a logical one, soundness follows from the soundness of first order logic. Observe that we have a value in the promotion rule [promote] thus no reductions are possible and the soundness is vacuously valid. If he last judgment rules used is a language rule, we only consider the quantum fragment (indeed for the functional fragment, the proof follows directly from [BHY05]), thus we have the following cases: – [CN OT 1J ], thus {C}M :Γ ;Λ;Δ;τ u{C } is in facts ◦ ◦ {C1 ∧ u }(Cnot N ) :Γ ;Λ;Δ;B ⊗B u , v {C }. By induction hypothesis we Γ ;Λ;Δ know that if M |= C1 ∧ u , if [A, N ] →∗A [A , V ], and v ∈ ΞA , then ,τ
Reasoning about Entanglement and Separability
–
–
– –
233
M · u , v : vMC . We know that V is a couple of qbits (since judgment is well typed), say qi , qj . Now [A , (Cnot qi , qj )] →A [A, qi , qj ] thanks to rule [CN O1A ] and due to the fact that M |= u . ◦ ◦ [CN OT 2J ], thus {C}M :Γ ;Λ;Δ;τ u{C } is in facts {C}(Cnot N ) :Γ ;Λ;Δ;B ⊗B u , v {C ∧ u ↔ v } we reason similarly as in previous case with the difference that the last abstract operational rule used is [CN O0A ]. ◦ [HADJ ], thus {C}M :Γ ;Λ;Δ;τ u{C } is in facts {C}(H N ) :Γ ;Λ;Δ;B u{C [¬ u]}. By induction hypothesis we know that if M |= C, if [A, N ] →∗A [A , V ], and Γ ;Λ;Δ v ∈ ΞA , then M · u : vMC . Now because judgment is well typed τ is ,τ ◦ B , and V is qi . Thus [A, (H qi )] →A [(R, P \ {qi }), qi ], and clearly M · u : v |= ¬ u, the rest is done by induction hypothesis. [P HASEJ ], thus {C}M :Γ ;Λ;Δ;τ u{C } is direct by induction hypothesis and considering abstract reduction rule [P HSA ]. ◦ [M EASJ ], thus {C}M :Γ ;Λ;Δ;τ u{C } is in facts {C}(meas N ) :Γ ;Λ;Δ;B u{C [−u] ∧ u]}. By induction hypothesis we know that if M |= C, if Γ ;Λ;Δ [A, N ] →∗A [A , V ], and v ∈ ΞA , then M · u : vMC . Now because ,τ ◦ judgment is well typed τ is B , and V is qi . Thus [A, (meas qi )] →A [(R, P ∪ {qi } \ {qi }), 1 0 ], and clearly M · u : v |= u, the rest is done by induction hypothesis.
Example 1. This small example shows how the entanglement logic may be used to analyse non local and non compositional behavior. We want to prove the following statement: {T}P : u{∀x, y, z, t.{x ↔ y ∧ z ↔ t}u • y, z = v{x ↔ t}} where P is the following program λy, z : B◦ .let u, v = (Cnot y, z) in (meas u), (meas v) Then using rule [AP PJ ] we can derive the following judgment on actual quantum bits: {C}(P q2 , q3 ) : u, v{q1 ↔ q4 } where C denotes the following assertion : q1 ↔ q2 ∧ q3 ↔ q4 . This judgment is remarkable in the fact that it asserts on entanglement properties of q1 , q4 while those two quantum bits do not occur in the piece of code analysed. Unlike [BHY05], the separability logic is not complete. Indeed consider the following negation program: N OT = λx.(H (T (T (H x)))). Then one would like to infer the following judgment which is correct: { q1 }(N OT q1 ) : u{ u} but it is not possible due to rule [HADJ ].
5
Conclusion
In this paper we have proposed a logic for the static analysis of entanglement for a functional quantum programing language. We have proved that this logic is safe and sound: if two quantum bits are provably separable then they are not entangled while if they are provably entangled they could actually be separable. We have shown that non local behavior can be handled by our logic.
234
F. Prost and C. Zerrari
The functional language considered includes higher-order functions. It is, to our knowledge the first proposal to do so. It strictly improves over [Per07] on this respect. [Per08] follows the same approach as ours but with a different starting point: abstract interpretation tools are used for the entanglement analysis. Thus, it is possible to deal with potentially infinite loops, but it is done in a first order imperative language. The question of a complete analysis is an open issue. An idea would be to use a more expressive logic, inspired for instance by [CMS06].
Acknowledgments The authors wish to thank Simon Perdrix and Mehrnoosh Sadrzadeh for fruitful discussions and remarks.
References [AG05]
Altenkirch, T., Grattage, J.: A functional quantum programming language. In: 20th IEEE Symposium on Logic in Computer Science (LICS 2005), pp. 249–258. IEEE Computer Society, Los Alamitos (2005) [Bar96] Barber, A.: Dual intuitionistic logic. Technical Report ECS-LFCS-96-347, Laboratory for Foundations of Computer Science, University of Edimburgh (1996) [BHY05] Berger, M., Honda, K., Yoshida, N.: A logical analysis of aliasing in imperative higher-order functions. In: Danvy, O., Pierce, B.C. (eds.) Proceedings of the 10th ACM SIGPLAN International Conference on Functional Programming, ICFP 2005, pp. 280–293 (2005) [CMS06] Chadha, R., Mateus, P., Sernadas, A.: Reasoning about imperative quantum programs. Electr. Notes Theoretical Computer Science 158, 19–39 (2006) [Hoa69] Hoare, T.: An axiomatic basis of computer programming. CACM 12(10), 576–580 (1969) [NC00] Nielsen, M.A., Chuang, I.L.: Quantum Computation and Quantum Information. Cambridge University Press, Cambridge (2000) [Per07] Perdrix, S.: Quantum patterns and types for entanglement and separability. Electronic Notes Theoretical Computer Science 170, 125–138 (2007) [Per08] Perdrix, S.: Quantum entanglement analysis based on abstract interpretation. In: Alpuente, M., Vidal, G. (eds.) SAS 2008. LNCS, vol. 5079, pp. 270–282. Springer, Heidelberg (2008) [Pie02] Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002) [Pro07] Prost, F.: Taming non-compositionality using new binders. In: Akl, S.G., Calude, C.S., Dinneen, M.J., Rozenberg, G., Wareham, H.T. (eds.) UC 2007. LNCS, vol. 4618, pp. 150–162. Springer, Heidelberg (2007) [PZ08] Prost, F., Zerrari, C.: A logical analysis of entanglement and separability in quantum higher-order functions (2008), http://fr.arxiv.org/abs/0801.0649 [Smu68] Smullyan, R.M.: First-Order Logic. Springer, Heidelberg (1968)
Reasoning about Entanglement and Separability [SV05]
[Vid03] [vT04]
235
Selinger, P., Valiron, B.: A lambda calculus for quantum computation with classical control. In: Urzyczyn, P. (ed.) TLCA 2005. LNCS, vol. 3461, pp. 354–368. Springer, Heidelberg (2005) Vidal, G.: Efficient classical simulation of slightly entangled quantum computations. Physical Review Letters 91(14) (2003) van Tonder, A.: A lambda calculus for quantum computation. SIAM Journal on Computing 33(5), 1109–1135 (2004)
On the Brightness of the Thomson Lamp: A Prolegomenon to Quantum Recursion Theory Karl Svozil Institute for Theoretical Physics, Vienna University of Technology, Wiedner Hauptstraße 8-10/136, A-1040 Vienna, Austria
[email protected] http://tph.tuwien.ac.at/~svozil
Abstract. Some physical aspects related to the limit operations of the Thomson lamp are discussed. Regardless of the formally unbounded and even infinite number of “steps” involved, the physical limit has an operational meaning in agreement with the Abel sums of infinite series. The formal analogies to accelerated (hyper-) computers and the recursion theoretic diagonal methods are discussed. As quantum information is not bound by the mutually exclusive states of classical bits, it allows a consistent representation of fixed point states of the diagonal operator. In an effort to reconstruct the self-contradictory feature of diagonalization, a generalized diagonal method allowing no quantum fixed points is proposed.
1
Introduction
Caveats at the very beginning of a manuscript may appear overly prudent and displaced, stimulating even more caveats or outright rejection. Yet, one should keep in mind that, to rephrase a dictum of John von Neumann [1], from an operational point of view [2], anyone who considers physical methods of producing infinity is, of course, in a state of sin. Such sinful physical pursuits qualify for Neils Henrik Abel’s verdict that (Letter to Holmboe, January 16, 1826 [3,4]), “divergent series are the invention of the devil, and it is shameful to base on them any demonstration whatsoever.” This, of course, has prevented no-one, in particular not Abel himself, from considering these issues. Indeed, by reviving old eleatic ideas [5,6], accelerated computations [7] have been the main paradigm of the fast growing field of hypercomputations (e.g., Refs. [8,9,10]). For the sake of hypercomputation, observers have been regarded on their path toward black holes [11,12,13], and automata have been densely embedded [14], to name just two “mind-boggling” proposals. In what follows we shall discuss issues related to the quasi-physical aspects of hypercomputers, or more specifically, accelerated agents or processes approaching the limit of infinite computation. Thereby, we shall not be concerned with issues related to unbounded space or memory consumption discussed by Calude and Staiger [15], although we acknowledge their importance. In analogy to Benacerraf’s discussion [16] of Thomson’s proposal [17,18] of a lamp which is C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 236–246, 2009. c Springer-Verlag Berlin Heidelberg 2009
On the Brightness of the Thomson Lamp
237
switched on or off at geometrically decreasing time delays, Shagrir [19] suggested that the physical state has little or no relation to the states in the previous acceleration process. This argument is not dissimilar to Bridgman’s [2] argument against the use of Cantor-type diagonalization procedures on the basis that it is physically impossible to operationalize and construct some process “on top of” or after a non-terminating, infinite process [20]. The method of diagonalization presents an important technique of recursion theory [21,22,23]. Some aspects of its physical realizability have already been discussed by the author [24,25,26,27]. In what follows we shall investigate some further physical issues related to “accelerated” agents and the operationalizability of the diagonalization operations in general.
2
Classical Brightness of the Thomson Lamp
The Thomson lamp is some light source which is switched off when it is on, and conversely switched on when it is off; whereby the switching intervals are geometrically (by a constant factor smaller than unity) reduced or “squeezed.” By construction, the switching process never “saturates,” since the state always flips from “on” to “off” and then back to “on” again ad infinitum; yet, as this infinity of switching cycles is supposed to be reachable in finite time, one may wonder what happens at and after the accumulation point. The Thomson process can formally be described at intrinsic (unsqueezed, unaccelerated) discrete time steps t; i.e., by the partial sum t 1 for even t, n s(t) = (−1) = (1) 0 for odd t, n=0
which can be interpreted as the result of all switching operations until time t. The intrinsic time scale is related to an extrinsic (squeezed, accelerated) time scale [28, p. 26] τ0 = 0, τt>0 =
t
2−n = 2 1 − 2−t
.
(2)
n=1
In the limit of infinite intrinsic time t → ∞, the proper time τ∞ = 2 remains finite. If one encodes the physical states of the Thomson lamp by “0” and “1,” associated with the lamp “on” and “off,” respectively, and the switching process with the concatenation of “+1” and “-1” performed so far, then the divergent infinite series associated with the Thomson lamp is the Leibniz series [29,30,3,31] s=
∞
(−1)n = 1 − 1 + 1 − 1 + 1 − · · · =
n=0
A
1 . 2
(3)
Here, “A” indicates the Abel sum [3] obtained from a “continuation” of the geometric series, or alternatively, by s = 1−s. As this shows, formal summations of the Leibnitz type (3) require specifications which could make them unique.
238
K. Svozil
Moreover, divergent sums could be valuable approximations of solutions of differential equations which might be even analytically solvable. One of the bestknown examples of this case is Euler’s differential equation [32,4,33] z 2 y +y = z, n which has both (i) a formal solution as a power series fˆ(z) = − ∞ n=0 n! (−z) , which diverges for all nonzero values of z; as well as (ii) an exact solution fˆ(z) = e1/z Ei(−1/z) obtained by direct integration. Ei stands for the exponen∞ tial integral Ei(z) = z e−t /t. The difference between the exact and the series √ solution up to index k can be approximated [4] by |f (z) − fk (z)| ≤ 2πze−1/z , which is exponentially small for small z. To note another example, Laplace has successfully (with respect to the predictions made) used divergent power series for calculations of planetary motion. Thus it is not totally unreasonable to suspect that the perturbation series solutions obtained via diagrammatical techniques [34,35,36] for the differential equations of quantum electrodynamics are of this “well behaved” type. Therefore, at least in principle, the Thomson lamp could be perceived as a physical process governed by some associated differential equation, such as y (1 − z) − 1 = 0, which has an exact solution f (z) = log(1/1 − x); as well as ∞ a divergent series solution fˆ(z) = n=0 (−z)n /n, so that the first derivative of fˆ(z), taken at z = 1, yields the Leibniz series s. If one is willing to follow the formal summation to its limit, then the Abel sum could be justified from the point of view of classical physics as follows. Suppose that the switching processes can be disregarded, an assumption not dissimilar to related concerns for Maxwell’s demon [37]. Suppose further that all measurements are finite in the sense that the temporal resolution δ of the observation of the Thomson lamp cannot be made “infinitely small;” i.e., the observation time is finitely limited from below by some arbitrary but non-vanishing time interval. Then, the mean brightness of the Thomson lamp can be operationalized by measuring the average time of the lamp to be “on” as compared to being “off” in the time interval determined by the temporal resolution of the measuring device. This definition is equivalent to an idealized “photographic” plate or light-sensitive detector which additively collects light during the time the shutter is open. Then, such a device would record the cycles of Thomson’s lamp up to temporal resolution δ, and would then integrate the remaining light emanating t from it. Suppose that δ = 1/2t , and that at the time n=1 2−n = 2 (1 − 2−t ), the Thomson lamp is in the “off” state. Then the “on” and “off” periods sum up to 1 1 s0 = 14 + 16 + 64 + · · · = 13 (4) 1 1 1 s1 = 2 + 8 + 32 + · · · · · · = 23 . By averaging over the initial time, there is a 50:50 chance that the Thomson lamp is “on” or “off” at highest resolution — which is equivalent to repeating the experiment with different offsets – resulting in an average brightness of 1/2, which is identical to the Abel sum. In this way, the Abel sum can be justified from a physical point of view. The use of the Abel sum may not be perceived as totally convincing, as the Abel sum can be affected by changes to an initial segment of the series.
On the Brightness of the Thomson Lamp
239
In a strict sense, this classical physics treatment of the brightness of the Thomson lamp is of little use for predictions of the state of the Thomson lamp after the limit of the switching cycles. One might still put forward that, in accordance with our operationalization of the average brightness, there is a 50:50 probability that it is in state “on” or “off.” Just as for the Thomson lamp discussed above, one needs to be careful in defining the output of an accelerated Turing machine [28,24,25,26,27,38,39,19].
3
Quantum State of the Thomson Lamp
The quantum mechanical formalization of the Thomson lamp presents an intriguing possibility: as quantum information is not bound by two classically contradictory states, the quantum state of the Thomson lamp can be in a superposition thereof. At first glance, the fact that quantum information co-represents contradictory cases appears “mind-boggling” at best. As Hilbert pointedly stated (in Ref. [40, p. 163], he was not discussing quantum information theory): “. . . the conception that facts and events could contradict themselves appears to me as an exemplar of thoughtlessness1 .” Nevertheless, “quantum parallelism” appears to be an important property of quantum information and computation, which is formally expressed by a coherent summation of orthogonal pure states. This property can be used for quantum states which are formally invariant “fixed points” of diagonalization operators. We note a particular aspect of the quantization of the electromagnetic field emanating from the Thomson lamp: the quanta recorded at the photographic emulsion or detector impinge on these light sensitive devices not continuously but in discrete “energy lumps” of Eν = hν = hc/λ, where ν and λ refer to the frequency and wavelength of the associated field mode. We shall also not be concerned with the photon statistics, which would require a detailed analysis of the light source [41]. In what follows, the notation of Mermin [42] will be used. Let |0 = (1, 0) and |1 = (0, 1) be the representations of the “off” and “on” states of the Thomson lamp, respectively. Then, the switching process can be symbolized by the “not” 01 operator X = , transforming |0 into |1 and vice versa. Thus the quantum 10 switching process of the Thomson lamp at time t is the partial product [43, Sect. 5.11] t
I2 for even t, S(t) = Xt = (5) X for odd t. n=0
In the limit, one obtains an infinite product S of matrices with the two accumulation points mentioned above. 1
“. . . mir erscheint die Auffassung, als k¨ onnten Tatsachen und Ereignisse selbst miteinander in Widerspruch geraten, als das Musterbeispiel einer Gedankenlosigkeit.”
240
K. Svozil
The eigensystem of S(t) is given by the two 50:50 mixtures of |0 and |1 with the two eigenvalues 1 and −1; i.e., 1 1 S(t) √ (|0 ± |1) = ± √ (|0 ± |1) = ±|ψ± . 2 2
(6)
In particular, the state |ψ+ associated with the eigenvalue +1 is a fixed point of the operator S(t). These are the two states which can be expected to emerge as the quantum state of the Thomson lamp in the limit of infinity switching processes. Note that, as for the classical case and for the formal Abel sum, they represent a fifty-fifty mixture of the “on” and “off” states.
4
Quantum Fixed Point of Diagonalization Operator
In set theory, logic and in recursion theory [21,44,45,46,22,23], the method of proof by contradiction (reductio ad absurdum) requires some “switch of the bit value,” which is applied in a self-reflexive manner. Classically, total contradiction is achieved by supposing that some proposition is true, then proving that under this assumption it is false, and vice versa. The general proof method thus can be intuitively related to the application of a “not” operation. The following considerations rely on the reader’s informal idea of effective computability and algorithm, but they can be translated into a rigorous description involving universal computers such as Turing machines [45, Chapter C.1]. Assume that an algorithm A is restricted to classical bits of information. For the sake of contradiction, assume that there exists a (suspicious) halting algorithm h which outputs the code of a classical bit as follows: 0 whenever B(X) does not halt, h(B(X)) = (7) 1 whenever B(X) halts. Then, suppose an algorithm A using h as a subprogram, which performs the diagonal argument by halting whenever (case 1) h(B(X)) indicates that B(X) does not halt (diverges), and conversely (case 2) by not halting whenever h(B(X)) indicates that B(X) halts (converges). Self-reflexivity reveals the antinomy of this construction: upon operating on its own code, A reaches at a total contradiction: whenever A(A) halts, h(A(A)) outputs 1 and forces A(A) not to halt. Conversely, whenever A(A) does not halt, then h(A(A)) outputs 0 and steers A(A) into the halting mode. In both cases one arrives at a complete contradiction. Classically, this contradiction can only be consistently avoided by assuming the non-existence of A and, since the only non-trivial feature of A is the use of the peculiar halting algorithm h, the impossibility of any such √ halting algorithm. As has already been argued [24,25,26,27], |ψ+ = (1/ 2) (|0 + |1) is the quantum fixed point state of the “not” operator, which is essential for diagonal arguments, as X|ψ+ = |ψ+ . Thus in quantum recursion theory, the diagonal argument consistently goes through without leading to a contradiction, as h(A(A)) yielding |ψ+ still allows a consistent response of A by a coherent superposition of its halting and non-halting states. It should be noted, however,
On the Brightness of the Thomson Lamp
241
that the fixed point quantum “solution” of the halting problem cannot be utilized. In particular, if one is interested in the “classical” solution of the decision problem whether or not A(A) halts, then one ultimately has to perform an irreversible measurement on the fixed point state. This causes a state reduction into the classical states corresponding to |0 and |1. Any single measurement yields an indeterministic result: According to the Born rule (cf. [47, p. 804], English translation in [48, p. 302] and [49]), when measured “along” the classical basis (observable) {|0, |1}, the probability that the fixed point state |ψ+ returns at random one of the two classical states |0 (exclusive) or |1, is 1/2. Thereby, classical undecidability is recovered. Thus, as far as problem solving is concerned, this method involving quantum information does not present an advantage over classical information. For the general case discussed, with regards to the question of whether or not a computer halts, the quantum “solution” fixed point state is equivalent to the throwing of a fair classical coin [50].
5
Quantum Diagonalization
The above argument used the continuity of quantum bit states as compared to the discrete classical spectrum of just two classical bit states for a construction of fixed points of the diagonalization operator modeled by X. One could proceed a step further and allow non-classical diagonalization procedures. Thereby, one could allow the entire range of two-dimensional unitary transformations [51] iα e cos ω −e−i ϕ sin ω U2 (ω, α, β, ϕ) = e−i β , (8) ei ϕ sin ω e−i α cos ω where −π ≤ β, ω ≤ π, − π2 ≤ α, ϕ ≤ π2 , to act on the quantum bit. A typical example a non-classical operation on a quantum bit is the “square root of √ of √ not” ( X · X = X) gate operator √ 1 1+i1−i X= , (9) 2 1−i1+i which again has the fixed point state |ψ+ associated with the eigenvalue +1. Yet, not all of these unitary transformations have eigenvectors associated with eigenvalues +1 and thus fixed points. Indeed, only unitary transformations of the form [U2 (ω,α, β, ϕ)]−1 diag(1, eiλ )U2 (ω, α, β, ϕ) = 1 −i (α+ϕ) i λ cos2 ω + ei λ sin2 ω e (e − 1) sin(2 ω) 2 = 1 i (α+ϕ) i λ (e − 1) sin(2 ω) ei λ cos2 ω + sin2 ω 2e
(10)
for arbitrary λ have fixed points. Applying non-classical operations on quantum bits with no fixed points −1 iμ iλ [U2 (ω, ϕ) = α, β,i μϕ)] 2 diag(ei λ , e 2)U2 (ω,1α,−iβ,(α+ϕ) e cos ω + e sin ω e ei λ − ei μ sin(2 ω) 2 = 1 i (α+ϕ) i λ e − ei μ sin(2 ω) ei λ cos2 ω + ei μ sin2 ω 2e
(11)
242
K. Svozil Ubs (ω, α, β, ϕ) |0
|0
-HP1 , α + β P3 , ϕ HH HH S(T (ω)) H P2 , β HH HH |1 |1 H - H -
Fig. 1. Quantum gate operating on a qubit realized by a four-port interferometer with two input ports |0, |1, a beam splitter S(T ) with variable transmission T (ω), three phase shifters P1 , P2 , P3 , and two output ports |0 , |1
with μ, λ = 2nπ, n ∈ N0 gives rise to eigenvectors which are not fixed points, and which acquire non-vanishing phases μ, λ in the generalized diagonalization process. For the sake of demonstration of a physical realization, consider an elementary diagonalization operator without a fixed point and with equal phases in the diagonal terms; i.e., μ = λ, thus reducing to diag(eiλ , eiλ ). The generalized quantum optical beam splitter sketched in Fig. 1 can be described either by the transitions [52] P1 : |0 → |0ei(α+β) , P2 : |1 → √ |1eiβ , √ (12) S : |0 → √T |1 + i√R |0 , S : |1 → T |0 + i R |1 , P3 : |0 → |0 eiϕ , where every reflection by a beam splitter S contributes a phase π/2 and thus a factor of eiπ/2 = i to the state evolution. Transmitted beams remain unchanged; i.e., there are no phasechanges. Alternatively, with T (ω) = cos ω and R(ω) = sin ω, the action of a lossless beam splitter may be described by the matrix2 i R(ω) T (ω) i sin ω cos ω = . cos ω i sin ω T (ω) i R(ω) A phase shifter is represented by either diag eiϕ , 1 or diag 1, eiϕ in twodimensional Hilbert space. The action of the entire device consisting of such elements is calculated by multiplying the matrices in reverse order in which the quanta pass these elements [53,54]; i.e., 2
The standard labeling of the input and output ports are interchanged. Therefore, sine and cosine functions are exchanged in the transition matrix.
On the Brightness of the Thomson Lamp bs
U (ω, α, β, ϕ) =
i(α+β) eiϕ 0 i sin ω cos ω 1 0 e 0 0 1 cos ω i sin ω 0 1 0 eiβ i ei (α+β+ϕ) sin ω ei (β+ϕ) cos ω = . ei (α+β) cos ω i ei β sin ω
243
(13)
For this physical setup, the phases ω = π/2, β = λ − π/2 and ϕ = −α can be arranged such that Ubs (π/2, α, λ − π/2, −α) = diag(eiλ , eiλ ). Another example is Ubs (π/2, 2λ, −π/2 − λ, 0) = diag(eiλ , e−iλ ). For the physical realization of general unitary operators in terms of beam splitters the reader is referred to Refs. [55,56,57,58].
6
Summary
In summary we have discussed some physical aspects related to the limit operations of the Thomson lamp. This physical limit, regardless of the formally unbounded and even infinite number of “steps” involved, has an operational meaning in agreement with the formal Abel sums of infinite series. We have also observed the formal analogies to accelerated (hyper-)computers and have discussed the recursion theoretic diagonal methods. As quantum information is not bound by mutually exclusive states of classical bits, it allows a consistent representation of fixed point states of the diagonal operator. In an effort to reconstruct the self-contradictory feature of diagonalization and the resulting reductio ad absurdum, a generalized diagonal method allowing no quantum fixed points has been proposed.
Acknowledgements The author gratefully acknowledges discussions with Cristian Calude, Liam Fearnley andMartin Ziegler, as well as the kind hospitality of the Centre for Discrete Mathematics and Theoretical Computer Science (CDMTCS) of the Department of Computer Science at The University of Auckland.
References 1. von Neumann, J.: Various techniques used in connection with random digits. National Bureau of Standards Applied Math Series 3, 36–38 (1951); reprinted in von Neumann, J.: Collected Works. In: Traub, A.H. (ed.), vol. V, p. 768. MacMillan, New York (1963) 2. Bridgman, P.W.: A physicist’s second reaction to Mengenlehre. Scripta Mathematica 2, 101–117, 224–234 (1934); Cf. R. Landauer [59] 3. Hardy, G.H.: Divergent Series. Oxford University Press, Oxford (1949) 4. Rousseau, C.: Divergent series: past, present, future . . ..(2004) (preprint) 5. Lee, H.D.P.: Zeno of Elea. Cambridge University Press, Cambridge (1936) 6. Salmon, W.C.: Zeno’s Paradoxes. Hackett Publishing Company (1970, 2001) 7. Weyl, H.: Philosophy of Mathematics and Natural Science. Princeton University Press, Princeton (1949)
244
K. Svozil
8. Davis, M.: Why there is no such discipline as hypercomputation. Applied Mathematics and Computation 178, 4–7 (2006) 9. Doria, F.A., Costa, J.F.: Introduction to the special issue on hypercomputation. Applied Mathematics and Computation 178, 1–3 (2006) 10. Ord, T.: The many forms of hypercomputation. Applied Mathematics and Computation 178, 143–153 (2006) 11. Hogarth, M.L.: Does General Relativity Allow an Observer to View an Eternity in a Finite Time? Foundations of Physics Letters 5, 173–181 (1992) 12. Durand-Lose, J.: Abstract geometrical computation for black hole computation. In: Margenstern, M. (ed.) MCU 2004. LNCS, vol. 3354, pp. 176–187. Springer, Heidelberg (2005) 13. N´emeti, I., D´ avid, G.: Relativistic computers and the turing barrier. Applied Mathematics and Computation 178(1), 118–142 (2006); Special Issue on Hypercomputation 14. Schaller, M., Svozil, K.: Scale-invariant cellular automata and self-similar petri nets. The European Physical Journal B - Condensed Matter and Complex Systems (in print, 2009) 15. Calude, C.S., Staiger, L.: A note on accelerated turing machines. CDMTCS preprint nr. 350 16. Benacerraf, P.: Tasks and supertasks, and the modern Eleatics. Journal of Philosophy LIX(24), 765–784 (1962); reprinted in Ref. [6, pp. 103–129] 17. Thomson, J.F.: Tasks and supertasks. Analysis 15, 1–13 (1954); reprinted in Ref. [6, pp. 89–102] 18. Thomson, J.F.: Comments on paul benacerraf’s paper. In: Zeno’s Paradoxes, pp. 131–138. Hackett Publishing Company (1970, 2001) 19. Shagrir, O.: Super-tasks, accelerating Turing machines and uncomputability. Theoretical Computer Science 317(1-3), 105–114 (2004) 20. Hamkins, J.D.: Infinite time turing machines. Minds and Machines 12, 521–539 (2002) 21. Rogers Jr., H.: Theory of Recursive Functions and Effective Computability. McGraw-Hill, New York (1967) 22. Odifreddi, P.: Classical Recursion Theory, vol. 1. North-Holland, Amsterdam (1989) 23. Boolos, G.S., Burgess, J.P., Jeffrey, R.C.: Computability and Logic. Cambridge University Press, Cambridge (2007) 24. Svozil, K.: On the computational power of physical systems, undecidability, the consistency of phenomena and the practical uses of paradoxa. In: Greenberger, D.M., Zeilinger, A. (eds.) Fundamental Problems in Quantum Theory: A Conference Held in Honor of Professor John A. Wheeler. Annals of the New York Academy of Sciences, vol. 755, pp. 834–841. New York Academy of Sciences (1995) 25. Svozil, K.: Halting probability amplitude of quantum computers. Journal of Universal Computer Science 1(3), 201–204 (1995) 26. Svozil, K.: Consistent use of paradoxes in deriving contraints on the dynamics of physical systems and of no-go-theorems. Foundations of Physics Letters 8, 523–535 (1995) 27. Svozil, K.: The Church-Turing thesis as a guiding principle for physics. In: Calude, C.S., Casti, J., Dinneen, M.J. (eds.) Unconventional Models of Computation, Singapore, pp. 371–385. Springer, Heidelberg (1998) 28. Svozil, K.: Randomness & Undecidability in Physics. World Scientific, Singapore (1993)
On the Brightness of the Thomson Lamp
245
29. Leibniz, G.W.: Letters LXX, LXXI. In: Briefwechsel zwischen Leibniz und Christian Wolf, Handschriften der K¨ oniglichen Bibliothek zu Hannover. H. W. Schmidt, Halle (1860) 30. Moore, C.N.: Summable Series and Convergence Factors. American Mathematical Society, New York (1938) 31. Everest, G., van der Poorten, A., Shparlinski, I., Ward, T.: Recurrence sequences. AMS Surveys and Monographs series, vol. 104. American Mathematical Society, Providence (2003) 32. Balser, W.: Formal Power Series and Linear Systems of Meromorphic Ordinary Differential Equations. Springer, New York (2000) 33. Costin, O.: Asymptotics and Borel Summability. Taylor & Francis Group, Boca Raton (2009) 34. Itzykson, C., Zuber, J.B.: Quantum Field Theory. McGraw-Hill, New York (1980) 35. Luri`e, D.: Particles and Fields. Interscience Publishers, New York (1968) 36. ‘t Hooft, G., Veltman, M.: Diagrammar. CERN preprint 73-9 (1973) 37. Leff, H.S., Rex, A.F.: Maxwell’s Demon. Princeton University Press, Princeton (1990) 38. Copeland, B.J.: Even turing machines can compute uncomputable functions. In: Unconventional Models of Computation, pp. 150–164. Springer, Heidelberg (1998) 39. Potgieter, P.H.: Zeno machines and hypercomputation. Theoretical Computer Science 358(1), 23–33 (2006) ¨ 40. Hilbert, D.: Uber das Unendliche. Mathematische Annalen 95(1), 161–190 (1926) 41. Mandel, L., Wolf, E.: Optical Coherence and Quantum Optics. Cambridge University Press, Cambridge (1995) 42. Mermin, N.D.: Quantum Computer Science. Cambridge University Press, Cambridge (2007) 43. Arfken, G.B., Weber, H.J.: Mathematical Methods for Physicists. Academic Press, London (2005) 44. Davis, M.: The Undecidable. Basic Papers on Undecidable, Unsolvable Problems and Computable Functions. Raven Press, Hewlett (1965) 45. Barwise, J.: Handbook of Mathematical Logic. North-Holland, Amsterdam (1978) 46. Enderton, H.: A Mathematical Introduction to Logic, 2nd edn. Academic Press, San Diego (2001) 47. Born, M.: Quantenmechanik der Stoßvorg¨ ange. Zeitschrift f¨ ur Physik 38, 803–827 (1926) 48. Jammer, M.: The Conceptual Development of Quantum Mechanics, 2nd edn. The History of Modern Physics, vol. 12, pp. 1800–1950. American Institute of Physics, New York (1989) 49. Zeilinger, A.: The message of the quantum. Nature 438, 743 (2005) 50. Diaconis, P., Holmes, S., Montgomery, R.: Dynamical bias in the coin toss. SIAM Review 49(2), 211–235 (2007) 51. Murnaghan, F.D.: The Unitary and Rotation Groups. Spartan Books, Washington (1962) 52. Greenberger, D.M., Horne, M.A., Zeilinger, A.: Multiparticle interferometry and the superposition principle. Physics Today 46, 22–29 (1993) 53. Yurke, B., McCall, S.L., Klauder, J.R.: SU(2) and SU(1,1) interferometers. Physical Review A (Atomic, Molecular, and Optical Physics) 33, 4033–4054 (1986) 54. Campos, R.A., Saleh, B.E.A., Teich, M.C.: Fourth-order interference of joint singlephoton wave packets in lossless optical systems. Physical Review A (Atomic, Molecular, and Optical Physics) 42, 4127–4137 (1990)
246
K. Svozil
55. Reck, M., Zeilinger, A., Bernstein, H.J., Bertani, P.: Experimental realization of any discrete unitary operator. Physical Review Letters 73, 58–61 (1994) 56. Reck, M., Zeilinger, A.: Quantum phase tracing of correlated photons in optical multiports. In: Martini, F.D., Denardo, G., Zeilinger, A. (eds.) Quantum Interferometry, pp. 170–177. World Scientific, Singapore (1994) 57. Zukowski, M., Zeilinger, A., Horne, M.A.: Realizable higher-dimensional twoparticle entanglements via multiport beam splitters. Physical Review A (Atomic, Molecular, and Optical Physics) 55, 2564–2579 (1997) 58. Svozil, K.: Noncontextuality in multipartite entanglement. J. Phys. A: Math. Gen. 38, 5781–5798 (2005) 59. Landauer, R.: Advertisement for a paper I like. In: Casti, J.L., Traub, J.F. (eds.) On Limits, p. 39. Santa Fe Institute Report 94-10-056, Santa Fe, NM (1994)
Advances in I/O, Speedup, and Universality on Colossus, an Unconventional Computer Benjamin Wells Departments of Computer Science and Mathematics, University of San Francisco, 2130 Fulton Street, San Francisco CA 94117, USA
[email protected]
Abstract. Colossus, the first electronic digital (and very unconventional) computer, was not a stored-program general purpose computer in the modern sense, although there are printed claims to the contrary. At least one of these asserts Colossus was a Turing machine. Certainly, an appropriate Turing machine can simulate the operation of Colossus. That is hardly an argument for generality of computation. But this is: a universal Turing machine could have been implemented on a clustering of the ten Colossus machines installed at Bletchley Park, England, by the end of WWII in 1945. Along with the presentation of this result, several improvements in input, output, and speed, within the hardware capability and specification of Colossus are discussed. Keywords: Colossus, universal computation, small UTM, preclassical computers.
1
Background
Colossus was the first electronic, programmable, digital computation device.1 Tommy Flowers architected and supervised the building of the first instance (later called Mark 1) of this decryption-support machine at the Post Office Research Station at Dollis Hill, London, in 1943. The machine was dismantled and delivered to Bletchley Park (BP), also north of London, for reassembly that December. Its purpose was to provide statistical evidence of wheel settings for motor-driven, teletypewriter-based cryptographic machines used for Berlin supreme command traffic sent by radio to army headquarters. The British called ciphertext traffic from such machines “Fish,” with individual fish names representing different types of the originating machines. Colossus was employed on Tunny traffic, originating from the Lorenz Schl¨ usselzusatz 40 and 42 (SZ 40, 42) machines. “Tunny” was also used as a nickname for Bletchley Park’s electromechanical and electronic simulations of these German devices. Amazingly, these 1
Claims to the contrary are disambiguated in [7] and especially in [29]. Other historical observations may be found in [2,5,8,10,12,13,14,16,20,21,23].
C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 247–261, 2009. c Springer-Verlag Berlin Heidelberg 2009
248
B. Wells
were built by deduction without ever seeing the original SZ machines.2 The resulting decrypted information (today called “elint”) had the highest strategic and tactical value during the last phases of World War II. In the Colossus era at BP, 63 million characters of Tunny messages were decrypted [1, p. 82]. Numerous accounts of Colossus by designers, builders, and users have appeared, most notably the release of the General Report on Tunny (GRT) [14] in 2000. More may still be protected under the British Official Secrets Act, which also prohibits any catalog of remaining materials. There are many references to the likely hoarding of additional information, and the almost certain dissimulation of even current eyewitness histories. Machines delivered by Dollis Hill after the first Colossus were termed Mark 2. When the war ended, there had been nine such deliveries, with a tenth ready and the twelfth Colossus under construction. It was not completed, and all but two of the twelve were quickly destroyed. The two survived till the late 50s and early 60s. 1.1
Overview of the Architecture
The main features of Colossus of interest here are input, timing, output, and a sketch of its logic and operation. Input. Punched paper tape was used extensively on precursor and auxiliary machines, so it was the input of choice, especially since the input was the output of such a tape-using machine. Five holes across the tape were used to represent Baudot code, with upshift and downshift symbols to afford an alternate character set. There was another row for holes on the tape: the center of the tape was prepunched with small, equidistant holes engaging a sprocket wheel on other types of machines. This wheel transported the tape past optical or mechanical readers and punches. For Colossus, the decision was made to use smooth rollers for faster tape transport and thus faster input, but this would have led to timing problems from speed variations, so the sprocket holes were read optically for a real-time synch signal. The ends of the tape were spliced together and the tape was run in a loop through through the reader by a transport device called the “bedstead.” Even though it needed to be read repeatedly, the prepunched paper tape was the simple, flexible, reliable input mechanism of choice for that era. Timing. The timing signal from the sprocket holes was broadcast to several processing areas. This served as the clock of Colossus. The steady operating speed was 5000 characters read per second. Interrupts might affect the processing, but the tape speed was held steady. Because all processing occurred during the interval between sprocket holes, it is tempting to view all instructions as atomic, single cycle (if in fact one adopts a view that there is any instruction 2
This contrasts with the Ultra/Enigma story in Poland and England, where the general layout of the machines was well known, and captured Enigma codecs helped update the Polish decryption algorithms and mechanisms and their eventual automation on Turing’s Bombe.
Advances in I/O, Speedup, and Universality on Colossus
249
execution). But that is naive. It is more productive to think of the processing as asynchronous and data-driven (see [9]). So several parallel and sequential logical operations took place between timing spikes, but they themselves were not timed. Output. An IBM Electromatic typewriter was adapted to print the values of selected output counters. Clever interrupt mechanisms prevented loss of computational state if the printer got behind. One of the problems with the printer was the slowness of a repeated key, so arbitrary letter keys would be substituted in a sort of contrary-to-run-length encoding. Thus, ab043m25 represented 00043225 (see [8, p. 99]). The typewriter output served the useful purpose of allowing the operator to make an instantaneous assessment of the value of a run, change a parameter, and try again. Logic. This is a tricky subject. Despite the physical rebuild of Colossus at BP dreamed and directed by Tony Sale, there still seem to be some gray areas of exactly what the logic facilities could do. Here is the essential story: characters read off the paper tape are compared with characters generated by twelve thyratron rings that simulate the twelve wheels of the Lorenz machines. Aside from some small buffers and registers, the rings were the memory installed in Colossus. They were configured by plugwiring, as were many of the logical operations. The plugwires were, in essence, the instructions (see [29, pp. 137–138]).
2
Input-Output Improvements
Paper tape was not necessarily limited to input data. GRT lists fantasy improvements [14, p. 331] wished for future Colossi, including setting the triggers electronically from punchcards. The GRT [14, pp. 326, 351] refers to a five-row punch on Colossus #6, so on that machine it seems that paper tape could have served as intermediate storage as well as output. This may have been a step toward empowering Colossus to reconfigure itself based on run results, or to switch its behavior automatically to that of a decryption device.3 Colossus might eventually have had a fully electrical configuration loaded from paper tape, already the case with the support machine Aquarius.
3
Speed Advances
The first recommendation for speeding up the processing in Colossus originated with Flowers [10]. This is “overclocking” by running the tape faster. Even at 15–18 KHz, the vacuum tubes would have operated within heat limits according to Chandler in [3]. This could not be done with a paper tape, for 10 KHz speed 3
Most authors deny or ignore using Colossus as a Tunny substitute, but according to Cragon [8, p. 93], its own results were often used to set the thyratron rings up as Lorenz wheels, and it decrypted German cipher text at a much higher rate than obtainable on a dedicated Tunny machine.
250
B. Wells
would reliably break the tape (contrary to rumor, it would not set it ablaze). But a stationary, pulsing light source could generate the timing signal, with no rewiring, if internal speed were the only consideration. The speed of Colossus actually compares well with the first home computer kits running the Intel 4004 CPU chip at 108 KHz. That chip performed 60,000 instructions a second, only about six times faster than a cranked-up Colossus. Another legend on Colossus speed holds that a simulation on the first Pentium microprocessor ran at half the speed of the BP machine. That Pentium ticked at 60 MHz, so the relatively slow simulation may be an artifact of the programming language used rather than a quality of Colossus. Besides pointless exercises like making the holes smaller and rows closer together, input acceleration could be achieved by using fully optical input as well as synch. This raises the question of how the optical input could be generated without reading it from tape. Flowers considered an answer, perhaps like the following.4 The tape can be viewed as simply a very big wheel, apart from the timing, It could be implemented, in principle, in a monster thyratron ring. In practice, if there were an automated input stream, it and the clocking signals derived from it could be wired directly to Colossus, bypassing the optical reader (now no longer necessary). The final speedup suggestion comes from parallel processing introduced on Mark 2 Colossi. The simultaneous reading of six hole-positions running lengthwise along the tape had no engineering solution at the time (two character columns across the tape were already read by Mark 1 and precursors of Colossus). According to Flowers [10], it was decided to serialize the process slightly by storing six successive characters from the tape reader in five 6-bit shifting and delaying buffers, one for each tape row, or impulse. These shift registers then delivered six 5-bit characters to the ALU: five pairs of characters to the five independent logical processors—in other words, to five parallel copies of the current program. The data tapped off from the shift registers were sent to the same, identically parallel cryptanalytic program in analogy with present-day SIMD, or singleinstruction, multiple-data parallel computers. Flowers indicated that switch panels were configured to facilitate this parallel programming. But if it was the same program, then why process each pair five times as it moved along the delay chain in the shift register? Because at each stage, new data arrived from the simulated Tunny machine embodied in the thyratron ring assembly. The operation of the machine was not only parallel but also interlaced in the same way that modern “pipelines” interlace instructions. Another style of parallel computing was feasible. In the above description, these cryptanalytic programs were wired separately; today, they might be forks or clones of a master program, but back then nothing prevented their being set 4
Flowers did initially consider a tapeless machine, with the encrypted message as well as the wheel-data setup internally, but did not pursue the idea. [6]
Advances in I/O, Speedup, and Universality on Colossus
251
up as different programs. Because this could happen unintentionally, the parallel programming required special care (according to Flowers’s account in [10]). The parallel streams of data from the shift registers could be directed to separate and different logical manipulations performed by distinct programs running simultaneously (and synchronously). Apart from the lockstep clocking, this resembles the programming of MIMD, or multiple-instruction, multiple-data parallel computers, exemplified by modern multicore PCs, clusters of workstations, and networked distributed processors. SIMD or MIMD, it is like five copies of Colossus I running at once. In the first case, they compute the same thing on different data; this is the only parallel use described by Flowers. But the second style of parallel computing was at least feasible, and the point was made that the five “submachines” were capable of even running five different cryptographic methods on the same or different input characters. Two completely different parallelisms are demonstrated by the “multiple test” feature discussed in GRT [14, pp. 337, 342, 345–350] and implemented by Sale in the rebuild [19]. This took a single letter from the input tape, but used the current and four previous bits from a chosen wheel for five simultaneous calculations feeding to the five output counters. The saved bits could also be in delta form, representing the Boolean symmetric difference or XOR between successive characters. Thus, in the Colossi so equipped, thyratron ring output could be buffered for six cycles. Curiously, Flowers [10] does not mention multiple testing directly, while GRT has only two vague references [14, p. 337] to the “multiple reading” shift-buffer parallelism outlined above, described by Flowers, and discussed by the author in [29, pp. 133–136]. According to GRT [14, p. 345], the two parallel modes are incompatible, although both could take advantage of 5-stepping. This may be an early example of the frequently encountered gulf between architect and user. One resolution is that multiple testing and reading both occurred in some fashion, despite no description from users or builders of how that might work. Another more fantastic yet plausible solution is that Flowers was dissimulating, seventeen years before the release of GRT.5 When documents emerge from the cover of the Official Secrets Act, there is no indication of how much is still left behind, even now. GRT was an internal and secret document at the time, but in the public IEEE paper, Flowers may have wished to indicate parallellism while concealing its usage and whereabouts. If both types of parallelism could coexist, then a 25-time speedup could result from them. At any rate, given overclocking at an input rate of 18 Khz (not with paper tape) and the guaranteed 5-time parallel speedup, Colossus is now only 17% slower than the 4004 chip in processing speed.
5
There are several instances where Colossus cognoscenti have been coy about what was really there. See Cragon [8] for another account of the parallelism in today’s terminology and for suggestions of dissimulation.
252
4
B. Wells
Universality
Colossus had many instances of conditional branching. There is no evidence, however, that the power and flexibility of explicit program instruction branching was considered by the designers. While this is only one aspect (a special case) of conditional branching, it is the one of main importance when discussing the generality of computation. Colossus did not have this one.6 This is why a demonstration of universality is crucial—without the program control branching structure, the standard argument of equivalence by language fails. But universal Turing machines (UTMs) were on the founders’ minds. Michie says [1, p. 83], “The innovative design specification that was my personal contribution, made in April 1944 under pressure of cryptanalytic need, not only led to a radical lastminute enhancement in the construction of Colossus 2 and an ensuing program to manufacture as many as possible, but it also endowed the machine with a degree of general-purpose programmability, thus moving it a little towards the UTM model.”7 He also points there to Timms’s postwar programming of a Colossus to perform multiplication, limited to what could be accomplished in a single machine cycle, as demonstrating “the in-principle applicability of the later Colossi to problem domains far beyond the original.” 4.1
Installing a UTM on Colossus
After graduate students at the University of San Francisco built a Lisp and Java simulation of Colossus, the author realized that a small UTM might run on the original machine—and might be demonstrable on our simulators. In the abstract [28], the UTM of choice was Watanabe’s (5,4) creation (the first number counts the states, the second, the symbols; this is the prevalent convention). But at the time, Watanabe’s article [25] was not obtainable, and only later did it become clear that this machine, as well as his (6,5) machine of [24], require a periodic background, i.e., the right-infinite tape is preprinted beyond the input string with a periodic sequence of tape symbols (typically a repetition of the particular encoded input). In practice, when the machine gets to the right end of the tape, instead of a single blank cell8 being added, the entire periodic block is attached. Once Watanabe introduced this notion, later called semi-weak universality by Woods and Neary [31], it was not a hard leap to Alex Smith’s proof [22] that Wolfram’s (2,3) machine [30, p. 709] is universal when it has a particular easily computable nonperiodic background. 6 7
8
Sources include both sides: engineers and users. In particular, Michie as user, and later engineer, has said Colossus could not loop. This language portrays a popular view that UTM is simply another way of phrasing “general purpose programmable computer” and does not refer to the specific technique of having one Turing machine simulate any other machine M via an initial input of an encoding of M . See [17] for a history of these. The blank cell is in fact a cell preprinted with the designated “blank” character of the alphabet, so every Turing machine could be said to have a periodic background.
Advances in I/O, Speedup, and Universality on Colossus
253
Smith’s nonblank background was recently troublesome for the Foundations of Mathematics community [11], some of whom found that leap to be across a great chasm. It also presented new problems (even when periodic) of tape synchronization and compact tape operations for the Colossus implementation. Earlier ideas of working with blank tape had to be adjusted, with no easy answer on how to maintain the computational configuration without being able to copy it onto that ever expanding right-infinite tape. The objection is not based on the difficulty of providing additional prepunched tape, for the prepunched sprocket holes on teletype tape or the preprinted “blank” squares we imagine on Turing tape have the same flavor. The difficulty arises from using paper tape that cannot be unpunched. Then Hewitt’s (3,2) machine appeared online [18]. It is based on Wolfram’s (5,2) Rule 110 UTM [30, pp. 685–714]. Hewitt’s UTM uses a blank background, but assumes the tape is circular, and when the right end is passed, a new cell appears, followed immediately to the right by the left end of the tape. The applicability to the Colossus situation is obvious, because its preferred operation is with a tape loop input. It is no more of a philosophical burden to splice a blank square into the loop than it is to extend the usual Turing machine tape to the right. 4.2
Tracer Turing Machines
Before we discuss the tape-handling technique that avoids “unpunching,” we need to consider tracer Turing machines. Given a target TM M , the tracer TM is built to take the input to M , simulate M ’s action on it, and write the result as a new copy of M ’s input block, modified by M ’s first action, in the blank space to the right of this input block. This continues as long as M runs, with record after record of M ’s actions written sequentially on blank space. The construction and use of tracers is fully defined and exploited in the author’s [26,27]. Here is an illustration of the tracer’s method for Colossus tape handling in implementing any small UTM (blank background) with four symbols or fewer. The paper tape has five rows running lengthwise. Across the tape lie many columns of five punch sites, with punched holes represented by black dots below. Ignoring the sprocket holes, it can look like this:
◦ ◦ ◦ • •
• ◦ • • •
• • ◦ • •
• ◦ ◦ • •
◦ • ◦ • •
◦ ◦ ◦ ◦ ◦
◦ • ◦ ◦ ◦
• • ◦ ◦ ◦
◦ • ◦ ◦ ◦
◦ ◦ ◦ • ◦
◦ • ◦ ◦ •
• • • ◦ •
• ◦ ◦ ◦ •
◦ • ◦ ◦ •
◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦
··· ··· ··· ··· ···
UTM data bit 2 UTM data bit 1 UTM head signal bit 2 signal bit 1
Fig. 1. Tape configuration in middle of first record creation. Heads move right.
254
B. Wells
◦ ◦ ◦ • •
• ◦ • • •
• • ◦ • •
• ◦ ◦ • •
◦ • ◦ • •
◦ ◦ ◦ • •
◦ • ◦ • •
• • ◦ • •
◦ • ◦ • •
◦ ◦ ◦ • •
◦ • ◦ ◦ •
• • • ◦ •
• ◦ ◦ ◦ •
◦ • ◦ ◦ •
◦ ◦ ◦ ◦ •
◦ • ◦ ◦ •
• • ◦ ◦ •
◦ • ◦ ◦ •
◦ ◦ ◦ • ◦
◦ ◦ ◦ ◦ ◦
··· ··· ··· ··· ···
UTM data bit 2 UTM data bit 1 UTM head signal bit 2 signal bit 1
Fig. 2. Tape configuration immediately after creation of first record
The signal bits are interpreted as 0 = blank (no signal), 1 = in use, 2 = end of record mark, 3 = ignore (like the teletype erase of five punches). An ignore signal in an otherwise unpunched column delimits the left end and an end-of-record punch in an otherwise blank column marks the right end of the current record and, initially, the input string. The head position is marked in the head row. The head begins at the leftmost character of the input. Data is represented by two bits in the top two rows, supporting a UTM alphabet of four or fewer symbols. The in-use mark lets us know when an otherwise blank column is in fact part of the copied record and helps with scanning the tape loop. Fig. 1 shows the resulting tape configuration after execution of a UTM quintuple q0 , 2, 1, R, q1, where the initial input starts with 2, and the copying has proceeded past the fourth character of an 8-character UTM input 23210131, but before the fifth character is encountered on the tape loop. Fig. 2 shows the configuration after the completion of the first record. The last ignore now marks the left end of the record, whose right end is followed by a new end-of-record mark, with blank tape beyond. A right UTM head move going past the end of the loop (i.e., into the ignored stretch) causes a blank column to be added, then punched with the UTM head mark. A left UTM head move means the head mark is punched one column earlier than the new UTM print character, but that is feasible because the punch head is arranged to lag the read head by a fixed number of characters (at least one).9 During record creation, the tracer will also move past the right end, with a new blank column appearing, by the usual Turing magic, before the equally magical landing on the start of the tape loop. That happens for the tracer every time around the loop. It also happens for the interpreted UTM at record completion after the tracer moves the head it has moved into right blankspace on a newly punched character, starting what appears to it as the beginning of its own tape loop. This shows how to accommodate small alphabets, but interlacing of columns could allow an alphabet of 32 characters (as a full teletype column) or, more awkwardly, an arbitrary alphabet. There is another approach to an expanded alphabet. In many Bletchley Park teletype applications, a 62 character alphabet was used, 9
Presumably, if Colossus were endowed with a tape punch, this would not be located near the read head, partly to prevent vibration from contaminating input. So we just arrange for the tape to pass the punch head after the read head, separated by a fixed length of tape.
Advances in I/O, Speedup, and Universality on Colossus
255
the Baudot code embracing two banks of 31 characters each, accessed by two latching upshift and a downshift characters. This will inspire a simplification later. 4.3
Tracing the Hewitt Machine
With the Hewitt (3,2) machine, only one data row is necessary, and signaling can be more streamlined, as in Fig. 3, showing record creation with UTM quintuple q0 , 0, 1, R, q1, and the fourth character of the 8-character input 01100011 already copied. Fig. 4 shows the result after completion of the first record. In approaching one embodiment of Hewitt’s machine on Colossus, it is useful to restrict the tape to data on four rows only, which can be done by taking advantage of the last two schemes. Fig. 5 shows what Fig. 3 becomes.
◦ ◦ ◦ ◦ •
◦ • ◦ ◦ •
• ◦ ◦ ◦ •
• ◦ ◦ ◦ •
◦ ◦ ◦ ◦ •
◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦
• ◦ ◦ ◦ ◦
• ◦ ◦ ◦ ◦
◦ ◦ • ◦ ◦
• ◦ ◦ • ◦
• • ◦ • ◦
• ◦ ◦ • ◦
◦ ◦ ◦ • ◦
◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦
··· ··· ··· ··· ···
UTM data bit UTM head end of record in use ignore
Fig. 3. Tape configuration in middle of first record creation. One data bit.
◦ ◦ ◦ ◦ •
◦ • ◦ ◦ •
• ◦ ◦ ◦ •
• ◦ ◦ ◦ •
◦ ◦ ◦ ◦ •
◦ ◦ ◦ ◦ •
◦ ◦ ◦ ◦ •
• ◦ ◦ ◦ •
• ◦ ◦ ◦ •
◦ ◦ • ◦ •
• ◦ ◦ • •
• • ◦ • •
• ◦ ◦ • •
◦ ◦ ◦ • •
◦ ◦ ◦ • •
◦ ◦ ◦ • •
• ◦ ◦ • •
• ◦ ◦ • •
◦ ◦ • ◦ ◦
◦ ◦ ◦ ◦ ◦
··· ··· ··· ··· ···
UTM data bit UTM head end of record in use ignore
Fig. 4. Tape configuration after creation of first record
◦ ◦ ◦ • •
◦ • ◦ • •
• ◦ ◦ • •
• ◦ ◦ • •
◦ ◦ ◦ • •
◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦
• ◦ ◦ ◦ ◦
• ◦ ◦ ◦ ◦
◦ ◦ ◦ • ◦
• ◦ ◦ ◦ •
• • ◦ ◦ •
• ◦ ◦ ◦ •
◦ ◦ ◦ ◦ •
◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦
··· ··· ··· ··· ···
UTM data bit UTM head [not used] signal bit 2 signal bit 1
Fig. 5. Tape configuration in middle of first record creation. Two signal bits.
256
B. Wells
◦ ◦ ◦ • •
◦ • ◦ • •
• ◦ ◦ • •
• ◦ ◦ • •
◦ ◦ ◦ • •
◦ ◦ ◦ • •
◦ ◦ ◦ • •
• ◦ ◦ • •
• ◦ ◦ • •
◦ ◦ ◦ • •
• ◦ ◦ • •
• • ◦ • •
• ◦ ◦ • •
◦ ◦ ◦ • •
◦ ◦ ◦ • •
◦ ◦ ◦ • •
• ◦ ◦ • •
• ◦ ◦ • •
◦ ◦ ◦ • ◦
◦ ◦ ◦ ◦ ◦
··· ··· ··· ··· ···
UTM data bit UTM head [not used] signal bit 2 signal bit 1
Fig. 6. Tape configuration after creation of first record
Fig. 6 shows the result after completion of the first record on blankspace. The middle row was chosen as the blank row for a purpose to be described shortly. This method of tape handling is one of three plausible approaches. The least in keeping with our goal is to massively rewire Colossus, so this is simply the way the hardware works. The second involves using two Turing machines: one performs the record copying and the other is the UTM running as a sort of subroutine. That was suggested in [28], but it seems to fail both to account for left head movement of the UTM and to implement UTM printing correctly. The method described here assumes the UTM is run interpretively by the tracer, itself a larger Turing machine. How much larger? In the case of the Watanabe (5,4) machine, it was thought at the time of [28] that six to seven times as many quintuples as its own 18 would be adequate, with both machines just fitting on the combined 120 thyratron rings of the ten installed at BP (forget Dollis Hill). In fact, the tracer version for even the smallest Watanabe machine would have been much larger, probably in the thousands of quintuples. With the Hewitt (2,3) machine, an initial guess of 111 turned out not to be far off for the number of quintuples needed to handle record maintenance, simulate the six quintuples of the target machine, and implement the fast-forward through ignored characters to bring the small machine back to the start of what it sees as its own tape loop. That would fit on a cluster of the ten Colossi housed at BP. The contention at the time of [28] was that the clustering and hardware modifications (beyond including the inline tape punch, drivers, and transport) could have been accomplished in an evening by Tommy Flowers and a soldering iron. State Read Print Next 1 0 0 1 1 1 1 2 2 0 1 1 2 1 1 3 3 0 1 1 3 1 0 3 s b sb [sb] Fig. 7. Quadruples for the right-moving Hewitt machine H
Advances in I/O, Speedup, and Universality on Colossus
257
Specifics for H. We now consider several different approaches to capturing the Hewitt machine H on Colossus. Fig. 7 lists the quadruples for H. Only quads are necessary, because the head motion is always to the right. The symbols at the bottom of the list will be used in the schematic outlines of the tracers. A quad list for a tracer TH embodying H is given in Fig. 8. Besides the symbols at the bottom of Fig. 7, the following abbreviations are used. s b, c G H U R O
a variable over the three H states, variables over the input-output alphabet of H = {0, 1} the iGnore symbol the H Head position symbol the in Use symbol the end of Record symbol blank column
The states have parameters representing some or all of H-state, H-symbol read, H-symbol printed. Thus an expression like q3sbc represents 12 distinct states. The ¬ sign is used to mean the state is reading a different letter; e.g., reading ¬G is reading any non-ignore input. A print code like cHU means that all three symbols will be punched in that column on the tape. The state count (SC) and quad count (QC) for each abbreviated template line are given at the right. State q0 q1sb q1sb q2sbc q2sbc q3sbc q3sbc q4sc q5s q5s q6s q6s q6s q7sb q7sb q8sb q8sb q9sb sb q10
Read bH c¬R R ¬R R U ¬U O
Print Next [1b]b G q1 G q2sbc G q9sb O q2sbc O q3sbc O q3sbc sbU q4sc cHU q5s
¬G O G O G O b¬G¬H G b¬GH G ¬R O R O U O ¬U sbU O O
q5s q6s q6s q7sb [sb]b q1 q7sb q8sb q8sb q5s
sb R q10 [sb] sbHU q5
SC QC 1 2 6 12 6 12 12 12 12 12 12 6 6 3 3
6 6
6 6
Fig. 8. The right-moving tracer TH
3 3 3 6 6 6 6 6 6 6 6
258
B. Wells
The reader may wonder about the low quad count, for example when reading ¬G. Here is where the hardware in Colossus is a saving grace. Colossus was built to afford masking logic, so G and ¬G, which really stand for 8 and 24 tape symbols of T1 respectively, can be handled as just two symbols. Another concern may be the printing of O (all zeroes). This just means the column is left untouched, punched as it was. It will be seen that in this version of TH , many state-patterns carry the H-state parameter. This inflates the totals to 67 states and 131 quads. Thus we need seven bits to code the state address. Economizing. Here is a way to save states at the cost of a larger alphabet. Instead of just marking the head position in the fourth tape row, we now use the third and fourth rows to write the state of H at the current head position. Fig. 9 shows the resulting smaller tracer T1 . Note that the numbering of the base states is the same, but there are fewer “flavors” of some of them. The new column labeled Bank will be discussed shortly. Some points about operations must be made. State 1 is the start state for H, and T1 starts in state q0 . The savvy reader may wonder where the halt state for T1 is (there is room for it). But H has no halt state, so T1 does not inherit one; this attribute of very small UTMs must be left to those who care more. In T1 , 55 states and 105 quads are used. This means that six bits are sufficient to address states, although now 5 bits are needed for characters. Either way, the State q0 q1sb q1sb q2sbc q2sbc q3sbc q3sbc q4sc q5 q5 q6 q6 q6 q7b q7b q8b q8b q9sb sb q10
Read bH1 c¬R R ¬R R U ¬U O
Print Next Bank [1b]b G q1 1 G q2sbc 1 G q9sb 1 O q2sbc 1 O q3sbc 1 O q3sbc 1 sbU q4sc 1 cHs U q5 1∗
¬G O G O G O bH0 ¬G G bHs ¬G G ¬R O R O U O ¬U sbU O O
R sbHs U
q5 q6 q6 q7b
[sb]b
q1 q7sb q8b q8b q5
sb q10 q5
SC QC 1 2 6 12 6 12 12 12 12 12 12 6 6
2 2 2 2 2∗ 2 2 2 2
1
1 2
6 6
Fig. 9. The reduced-state tracer T1
1
2 2
1 1 1 2 6 2 2 2 2 6 6
Advances in I/O, Speedup, and Universality on Colossus
259
bits to code a quad remain at 22 = 7+4+4+7 = 6+5+5+6. Because we plan to store one quad on each thyratron ring, T1 has the advantage of fitting on the 120 rings of the original ten installed Colossi. The smallest ring has 23 bits, so this is sufficient, and we don’t have to bring in additional cluster nodes from Dollis Hill. Or it may turn out that using the two motor wheels is not attractive (when we know more about Colossus internals), and then we can just use the 120 chi and psi rings on the full dozen cluster. We can reduce the quad coding with a hardware adjustment that uses two banks of states, according to the bank number in Fig. 9. The switches between banks occur at the ∗ calls. This is reminiscent of the Baudot bank shift. The first bank has 31 states, which even leaves room for switching via a dummy state, except that may entail a timing problem. The second bank has 24 states. With the banks, state addressing requires only five bits, so the T1 quads are uniformly codable with 5+5+5+5 = 20 bits. 4.4
Implementation
It is time to discuss how T1 could be stored and executed on Colossus. As mentioned above, a general plan is to store one quad per thyratron ring. Two state addressing schemes are plausible. A modern method is hardware decoding of the next state in the quad code, which might save storing the first component of the quad and reducing the space needed per LOC to 15 bits. But there is little hardware support in Colossus for this scheme. Because there was no addressable internal program or data memory, there was no mechanism for such addressing. An even more modern method, which is harmonious with Colossus thinking and supported by the hardware, is to harness the flexible Boolean matching logic to perform an associative search through the quad codes. This style has already been alluded to in suggesting how to employ read masking. How are the print character and next state stored? Colossus provides an output counter (or even printer buffer) for the first, say on some designated node, and the second could be stored on another node’s print buffer. But it may be better to recirculate next state code directly into the shift buffer associated with multiprocessing for the next round of associative search. With all of this decoding, searching, and retrieving, it appears that more than one processing cycle may be required per T1 character. In keeping with the original design, the best way to do that is to restructure the tape layout and reading process to allow a fixed number of blank columns (additional clock ticks) between T1 characters. When a T1 character is read, it is sent to all nodes in the cluster, and all perform the same processing from all quads each stores. The results of the “right” one are collected as the output and next state. Resetting the rings after each character is processed can be accomplished under internal control. In the original machine, the reset was accomplished by a special tape punch between the fourth and fifth rows. Colossus Mark 1 read two characters at a time from the tape, mimicking its precursor, the Heath-Robinson machine, which had no input buffer for taking deltas. With shift buffers built in, the Mark 2s read only one character at time.
260
B. Wells
For uniformity of hardware in parallelism and input buffering, we may want to cluster only the ten built Mark 2s. Colossus can typically retrieve five successive bits across the five rings in each of the chi and psi gangs. While we have suggested that each ring store one quad, we can also take advantage of the built-in parallelism to stripe the quad codes across a gang of five rings. Then the chi gang, with 23 bits on the smallest ring, could store five quads (no improvement). The psi gang, with 43 bits on the smallest ring, could store ten quads. The two motor rings with 37 and 61 bits could store three, serially. So each node could house 18 quads. The bits on a ring (called the ring’s “trigger”) were set by special U-link jumpers in Colossus Mark 1 and by standard plug cords in later models. As many as seven different triggers could be preset and selected by the operator; two could be in effect at once. And there was the mention of automated trigger setting from punchcards in GRT [14, p. 331]. One can imagine a resulting sevenfold space reduction that would allow 126 quads per node. In this fantasy, T1 could be implemented on a single Mark 2! With all of the tape looping, even ignoring the minor burden of spacing out the T1 characters on the tape, this would not be a fast implementation of a UTM. If the goal is Colossus universality, it is better to think like a tortoise, not a hare. Earlier musings on the effort to construct this computationally universal Colossus cluster need to be reconsidered: maybe it would take Flowers, Coombs, and Chandler all working for a week, with armfuls of schematics and more than one soldering iron. Acknowledgments. I am deeply grateful to the University of San Francisco Faculty Development Fund, for sponsoring participation in UC09 and for providing stipends to the graduate research assistants who developed the Colossus simulator and worked briefly on the UTM project; the UC09 organization, for cheerful and brilliant organization; Mike Stannett, for inclusion in Hypernet and the invitation to participate in the Hypercomputation Workshop at UC09; Jack Copeland, for starting me on the path to hypercomputation in 2000 and to Colossus soon after; Vaughan Pratt, for the gift of the Hewitt machine and other useful discussions on small UTMs; and the One True Being, for being.
References 1. Andresen, S.L.: Donald Michie: Secrets of Colossus Revealed. IEEE Intelligent Systems, 82–83 (November/December 2001) 2. Beckman, B.: Codebreakers: Arne Beurling and the Swedish Crypto Program during World War II. American Mathematical Society, Providence (2000) 3. Chandler, W.W.: The Installation and Maintenance of Colossus. IEEE Annals Hist. Computing 5, 260–262 (1983) 4. Coombs, A.W.M.: The Making of Colossus. IEEE Annals Hist. Computing 5, 253– 259 (1983) 5. Copeland, B.J.: Colossus: Its Origins and Originators. IEEE Annals Hist. Computing 26, 38–45 (2004)
Advances in I/O, Speedup, and Universality on Colossus
261
6. Copeland, B.J.: Personal communication (2005) 7. Copeland, B.J. (ed.): Colossus: the Secrets of Bletchley Park’s Codebreaking Computers. Oxford University Press, Oxford (2006) 8. Cragon, H.G.: From Fish to Colossus. Cragon Books, Dallas (2003) 9. Fant, K., Brandt, S.: Null Convention Logic, a Complete and Consistent Logic for Asynchronous Digital Circuit Synthesis. In: Proceedings of the International Conference on Application Specific Systems, Architectures, and Processors (ASAP 1996), pp. 261–273. IEEE Computer Society Press, Los Alamitos (1996) 10. Flowers, T.H.: The Design of Colossus. IEEE Annals Hist. Computing 5, 239–252 (1983) 11. Foundations of Mathematics archive (October 2007), http://www.cs.nyu.edu/pipermail/fom/2007-October/thread.html 12. Fox, B., Webb, J.: Colossal Adventures. New Scientist 154/No.2081, 38–43 (1997) 13. Gannon, P.: Colossus: Bletchley Park’s Greatest Secret. Atlantic Books, London (2006) 14. Good, I.J., Michie, D., Timms, G.: General Report on Tunny. National Archives/ Public Records Office, HW 25/4 and HW 25/5 (1945) 15. Good, I.J.: Early Work on Computers at Bletchley. IEEE Annals Hist. Computing 1, 38–48 (1979) 16. Good, I.J.: Pioneering Work on Computers at Bletchley. In: Metropolis, N., Howlett, J., Rota, G.-C. (eds.) A History of Computing in the Twentieth Century, pp. 31–46. Academic Press, New York (1980) 17. Herken, R. (ed.): The Universal Turing Machine: A Half-Century Survey, 2nd edn. Springer, New York (1995) 18. Hewitt, A.: Universal computation with only 6 rules (2007), http://forum.wolframscience.com/showthread.php?threadid=1432 19. Sale, T.: Personal communication (2009) 20. Singh, S.: The Code Book. Anchor Books, New York (1999) 21. Small, A.W.: The Special Fish Report (1944) 22. Smith, A.: Universality of Wolfram’s 2, 3 Turing Machine (2008), http://www.wolframscience.com/prizes/tm23/TM23Proof.pdf 23. Tutte, W.T.: FISH and I. Department of Combinatorics and Optimization monograph 98-39, University of Waterloo (1998) 24. Watanabe, S.: 5-Symbol 8-State and 5-Symbol 6-State Universal Turing Machines. J. ACM 8, 476–483 (1961) 25. Watanabe, S.: 4-Symbol 5-State Universal Turing Machines. Journal of the Information Processing Society of Japan 13, 588–592 (1972) 26. Wells, B.: Pseudorecursive Varieties and Their Implications for Word Problems. Doctoral dissertation, University of California Berkeley (1982) 27. Wells, B.: Pseudorecursive Varieties of Semigroups—I. Int. Journal of Algebra and Computation 6, 457–510 (1996) 28. Wells, B.: A Universal Turing Machine Can Run on a Cluster of Colossi. Abstracts Amer. Math. Soc. 25, 441 (2004) 29. Wells, B.: The PC-User’s Guide to Colossus. Invited chapter on the architecture of Colossus in [7], 116–140 (2006) 30. Wolfram, S.: A New Kind of Science. Wolfram Media, Champaign (2002) 31. Woods, D., Neary, T.: The Complexity of Small Universal Turing Machines: A Survey. Theoretical Computer Science 410, 443–450 (2009)
Membrane Dissolution and Division in P Damien Woods1 , Niall Murphy2 , Mario J. P´erez-Jim´enez1, and Agust´ın Riscos-N´ un ˜ ez1 1
2
Research Group on Natural Computing, Department of Computer Science and Artificial Intelligence, University of Seville, Spain Department of Computer Science, National University of Ireland Maynooth, Ireland
Abstract. Membrane systems with dividing and dissolving membranes are known to solve PSPACE problems in polynomial time. However, we give a P upperbound on an important restriction of such systems. In particular we examine systems with dissolution, elementary division and where each membrane initially has at most one child membrane. Even though such systems may create exponentially many membranes, each with different contents, we show that their power is upperbounded by P.
1
Introduction
Bacteria and other cells provide an interesting avenue to consider in Natural Computing. Their native ability to make copies of themselves inspires us with visions of exponentially multiplying processors churning away, solving intractable problems. But can cells actually solve such hard problems? To answer this we should abstract away from the mind-boggling intricacy of a living cell and create a model that strips away everything but the features that we want to analyse. The model we investigate is called active membrane systems [9], a variant of P systems [10]. Active membrane systems were introduced to analyse the computational complexity of nested membranes that have the ability to divide and dissolve. It was shown by Sos´ık [11] that the model was extremely powerful and could solve problems as quickly as parallel machines that satisfy the parallel computation thesis. Later Sos´ık and Rodr´ıguez-Pat´on showed [12] that the model was no more powerful than such parallel machines. This result holds for a very general definition of active membrane systems and so can be interpreted as an upperbound on systems with dividing and dissolving membranes. These results used non-elementary division, that is, when a membrane divides, all sub-membranes are copied. For several years a tighter upperbound (or lowerbound) has been sought for the model where only membranes with no sub-membranes may divide. This would close an open problem known as the P conjecture which states that active membrane systems without charges characterise P [8].
This work is supported by a Project of Excellence TIC-581 from the Junta de Andaluca, project TIN 2006 13425 of Ministerio de Educaci´ on y Ciencia of Spain, and the Irish Research Council for Science, Engineering and Technology.
C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 262–276, 2009. c Springer-Verlag Berlin Heidelberg 2009
Membrane Dissolution and Division in P
263
However, the proof has been elusive (see Mauri et al. [3] for a more detailed survey). While attempting to answer this conjecture it was discovered that membrane dissolution was a powerful aspect of the system when it was found that without dissolution the system was upperbounded by P [1]. It is also known that systems without division rules are upperbounded by P [13]. This highlights that membrane dissolution when combined with division are the most difficult aspects of the model. A restriction of the model that uses symmetric cell division, where the two resulting membranes are identical, was shown to solve no more than P [5]. In this paper we analyse the more general division rule where two resulting membranes of a division may be different (in a manner similar to the mechanism of stem cells) combined with dissolution rules. Our result gives a P upperbound on systems with dissolution and elementary division, where at the initial timestep, the depth of membrane nesting is equal to the total number of membranes. In the notation of membrane systems, this may be stated as follows. Theorem 1. PMC∗D ⊆ P, where D is the class of systems in AM0+d,−ne,−e,−c having an initial membrane structure that is a single path. While all the machinery is in place for a proof for a membrane structure that (initially) is a tree, we leave the full proof to a more complete version of the paper and only consider here the case where the structure is initially a single path. Our simulation algorithm does not explicitly simulate all (of the exponential number of) membranes. Even though these systems may create exponentially many membranes, each with different contents, we observe that the elementary membranes are only important to simulate if they release a dissolution object to a parent membrane, or some other ancestor. To prove our main result we use a number of simulation techniques. The main novelties in our approach are the following. We carefully choose a computation to simulate: the membrane systems we simulate are confluent (nondeterministic, but all computations produce the same answer), and our technique finds a sufficiently simple computation to simulate out of a large set of more complicated computations. Also, we model important aspects of the computation using special division graphs that are inspired by, and a generalisation of, dependency graphs. Finally, our simulation algorithm carefully selects a small number of important membranes to explicitly simulate, while ignoring up to exponentially many other membranes. This technique is nicer than a brute force approach as it highlights which aspects of the computation actually influence the answer, and which do not. Although our main motivation is the P conjecture, our work has applications for membrane system simulators. For previous P upperbounds, this point could perhaps be more difficult to argue since such upperbounds on membrane systems often have large hidden constants. However given a membrane system that creates an exponential number of membranes, our algorithm actually explicitly
264
D. Woods et al.
simulates very few membranes (less than double the number of membranes that are in the initial configuration). Unlike some previous techniques, we feel that the present approach will be fruitful for proving the P conjecture for systems that have dissolution, elementary division, evolution and communication rules. Our technique seems suitable for generalisation, and does not suffer from a combinatorial explosion of cases. What is the lowerbound on the power of the systems that we consider? If P uniformity is used, then we get a trivial P lowerbound [6]. However for uniformity that is tighter than P (e.g. AC0 or L), then we conjecture that a P lowerbound can be found by improving a result in [6].
2
Membrane Systems
In this section we define membrane systems and some complexity classes. These definitions are based on those from P´erez-Jim´enez et al. [2], P˘ aun [9,10], Sos´ık and Rodr´ıguez-Pat´on [12], and Murphy and Woods [4]. 2.1
Active Membrane Systems
Active membrane systems are a class of membrane systems with membrane division rules. In this paper, division rules can act only on elementary membranes, which are membranes that do not contain other membranes (and are represented as leaves in the membrane structure tree). Definition 2. An active membrane system without charges is a tuple Π = (O, H, μ, w1 , . . . , wm , R) where, m ≥ 1 is the initial number of membranes; O is the alphabet of objects; H is the finite set of labels for the membranes; μ is a tree that represents the membrane structure, consisting of m nodes, labelled with elements of H. The root node (representing the parent of all membranes) is called the “skin” and has label 1 ∈ H; 5. w1 , . . . , wm are strings over O, describing the multisets of objects placed in the m regions of μ. 6. R is a finite set of developmental rules, of the following forms: (a) [ a → u ]h , for h ∈ H, a ∈ O, u ∈ O∗ (object evolution) (b) a[ ]h → [ b ]h , for h ∈ H, a, b ∈ O (communication in) (c) [ a ]h → [ ]h b, for h ∈ H, a, b ∈ O (communication out) (d) [ a ]h → b, for h ∈ H, a, b ∈ O (membrane dissolution) (e) [ a ]h → [ b ]h [ c ]h , for h ∈ H, a, b, c ∈ O (elementary membrane division) 1. 2. 3. 4.
The semantics of these rules are described elsewhere [10], however we note that they are applied according to the following principles: – All the rules are applied in a maximally parallel manner. That is, in one step, one object of a membrane is used by at most one rule (chosen in a non-deterministic way), but any object which can evolve by one rule of any form, must evolve.
Membrane Dissolution and Division in P
265
– The rules associated with membranes labelled with h are used for membranes with that label. At one step, a membrane can be the subject of only one rule of types (b)–(e), although in this paper we use only rules of type (d) and (e). 2.2
Recogniser Membrane Systems
We recall [1] that a computation of a membrane system is a sequence of configurations such that each configuration (except the initial one) is obtained from the previous one by a transition (one-step maximally parallel application of the rules). Systems are nondeterministic, therefore on a given input there are multiple possible computations. Definition 3 ([1]). A recogniser membrane system is a membrane system where each computation outputs either object yes or no (to the membrane with label 1). When this output occurs, no other rules are applicable. 2.3
Complexity Classes
Consider a decision problem X, i.e. a set of instances X = {x1 , x2 , . . .} over some finite alphabet such that to each xi there is a unique answer “yes” or “no”. We say that a family of membrane systems solves a decision problem if each instance of the problem is solved by some family member. We let |x| denote the length of x. In this paper, the functions classes E, F, H are each contained in the class of functions that are polynomial time computable on deterministic Turing machines. Definition 4. Let D be a class of membrane systems, let E and F be classes of functions, and let t : N → N be a total function. The class of problems solved by (E, F )-uniform families of membrane systems of type D in time t, denoted (E, F )–MCD (t), contains all problems X such that: – There exists an f -uniform family of membrane systems, ΠX = {ΠX (1), ΠX (2), . . .} of type D: that is, there exists a function f ∈ F , f : {1}∗ → ΠX such that f (1n ) = ΠX (n). – There exists an input encoding function e ∈ E, e : X → Σ ∗ where e(x) represents the input multiset (as a word), which is placed in the input membrane of ΠX (n). – The pair ΠX , e is sound and complete with respect to X: ΠX (n) given the encoded input e(x), where |x| = n, accepts iff the answer to x is “yes”. – ΠX is t-efficient: ΠX (n) always halts in at most t(n) steps. Definition 4 describes (e, f )-uniform family (i.e. with input) and we generalise this to define (h)-semi-uniform family of membrane systems ΠX = {ΠX (x1 ), ΠX (x2 ), . . .} where there exists a function h ∈ H, h : X → ΠX such that h(x) = ΠX (x). Here a single function (rather than two) is used to construct the semi-uniform membrane family, and so the problem instance is encoded using objects, membranes, and rules. In this case, for each instance of x ∈ X we
266
D. Woods et al.
have a (possibly unique) membrane system. The resulting class of problems is denoted by (H)–MC∗D (t). We define (E, F )–PMCD =
(E, F )–MCD (nk ),
k∈N
(H)–PMC∗D =
(H)–MC∗D (nk ).
k∈N
AM0+d,−ne,−e,−c
We let denote the class of active membrane systems without charges and using only dissolution and elementary division rules. Theorem 1 is shown for such (polynomial time) systems. For consistency with the membrane systems literature (which often uses P uniformity and semi-uniformity), we simply write PMCD and PMC∗D when E, F, H are classes of functions that are polynomial time computable on deterministic Turing machines. The results in this paper hold for P, or tighter, uniformity and semi-uniformity. Remark 5. A recogniser membrane system is confluent if it is both sound and complete. That is a ΠX is confluent if all computations of ΠX , with the same encoded input, give the same result. Therefore the following interpretation holds: in a confluent membrane system, given a fixed initial configuration, the system non-deterministically chooses one from a number of valid computations, but all computations must lead to the same result, either all accepting or all rejecting. 2.4
Notation
For a membrane system Π we define Δi = {δ | [δ]i → o is a rule in Π, o ∈ O, i ∈ H}. In other words, Δi is the set of objects that are on the left hand side of a rule that dissolves a membrane with label i. Also, Δ1 = {yes, no}, and Δ = ∪i∈H Δi . The parent of a membrane with label i is denoted p(i). We often explicitly write the contents of a multiset as a vector C of multiplicities, as shown in Section 4.4.
3
Object Division Graphs
We introduce object division graphs which represent all divisions that result from a given object and membrane label. We use the notion of dependency graph [1], a directed acyclic graph previously used to represent non-dissolution rules [i.e. types (a), (b), (c), and (e)]. Given a (properly encoded) set of rules for a membrane system Π, the dependency graph GΠ is created in logspace [6]. An object division graph is a directed acyclic graph Gdiv(o,h) that is the dependency graph for division rules only (ignoring all other rules), and that contains only those nodes and edges that are on paths leading from (o, h). We can also define an object division graph as follows. For each division rule [ oi ]h → [ oj ]h [ ok ]h we define the three nodes {oi,h , oj,h , ok,h } and the two edges (oi,h , oj,h ) and
Membrane Dissolution and Division in P
b a
δp(hmax ) e
c
δ3
j
h g
k i
j
h δ6
g
m
k i
δhmax
p δ6 m
...
267
q
o p
δhmax
δhmax
Fig. 1. Example division graph Ghmax . The contents (in this case a, g, g, . . . , o) of the single membrane with label hmax , and the hmax division rules, are used to define Ghmax . Dummy edges ( ) are dashed and go from sinks to roots. The shortest path to expel the object δp(hmax ) is highlighted ( ).
(oi,h , ok,h ). Then, the object division graph Gdiv(o ,h) is the subgraph that is reachable from the node o,h . For example, Figure 3 shows four object division graphs (each is contained in a ‘cloud’). The three rules that gave rise to the leftmost object division graph (rooted at a) are as follows, [ a ] → [ b ][ c ], [ b ] → [ δp(hmax ) ][ e ], [ c ] → [ e ][ δ3 ]. (All membranes are labeled hmax and this label is omitted for brevity.) For each element of O × H the simulation algorithm creates such a graph. By Lemma 8, we are simulating a membrane system Π where division is deterministic in the sense that for a given (object, label) pair, there is at most one applicable division rule. From this, and Lemma 7 it can be seen that each non-leaf vertex in Gdiv(o,h) has out-degree 2. Also, from the fact that division rules do not change membrane labels, a single object division graph encodes a set of rules, where each rule in the set has the same label.
4
Simulation
Here we prove our main result, Theorem 1. Theorem 1 PMC∗D ⊆ P, where D is the class of systems in AM0+d,−ne,−e,−c having an initial membrane structure that is a single path. We give a polynomial time algorithm that takes as input a membrane system Π from the class AM0+d,−ne,−e,−c , which has a membrane structure that is a single path, as well as Π’s input. The simulation algorithm begins with the (relatively easy) task of simplifying Π using Lemmas 6, 7 and 8. Then, the step-by-step simulation uses the algorithms given from Section 4.2 onwards. 4.1
Normal Forms and Simplifications
The algorithm begins the simulation by simplifying the membrane system as follows.
268
D. Woods et al.
Lemma 6 (Normal form: unique labels at initial step). Given a membrane system Π with multiple membranes of the same label at the initial configuration, this can be converted (in time quadratic in the size of Π) to a membrane system Π where each membrane has a unique label that accepts w iff Π does. Proof. We can iterate the following algorithm until each membrane has a unique label. For each membrane of label h, give the ith membrane a new label hi , and create a new set of rules that is identical to the set of rules that make use of label h, except h is replaced by hi in each rule. The algorithm runs in polynomial time, since both the set of rules R and labels H are of polynomial size. Thus we can assume that each membrane has a unique label from {1, . . . , |H|} in the initial configuration of the membrane system, labelled sequentially from the root 1, to leaf |H|. Lemma 7 (Normal form: removing symmetric division rules). Given a membrane system Π, it can be converted (in polynomial time in the size of Π) to a membrane system Π where all division rules are asymmetric, that is each division rule is of the form [ o1 ]i → [ o2 ]i [ o3 ]i , and o2 = o3 . Proof. The rules in Π are the same as those Π, with the following exception. Each symmetric division rule [ o1 ]i → [ o2 ]i [ o2 ]i in Π is replaced by an asymmetric division rule [ o1 ]i → [ o2 ]i [ o2 ]i in Π . We add the following: for each rule with o2 on the left hand side, we create an extra rule which is the same except it has o2 on the left hand side. Lemma 8 (Normal form: removing nondeterminism on left-hand sides of the rules). Suppose there is more than one rule for a given object o ∈ O and label h ∈ H in membrane system Π. Let Π be identical to Π, except that we have exactly one of these rules (arbitrarily chosen) for each pair (o, h). That is, given any o ∈ O, for each h ∈ H there is at most rule: either one division rule of the form [ o ]h → [ b ]h [ c ]h with o on the left hand side, or one dissolution rule of the form [ o ]h → u with o on the left hand side. The resulting membrane system Π accepts input word w if and only if Π accepts w. Proof. Assuming that Π is a recogniser, we know (by definition) that given an input w either all computations accept it (yielding “yes” as output), or else none of the computations accept it (the output is always “no”). The proof follows from the observation that all computations of Π are also computations of Π, since every time that it is possible to apply several rules of types (d) or (e) on a membrane labelled by h we must choose exactly one such rule (see Definition 2). This means that when Π is running a computation and is in a situation where there is an object o in a membrane labelled by h, it nondeterministically chooses the single rule that Π has for the pair (o, h). The input membrane system has now been simplified (within polynomial time) and we begin the simulation assuming these normal forms.
Membrane Dissolution and Division in P
4.2
269
Simulating, and Avoiding, Division
The simulation algorithm classifies the system into one of Cases 0, 1, 2, or 3, depending on the contents of the membrane with greatest label hmax (hmax = |H| in the first timestep). If the system fits Cases 0 or 1 then we simulate a valid computation where all membranes with label hmax (eventually) dissolve, and moreover in a way that can be simulated. This reduces the depth of the membrane structure by 1. Then, the algorithm restarts, and once again classifies the system into one of the 4 cases. If we only ever encounter Cases 0 and 1 then a straightforward inductive argument can be used to give prove the correctness of our simulation. In either of Cases 2 or 3, we select a computation where there are membrane(s) of label hmax that never dissolve. In these cases, the sub-system with labels {1, . . . , p(hmax )} is non-elementary for all time ≥ t, and the algorithm in Section 4.4 is used to simulate this sub-system. For Case 2 simulation of the elementary membranes is relatively straightforward. However, for Case 3 a more sophisticated simulation algorithm for elementary membranes is given in Section 5. These four cases give full coverage in the sense that any valid configuration is represented by one of the cases, and this can be seen by a careful examination of Lemmas 9 to 12. 4.3
Case 0
Lemma 9 (Case 0). At timestep t, if the single membrane of label hmax contains an object δ where δ ∈ Δhmax , then there is a polynomial time simulation of the system from time t to t + 1. Proof. We simulate the computation where dissolution is chosen (has priority) over division. If there are multiple such δ, we choose the lexicographically first one. The algorithm given below in Section 4.4 is then used for the simulation of the dissolution rule on hmax , and likewise for any applicable dissolution rule on membranes of label < hmax for one timestep. Then the simulation algorithm returns to the beginning (of Section 4.2), to find which of Cases 0, 1, 2, or 3 is applicable for timestep t + 1. 4.4
Simulation Algorithm for Dissolution Only
In this section we give a polynomial time simulation for the case where there are only dissolution rules. This could also be shown via Theorem 3 from Zandron et al. [13], but we instead give an explicit simulation that is useful in our constructions. Suppose there are h membranes with distinct labels {1, . . . , h} at some time t (initially, t = 0). At time t, the simulation algorithm encodes the contents of each membrane as a vector. Specifically, for each membrane of label i ∈ {1, . . . , h}, the multiset contents are encoded explicitly as Ci,0 = |i|o1 , |i|o2 , . . . , |i|o|O|
270
D. Woods et al.
where |i|oj is the multiplicity of oj ∈ O in the membrane with label i. Also, for all t > t, Ci,t = 0, 0, . . . , 0. For all time t, the system has a polynomial number of labels so the vectors Ci,t can be written out by a polynomial time Turing machine. The system uses only dissolution rules, thus it is straightforward to find the contents of Ci,t+1 , for each i, in polynomial time, as follows. Initially, let Ci,t+1 = 0, 0, . . . , 0. Then, for each i, from h down to 1, check the vector Ci,t to see if |i|δ > 0, where δ ∈ Δi (i.e. check if Ci,t contains a non-zero value for any δ ∈ Δi ): – if so, add Ci,t − δ + x to Cp(i),t+1 (where [δ]i → x is the simulated dissolution rule, and if there are multiple such δ, we choose the lexicographically first),1 – if not add Ci,t to Ci,t+1 . The algorithm should take care of the important detail where, in one step, the dissolution occurs of multiple membranes with consecutive labels. If the (skin membrane) vector C1,t , for any t , encodes the object yes (respectively, no) then the simulation is finished and we accept (respectively, reject). The computation that we are simulating for these membranes should be clear from the algorithm, so we omit a proof of correctness (which would proceed by a simple inductive argument on membrane contents). 4.5
Cases 1 and 2
Lemma 10 (Case 1). At timestep t, if the single membrane of label hmax contains an object o where the object division graph Gdiv(o,hmax ) has the property that every sink node is in Δhmax , then there is a polynomial time simulation of the computation from time t to time t + d + 1. Here d is the length of the longest path starting at the root o in Gdiv(o,hmax ) . Moreover, at time t + d + 1, all of the label hmax membranes have been dissolved. Proof. If there are multiple such o, we choose the lexicographically first one. To simulate the computation of membranes of label hmax , we choose the (valid) computation that is defined by the graph Gdiv(o,h) . That is, starting at object o, we simulate the divisions defined by out-branchings in Gdiv(o,h) , followed by dissolutions that are triggered by sink nodes in Gdiv(o,h) . The object division graph Gdiv(o,h) may have an exponential number of paths, so we do not explicitly simulate the membrane division and subsequent dissolution. Instead, we calculate the number of objects that are expelled (dissolved out) from hmax membranes at each timestep, as follows. Let d ∈ {1, 2, . . . , d}. At time t + d we calculate the following. For the jth sink node in Gdiv(o,h) , we calculate kj which is the number of paths of length d that begin at o and end in sink j (by multiplying the adjacency matrix of 1
Here the notation Ci,t − δ + x means remove one copy of δ from C and add one copy of x to Ci,t (i.e. we let δ, x be vectors that encode the symbols δ, x).
Membrane Dissolution and Division in P
271
Gdiv(o,h) by itself k times). Let δj ∈ Δhmax be the label of the jth sink, and let [δj ]hmax → xj . At time t + d the vector
(kj · (Chmax ,t + xj − o))
j
is added to Cp(hmax ),t+d +1 . The algorithm given in Section 4.4 is then used for the remaining simulation of labels < hmax at timestep t + d . After d timesteps the simulation algorithm returns to the beginning (of Section 4.2), to find which of Cases 0, 1, 2, or 3 is applicable for time t + d + 1. Lemma 11 (Case 2). At timestep t, for all objects o in the single membrane of label hmax , if o ∈ / Δhmax and if the division tree of (o, h) has no sinks in Δhmax , then there is a polynomial time simulation of the computation from time t until the computation finishes. Moreover, a simulation of this computation can ignore membranes of label hmax , and assume all ancestors of hmax never divide. Proof. There is a computation where no membrane of label hmax ever dissolves. The simulation for this case ignores all membranes of label hmax for all time > t. The algorithm in Section 4.4 simulates the dissolution-only sub-system with labels < hmax .
5
Simulation Algorithm for Case 3
Lemma 12 (Case 3). At timestep t, we look at all objects o ∈ O in the single membrane of label hmax . If both of the following hold: • for all such o, there are ≥ 1 sink nodes of Gdiv(o,hmax ) not in Δhmax , and • there is at least one such o where ≥ 1 sink nodes of Gdiv(o,hmax ) are in Δhmax , then there is a polynomial time simulation of the computation from time t until the computation finishes. The proof is given in the remainder of Section 5. 5.1
Overview of Simulation Technique
We define a special graph called the division graph, and use that to choose a specific computation to simulate. In fact we simulate only a very small number of membranes explicitly, and ignore an exponentially large number of other membranes. Remarkably, we explicitly simulate at most 2hmax − 2 membranes, where hmax is the depth of the membrane structure. We prove that this small number of membranes is sufficient to correctly predict the output of the computation. Then, by confluence, the correct prediction of one computation implies a correct prediction of the answer to all computations.
272
D. Woods et al.
5.2
Division Graph
The simulation algorithm creates a (directed acyclic) division graph, Ghmax using the following algorithm: – Write out the object division graph Gdiv(o,hmax ) , for each object o in m (the graphs are written in lexicographical order by object o, multiplicities included). – Add a directed edge from each sink vertex of graph i to the root of graph i + 1. These edges are called dummy edges because they do not correspond to actual rules. An example division graph is illustrated in Figure 3. 5.3
Some Observations about the Division Graph
We claim that the division graph is a good model of membrane division, in the sense that it accurately models the division history of any membrane (given a membrane of label hmax , its division history is defined to be the sequence of division rules, with a left/right choice for each rule, that gave rise to that membrane from the time when there was exactly one membrane of label hmax ). In the following lemmas, the function length(·) does not count dummy edges. Lemma 13. Each path ρ in Ghmax models the division history of a membrane with label hmax , for exactly τ = length(ρ) consecutive division steps. Lemma 14. The division history of any membrane of label hmax , after τ consecutive divisions, is modelled by some path ρ in Ghmax , and length(ρ) = τ . 5.4
Chosen Computation
The simulation proceeds by simulating some important aspects of a particular computation. This chosen computation is defined as follows. Remark 15. Our chosen computation of Π satisfies all of the following criteria: 1. Division of hmax membranes: All hmax divisions occur in the order defined by the division graph Ghmax . The divisions may terminate early, but if a root object2 starts dividing, then these divisions must continue until the sinks of Gdiv(o,h) (thus if there is a non-root, non-leaf object o present in a hmax membrane we must immediately divide using o, and we cannot divide by another object, nor dissolve). 2
By root object o, we mean an object that is a root vertex in one of the object division graphs Gdiv(o,h) that Ghmax is composed of. Analogously, a leaf bject is an object that is a leaf in some Gdiv(o,h) .
Membrane Dissolution and Division in P
273
2. Dissolution of < hmax membranes: If a non-elementary membrane of label i is to dissolve, then this happens at the earliest possible time tmin (using some object δ ∈ Δi ) that is consistant with 1 above. (If there are multiple such δ, then then any δ is chosen.) 3. Dissolution of hmax membranes: membranes of label hmax choose division of root objects over dissolution, except where this would contradict point 2. Remark 16. If we dissolve a label hmax membrane then all of its object contents are roots or sinks, in object division graphs (in Ghmax ).
5.5
Overview of Case 3 Simulation Algorithm
We do not simulate the division and dissolution of all label hmax membranes: However, a subset, of ≤ hmax − 1 membranes, are explicitly simulated. The following is an overview of our simulation algorithm for Case 3, the details are given in the remainder of the section. At timestep t: – if label p(hmax ) contains an element of Δp(hmax ) then simulate the dissolution of p(hmax ), – else if any label hmax membrane expels (dissolves) out a Δp(hmax ) object in < t timesteps, then explicitly simulate (only) the relevant label hmax membrane, and simulate the subsequent dissolution of p(hmax ), – else p(hmax ) is not dissolved, – membranes of label < p(hmax ) are simulated explicitly (as in Section 4.4). 5.6
Expel: Simulating Division and Dissolution Using Shortest Paths
Before giving the main simulation algorithm, we first give expel(S, τ ), see Algorithm 1, which uses the division graph Ghmax . Given a set of objects S, and a time τ , the function expel(S, τ ) finds whether or not the elementary membranes (of label hmax ) expel (release on dissolution) any element of S within τ timesteps. If so, expel(S, τ ) returns the vector C, which represents the contents of the entire membrane m that expels some such s ∈ S. In particular, if there are multiple such membranes that release an element of S in time ≤ τ , then expel(S, τ ) chooses the membrane which dissolves at the earliest timestep. The expel(S, τ ) algorithm computes the shortest path in the division graph Ghmax that expels any s ∈ S [shortest path is NL-complete [7], and at most 4|S| shortest paths need to found in each run of expel(S, τ )]. If no element of S is expelled by membranes of label hmax in ≤ τ timesteps, then expel(S, τ ) returns FALSE.
274
D. Woods et al.
Algorithm 1. Find whether a membrane with label hmax expels any object from the set S in time ≤ τ . divGraph.expel(S: set of objects, τ : time ∈ N) // s is a sink or root object, and δhmax ∈ Δhmax is a sink object (in object division // graphs). Path lengths do not include dummy edges. We ignore ‘used’ paths. O is the // alphabet of objects (i.e. nodes in Ghmax ). All paths begin at the root of the first // object division graph in Ghmax . FOR all s ∈ S, find the shortest path ρ (in Ghmax ) of one of the following forms: O∗ sO∗ δhmax O∗ δhmax O∗ s O∗ δhmax and ∃ a rule: [δhmax ]hmax → s O∗ δhmax and s is in hmax at the timestep where Case 3 began END FOR IF (length(ρ) ≤ τ ) // Do not count dummy edges in path lengths Explicitly simulate the membrane induced by the path ρ to give expelled objects C Mark the path ρ as ‘used’ in Ghmax RETURN(C) ELSEIF ( ( such ρ) OR (length(ρ) > τ ) ) RETURN FALSE END IF/ELSEIF END expel
5.7
Case 3 Simulation Algorithm
Algorithm 2 simulates the computation described in Remark 15. Initially there is one membrane of label hmax , however over time (at most) exponentially many such membranes are created. So Algorithm 2 does not explicitly simulate all label hmax membranes. At each timestep t, Algorithm 2 checks if it should dissolve the membrane of label p(hmax ), by (i) checking Cp(hmax ),t for a Δp(hmax ) object, and if not then (ii) checking if any hmax membrane expels a Δp(hmax ) object in any timestep < t, using expel(Δp(hmax) , t − 1). When Algorithm 2 begins execution, we have just entered Case 3 at time t and there is at most one membrane of each label. Also, for all i, the simulation algorithm has already initialised the vectors Ci,t to their correct contents, and for all t > t, Ci,t = 0, 0, . . . , 0. 5.8
Case 3 Proof of Correctness
Lemma 17. Algorithm 2 simulates the dissolution of membrane with label p(hmax ) at timestep t, using dissolution rule r, if and only if the chosen computation (Section 5.4) does so at the same timestep t. Proof (If ). In the chosen computation defined in Section 5.4, if p(hmax ) is to dissolve at time t, then we show that Algorithm 2 simulates the dissolution of p(hmax ), using a valid rule. There are two cases, (i) and (ii). (i) Some membrane of label hmax expels a Δp(hmax ) object at time < t. Algorithm 2 uses Algorithm 1, via the call expel(Δp(hmax) , t − 1), to find whether membranes of label hmax expel Δhmax objects at any time < t. Let C = expel(Δp(hmax ) , t − 1). If C = FALSE, then C represents the contents of a membrane that expels a Δp(hmax ) object.
Membrane Dissolution and Division in P
275
Algorithm 2. Simulation of membranes with label hmax and p(hmax ). At time t we are in Case 3, and there is one membrane of label p(hmax ). Cp(hmax ),t := contents of the single membrane with label p(hmax ) at time t WHILE (C1,t encodes neither yes nor no) IF (there is any δ ∈ Δp(hmax ) encoded in Cp(hmax ),t ) Simulate the rule [δ]p(hmax ) → x by adding (Cp(hmax ),t + x − δ) to Cp(p(hmax )),t+1 ∀t > t delete vectors Cp(hmax ),t p(hmax ) := p(p(hmax )) ELSE // Check if any hmax membrane expels any δ ∈ Δp(hmax ) object in any timestep < t: C := Ghmax .expel(Δp(hmax ) , t − 1) IF (C = FALSE) Add C to Cp(hmax ),t Simulate the rule [δ]p(hmax ) → x by adding (Cp(hmax ),t + x − δ) to Cp(p(hmax )),t+1 ∀t > t delete vectors Cp(hmax ),t p(hmax ) := p(p(hmax )) ELSEIF (C = FALSE) // Do nothing, i.e. p(hmax ) is not dissolved END IF/ELSEIF END IF/ELSE Update all Ci,t+1 , where i < p(hmax ), using algorithm in Section 4.4 t := t + 1 END WHILE
(ii) There exists a Δhmax object in p(hmax ) at time t. If this is the case then that object was either there at the timestep where p(hmax ) was non-elementary (in which case it was encoded in Cp(hmax ),t at an earlier timestep), or else was expelled by some membrane of label hmax (already shown in (i)). (Only if ) If p(hmax ) does not to dissolve at time t, then we are in one of two cases, (iii) or (iv). (iii) There does not exist a Δp(hmax ) object in p(hmax ) at time t. In Algorithm 2, the vector Cp(hmax ),t encodes a subset of the contents of the membrane p(hmax ), therefore if there are no Δp(hmax ) objects in the membrane p(hmax ) at time t, then there are no Δp(hmax ) objects encoded in Cp(hmax ),t at time t. (iv) No membrane of label hmax expels a Δp(hmax ) object at time < t. Algorithm 2 uses Algorithm 1, via the call expel(Δp(hmax) , t − 1), to find whether membranes of label hmax expel Δhmax objects at any time < t. If expel(Δp(hmax ) , t − 1) = FALSE then this does not occur on the chosen computation path, and Algorithm 2 does not simulate the dissolution of p(hmax ). Lemma 18. Algorithm 2 runs in polynomial time and outputs yes iff Π does, and outputs no otherwise. Proof. By Lemma 17 we dissolve the p(hmax ) membranes correctly (i.e. consistent with the chosen computation in Section 5.4). The membranes of label i, where 1 ≤ i < p(hmax ), are simulated using the algorithm given in Section 4.4. Finally, we note that Δ1 = {yes, no}, and so Algorithm 2 treats the search for {yes, no} in the same way that the search for any Δi object is treated. Algorithm 2 iterates a number of times that is less than or equal to the number of time steps of the chosen computation that is being simulated. The most
276
D. Woods et al.
significant operations in Algorithms 1 and 2 involve vector addition/subtraction, checking vector coordinates for 0, and finding shortest paths, all of which can be computed in polynomial time.
Acknowledgement We thank the anonymous reviewers for helpful comments on the presentation.
References 1. Guti´errez-Naranjo, M.A., P´erez-Jim´enez, M.J., Riscos-N´ un ˜ez, A., RomeroCampero, F.J.: Computational efficiency of dissolution rules in membrane systems. International Journal of Computer Mathematics 83(7), 593–611 (2006) 2. P´erez-Jim´enez, M.J., Romero-Jim´enez, A., Sancho-Caparrini, F.: Complexity classes in models of cellular computing with membranes. Natural Computing 2(3), 265–285 (2003) 3. Mauri, G., P´erez-Jim´enez, M.J., Zandron, C.: On a P˘ aun’s Conjecture in Membrane ´ Systems. In: Mira, J., Alvarez, J.R. (eds.) IWINAC 2007. LNCS, vol. 4527, pp. 180–192. Springer, Heidelberg (2007) 4. Murphy, N., Woods, D.: The computational complexity of uniformity and semiuniformity in membrane systems (in preparation) 5. Murphy, N., Woods, D.: Active membrane systems without charges and using only symmetric elementary division characterise P. In: Eleftherakis, G., Kefalas, P., P˘ aun, G., Rozenberg, G., Salomaa, A. (eds.) WMC 2007. LNCS, vol. 4860, pp. 367–384. Springer, Heidelberg (2007) 6. Murphy, N., Woods, D.: A characterisation of NL using membrane systems without charges and dissolution. In: Calude, C.S., Costa, J.F., Freund, R., Oswald, M., Rozenberg, G. (eds.) UC 2008. LNCS, vol. 5204, pp. 164–176. Springer, Heidelberg (2008) 7. Papadimitriou, C.H.: Computational complexity. Addison-Wesley, Reading (1995) 8. P˘ aun, G.: Further twenty six open problems in membrane computing. In: Proceedings of the Third Brainstorming Week on Membrane Computing, Sevilla, Spain, January 2005, pp. 249–262 (2005) 9. P˘ aun, G.: P Systems with active membranes: Attacking NP-Complete problems. Journal of Automata, Languages and Combinatorics 6(1), 75–90 (2001) 10. P˘ aun, G.: Membrane Computing. Springer, Berlin (2002) 11. Sos´ık, P.: The computational power of cell division in P systems: Beating down parallel computers? Natural Computing 2(3), 287–298 (2003) 12. Sos´ık, P., Rodr´ıguez-Pat´ on, A.: Membrane computing and complexity theory: A characterization of PSPACE. Journal of Computer and System Sciences 73(1), 137–152 (2007) 13. Zandron, C., Ferretti, C., Mauri, G.: Solving NP-complete problems using P systems with active membranes. In: Antoniou, I., Calude, C., Dinneen, M. (eds.) UMC 2000: Proceedings of the Second International Conference on Unconventional models of Computation, London, UK, pp. 289–301. Springer, Heidelberg (2000)
Computing Naturally in the Billiard Ball Model Liang Zhang Center of Unconventional Computing and Department of Computer Science University of the West of England, Bristol, United Kingdom
[email protected]
Abstract. Fredkin’s Billiard Ball Model (BBM) is considered one of the fundamental models of collision-based computing, and it is essentially based on elastic collisions of mobile billiard balls. Moreover, fixed mirrors or reflectors are brought into the model to deflect balls to complete the computation. However, the use of fixed mirrors is “physically unrealistic” and makes the BBM not perfectly momentum conserving from a physical point of view, and it imposes an external architecture onto the computing substrate which is not consistent with the concept of “architectureless” in collision-based computing. In our initial attempt to reduce mirrors in the BBM, we present a class of gates: the m-counting gate, and show that certain circuits can be realized with few mirrors using this gate. We envisage that our findings can be useful in future research of collisionbased computing in novel chemical and optical computing substrates.
1
Introduction
Collision-based computing [2] is an unconventional paradigm of computation, where quanta of information are represented by compact patterns or localizations traveling in spatially-extended architectureless medium, such as billiard balls in an idealized friction-free environment [9], gliders in cellular automata [5, 10, 1, 15], discrete solitons in optical waveguide lattices [6] and wave-fragments in a subexcitable Belousov–Zhabotinsky medium [12]. The information is encoded in binary as the presence or absence of localizations corresponds to logical 1 and 0. The computation is performed by mutual collisions of localizations. Trajectories of localizations approaching a collision site represent input values; and trajectories of localizations traveling away from a collision site represent output values. Pre-determined stationary wires and gates are not needed in collision-based computing. Anywhere within the medium space can be used as wires (trajectories of traveling localizations) and gates (collective collision sites of localizations). Fredkin’s Billiard Ball Model [9] is one of the fundamental models of collisionbased computing and a model of universal physical computation, based on idealized elastic collisions of mobile billiard balls. Additionally, fixed mirrors are used to route signals. As one may find that mirrors are almost unavoidable when realizing complicated circuits in the BBM. However, there are several reasons we want to remove mirrors from the model. First, as Margolus [11] stated, fixed mirrors are “physically unrealistic”, since in reality perfectly fixed mirrors “must be C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, pp. 277–286, 2009. c Springer-Verlag Berlin Heidelberg 2009
278
L. Zhang
infinitely massive”, otherwise a sightly shift in position of a single mirror could result in the model losing its “digital nature”. Second, from the collision-based computing point of view, mirrors stand for external architecture onto the computing medium. Although they are not stationary wires that signals propagate along and the virtual wires formed by traveling balls are still dynamical, mirrors are routing devices that control the moving directions of signals. Therefore the model is not entirely architectureless. More importantly, for anyone who intends to use the BBM as a blueprint to guide their research in collision-based computing using substrates in the real world, it may not be easy to look for an analogy to mirrors. Margolus [11] once successfully replaced mirrors with constant particle streams together with the dual-rail logic to deflect signals in a lattice gas version of his Soft Sphere Model (SSM, a model very similar to the BBM, with the difference that balls are compressible during collisions), in an attempt to achieve momentum conservation. Also, a concept of rest particle was introduced into the model to fix the problem of signals crossing without mirrors. Obviously, the dual-rail logic does not apply to the BBM, and the rest particle has no room in the BBM simply because the BBM cannot be simulated by a lattice gas model. Thus methods to remove mirrors in the SSM cannot be directed applied to the BBM. In this paper, we present a class of gates: the m-counting gate. By using the gate as building blocks, we demonstrate that certain circuits can be realized in the BBM with few mirrors in place, which is one step closer to a physical realistic, architectureless, and momentum conserving BBM. The structure of the paper is as follows, we first review the BBM in Sect. 2. Then we introduce the m-counting gate in Sect. 3, and demonstrate how we use such a gate to realize binary adders and parallel binary counters in Sect. 4 and Sect. 5. As a conclusion, we discuss the difference between the computational logic of the mcounting gate and primitive gates in the BBM, and how our findings may benefit the future research in Sect. 6.
2
The Billiard Ball Model
In the BBM, identical balls with finite diameter travel diagonally on a twodimensional grid with the same magnitude of velocity. Balls are all initially placed on one of the dots of the grid, and the magnitude of their velocity is specifically chosen so that balls can appear at diagonally adjacent dots at every integer time (Fig. 1a). On two occasions balls can change their moving directions: colliding against each other (Fig. 1b) and/or being deflected by a fixed mirror (Fig. 1c). The diameter of balls is chosen to be the distance between two vertical (or horizontal) adjacent dots of the grid and the fixed mirrors should be carefully placed to ensure that collisions only happen when balls on one of the dots of the grid. Binary information, 1 and 0, is encoded by the presence or the absence of a ball at a given site of the grid at a given time. Therefore, trajectories of balls can be seen as routes of traveling signals, or wires. The routing of signals and the gates can be realized by collisions of balls (with the help of mirrors, sometimes).
Computing Naturally in the Billiard Ball Model
(a)
(b)
279
(c)
Fig. 1. The Billiard Ball Model. (a) balls move diagonally on a two-dimensional grid; (b) two balls collide and change their moving directions; (c) a ball moving South-East is deflected by a fixed mirror and heads North-East instead. In these graphs, arrows show moving directions of the balls, diagonal lines represent trajectories that balls traveled and vertical lines indicate collisions, either between two balls or between a ball and a mirror.
A
AB
¯ AB
A
¯ AB
AB
¯ AB B
AB
(a)
B
A
(b)
Fig. 2. Primitive gates in the Billiard Ball Model: (a) the interaction gate, and (b) the switch gate
Two primitive gates were introduced in [9], namely, the interaction gate and the switch gate (Fig. 2). The interaction gate is merely realized by a possible collision of two balls. Fig. 2a shows a superposition of all possible trajectories concerning the gate: when two balls start traveling from positions denoted by small circles on the left, they will collide with each other; and if only one ball is present at the starting positions, it will travel straight through. The switch gate (Fig. 2b) is constructed on the basis of the interaction gate with two additional mirrors. The output signals AB of the interaction gate are routed by mirrors ¯ thus realizing the so that one of them falls into the same route as the ball AB, switch gate. It has been demonstrated that both gates are capable of universal computation. Later works related to the BBM include a cellular automaton (BBMCA) [10] that simulates the behavior described in the BBM and the Soft Sphere Model [11], both developed by Margolus. Both models dealt with mirrors in
280
L. Zhang
a different approach to the BBM. In the BBMCA, mirrors are formed by the computing substrate itself, which is amazing because no external medium is involved. However, when experimenting on real media, it is still hard to find an analogy to the mirrors. In the SSM, especially in a lattice gas version of the model, Margolus managed to remove all of the mirrors. In the BBM, maybe we cannot remove them all, at least not until we find a way to overcome the problem of signals crossing. But we can try to reduce mirrors to a minimum level, and that is where the m-counting gate can help us in certain situations.
3
The m-Counting Gate
The m-counting gate has m input variables (a1 ...am ) and its function is to count the number of logical Truths n out of all m input variables. A graphical realization of the gate in the BBM is shown in Fig. 3, and realizations of three simplest instances of the gate in the BBM are shown in Fig. 4. Generally, realization of the m-counting gate in the BBM consists of m balls (a1 ...am ) as input variables moving in one direction, together with a ball T representing a constant logical Truth moving in another direction. The gate has 2m + 1 output variables, with m of which being an exact copy of all input variables (a1 ...am ) and other m + 1 output variables (c0 ...cm ). The traveling routes of the output variables are solely determined by the input balls, with a1 ...am moving one line to the South of their original traveling routes. The route of c0 is always the same as the constant Truth ball T , and routes of c1 ...cm are 1 to m lines to the North of c0 . Among these m + 1 output variables (c0 ...cm ), only one of them, cn , equals to logical Truth, showing the result of the m-counting gate. Depending on the number of input variable balls being logical Truth: n, exactly n collisions will happen during the computation, starting from the constant Truth ball T dynamically deflects the first ball it encounters. After each collision, the ball moving North-East changes its traveling route one line higher, as it would have done in a normal interaction gate 2a, so that after n a1 ...
a1 ...
am
am cm ...
T
c0
Fig. 3. The graphical realization of the m-counting gate in the Billiard Ball Model, which can be used to count how many logical Truths there are in all m input variables (a1 ...am )
Computing Naturally in the Billiard Ball Model a1
c3 c2 c1 c0
a2 a1 a2 a1
c1 c0
(a)
c2 c1 c0
a3
a1
a1
T
a2
T
a1
T
281
a2 (b)
a3 (c)
Fig. 4. Simplest examples of the m-counting gate in the Billiard Ball Model: (a) the 1-counting gate, where c0 = a ¯1 and c1 = a1 (b) the 2-counting gate, where c0 = a ¯1 a ¯2 , c1 = a1 a ¯2 + a ¯1 a2 and c2 = a1 a2 , and (c) the 3-counting gate, where c0 = a ¯1 a ¯2 a ¯3 , c1 = a1 a ¯2 a ¯3 + a ¯ 1 a2 a ¯3 + a ¯1 a ¯2 a3 , c2 = a1 a2 a ¯ 3 + a1 a ¯ 2 a3 + a ¯1 a2 a3 and c3 = a1 a2 a3 . Initial positions of input variables (a1 ...am ) are represented by circles and that of the constant Truth input T is represented by a dot. Output variables include an exact copy of all input variables (a1 ...am ) and a single ball positioned at cn , denoting that there are n out of m input variables being constant Truth.
collisions, the output variable cn = 1. If there is no ball to deflect at all, the ball T remains its traveling route so that the output variable c0 = 1. The feature of the m-counting gate that an exact copy of input variables is included in its output variables allows us to generate multiple instances of output variables (c0 ...cm ) with only one set of input variables (a1 ...a3 ) and multiple instances of the constant Truth balls. As illustrated in Fig. 5a, the input variables (a1 ...a3 ) interact with the first constant Truth ball T1 and generate a set of output variables (c0 ...c3 ), together with a copy of the input variables (a1 ...a3 ), which in turn interact with the second constant Truth ball T2 , generating a second set of (c0 ...c3 ) as well as a copy of (a1 ...a3 ) again. Relative positions of the multiple instances of output variables (c0 ...cm ) are determined by relative positions of the constant Truth balls. Thus by adjusting relative positions of adjacent constant Truth balls, we can perform logical disjunction operation on certain output variables (c0 ...cm ). As shown in Fig. 5b, while T1 and T2 move closer, traveling routes of the two sets of output variables (c0 ...c3 ) overlap, resulting in two outputs c3 + c1 and c2 + c0 . Since constant Truth balls cannot be too close to be next to each other, we cannot generate outputs in the form of cn + cn−1 directly. To do that, we need to use a mirror, as illustrated in Fig. 5c. Again, two constant Truth balls are used, producing two set of output variables (c0 ...c3 ). The mirror is placed to deflect one of the balls representing c2 (the top one), which then collide with the other ball representing c2 (the bottom one) and its traveling route end up the same as a ball representing c3 , resulting in an output c3 + c2 .
282
L. Zhang
c3 c3 c2 c1 c0
a1 a2
c3 c2 c1 c0
a3 T1
a1 a2
T2
a1 c3 c2 a2 c3 + c1 c2 + c0 c1 a3 c0
a1 a2 a3
a1
T1 T2
a2
a3 (a)
c1 c0 c3 + c2 c1 c0 c2
T1
a1
T2
a2
a3 (b)
a3 (c)
Fig. 5. Multiple m-counting gate in the Billiard Ball Model: (a) two 3-counting gates generate two sets of outputs (c0 ...c3 ); (b) move the constant Truth balls closer may generate outputs such as c3 + c1 , c2 + c0 ; (c) however, to produce outputs in the form of cn + cn−1 needs the help of mirrors
4
Binary Adders
The m-counting gate is very helpful in realizing binary adders with few mirrors or even no mirrors at all in the BBM. The simplest binary adder, the 1-bit half adder, resides in the 2-counting gate (Fig. 4b), with two input variables a1 and a2 being summands and the output variables c1 and c2 equal the Sum and Carry value of the 1-bit half adder respectively. This circuit is constructed with no mirrors. Imagine if we were to build the same circuit using only interaction gates, there would have been no way to generate the Sum value without using fixed mirrors. The binary 1-bit full adder, can be realized by four 3-counting gates and one extra mirror in the BBM, as illustrated in Fig. 6. It is actually a combination of the circuits in Fig. 5b and 5c, since if we consider input variables (a1 ...a3 ) as two summands and the Carry-in value of the adder, then the Sum value S = c3 + c1 and the Carry-out value Cout = c3 + c2 .
5
Parallel Binary (m,k)-Counters
The concept of parallel binary (m,k)-counters was first introduced by Dadda [7] to construct parallel multipliers in 1965. An (m,k)-counter has m input variables,
Computing Naturally in the Billiard Ball Model
283
S = c3 + c1 a1 a2 a3
Cout = c3 + c2
T T
T
a1 a2
T
a3
Fig. 6. The realization of a binary 1-bit full adder using four 3-counting gates and a fixed mirror in the Billiard Ball Model
and it counts the number of input variables being logical Truths: n. This concept is very similar to the above m-counting gates, with the difference that in (m,k)counters the result n is recorded using k-bit binary numbers. Three of the simplest instances of (m,k)-counters: (1,1)-counter, (2,2)-counter and (3,2)-counter are already realized in previous sections, since they are equivalent to the 1-counting gate (Fig. 4a), the 2-counting gate (Fig. 4b) and the 1-bit full adder (Fig. 6). Here we demonstrate a realization of the (5,3)-counter (Fig. 7), where the counting result n is recorded in a 3-bit binary number: n3 n2 n1 . The realization uses the same techniques that are used in the 1-bit full adder. First, three 5counting gates are used to producing an output of n1 = c1 + c3 + c5 by arranging three constant Truth balls in close distances. Then, two sets of output variables (c0 ...c5 ) are generated by another two 5-counting gates, followed by the pairs of c4 s and c2 s colliding between themselves, producing the outputs of n2 = c2 + c3 and n3 = c4 + c5 . Other (m,k)-counters (m ≥ 6) can also use m-counting gates as building blocks, however, more mirrors may be placed to route signals in order to avoid unwanted collisions.
284
L. Zhang
n1 = c5 + c3 + c1
a1 a2 a3 a4 a5 T
n3 = c5 + c4 n2 = c3 + c2
T T
T
T
Fig. 7. A realization of the (5,3)-counter in the Billiard Ball Model, which uses five 5-counting gates and two fixed mirrors
6
Discussions
The m-counting gate reveals one of the underlying logic naturally existing in the BBM. Thus we can build certain circuits without recourse to lots of fixed mirrors, which is not possible when using only primitive gates — the interaction gate and the switch gate. Although primitive gates are capable of universal computation, they do not naturally support disjunction operation or conjunction operation on more than two operands, which is why we often need multiple instances of such gates to realize a circuit and why we need a great many fixed mirrors to route signals. The switch gate itself is actually a good example of using mirrors to perform a disjunction operation. On the contrary, the m-counting gate produces outputs with several conjunction and disjunction operations on the inputs, avoiding those mirrors that may have been needed if we use primitive gates. Take the realization of parallel binary counters, for example, as described by Swartzlander [13], conventionally an
Computing Naturally in the Billiard Ball Model
285
(m,k)-counter is implemented using a two-level gate network, which consists of 2m -1 AND gates with m inputs as well as k OR gates with 2m -1 inputs. The mcounting gate do not build circuits from the simplest AND gates and OR gates, rather, some of those two-level gate networks are outputs of the m-counting gate. The m-counting gate has its limitation. First, though it is suitable as the building blocks to construct binary adders and parallel binary counters, it may not be that efficient when used to build other circuits. Second, the m-counting gate produce many outputs, and not all of them may be useful in constructing other circuits. Thus those signals that are no use can turn into obstacles and need to be clear out of the space, which may need more fixed mirrors. Nonetheless, we present a new way of exploit the Billiard Ball Model and the m-counting gate shows us some insights into how the BBM can compute in its natural fashion without mirrors. We envisage that our findings can be useful in future research of collision-based computing since the BBM is used as a blueprint of computing schemes in novel computing substrates, for example, the light-sensitive sub-excitable Belousov– Zhabotinsky (BZ) medium. Adamatzky, de Lacy Costello and their colleagues have demonstrated both computationally and experimentally that mutual collisions of wave-fragments in the sub-excitable BZ medium can implement certain logical gates and basic operations [3, 8, 4, 14]. Further research in constructing complex circuits may require the implementation of “mirrors” by adjusting light intensity to control the traveling directions of wave-fragments, while our findings in the present paper show another approach to continue the research.
Acknowledgment The author wishes to thank Andrew Adamatzky, Norman Margolus, Silvio Capobianco and Katsunobu Imai for their valuable comments and suggestions on this work.
References [1] Adamatzky, A.: Controllable transmission of information in the excitable media: the 2+ medium. Adv. Mater. Opt. Electron. 5, 145–155 (1995) [2] Adamatzky, A. (ed.): Collision-Based Computing. Springer, London (2002) [3] Adamatzky, A.: Collision-based computing in Belousov–Zhabotinsky medium. Chaos, Solitons & Fractals 21(5), 1259–1264 (2004) [4] Adamatzky, A., de Lacy Costello, B.: Binary collisions between wave-fragments in a sub-excitable Belousov–Zhabotinsky medium Chaos. Solitons & Fractals 34(2), 307–315 (2007) [5] Berlekamp, E.R., Conway, J.H., Guy, R.K.: Winning Ways for Your Mathematical Plays. Games in particular, vol. 2. Academic Press, London (1982) [6] Christodoulides, D.N., Lederer, F., Silberberg, Y.: Discretizing light behaviour in linear and nonlinear waveguide lattices. Nature 424, 817–823 (2003) [7] Dadda, L.: Some Schemes for Parallel Multipliers. Alta Frequenza 34, 349–356 (1965)
286
L. Zhang
[8] de Lacy Costello, B., Adamatzky, A.: Experimental implementation of collisionbased gates in Belousov–Zhabotinsky medium Chaos. Solitons & Fractals 25(3), 535–544 (2005) [9] Fredkin, E., Toffoli, T.: Conservative logic. Int. J. Theor. Phys. 21(3-4), 219–253 (1982) [10] Margolus, N.: Physics-like models of computation. Physica D 10(1-2), 81–95 (1984) [11] Margolus, N.: Universal cellular automata based on the collisions of soft spheres. In: Adamatzky, A. (ed.) Collision-Based Computing, pp. 107–134. Springer, London (2002) [12] Sendi˜ na-Nadal, I., Mihaliuk, E., Wang, J., P´erez-Mu˜ nuzuri, V., Showalter, K.: Wave Propagation in Subexcitable Media with Periodically Modulated Excitability. Phys. Rev. Lett. 86, 1646–1649 (2001) [13] Swartzlander Jr., E.E.: Parallel Counters. IEEE Trans. Comput. C–22 (11), 1021– 1024 (1973) [14] Toth, R., Stone, C., Adamatzky, A., de Lacy Costello, B., Bull, L.: Experimental validation of binary collisions between wave fragments in the photosensitive Belousov–Zhabotinsky reaction Chaos. Solitons & Fractals (in press) [15] Wuensche, A., Adamatzky, A.: On Spiral Glider–Guns in Hexagonal Cellular Automata: Activator–Inhibitor Paradigm. Int. J. Modern Phys. C 17(7), 1009–1025 (2006)
Water as a Quantum Computing Device (POSTER) Edward G. Belaga1, Daniel Grucker2 , Tarek Khalil3 , Jean Richert4 , and Kees van Schenk Brill1,2 1
IRMA, UMR 7501 CNRS/UDS, 67085 Strasbourg Cedex, France LINC, UMR 7191 CNRS/UDS, 67084 Strasbourg Cedex, France Dpt. of Physics, Fac. of Sciences (V), Lebanese University, Nabatieh, Lebanon 4 Laboratoire de Physique Théorique, UMR 7085 CNRS/ULP, 67084 Strasbourg Cedex, France
[email protected],
[email protected],
[email protected] [email protected],
[email protected] 2
3
Abstract. We propose a new approach in Nuclear Magnetic Resonance (NMR) technology for quantum computing. Two basic elements for quantum computation are qubits and interaction. Traditionnally in NMR, qubits are obtained by considering the spin states of certain atoms of a specific molecule. The interaction that is necessary to create qubit gates such as Control-NOT is then made possible by the spin-spin coupling that exists in such a molecule. One of the drawbacks of this method is the low scalability. More qubits usually means finding an entire different molecule to label the qubits. We take a different view on the NMR approach. We use a water tube as quantum computer where qubits are defined by the spins which have the same frequency resonance in a small interval defined by the NMR linewidth. Two fundamental roadblocks have to be crossed before this method can even be considered as a possible quantum computation technique: single qubits need to be identified and adressed and an interaction between these qubits has to exist to create two-qubit gates. We settle the first of these problems by using a magnetic field gradient applied in the main magnetic field direction. The application of a magnetic field gradient during the RF pulse induces a rotation only of those spins whose resonant frequency is equal to the bandwidth of the RF pulse, therefore a qubit can be defined by its resonant frequency and manipulated by selective RF pulses. The main advantage of creating qubits in this way is scalability. As qubits are no longer atoms of a specific molecule but segments of our water tube, increasing the number of qubits would hypothetically just mean increasing the number of segments by applying a stronger magnetic field gradient. Another potential advantage can be obtained during the initialisation phase of the qubits. The second roadblock, the problem of creating interaction between qubits, is work in progress. As for now we are investigating the use of the dipoledipole interaction between the spins to generate a coupling between the spins in order to create entanglements.
C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, p. 287, 2009. c Springer-Verlag Berlin Heidelberg 2009
Cloning for Heteroscedasticity Elimination in GMDH Learning Procedure (POSTER) Marcel Jirina1 and Marcel Jirina jr.2 1
Institute of Computer Science AS CR, Pod vodarenskou vezi 2, 182 07 Prague 8 – Liben, Czech Republic
[email protected] http://www.cs.cas.cz/~jirina 2 Faculty of Biomedical Engineering, Czech Technical University in Prague, Nám. Sítná 3105, 272 01, Kladno, Czech Republic
[email protected]
Abstract. Classification of multivariate data into two or more classes is an important problem of data processing in many different fields. For the classification of multivariate data into two classes the well-known GMDH MIA (group method data handling multilayer iterative algorithm) is often used. This approach - in contrast to others – can provide even a closed form polynomial solution. Each neuron of the GMDH network has a quadratic transfer function of two input variables that has six parameters. The process of adaptation of the GMDH network is based on standard linear regression. However, it can be found that the mathematical condition of homoscedasticity for linear regression to get unbiased results is not fulfilled. Thus all neurons have slightly biased parameters and do not give an optimal solution. Here we introduce a cloning procedure for generating clones of a given neuron that may be better than the original “parent” neuron with the parameters stated by linear regression. We show that cloning together with the use of genetic selection procedure leads to an unconventional type of GMDH algorithm. We found that cloning is a simple and effective method for obtaining a less biased solution and faster convergence than that obtained by standard linear regression. At the same time, the use of genetic selection procedure allows all neurons already generated to remain potential parents for a new neuron. Thus the problem of deleting excessive neurons during learning disappears. We show that GMC GMDH can outperform other powerful methods. It is demonstrated on tasks from the Machine Learning Repository. Our results demonstrate that the influence of heteroscedasticity can be easily eliminated by a simple cloning procedure and faster convergence and so better behavior of GMDH algorithm can be obtained. We suppose that our finding of heteroscedasticity in the GMDH method and its solution by cloning may lead to finding other more effective procedures based e.g. on robust approaches. Keywords: Multivariate data, GMDH, linear regression, Gauss-Markov conditions, cloning, genetic selection, classification.
C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, p. 288, 2009. © Springer-Verlag Berlin Heidelberg 2009
Tug-Of-War Model for Two-Bandit Problem (POSTER) Song-Ju Kim1 , Masashi Aono2 , and Masahiko Hara1,2 1
Fusion Technology Center 5F, Hanyang University, 17 Haengdang-dong, Seongdong-gu, Seoul 133-791, Korea 2 2-1 Hirosawa, Wako-shi, Saitama 351-0198, Japan {songju,masashi.aono,masahara}@riken.jp Flucto-Order Functions Asian Collaboration Team, RIKEN Advanced Science Institute
Abstract. The amoeba of the true slime mold Physarum polycephalum shows high computational capabilities. In the so-called amoeba-based computing, some computing tasks including combinatorial optimization are performed by the amoeba instead of a digital computer. We expect that there must be problems living organisms are good at solving. The “multi-armed bandit problem” would be the one of such problems. Consider a number of slot machines. Each of the machines has an arm which gives a player a reward with a certain probability when pulled. The problem is to determine the optimal strategy for maximizing the total reward sum after a certain number of trials. To maximize the total reward sum, it is necessary to judge correctly and quickly which machine has the highest reward probability. Therefore, the player should explore many machines to gather much knowledge on which machine is the best, but should not fail to exploit the reward from the known best machine. We consider that living organisms follow some efficient method to solve the problem. We propose a model, named as the “tug-of-war (TOW) model,” based on the photoavoidance behavior of amoeba induced by light stimuli. The TOW model is a bio-inspired computing method capable of solving the problem efficiently, while it is not necessarily a biological model for reproducing a behavior of the true slime mold. In this study, we focus on the two-bandit problem. In the original version of the problem, the player can select only one machine for a trial. To explore advantages of parallel computing, we extend this problem so that the player is allowed to select both machines for a trial. We show that the TOW model exhibits good performance. The average accuracy rate of the TOW model is higher than that of well-known algorithms such as the modified -greedy algorithm and the modified softmax algorithm. Additionally, the TOW model is effective for solving relatively difficult problems in which the reward probabilities of the two machines are close. Finally, we show that the TOW model is good at adapting to a changing environment in which the reward probabilities are dynamically updated. The results are highly suggestive because, in order to survive in the unknown world, living organisms have to adapt to new environments as quickly as possible at the expense of a slight reduction in accuracy. C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, p. 289, 2009. c Springer-Verlag Berlin Heidelberg 2009
Intrusion Detection in Circular Frustrated Systems: An Eminently Parallel Processing Algorithm (POSTER) Patricia Mostardinha and Fernão Vistulo de Abreu Departamento de Física, Universidade de Aveiro, Campus de Santiago, 3810-193 Aveiro, Portugal {pmostardinha,fva}@ua.pt Abstract. The cellular frustration framework (CFF) is a new approach capable of performing single intrusion detections in large populations of very diverse agents[1]. A classical approach in the literature consists in defining a set of detectors where each one surveys a sub-domain of the space of patterns that characterize non-self agents. The intrusion detection task is computationally demanding because it requires matching every new agent against all possible detectors. Also the set of detectors has to be carefully selected to avoid false positive and false negative detections. In these approaches the outcome of detection events depends only on the two agents that interact and is essentially a serial processing computation. Cellular frustration uses a different conceptual approach to solve intrusion detection tasks. First it is assumed that any agent can interact and potentially react with any other agent in the system. However, instead of instantaneous reactions, agents perform time lasting decisions, during which they interact with other agents and can change pair to optimize their previous choices. Reactions, (i.e. the triggering of detection events) only take place if agents form stable interactions that last longer than a characteristic time. False positive detections, which lead to elimination of self agents, can thus be avoided in populations that are organized in a highly frustrated dynamics where all agents never establish sufficiently long interactions. Furthermore, the population should be maximally frustrated so that intruders will always produce more stable interactions that are used to signal detection events. In this presentation we discuss this general framework. In particular we discuss how it is possible to organize a large population (e.g. with 1000 different agents) so that any intruder will always be detected because it will always perform longer interactions than self agents. We also show that even if an intruder copies exactly another self agent, then it cannot spread in the population, as its outgrowth would change the dynamical interactions and lower its frustration. This corresponds to a form of homeostatic response. As detection events in the CFF are triggered as a result of an emergent property of the dynamical system, intrusion detection becomes a whole system property that requires an inherently parallel processed computation.
Reference [1] de Abreu, F.V., Mostardinha, P.: Maximal frustration as an immunological principle. Journal of the Royal Society Interface 6, 321–334 (2009) C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, p. 290, 2009. © Springer-Verlag Berlin Heidelberg 2009
NMR-Based Encoding and Processing of Alphanumeric Information (POSTER) Tamar Ratner1, Ofer Reany1, and Ehud Keinan1,2 1
The Schulich Faculty of Chemistry and Institute of Catalysis Science and Technology, Technion – Israel Institute of Technology Technion City, Haifa 32000, Israel 2 Departments of Molecular Biology and Cell Biology, and the Skaggs Inst. of Chemical Biology, 10550 North Torrey Pines Road, La Jolla, CA 92037, USA
[email protected]
Abstract. We present here a novel experimental computing device that is based on 1H Nuclear Magnetic Resonance (NMR) readout of chemical information. This chemical encoding system utilizes two measurable parameters of homogeneous mixtures, chemical shift and peak integration, for different applications: 1) text encoding device that is based on spectral representation of a sequence of symbols, 2) encoding of 21-digit binary numbers, each represented by an NMR spectrum, and their algebraic manipulations, such as addition and subtraction, and 3) encoding of 21-digit decimal numbers. We have selected 22 compounds, each characterized by a simple 1H NMR spectrum with a single absorption within the chemical shift range of δ 2-4 ppm. The use of NMR allows us to detect the presence / absence of each substances, as well as its relative concentration, thus creating a two dimensional matrix of two parameters. The first application enables molecular information storage and encryption. The relative concentration of each component, as measured by the relevant peak integration, can represent a symbol. Integration of any of the 22 compounds in our library can be accurately measured for at least 10 different levels of concentrations. In order to represent 26 letters with high precision and also increase the encryption complexity we assigned each symbol to a pair of consecutive peaks in the spectrum. Based on 10 concentration levels of each component, a pair of peaks can produce 102 = 100 combinations, each representing a different symbol. A second application of this system, in addition to its obvious memory abilities, enables mathematical operations. The NMR spectrum of a 22component mixture represents a 21-digit binary number (on of the peaks served as an integration reference) where each of the peaks encodes for a specific digit. In any of the input mixtures (numbers) each compound was either present or absent, representing either 1 or 0, respectively. This encoding can produce as many as 221 = 2,097,152 different numbers. We used the various binary numbers to carry out addition operations by combining two or more solutions (numbers). Electronically, subtraction operations were also preformed. A third application is the representation of decimal numbers. As before, each of the peaks encodes for a specific digit. In any of the input mixtures each compound was present in one of 10 different relative concentrations, representing the 10 digits of the decimal number.
C.S. Calude et al. (Eds.): UC 2009, LNCS 5715, p. 291, 2009. © Springer-Verlag Berlin Heidelberg 2009
Author Index
Abreu, Fern˜ ao Vistulo de 290 Aihara, Kazuyuki 56 Aman, Bogdan 42 Aono, Masashi 56, 209, 289
Labella, Anna 70 Louren¸co, Carlos 7 Lutz, Jack H. 143
Beggs, Edwin J. 1 Belaga, Edward G. 287 Bottoni, Paolo 70 Burckel, Serge 85 Calvert, Wesley 98 Campagnolo, Manuel Lameiras Ciobanu, Gabriel 42 Crutchfield, James P. 3
2
D’Hondt, Ellie 110 Davis, Martin 4 Di Crescenzo, Giovanni 125 D´ıaz-Pernil, Daniel 168 Doty, David 143 Durand-Lose, J´erˆ ome 158 Etemad, Shahab
Hara, Masahiko Hirata, Yoshito
56, 209, 289 56
Jackel, Janet 125 Jirina, Marcel 288 Jirina jr., Marcel 288 Jones, Jeff 191 Kari, Jarkko 6 Keinan, Ehud 291 Khalil, Tarek 287 Kim, Song-Ju 289
Nyce, James M.
11
Ozasa, Kazunari
209
Patitz, Matthew J. 143 P´erez-Jim´enez, Mario J. 168, 262 Prost, Fr´ed´eric 219 Prusinkiewicz, Przemyslaw 16 Ratner, Tamar 291 Reany, Ofer 291 Richert, Jean 287 Riscos-N´ un ˜ez, Agust´ın
125
Gallego-Ortiz, Pilar 168 Gioan, Emeric 85 Gra¸ca, Daniel S. 179 Grucker, Daniel 287 Guti´errez-Naranjo, Miguel A.
Maeda, Mizuo 209 Manea, Florin 70 Menendez, Ron 125 Miller, Russell 98 Mills, Jonathan W. 10 Mitrana, Victor 70 Mostardinha, Patricia 290 Murphy, Niall 262
168
168, 262
Schenk Brill, Kees van 287 Sekanina, Luk´ aˇs 24 Sempere, Jose M. 70 Summers, Scott M. 143 Svozil, Karl 236 Thom´e, Emmanuel
85
Vandriessche, Yves
110
Welch, Philip D. Wells, Benjamin Woods, Damien
37 247 143, 262
Zerrari, Chaouki 219 Zhang, Liang 277 Zhong, Ning 179