CSCI 6304: Visual Languages A Shape-Based Computational Model

Similar documents
Undecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK

Array Insertion and Deletion P Systems

Foundations of Informatics: a Bridging Course

Accepting H-Array Splicing Systems and Their Properties

The Pumping Lemma. for all n 0, u 1 v n u 2 L (i.e. u 1 u 2 L, u 1 vu 2 L [but we knew that anyway], u 1 vvu 2 L, u 1 vvvu 2 L, etc.

On Controlled P Systems

On P Systems with Active Membranes

MINIMAL INGREDIENTS FOR TURING COMPLETENESS IN MEMBRANE COMPUTING

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,

Language Recognition Power of Watson-Crick Automata

Left-Forbidding Cooperating Distributed Grammar Systems

4.2 The Halting Problem

From Fundamentele Informatica 1: inleverdatum 1 april 2014, 13:45 uur. A Set A of the Same Size as B or Larger Than B. A itself is not.

Peter Wood. Department of Computer Science and Information Systems Birkbeck, University of London Automata and Formal Languages

P Finite Automata and Regular Languages over Countably Infinite Alphabets

DM17. Beregnelighed. Jacob Aae Mikkelsen

5 3 Watson-Crick Automata with Several Runs

Automata Theory (2A) Young Won Lim 5/31/18

ON MINIMAL CONTEXT-FREE INSERTION-DELETION SYSTEMS

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Characterizations of Catalytic Membrane Computing Systems

DNA computing, sticker systems, and universality

Computability and Complexity

Reducability. Sipser, pages

Insertion operations: closure properties

How to Pop a Deep PDA Matters

CS21 Decidability and Tractability

Limits of Computability

CS 7220 Computational Complexity and Algorithm Analysis

Context Free Languages and Grammars

CS5371 Theory of Computation. Lecture 14: Computability V (Prove by Reduction)

Computability Theory

On String Languages Generated by Numerical P Systems

Computability and Complexity

Descriptional Complexity of Formal Systems (Draft) Deadline for submissions: April 20, 2009 Final versions: June 18, 2009

Decidability: Church-Turing Thesis

Ogden s Lemma. and Formal Languages. Automata Theory CS 573. The proof is similar but more fussy. than the proof of the PL4CFL.

Turing machines and linear bounded automata

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012

Turing machines and linear bounded automata

The Unsolvability of the Halting Problem. Chapter 19

CSE 105 THEORY OF COMPUTATION

CS:4330 Theory of Computation Spring Regular Languages. Finite Automata and Regular Expressions. Haniel Barbosa

SYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES

Final exam study sheet for CS3719 Turing machines and decidability.

Introduction to the Theory of Computing

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

Turing machines and linear bounded automata

HENNING FERNAU Fachbereich IV, Abteilung Informatik, Universität Trier, D Trier, Germany

Decidability (What, stuff is unsolvable?)

11. Automata and languages, cellular automata, grammars, L-systems

A representation of context-free grammars with the help of finite digraphs

CS481F01 Solutions 8

Parikh s theorem. Håkan Lindqvist

CSCI FOUNDATIONS OF COMPUTER SCIENCE

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2. March 30, Please write your name in the upper corner of each page.

MA/CSSE 474 Theory of Computation

Distributed-Automata and Simple Test Tube Systems. Prahladh Harsha

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

Hybrid Transition Modes in (Tissue) P Systems

ECS 120: Theory of Computation UC Davis Phillip Rogaway February 16, Midterm Exam

1.A Sets, Relations, Graphs, and Functions 1.A.1 Set a collection of objects(element) Let A be a set and a be an elements in A, then we write a A.

Lecture 17: Language Recognition

P systems based on tag operations

Blackhole Pushdown Automata

Theory of Computation Turing Machine and Pushdown Automata

Theory of Computation

A shrinking lemma for random forbidding context languages

Propositional logic. First order logic. Alexander Clark. Autumn 2014

Lecture 2: Connecting the Three Models

Theory of Computer Science. Theory of Computer Science. D8.1 Other Halting Problem Variants. D8.2 Rice s Theorem

CS3719 Theory of Computation and Algorithms

Lecture 12: Mapping Reductions

Computational Tasks and Models

P Systems with Symport/Antiport of Rules

CSCI 1590 Intro to Computational Complexity

Introduction to Turing Machines. Reading: Chapters 8 & 9

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

Music as a Formal Language

Introduction to Computers & Programming

Introduction to Theoretical Computer Science. Motivation. Automata = abstract computing devices

Theory of Computation

Introduction to Theory of Computing

CSCE 551: Chin-Tser Huang. University of South Carolina

CS6901: review of Theory of Computation and Algorithms

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Languages, regular languages, finite automata

5 3 Sensing Watson-Crick Finite Automata

CS375: Logic and Theory of Computing

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama

Information and Computation 194 (2004) Boolean grammars. Alexander Okhotin

Introduction to Automata

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,

X-machines - a computational model framework.

Undecidable Problems and Reducibility

On Stateless Multicounter Machines

RATIONAL MONOID AND SEMIGROUP AUTOMATA

6.8 The Post Correspondence Problem

The Turing Machine. Computability. The Church-Turing Thesis (1936) Theory Hall of Fame. Theory Hall of Fame. Undecidability

Computability and Complexity

Transcription:

CSCI 6304: Visual Languages A Shape-Based Computational Model November 2, 2005 Matt.Boardman@dal.ca

Research Article Computing with Shapes Paulo Bottoni (Rome) Giancarlo Mauri (Milan) Piero Mussio (Brescia) Gheorghe Păun (Bucharest) Journal of Visual Languages and Computing, Vol. 12, No. 6, 2001 Main concept: Shape Completion System 2

Outline Introduction and Terminology Shape Completion Systems Turing Computational Completeness Variations Open Issues Conclusions 3

Introduction Visual languages address communication challenges Computability framework: Shape Completion Systems Associate meaning with the interaction of shapes Use this interactive meaning to create visual sentences Interactive visual languages (IVL) define sets of visual sentences A Shape Completion System is an implementation of IVL 4

Introduction: Familiar Shape Completion Systems 5 Image: Wikipedia (Dominoes)

Introduction: Familiar Shape Completion Systems 6 Images: Apple IIGS Gaming Memory Fairway

Introduction: Familiar Shape Completion Systems Shape completion systems don t need to be square: 7 but here we will only consider the square case. Image: The GIMP Documentation (Jigsaw Filter Example)

Introduction: Applications and Related Work Pattern recognition and image processing Algebraic characterization of images or time series Urban planning and industrial manufacturing Shape-fitting algorithms to assemble parts in minimum space Plane tessellation (mosaics) DNA computing Based on connecting tiles with like edges (colours, symbols) A similar system, based on DNA replication (Kari et al, 1998) 8

Shape Completion Systems Consider a set of polyominoes in two-dimensional space, created from square pixels 9 Image adapted from: Bottoni et al, 2001

Shape Completion Systems In formal language theory, we define: an alphabet V is a finite, non-empty set of abstract symbols e.g. V = { a, b, c } the empty string λ a free monoid V* is the set of possible sequences that can be created by combining zero or more elements of V e.g. V* = { λ, a, ab, abc, caacb, } a free semigroup V + is the non-empty subset of V* e.g. V + = { a, ab, abc, caacb, } the length w of a word w V* 10

Shape Completion Systems Two-dimensional shapes map to one-dimensional sentences (i.e. a sequence of operations) Interactions between different polyominoes describe a meaningful language Reveal implicit and explicit dependencies e.g. We cannot add an int to a float without an intermediate step e.g. I before E except after C 11

Shape Completion Systems We can define a correct computation: 1. Start with a specific polyomino 2. Add other polyominoes in a sequence mapping A sequence mapping defines which polyominoes can be added at each step, based solely on the previous polyomino. 3. At all steps in the computation, the adjoined polyominoes must be orthogonally connected Orthogonal means horizontal or vertical, but not diagonal. 4. To be considered correct, we must end with a complete rectangle 12

Shape Completion Systems A Shape Completion System : γ = ( V, P, p 0, next, lab ) where: V is an alphabet P is a finite set of polyominoes p 0 is the initial polyomino, p 0 P next is a sequence mapping, next: P 2 P (a transition mapping) lab is the label mapping, lab: P V* 13

Shape Completion Systems A Computation is a sequence: σ = p 0 p 1 p 2 p n, n 1 where the sequence of polyominoes is controlled by the sequence mapping: p i next ( p i-1 ), 1 i n 14 Without this condition, we would call this a simple shape completion system i.e. next ( p ) = P p P

Shape Completion Systems We can use the label mapping to associate a string with each computation, simply through concatenation i.e. lab(σ) = lab( p 0 )lab( p 1 )lab( p 2 ) lab( p n ), n 1 The resulting language of all strings that can be generated from the computations in γ is denoted L(γ) A sparse definition of lab with values in V { λ } indicates that γ is reduced Authors assertion: Any finite language can be generated by a reduced, simple shape completion system. 15

Shape Completion Systems: Example 1 a 0 = λ a i p 0 p i a 1 w 1 = a 1 a 2 w 2 = a 2 a 3 w 3 = a 3 16 Image adapted from: Bottoni et al, 2001

Shape Completion Systems: Example 1 V = { a 1,, a n } L 1 V* L 1 = { w 1,, w m } p 0 p i For each w i where i = 1, 2,, m we consider the set of polyominoes P = { p 0, p i } to create: γ 1 = ( V, P, p 0, lab ) where lab( p 0 ) = λ lab( p i ) = a i Result: L(γ 1 ) = L 1 17 (Simple, but not necessarily reduced) Image adapted from: Bottoni et al, 2001

Shape Completion Systems: Example 2 V = { a 1,, a n } L 2 V* L 2 = { w 1,, w m } For each w i = a i,1 a i,2 a i,ki where a i,j V 1 j k i 1 i m we consider polyominoes P = { p 0, p i,j } to create: γ 2 = ( V, P, p 0, lab ) where lab( p 0 ) = λ p 0 p i,1 p i,j p i,ki Result: L(γ 2 ) = L 2 18 lab( p i,j ) = a i,j Image adapted from: Bottoni et al, 2001

Turing Computational Completeness What does it mean to be Turing-complete? System can be emulated by a Turing machine Imperative languages: Object-oriented languages: Visual languages: But not: BASIC, C C++, Java, Smalltalk Prograph, LabView SQL, Spreadsheets 19

Turing Computational Completeness Recursively Enumerable languages can be evaluated by a Turing Machine Pure characterization of shape-based languages in this paper is formal proof that IVL have the same computational power as Turing machines! no non-pictorial elements no non-terminal symbol or operation no matching colours no deformations of placed elements 20

Turing Computational Completeness Chomsky Hierarchy: Noam Chomsky based a hierarchy of grammars on linguistics Type 0: Recursively Enumerable Grammars May be evaluated using Turing machine Type 1: Context Sensitive Grammars May be evaluated using Linear-Bounded Automaton Type 2: Context Free Grammars May be evaluated using Pushdown automaton Type 3: Regular Grammars May be evaluated using Finite State Machine 21 Image in public domain

Turing Computational Completeness SL = RE Shape Languages can represent all Recursively Enumerable Grammars (Type 0, Turing Machine) Simple Shape Languages SSL CS Context-Sensitive Grammars (Type 1, Linear-Bounded Automaton) Reduced and Simple Shape Languages RSSL CF Context-Free Grammars (Type 2, Pushdown Automaton) REG Regular Grammars (Type 3, Finite State Machine) 22 Figure based on: Bottoni et al, 2001 = unknown relation? = incomparable to (Bottoni et al) = is a proper subset of (Chomsky Hierarchy) = is a proper subset of (Bottoni et al)

Additional Variations Some stronger variations: Specify stop polyomino, in addition to initial polyomino Impose a limit on the height of final rectangle Matching colours or symbols (Wang, Penrose tiles) Designate particular segments as sticky (Kari DNA) Stationary computations: stop when no steps possible Proposed computational complexity measure: Ratio of surface area of final rectangle to length of output string 23

Open Issues Implementation issues: Shape fitting algorithm? See e.g. S. Har-Peled, Y. Wang, Shape Fitting with Outliers, SIAM Journal of Computing, 33(2), 2004, pp. 269-285. Allow rotation, other transformations? Left to particular implementation (not allowed here). Design of next sequence mapping? Left to particular implementation (none specified here). How to address logical decidability? There may exist formulas or inputs which are undecidable, i.e. there is no algorithm with a finite number of steps to determine semantic validity. Advantages? Disadvantages? To compare a similar system with biological plausibility, see L. Kari, Gh. Păun, G. Rozenberg, A. Salomaa, S. Yu, DNA computing, sticker systems, and universality, Acta Informatica, 35(6), pp. 401-420, 1998. 24

Conclusions Complex languages can be created using Shape Completion Systems Even without next sequence mapping (i.e. SSL or RSSL) IVL are Turing-complete Shape Completion System is a variant of IVL A picture is worth 1000 words Mathematical proof of the power and complexity of visual languages 25

References P. Bottoni, G. Mauri, P. Mussio, Gh. Păun, Computing with Shapes, Journal of Visual Languages and Computing, 12(6), 2001, pp. 601-626. P. Bottoni, M. F. Costabile, S. Levialdi, P. Mussio, Defining Visual Languages for Interactive Computing, IEEE Transactions on Systems, Man, and Cybernetics Part A, 27(6), 1997, pp. 773-782. The GIMP Documentation, Jigsaw Filter Example (Figure 10.40), [http://docs.gimp.org]. S. Har-Peled, Y. Wang, Shape Fitting with Outliers, SIAM Journal of Computing, 33(2), 2004, pp. 269-285. L. Kari, Gh. Păun, G. Rozenberg, A. Salomaa, S. Yu, DNA computing, sticker systems, and universality, Acta Informatica, 35(6), pp. 401-420, 1998. A. Pajitnov, TETPИC (Tetris): The Soviet Challenge, Academy Soft ELORG / Spectrum Holobyte Sphere Inc., 1987. Images: A. Lee, The Apple IIGS Gaming Memory Fairway, 2001 [http://www.whatisthe2gs.apple2.org.za]. Schadel, Image of Turing Machine (in public domain), 2005. M. A. Tapia, J. P. Duarte, Shape Grammars, MIT, 1999 [http://shapegrammar.org]. Wikipedia contributors, Dominoes (Image), Chomsky Hierarchy, Decidability (logic), Free Monoid, Recursively Enumerable Language, Turing Completeness, Turing Machine, Wikipedia: The Free Encyclopedia, 2005, [http://en.wikipedia.org/wiki]. 26

Appendix: Visual Sentences For Interactive Visual Languages (IVL), we define: i image: an abstract arrangement of shapes d description: the meaning of shape interactions int interpretation: explicit relation from i d mat materialization: explicit relation from d i vs visual sentence: quadruple of these four definitions i.e. vs = (i, d, int, mat) 27 Source: Bottini et al, 1997

Appendix: Turing Computational Completeness Looping constructs: Conditional statements, Boolean operations: 28 AND OR

Appendix: Proof of Theorem 5 Theorem: Reduced, simple shape completion systems can produce fairly complex languages which are noncontext-free. RSSL CF 29

Appendix: Proof of Theorem 5 Here we consider a oneletter, non-regular, simple, reduced shape completion system: γ = ( { a }, P, p 0, lab ) where: P = { p 0, p 1, p 2, p 3, p 4, p 5 } lab( p i ) = a 0 i 5 30

Appendix: Proof of Theorem 5 These shapes can only be used to create squares (no rectangles are possible). Call n the number of times that p 1 is used (shown green). For example, here we have n = 1. 31

Appendix: Proof of Theorem 5 Here we have n = 2. 32

Appendix: Proof of Theorem 5 We can calculate the size of the resulting square, as a function of n: S(n) = ( 8n + 4 ) 2 n 1 In constructing a square of size n, we use: one copy of p 0 n 1 n( n 1) i = n copies of of p 1 copies of of p 2 i= 1 2 n copies of of p 3 2(n-1)+2 = 2n copies of of p 5 2( n 1) i= 1 i + 2( n 1) = 2n 2 n 1 copies of of p 4 33

Appendix: Proof of Theorem 5 Since all polyominoes are labelled with a, we get a string of a s for a square of size n: w n n( n 1) 2 = 1+ n + n + + 2n + 2n n 2 5 n( n + 1) = 2 1 which is always an integer, since n(n+1) is always even. 34

Appendix: Proof of Theorem 5 We therefore have: L( γ ) = { [5n( n+ 1) / 2] a n 1} which is not a regular language. Since one-letter, context-free languages are regular, L(γ 2 ) CF (i.e. it is non-context-free). QED 35