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.

Slides:



Advertisements
Similar presentations
Finite-State Machines with No Output Ying Lu
Advertisements

Finite State Machines Finite state machines with output
4b Lexical analysis Finite Automata
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
YES-NO machines Finite State Automata as language recognizers.
1 Languages. 2 A language is a set of strings String: A sequence of letters Examples: “cat”, “dog”, “house”, … Defined over an alphabet: Languages.
Finite Automata Section 1.1 CSC 4170 Theory of Computation.
CS5371 Theory of Computation
Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by.
1 Languages and Finite Automata or how to talk to machines...
CS 310 – Fall 2006 Pacific University CS310 Finite Automata Sections: September 1, 2006.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
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.
Nondeterminism (Deterministic) FA required for every state q and every symbol  of the alphabet to have exactly one arrow out of q labeled . What happens.
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
Rosen 5th ed., ch. 11 Ref: Wikipedia
Regular Expressions (RE) Empty set Φ A RE denotes the empty set Empty string λ A RE denotes the set {λ} Symbol a A RE denotes the set {a} Alternation M.
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
CS490 Presentation: Automata & Language Theory Thong Lam Ran Shi.
Lecture 23: Finite State Machines with no Outputs Acceptors & Recognizers.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
REGULAR LANGUAGES.
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.
Copyright © Curt Hill Finite State Automata Again This Time No Output.
Finite State Machines 1.Finite state machines with output 2.Finite state machines with no output 3.DFA 4.NDFA.
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.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
1 Section 11.2 Finite Automata Can a machine(i.e., algorithm) recognize a regular language? Yes! Deterministic Finite Automata A deterministic finite automaton.
Akram Salah ISSR Basic Concepts Languages Grammar Automata (Automaton)
Lecture 14: Theory of Automata:2014 Finite Automata with Output.
  An alphabet is any finite set of symbols.  Examples: ASCII, Unicode, {0,1} ( binary alphabet ), {a,b,c}. Alphabets.
Theory of Computation Automata Theory Dr. Ayman Srour.
Theory of Languages and Automata By: Mojtaba Khezrian.
WELCOME TO A JOURNEY TO CS419 Dr. Hussien Sharaf Dr. Mohammad Nassef Department of Computer Science, Faculty of Computers and Information, Cairo University.
Lecture Three: Finite Automata Finite Automata, Lecture 3, slide 1 Amjad Ali.
Finite Automata.
Languages.
Lexical analysis Finite Automata
Non Deterministic Automata
Chapter 11 Finite State Machine
FORMAL LANGUAGES AND AUTOMATA THEORY
Theory of Computation Lecture # 9-10.
Two issues in lexical analysis
Recognizer for a Language
Jaya Krishna, M.Tech, Assistant Professor
Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz
Jaya Krishna, M.Tech, Assistant Professor
Non-Determinism 12CS45 Finite Automata.
Some slides by Elsa L Gunter, NJIT, and by Costas Busch
THEORY OF COMPUTATION Lecture One: Automata Theory Automata Theory.
Deterministic Finite Automata And Regular Languages Prof. Busch - LSU.
Non-Deterministic Finite Automata
Principles of Computing – UFCFA3-30-1
4. Properties of Regular Languages
Non-Deterministic Finite Automata
Nondeterministic Finite Automata
Non Deterministic Automata
Principles of Computing – UFCFA3-30-1
Finite Automata Reading: Chapter 2.
4b Lexical analysis Finite Automata
Deterministic Finite Automaton (DFA)
4b Lexical analysis Finite Automata
Chapter 1 Regular Language
Prepared by- Patel priya( ) Guided by – Prof. Archana Singh Gandhinagar Institute of Technology SUBJECT - CD ( ) Introcution to Regular.
Presentation transcript:

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 computing device which follows a predetermined sequence of operations automatically.

An automaton with a finite number of states is called a Finite Automaton(FA) or Finite State Machine (FSM). Formal definition of a Finite Automaton An automaton can be represented by a 5-tuple (Q, ∑, δ, q 0, F), where − Q is a finite set of states. ∑ is a finite set of symbols, called the alphabet of the automaton. δ is the transition function. q 0 is the initial state from where any input is processed (q 0 ∈ Q). F is a set of final state/states of Q (F ⊆ Q). Related Terminologies

Alphabet Definition − An alphabet is any finite set of symbols. Example − ∑ = {a, b, c, d} is an alphabet set where ‘a’, ‘b’, ‘c’, and ‘d’ are symbols. String Definition − A string is a finite sequence of symbols taken from ∑. Example − ‘cabcad’ is a valid string on the alphabet set ∑ = {a, b, c, d} Length of a String Definition − It is the number of symbols present in a string. (Denoted by |S|). Examples − – If S = ‘cabcad’, |S|= 6 – If |S|= 0, it is called an empty string (Denoted by λ or ε)

Kleene Star Definition − The Kleene star, ∑*, is a unary operator on a set of symbols or strings, ∑, that gives the infinite set of all possible strings of all possible lengths over ∑ including λ. Representation − ∑* = ∑ 0 ∪ ∑ 1 ∪ ∑ 2 ∪ ……. where ∑ p is the set of all possible strings of length p. Example − If ∑ = {a, b}, ∑* = {λ, a, b, aa, ab, ba, bb,………..} Kleene Closure / Plus Definition − The set ∑ + is the infinite set of all possible strings of all possible lengths over ∑ excluding λ. Representation − ∑ + = ∑ 1 ∪ ∑ 2 ∪ ∑ 3 ∪ ……. ∑ + = ∑* − { λ } Example − If ∑ = { a, b }, ∑ + = { a, b, aa, ab, ba, bb,………..} Language Definition − A language is a subset of ∑* for some alphabet ∑. It can be finite or infinite. Example − If the language takes all possible strings of length 2 over ∑ = {a, b}, then L = { ab, aa, ba, bb }

Finite Automaton can be classified into two types − Deterministic Finite Automaton (DFA) Non-deterministic Finite Automaton (NDFA / NFA) Deterministic Finite Automaton (DFA) In DFA, for each input symbol, one can determine the state to which the machine will move. Hence, it is called Deterministic Automaton. As it has a finite number of states, the machine is called Deterministic Finite Machineor Deterministic Finite Automaton.

Formal Definition of a DFA A DFA can be represented by a 5-tuple (Q, ∑, δ, q 0, F) where − Q is a finite set of states. ∑ is a finite set of symbols called the alphabet. δ is the transition function where δ: Q × ∑ → Q q 0 is the initial state from where any input is processed (q 0 ∈ Q). F is a set of final state/states of Q (F ⊆ Q).

Graphical Representation of a DFA A DFA is represented by digraphs called state diagram. The vertices represent the states. The arcs labeled with an input alphabet show the transitions. The initial state is denoted by an empty single incoming arc. The final state is indicated by double circles. Example Let a deterministic finite automaton be → Q = {a, b, c}, ∑ = {0, 1}, q 0 = {a}, F = {c}, and

Transition function δ as shown by the following table −

In NDFA, for a particular input symbol, the machine can move to any combination of the states in the machine. In other words, the exact state to which the machine moves cannot be determined. Hence, it is called Non- deterministic Automaton. As it has finite number of states, the machine is called Non- deterministic Finite Machine or Non- deterministic Finite Automaton.

Formal Definition of an NDFA An NDFA can be represented by a 5-tuple (Q, ∑, δ, q 0, F) where − Q is a finite set of states. ∑ is a finite set of symbols called the alphabets. δ is the transition function where δ: Q × ∑ → 2 Q (Here the power set of Q (2 Q ) has been taken because in case of NDFA, from a state, transition can occur to any combination of Q states) q 0 is the initial state from where any input is processed (q 0 ∈ Q). F is a set of final state/states of Q (F ⊆ Q).

Graphical Representation of an NDFA: (same as DFA) An NDFA is represented by digraphs called state diagram. The vertices represent the states. The arcs labeled with an input alphabet show the transitions. The initial state is denoted by an empty single incoming arc. The final state is indicated by double circles.

Example Let a non-deterministic finite automaton be → Q = {a, b, c} ∑ = {0, 1} q 0 = {a} F = {c}

The transition function δ as shown below −

Acceptors, Classifiers, and Transducers Acceptor (Recognizer) An automaton that computes a Boolean function is called an acceptor. All the states of an acceptor is either accepting or rejecting the inputs given to it. Classifier A classifier has more than two final states and it gives a single output when it terminates. Transducer An automaton that produces outputs based on current input and/or previous state is called a transducer. Transducers can be of two types − Mealy Machine − The output depends both on the current state and the current input. Moore Machine − The output depends only on the current state.

Acceptability by DFA and NDFA A string is accepted by a DFA/NDFA iff the DFA/NDFA starting at the initial state ends in an accepting state (any of the final states) after reading the string wholly. A string S is accepted by a DFA/NDFA (Q, ∑, δ, q 0, F), iff δ*(q 0, S) ∈ F The language L accepted by DFA/NDFA is {S | S ∈ ∑* and δ*(q 0, S) ∈ F} A string S′ is not accepted by a DFA/NDFA (Q, ∑, δ, q 0, F), iff δ*(q 0, S′) ∉ F The language L′ not accepted by DFA/NDFA (Complement of accepted language L) is {S | S ∈ ∑* and δ*(q 0, S) ∉ F}

Problem Statement Let X = (Q x, ∑, δ x, q 0, F x ) be an NDFA which accepts the language L(X). We have to design an equivalent DFA Y = (Q y, ∑, δ y, q 0, F y ) such that L(Y) = L(X). The following procedure converts the NDFA to its equivalent DFA − Algorithm Input − An NDFA Output − An equivalent DFA Step 1 − Create state table from the given NDFA. Step 2 − Create a blank state table under possible input alphabets for the equivalent DFA. Step 3 − Mark the start state of the DFA by q0 (Same as the NDFA). Step 4 − Find out the combination of States {Q 0, Q 1,..., Q n } for each possible input alphabet. Step 5 − Each time we generate a new DFA state under the input alphabet columns, we have to apply step 4 again, otherwise go to step 6. Step 6 − The states which contain any of the final states of the NDFA are the final states of the equivalent DFA.