THEORY OF COMPUTATION Lecture One: Automata Theory Automata Theory.

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

4b Lexical analysis Finite Automata
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
Lecture 6 Nondeterministic Finite Automata (NFA)
YES-NO machines Finite State Automata as language recognizers.
Chapter Two: Finite Automata
Chapter Section Section Summary Set of Strings Finite-State Automata Language Recognition by Finite-State Machines Designing Finite-State.
CS5371 Theory of Computation
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.
Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Fall 2008.
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.
1.Defs. a)Finite Automaton: A Finite Automaton ( FA ) has finite set of ‘states’ ( Q={q 0, q 1, q 2, ….. ) and its ‘control’ moves from state to state.
CPSC 388 – Compiler Design and Construction Scanners – Finite State Automata.
Finite-State Machines with No Output Longin Jan Latecki Temple University Based on Slides by Elsa L Gunter, NJIT, and by Costas Busch Costas Busch.
Finite-State Machines with No Output
Lecture 03: Theory of Automata:08 Finite Automata.
Lecture 23: Finite State Machines with no Outputs Acceptors & Recognizers.
INTRODUCTION TO THE THEORY OF COMPUTATION INTRODUCTION MICHAEL SIPSER, SECOND EDITION 1.
REGULAR LANGUAGES.
1 Unit 1: Automata Theory and Formal Languages Readings 1, 2.2, 2.3.
Theory of Computation - Lecture 3 Regular Languages What is a computer? Complicated, we need idealized computer for managing mathematical theories... Hence:
Lecture 1 Computation and Languages CS311 Fall 2012.
4b 4b Lexical analysis Finite Automata. Finite Automata (FA) FA also called Finite State Machine (FSM) –Abstract model of a computing entity. –Decides.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
Complexity and Computability Theory I Lecture #2 Rina Zviel-Girshin Leah Epstein Winter
Complexity and Computability Theory I Lecture #11 Instructor: Rina Zviel-Girshin Lea Epstein.
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.
Modeling Computation: Finite State Machines without Output
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.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
1 Finite Automata. 2 Introductory Example An automaton that accepts all legal Pascal identifiers: Letter Digit Letter or Digit "yes" "no" 2.
Lecture #4 Thinking of designing an abstract machine acts as finite automata. Advanced Computation Theory.
WELCOME TO A JOURNEY TO CS419 Dr. Hussien Sharaf Dr. Mohammad Nassef Department of Computer Science, Faculty of Computers and Information, Cairo University.
  An alphabet is any finite set of symbols.  Examples: ASCII, Unicode, {0,1} ( binary alphabet ), {a,b,c}. Alphabets.
Costas Busch - LSU1 Deterministic Finite Automata And Regular Languages.
Theory of Computation Automata Theory Dr. Ayman Srour.
Deterministic Finite-State Machine (or Deterministic Finite Automaton) A DFA is a 5-tuple, (S, Σ, T, s, A), consisting of: S: a finite set of states Σ:
WELCOME TO A JOURNEY TO CS419 Dr. Hussien Sharaf Dr. Mohammad Nassef Department of Computer Science, Faculty of Computers and Information, Cairo University.
Introduction to Automata Theory Theory of Computation Lecture 3 Tasneem Ghnaimat.
Finite Automata.
Finite-State Machines (FSMs)
Lexical analysis Finite Automata
Lecture2 Regular Language
Finite-State Machines (FSMs)
G. Pullaiah College of Engineering and Technology
CSC312 Automata Theory Chapter # 5 by Cohen Finite Automata
Theory of Computation Lecture # 9-10.
Deterministic Finite Automata
Two issues in lexical analysis
Recognizer for a Language
Jaya Krishna, M.Tech, Assistant Professor
Deterministic Finite Automata
Some slides by Elsa L Gunter, NJIT, and by Costas Busch
Deterministic Finite Automata And Regular Languages Prof. Busch - LSU.
Chapter Two: Finite Automata
Deterministic Finite State Automata
Non-Deterministic Finite Automata
Principles of Computing – UFCFA3-30-1
Finite Automata.
4b Lexical analysis Finite Automata
Deterministic Finite Automaton (DFA)
4b Lexical analysis Finite Automata
CSC312 Automata Theory Chapter # 5 by Cohen Finite Automata
AUTOMATA THEORY.
Chapter # 5 by Cohen (Cont…)
Formal Languages and Automata Theory BODDEDA HARITHA LAKSHMI,
What is it? The term "Automata" is derived from the Greek word "αὐτόματα" which means "self-acting". An automaton (Automata in plural) is an abstract self-propelled.
Automata theory and formal languages COS 3112 – AUTOMATA THEORY PRELIM PERIOD WEEK 1 AND 2.
Presentation transcript:

THEORY OF COMPUTATION Lecture One: Automata Theory Automata Theory

Automaton With every automaton, a transition function is associated which gives the next state in terms of the current state The labels on the edges show what happens (in terms of input and output) during the transitions Automata Theory

Components of an automaton Input file : Contains strings of input symbols Storage unit: consists of an unlimited number of cells, each capable of holding a single symbol from an alphabet Control unit : can be in any one of a finite number of internal states and can change states in defined manner Automata Theory

Some Terms used in automaton theory Alphabets-Everything in mathematics is based on symbols. This is also true for automata theory. Alphabets are defined as a finite set of symbols. An example of alphabet is a set of decimal numbers ∑={0,1,2,3,4,5,6,7,8,9} Strings- A string is a finite sequence of symbols selected from some alphabet If ∑ {a,b} is an alphabet then abab is string over alphabet ∑. A string is generally denoted by w. The length of string is denoted by |w| Empty string is string with zero occurrence of symbols . This string is represented by є Automata Theory

Finite Automaton One of the powerful models of computation which are restricted model of actual computer is called finite automata. These machines are very similar to CPU of a computer .They are restricted model as they lack memory. Finite automation is called finite because number of possible states and number of letter in alphabet are both finite and automation because the change of state is totally governed by the input. Automata Theory

2.2 Deterministic Finite Automata graphic model for a DFA tape tape reader finite control Automata Theory

Finite Automata FA Its goal is to act as a recognizer for specific a language/pattern. Any problem can be presented in form of decidable problem that can be answered by Yes/No. Hence FA (machine with limited memory) can solve any problem. Automata Theory

Deterministic Finite Automata DFA FA = “a 5-tuple “ (Q, Σ, , q0, F) Q: {q0, q1, q2, …} is set of states. Σ: {a, b, …} set of alphabet. (delta): represents the set of transitions that FA can take between its states.  : Q x Σ→Q Q x Σ to Q, this function: Takes a state and input symbol as arguments. Returns a single state. q0 Q is the start state. F Q is the set of final/accepting states. Automata Theory

A DFA machine can be constructed with every input and output. In transition, DFA cannot use n empty string, and it can be understood as one machine. A DFA machine can be constructed with every input and output. Automata Theory

Transition function  : Q x Σ→Q Maps from domain of (states, letters) to range of states. Q Q x Σ (q0, a) q1 (q2, b) q2 (q1, b) q3 Automata Theory

How does FA work? Starts from a start state. Loop Reads a sequence of letters Until input string finishes If the current state is a final state then Input string is accepted. Else Input string is NOT accepted. But how can FA be designed and represented? Automata Theory

Transition System FA = “a 5-tuple “ (Q, Σ, , q0, F) Q: {q0, q1, q2, …} is set of states. Σ: {a, b, …} set of alphabet. (delta): represents the set of transitions that FA can take between its states.  : Q x Σ→Q Q x Σ to Q, this function: Takes a state and input symbol as arguments. Returns a single state. q0 Q is the start state. F Q is the set of final/accepting states. Automata Theory

Transition System Transition Diagrams Transition Tables Automata Theory

Transition Diagram Notations If any state q in Q is the starting state then it is represented by the circle with arrow as Nodes corresponding to accepting states are marked by a double circle q Automata Theory

Transition Diagram Can be represented by directed labeled graph/Transition table Vertex is a state States= nodes Starting/Initial state denoted by circle and arrow/- Final state(s) denoted by two concentric circles/+ Transition function  =directed arrows connecting states. a a,b S2 S1 b Automata Theory

Acceptability of a string A string is accepted by a transition system if There exist a path from initial state to final state Path traversed is equal to w Automata Theory

Example withTransition Table Check for 110101 * 1 A C B B D A C A D D B C Automata Theory

Example withTransition Table Solution:- (A,110101)= (B,10101) (A,0101) (C,101) (D,01) (B,1) A* Automata Theory

Properties of transition function (q,λ)=q It comes back to same state It requires an input symbol to change the state of a system. (q,aw)=((q,a),w) (q,w,a)=((q,w),a) Automata Theory