Introduction to Theory of Automata

Slides:



Advertisements
Similar presentations
Formal Languages Languages: English, Spanish,... PASCAL, C,... Problem: How do we define a language? i.e. what sentences belong to a language? e.g.Large.
Advertisements

YES-NO machines Finite State Automata as language recognizers.
Chapter Chapter Summary Languages and Grammars Finite-State Machines with Output Finite-State Machines with No Output Language Recognition Turing.
Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by.
1 CSCI-2400 Models of Computation. 2 Computation CPU memory.
Regular Languages Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 3 Comments, additions and modifications.
Regular Languages Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 3 Comments, additions and modifications.
1 Languages and Finite Automata or how to talk to machines...
Finite Automata Chapter 5. Formal Language Definitions Why need formal definitions of language –Define a precise, unambiguous and uniform interpretation.
Topics Automata Theory Grammars and Languages Complexities
1 Regular Expressions/Languages Regular languages –Inductive definitions –Regular expressions syntax semantics Not covered in lecture.
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
Theory Of Automata By Dr. MM Alam
1 Introduction to Automata Theory Reading: Chapter 1.
CS490 Presentation: Automata & Language Theory Thong Lam Ran Shi.
Lecture # 1 (Automata Theory)
Theory of Automata.
1 Welcome to ! Theory Of Automata. 2 Text and Reference Material 1.Introduction to Computer Theory, by Daniel I. Cohen, John Wiley and Sons, Inc., 1991,
CS/IT 138 THEORY OF COMPUTATION Chapter 1 Introduction to the Theory of Computation.
Module 2 How to design Computer Language Huma Ayub Software Construction Lecture 7 1.
CSC312 Automata Theory Lecture # 2 Languages.
CSC312 Automata Theory Lecture # 2 Languages.
L ECTURE 1 T HEORY OF A UTOMATA. P RAGMATICS  Pre-Requisites  No Pre-Requisite  Text book  Introduction to Computer Theory by Daniel I.A. Cohen 
Formal Methods in SE Theory of Automata Qasiar Javaid Assistant Professor Lecture # 06.
Lecture Two: Formal Languages Formal Languages, Lecture 2, slide 1 Amjad Ali.
Introduction to Theory of Automata By: Wasim Ahmad Khan.
Compiler Phases: Source program Lexical analyzer Syntax analyzer Semantic analyzer Machine-independent code improvement Target code generation Machine-specific.
Winter 2007SEG2101 Chapter 71 Chapter 7 Introduction to Languages and Compiler.
By: Er. Sukhwinder kaur.  What is Automata Theory? What is Automata Theory?  Alphabet and Strings Alphabet and Strings  Empty String Empty String 
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
1 Chapter 1 Introduction to the Theory of Computation.
Lecture # 3 Regular Expressions 1. Introduction In computing, a regular expression provides a concise and flexible means to "match" (specify and recognize)
Languages, Grammars, and Regular Expressions Chuck Cusack Based partly on Chapter 11 of “Discrete Mathematics and its Applications,” 5 th edition, by Kenneth.
Module 2 How to design Computer Language Huma Ayub Software Construction Lecture 8.
Lecture-2 Recap Lecture-1
Introduction to Theory of Automata By: Wasim Ahmad Khan.
Review: Compiler Phases: Source program Lexical analyzer Syntax analyzer Semantic analyzer Intermediate code generator Code optimizer Code generator Symbol.
Strings and Languages CS 130: Theory of Computation HMU textbook, Chapter 1 (Sec 1.5)
Copyright © Curt Hill Finite State Automata Again This Time No Output.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
CSC312 Automata Theory Lecture # 3 Languages-II. Formal Language A formal language is a set of words—that is, strings of symbols drawn from a common alphabet.
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني Theory of Automata We will arrive at what we may believe to be the most powerful machine possible. When.
1 Formal Languages & Automata. 2 A formal language: Is an abstraction of the general characteristics of programming languages. Consists of a set of symbols.
UNIT - I Formal Language and Regular Expressions: Languages Definition regular expressions Regular sets identity rules. Finite Automata: DFA NFA NFA with.
Lecture # Book Introduction to Theory of Computation by Anil Maheshwari Michiel Smid, 2014 “Introduction to computer theory” by Daniel I.A. Cohen.
Theory of computation Introduction theory of computation: It comprises the fundamental mathematical properties of computer hardware, software,
1 Strings and Languages Lecture 2-3 Ref. Handout p12-17.
Lecture 02: Theory of Automata:2014 Asif Nawaz Theory of Automata.
Set, Alphabets, Strings, and Languages. The regular languages. Clouser properties of regular sets. Finite State Automata. Types of Finite State Automata.
Lecture 03: Theory of Automata:2014 Asif Nawaz Theory of Automata.
L ANGUAGE C ONCEPTS : F ORMAL M ODEL FOR L ANGUAGES Theory of Computer Akram Salah.
Akram Salah ISSR Basic Concepts Languages Grammar Automata (Automaton)
By Dr.Hamed Alrjoub. 1. Introduction to Computer Theory, by Daniel I. Cohen, John Wiley and Sons, Inc., 1991, Second Edition 2. Introduction to Languages.
Lecture 01: Theory of Automata:2013 Asif Nawaz Theory of Automata.
Chapter 1 INTRODUCTION TO THE THEORY OF COMPUTATION.
Topic 3: Automata Theory 1. OutlineOutline Finite state machine, Regular expressions, DFA, NDFA, and their equivalence, Grammars and Chomsky hierarchy.
Lecture # 2.
Lecture 1 Theory of Automata
Theory of Automata CS3434 Lecture 01.
CIS Automata and Formal Languages – Pei Wang
Formal Language & Automata Theory
Jaya Krishna, M.Tech, Assistant Professor
Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz
Review: Compiler Phases:
Instructor: Aaron Roth
Introduction Reading: Sections 1.5 – 1.7.
Chapter 1 Introduction to the Theory of Computation
CSC312 Automata Theory Lecture # 2 Languages.
Welcome to ! Theory Of Automata Irum Feroz
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.
Presentation transcript:

Introduction to Theory of Automata Lecture # 1 Course Instructor Waqar Azam

Text and Reference Material Introduction to Computer Theory, by Daniel I. Cohen, John Wiley and Sons, Inc., 1991, Second Edition

What does automata mean? It is the plural of automaton, and it means “something that works automatically” It accepts input, produces output, may have some temporary storage and can make decisions in transforming the input into the output.

Automata Theory Automata theory is the study of abstract machines and problems which they are able to solve A typical abstract machine consists of a definition in terms of input, output, and the set of allowable operations used to turn the former into the latter. Automata theory is a step in abstracting your attention away from any particular kind of computer or particular programming language In English we have letter, words and sentences (relationship) Not all collection of letters form a valid word, not all collections of words form a valid sentence. Same in Computer Languages 4 4 4 4 4

Automata Theory (Cont...) Certain character strings are recognized (do, if, While) Certain strings of words are recognizable commands Certain set of commands become a program It is important that a program compiles whether or not it does what the programmer intended If it compiles Its Valid and machine is responsible for executing the specified instructions Its hard to state all the rules for the languages like ENGLISH, PASHTO etc. But in programming languages we can insist on precise rules, computers cannot understand informal speech 5 5 5 5 5

Introduction to Languages The collection of different types of inputs through which a machine is operated is said to be language of a machine. Basically a language Comprises of three different entities Letters Words Sentences There are certain parallelism between the fact that groups of letters make up words and the fact that groups of words make up sentences. Not all collection of letters form a valid word, and not all collection of words form a valid sentences.

Introduction to languages There are two types of languages Formal Languages (Syntactic languages) Informal Languages (Semantic languages)

Formal Languages The word formal means that all the rules for the language are openly stated in terms of what strings symbols can occur. It is an abstraction of the general characteristics of programming languages It consists of a set of symbols and some rules of formation of sentences Sentences are formed by grouping the symbols

Central Concepts of Automata Theory We have Three basic concepts in Automata. Alphabet --- a set of symbols Strings --- a list of symbols from an alphabet Language --- a set of strings from the same alphabet

Alphabets Definition: A finite non-empty set of symbols (letters), is called an alphabet. It is denoted by Σ ( Greek letter sigma). Example: Σ={a,b} Σ={0,1} //important as this is the language //which the computer understands. Σ={i,j,k}

Strings Definition: Concatenation of finite symbols from the alphabet is called a string. Example: If Σ= {a,b} then a, abab, aaabb, ababababababababab

EMPTY STRING or NULL STRING Sometimes a string with no symbol at all is used, denoted by (Small Greek letter Lambda) λ or (Capital Greek letter Lambda) Λ, is called an empty string or null string. The capital lambda will mostly be used to denote the empty string, in further discussion.

Introduction to defining languages Lets start with an alphabet having only one letter, the ‘x’ Σ = {x} L1 = {x xx xxx xxxx ……..} Or L1 = {xn for n = 1 2 3 4…..} Similarly L2 = {x xxx xxxxx xxxxxxx ……….} L2 = {x2n+1 for n = 0 1 2 3 4……..} 13 13 13 13 13

Length of the string Reverse of the string The length of the string is the number of symbols in the string If a = xxxx then length(a) = 4 Length(428) = 3 Length(Λ) = 0 Reverse of the string The reverse of a string is obtained by writing the symbols in reverse order. Reverse(xxx) = xxx Reverse(420) = 024

KLEENE CLOSURE Given an alphabet Σ, we wish to define a language in which any string of letters from Σ is a word, even the null string This is called closure of the alphabet and denoted by Σ* This notation is sometimes known as Kleene star If Σ = {x}, then Σ* = L1 = {Λ x xx xxx xxxx……….} If Σ = {0 1} then Σ* = L2 = {Λ 0 1 00 01 10 11 000 001…….} If Σ = {a b c} then Σ* = L3 = {Λ a b c aa ab ac ba bb bc ca cb cc aaa …..} 15 15 15 15 15

KLEENE CLOSURE S+ is the set of all strings obtained by concatenating one or more symbols S ={y} S+ ={y,yy,yyy,yyyy,…}

Example Consider the language S*, where S = {a b}.How many words does this language have of length 2? of length 3? of length n? Number of words = (Number of letters)^ (WordLength) Length 2: 2^ 2 = 4 Length 3: 2 ^3 = 8 Length n: 2 ^n

End of Chapter