SM2220 – Class 10 Finite Automata. SM2220 – Class 10 Finite Automata Computation theory Formal language.

Slides:



Advertisements
Similar presentations
ICT2191 Topic 4 State Machines Why State Machines? What is a State Machine? Finite State Automata Finite State Machines Using FSMs Use in Game AI Advantages.
Advertisements

Lecture 23UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 23.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
Theory Of Automata By Dr. MM Alam
C O N T E X T - F R E E LANGUAGES ( use a grammar to describe a language) 1.
1 Combinational Logic Design&Analysis. 2 Introduction We have learned all the prerequisite material: – Truth tables and Boolean expressions describe functions.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Notes for presenters: –These slides are provided courtesy of Tom Cortina (Carnegie Mellon University). Details about this activity can be found at
January 5, 2015CS21 Lecture 11 CS21 Decidability and Tractability Lecture 1 January 5, 2015.
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Fall 2008.
CS 310 – Fall 2006 Pacific University CS310 Finite Automata Sections: September 1, 2006.
CS 490: Automata and Language Theory Daniel Firpo Spring 2003.
CS 1400 Chapter 1 Introduction and Background
Topics Automata Theory Grammars and Languages Complexities
CSC 361Finite Automata1. CSC 361Finite Automata2 Formal Specification of Languages Generators Grammars Context-free Regular Regular Expressions Recognizers.
Grammars, Languages and Finite-state automata Languages are described by grammars We need an algorithm that takes as input grammar sentence And gives a.
Introduction to Software Testing Chapter 9.4 Model-Based Grammars Paul Ammann & Jeff Offutt
Language Recognizer Connecting Type 3 languages and Finite State Automata Copyright © – Curt Hill.
CSC1401: Introductory Programming Steve Cooper
CSI 3120, Grammars, page 1 Language description methods Major topics in this part of the course: –Syntax and semantics –Grammars –Axiomatic semantics (next.
Welcome to Honors Intro to CS Theory Introduction to CS Theory (Honors & Traditional): - formalization of computation - various models of computation (increasing.
CS/IT 138 THEORY OF COMPUTATION Chapter 1 Introduction to the Theory of Computation.
1 Unit 1: Automata Theory and Formal Languages Readings 1, 2.2, 2.3.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
DISCRETE COMPUTATIONAL STRUCTURES CS Fall 2005.
Computabilty Computability Finite State Machine. Regular Languages. Homework: Finish Craps. Next Week: On your own: videos +
Introduction to Software Testing Chapter 5.1 Syntax-based Testing Paul Ammann & Jeff Offutt
CS 461 – Sept. 19 Last word on finite automata… –Scanning tokens in a compiler –How do we implement a “state” ? Chapter 2 introduces the 2 nd model of.
Copyright © Curt Hill Languages and Grammars This is not English Class. But there is a resemblance.
Computability Review homework. Regular Operations. Nondeterministic machines. NFSM = FSM Homework: By hand, build FSM version of specific NFSM. Try to.
Introduction to Parsing
Copyright © Curt Hill Finite State Machines The Simplest and Least Capable Automaton.
CS1Q Computer Systems Lecture 11 Simon Gay. Lecture 11CS1Q Computer Systems - Simon Gay 2 The D FlipFlop The RS flipflop stores one bit of information.
Natural Language Processing Lecture 4 : Regular Expressions and Automata.
SM2220 – Class 06 Finite Automata. SM2220 – Class 06 Topic in theoretical computing. A subset of computation machines. Closely related to formal language.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Chapter 3 Regular Expressions, Nondeterminism, and Kleene’s Theorem Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction.
Finite State Machines 1.Finite state machines with output 2.Finite state machines with no output 3.DFA 4.NDFA.
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 1 Regular Languages Some slides are in courtesy.
Finite Automata Chapter 1. Automatic Door Example Top View.
September1999 CMSC 203 / 0201 Fall 2002 Week #14 – 25/27 November 2002 Prof. Marie desJardins clip art courtesy of
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2007.
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.
CS 404Ahmed Ezzat 1 CS 404 Introduction to Compiler Design Lecture 1 Ahmed Ezzat.
CSE 202 – Formal Languages and Automata Theory 1 REGULAR EXPRESSION.
Theory of Computation Automata Theory Dr. Ayman Srour.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Formal Languages and Automata FORMAL LANGUAGES FINITE STATE AUTOMATA.
Theory of Computation Automata Theory Dr. Ayman Srour.
Chapter 1 INTRODUCTION TO THE THEORY OF COMPUTATION.
BCT 2083 DISCRETE STRUCTURE AND APPLICATIONS
CSCI 2670 Introduction to Theory of Computing
Formal Methods in software development
Finite State Machines Dr K R Bond 2009
BTS430 Systems Analysis and Design using UML
G. Pullaiah College of Engineering and Technology
CSC312 Automata Theory Chapter # 5 by Cohen Finite Automata
Recognizer for a Language
Formal Language.
Theory of Computation Languages.
What Are They? Who Needs ‘em? An Example: Scoring in Tennis
Finite Automata.
Formal Methods in software development
Introduction to Software Testing Chapter 5.1 Syntax-based Testing
CSC312 Automata Theory Chapter # 5 by Cohen Finite Automata
Formal Languages and Automata Theory BODDEDA HARITHA LAKSHMI,
CSCE 355 Foundations of Computation
Automata theory and formal languages COS 3112 – AUTOMATA THEORY PRELIM PERIOD WEEK 1 AND 2.
Presentation transcript:

SM2220 – Class 10 Finite Automata

SM2220 – Class 10 Finite Automata Computation theory Formal language

SM2220 – Class 10 Finite Automata Provides an easy method for the design of interactive artworks. Relates to generative art through the use of regular grammar.

SM2220 – Class 10 From a functional point of view, computation can be considered as a black box which takes in symbols and produces symbols. Computation Input symbolsOutput symbols

SM2220 – Class 10 Using the year 1 Pd or Director program you have done, the same logic applies. VJ software Keyboard inputsVideo clips

SM2220 – Class 10 Imagine this strange Boolean algebra formula, ANDNOT A (1 or 0)

SM2220 – Class 10 The feedback loop introduces the element of time and most importantly, memory. ANDNOT A

SM2220 – Class 10 The current formula is not very stable. It can perform better with in introduction of another input. ANDNOT A

SM2220 – Class 10 ANDNOT A ANDNOT B The following is a more stable memory logic.

SM2220 – Class 10 The memory gives you the state (status) of the computing device. The previous one can only remember two states (1 bit information).

SM2220 – Class 10 Finite Automata is an abstract computing device capable of remembering finite number of states.

SM2220 – Class 10 A less abstract description? Nonlinear description of how an object can change its state over time, possibly in response to events in its environment. The Ultimate Guide to FSMs in Games – Dan Fu and Ryan Houlette

SM2220 – Class 10 It starts at an initial state. By accepting different inputs, it changes to different states. Eventually, it stops at an ending state.

SM2220 – Class 10 S0 S1 S2 a b b Simple example

SM2220 – Class 10 The diagram is known as a Graph in Mathematics. Each state is a node and each input symbol is a directed link. A graph is different from a tree that it can contain a loop.

SM2220 – Class 10 State transition table Current stateInputNext state S0aS1 S0bS2 S1bS2

SM2220 – Class 10 If you consider the input symbol sequence, you can notice the valid ones are, ab b All the other input symbol sequences are invalid.

SM2220 – Class 10 Essentially this simple finite automata defines a simple language which has only 2 alphabets: a, b. And the valid syntax for the language are the 2 sentences: ab and b.

SM2220 – Class 10 Such language is known as, Regular language Regular grammar Regular expression

SM2220 – Class 10 S0 S1 S3 S2 a a b b a b a, b More complicated example

SM2220 – Class 10 Exercise time Try to draw the transition table for the finite automata. Try to identify the regular language pattern.

SM2220 – Class 10 Current stateInputNext state

SM2220 – Class 10 Current stateInputNext state S0aS1 S0b(S2) S1aS3 S1b(S2) S2b(S2) S2aS1 S3a b

SM2220 – Class 10 To determine the language that the previous finite automata generates, we can trace the patterns, (ab)*b* b(ab)*b*

SM2220 – Class 10 Applications of Finite Automata

SM2220 – Class 10 If you start replacing the a, b symbols with sentences, plots, etc., you can end up with a piece of text like the Oulipo experiments.

SM2220 – Class 10 Gather Treasure Flee Fight Monster in sight Monster dead Simple application in game Cornered Monster away

SM2220 – Class 10 If you start replacing the states: S0, S1, etc. with scenes, movie clips or frames, you will end up with an interactive movie. The symbols: a, b will become your participants’ input, such as sensor values or keyboard inputs.

SM2220 – Class 10 Now, go back to our job assignment. See if the idea of Finite Automata can help you out.

SM2220 – Class 10 First, you determine how many states the artwork requires.

SM2220 – Class 10 Second, for each state, design what actions will be needed, e.g. to play a video or to stop a video.

SM2220 – Class 10 Next, you need to figure out for each state, what type of inputs will lead it to the next state. Note that each sensor/key has two status, i.e. from off to on and from on to off.

SM2220 – Class 10 We have 3 sensors (a, b, c in keyboard), which will be all of our inputs.

SM2220 – Class 10 We have 3 sensors (a, b, c in keyboard), which will be all of our inputs. We have 3 outputs (video 1, 2, 3).

SM2220 – Class 10 Start +a S1S2S3S4S5 -a +b -b -a +a +c -c -b +b

SM2220 – Class 10 Current stateInputNext state S0+aS1 -aS0 S1+bS2 -bS1 S2-aS3 +aS2 S3+cS4 -cS3 S4-bS5 +bS4

SM2220 – Class 10 InputCurrent stateNext state +aS0S1 S3S2 -aS1S0 S2S3 +bS1S2 S5S4 -bS2S1 S4S5 +cS3S4 -cS4S3

SM2220 – Class 10 Current stateVideo playing S0- S1Video 1 S2Video 1, 2 S3Video 2 S4Video 1, 2, 3 S5Video 3