Efficient Divide-and- Conquer Simulations Of Symmetric FSAs David Pritchard, University of Waterloo Aug. 29 '07 Toronto, ON.

Slides:



Advertisements
Similar presentations
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Advertisements

Finite-State Machines with No Output Ying Lu
CSE 311 Foundations of Computing I
CMPS 3223 Theory of Computation
Lecture 24 MAS 714 Hartmut Klauck
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture2: Non Deterministic Finite Automata Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture4: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
Introduction to Computability Theory
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
Finite Automata Finite-state machine with no output. FA consists of States, Transitions between states FA is a 5-tuple Example! A string x is recognized.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
1 Finite Automata. 2 Finite Automaton Input “Accept” or “Reject” String Finite Automaton Output.
Validating Streaming XML Documents Luc Segoufin & Victor Vianu Presented by Harel Paz.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
CS Chapter 2. LanguageMachineGrammar RegularFinite AutomatonRegular Expression, Regular Grammar Context-FreePushdown AutomatonContext-Free Grammar.
Fall 2004COMP 3351 Another NFA Example. Fall 2004COMP 3352 Language accepted (redundant state)
Costas Busch - LSU1 Non-Deterministic Finite Automata.
Regular Expressions and Automata Chapter 2. Regular Expressions Standard notation for characterizing text sequences Used in all kinds of text processing.
1 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY For next time: Read 2.1 & 2.2.
1 Non-Deterministic Finite Automata. 2 Alphabet = Nondeterministic Finite Automaton (NFA)
Formal Language Finite set of alphabets Σ: e.g., {0, 1}, {a, b, c}, { ‘{‘, ‘}’ } Language L is a subset of strings on Σ, e.g., {00, 110, 01} a finite language,
Finite-State Machines with No Output
NFA ε - NFA - DFA equivalence. What is an NFA An NFA is an automaton that its states might have none, one or more outgoing arrows under a specific symbol.
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
REGULAR LANGUAGES.
Prof. Busch - LSU1 NFAs accept the Regular Languages.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.
Copyright © Curt Hill Finite State Automata Again This Time No Output.
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Modeling Computation: Finite State Machines without Output
UNIT - I Formal Language and Regular Expressions: Languages Definition regular expressions Regular sets identity rules. Finite Automata: DFA NFA NFA with.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 10 Automata, Grammars and Languages.
Lecture Notes 
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA.
Overview of Previous Lesson(s) Over View  A token is a pair consisting of a token name and an optional attribute value.  A pattern is a description.
98 Nondeterministic Automata vs Deterministic Automata We learned that NFA is a convenient model for showing the relationships among regular grammars,
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Chapter 5 Finite Automata Finite State Automata n Capable of recognizing numerous symbol patterns, the class of regular languages n Suitable for.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Conversions Regular Expression to FA FA to Regular Expression.
Regular Languages Chapter 1 Giorgi Japaridze Theory of Computability.
Complexity and Computability Theory I Lecture #5 Rina Zviel-Girshin Leah Epstein Winter
1/29/02CSE460 - MSU1 Nondeterminism-NFA Section 4.1 of Martin Textbook CSE460 – Computability & Formal Language Theory Comp. Science & Engineering Michigan.
1 Chapter 2 Finite Automata (part a) Hokkaido, Japan.
Fall 2004COMP 3351 Finite Automata. Fall 2004COMP 3352 Finite Automaton Input String Output String Finite Automaton.
WELCOME TO A JOURNEY TO CS419 Dr. Hussien Sharaf Dr. Mohammad Nassef Department of Computer Science, Faculty of Computers and Information, Cairo University.
CIS Automata and Formal Languages – Pei Wang
Non Deterministic Automata
Hierarchy of languages
CSE322 Finite Automata Lecture #2.
CS 154, Lecture 4: Limitations on DFAs (I),
Non-Deterministic Finite Automata
COSC 3340: Introduction to Theory of Computation
Non-Deterministic Finite Automata
CSE322 Definition and description of finite Automata
Non Deterministic Automata
Introduction to Finite Automata
Finite Automata.
Instructor: Aaron Roth
Chapter 1 Regular Language
Non Deterministic Automata
Presentation transcript:

Efficient Divide-and- Conquer Simulations Of Symmetric FSAs David Pritchard, University of Waterloo Aug. 29 '07 Toronto, ON

Introduction Divide-and-conquer paradigm is used in both classical algorithms & parallel computing. We conisder a formal model for a divide-and- conquer process that resembles an FSA. Given a symmetric FSA (i.e., one unaffected by permutations of input) we show there exists a divide-and-conquer automaton to simulate it, such that the size of the state space used doesn't increase.

Overview Divide-and-conquer: example and definition Ladner and Fischer's divide-and-conquer simulation of a sequential FSA Motivation for new result Main lemma Construction/proof sketch Areas for future investigation

Definition: (Symmetric) Finite- State Automaton Input alphabet X, output alphabet O, state space Q, all finite. Initial state q 0 in Q. Transition function f ¾ : Q → Q for each ¾ in §. Post-processing function ¦ : Q → O generalizes set of accepting states On input string ®¯° … ! start in state q 0, then apply f ® to current state, then f ¯, etc. Output value is ¦ ( q ) where q is final state. "Symmetric": permute input ⇨ same output.

Divide-and-Conquer Example ………… =85+3=8 8+8=16

Elements of a Divide-and- Conquer Automaton (DCA) Inputs partitioned arbitrarily into 2 parts. Recurse until trivial case (e.g., one input). Intermediate results combined with a deterministic 2-input function. Post-processing function ¦ maps the final intermediate result to the output alphabet (analogue to set of accepting states). If all sets finite, and output is independent of how the division was performed, this is a Divide-and-Conquer Automaton (DCA).

[Ladner & Fischer '77] Functional Composition Idea Allows us to simulate any FSA with a DCA. Output of FSA on input ®¯° … ! is ¦ ( f ! (… f ° ( f ¯ ( f ® ( q 0 )))…)) = ¦ ( f ! ∘ … ∘ f ° ∘ f ¯ ∘ f ® ( q 0 )) Composition ( ∘) is associative; we can hence use D & C to compute composition of f 's. In post-processing, f ! ∘ … ∘ f ® ↦ ¦ ( f ! ∘ … ∘ f ® ( q 0 )). # intermediate states: #{ f | f : Q → Q } = | Q | | Q |.

[Ladner & Fischer '77] Illustration For string S = ® ¯° … ! define f S = f ! ∘ … ∘ f ° ∘ f ¯ ∘ f ® S = ®¯ … ·¸¹ … ! ®¯ … · ¸¹ … ! … ® Look up f ®, store as table q1q1 q2q2 q3q3 … f®(q1)f®(q1) f®(q2)f®(q2) f®(q3)f®(q3)… f®f® f ®¯ … · f ¸¹ … ! f S = f ¸¹ … ! ∘ f ®¯ … · Compute composition

Motivation (1/2) Symmetric Network Computation, 2006 with Santosh Vempala. Want FSA-based network computation in non- regular graphs with global symmetry and local symmetry. Each node is a copy of the same symmetric FSA; reads neighbours' states as inputs to compute next state during a transition. asynchronous, probabilistic Can elect leader, do biconnectivity. Firing squad? Demo

Motivation (2/2) Look at one node We showed: {symmetric functions computable by FSAs} = {symmetric functions computable by DCAs} = {ultimately periodic symmetric functions}. E.g., determine if at least 10 neighbours, or if number of purple neighbours is odd. cf. Ladner & Fischer: {functions computable by FSAs} = {functions computable by DCAs}.

Statement of New Result Until now all FSA-to-DCA conversions entail an exponential increase in the state space size (i.e., from | Q | to | Q | | Q | ). New contribution: a way to convert a symmetric FSA to a DCA without any increase in size of state space.

Main Lemma (1/3) State q of FSA inaccessible if no string S has f S ( q 0 ) = q. States q, q ' are indistinguishable if for all S, ¦ ( f S ( q )) = ¦ ( f S ( q ')). If an FSA has no inaccessible states and no indistinguishable pairs, it is irredundant. Given an FSA, straightforward to construct an equivalent FSA that is irredundant. E.g., delete states unreachable from q 0 in transition graph. Merge indistinguishable pairs similarly.

Main Lemma (2/3) Main lemma: irredundant symmetric FSAs have commuting transition functions. Symmetry is a black-box property; add to it the innocent-looking "white-box" property of irredundancy and we get a "white-box" result (commuting transition functions). We then obtain a simple D&C construction with a reasonably short proof of correctness.

Main Lemma (3/3) In a symmetric irredundant FSA, f ¾ 's commute. Say input symbols ¾, ¾ ' have f ¾ ( f ¾ ' ( q ))≠ f ¾ ' ( f ¾ ( q )) By distinguishability some string S has ¦ ( f S ( f ¾ ( f ¾ ' ( q )))) ≠ ¦ ( f S ( f ¾ ' ( f ¾ ( q )))). By accessibility some string T has q = f T ( q 0 ).  ¦ ( f S ( f ¾ ( f ¾ ' ( f T ( q 0 ))))) ≠ ¦ ( f S ( f ¾ ' ( f ¾ ( f T ( q 0 ))))). But this says that outputs on inputs T¾ ' ¾S and T¾¾ ' S differ, contradicting symmetry. 

Construction, Proof Idea (1/2) Given: symmetric irredundant FSA. For each state q fix a representative string r [ q ] that brings FSA to state q from q 0, f r [ q ] ( q 0 )= q Given any other string S with f S ( q 0 )= q, S and r [ q ] are interchangeable at start of input. Using commutativity of f 's, we obtain f S = f r [ q ] i.e., interchangeable anywhere in input.

Construction, Proof Idea (2/2) Definition of the DCA to simulate the FSA DCA intermediate state space = FSA state space; its size could only have decreased when redundancy was removed. Base case: map input character ¾ to f ¾ ( q 0 ). Combining: map pair ( q, q ') to f r [ q '] ( q ). Post-processing: use same ¦ as FSA did. Correct & independent of how dividing performed due to interchangeability.

Areas for Future Investigation Ladner-Fischer result extends to stochastic or nondeterministic automata. Seems for sure "main lemma" fails and no "small" DCA exist but we yet lack a convincing counterexample. Suppose FSA has implicit transition function: k -bit binary states/inputs, transition function is a poly-time Turing machine. Our transformation takes exp ( k ) time to ensure irredundancy, can one do better? Thanks for listening!

References Preprint: R. E. Ladner and M. J. Fischer. Parallel prefix computation. J. ACM, 27(4):831–838, Preliminary version appeared in Proc. 6 th International Conf. Parallel Processing, pages 218– 223, D. Pritchard and S. Vempala. Symmetric network computation. In Proc. 18th SPAA, pages 261–270, Model demo: