Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Theory of Automata

Similar presentations


Presentation on theme: "Introduction to Theory of Automata"— Presentation transcript:

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

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

3 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.

4 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

5 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

6 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.

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

8 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

9 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

10 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}

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

12 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.

13 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 = …..} Similarly L2 = {x xxx xxxxx xxxxxxx ……….} L2 = {x2n+1 for n = ……..} 13 13 13 13 13

14 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

15 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 = {Λ …….} If Σ = {a b c} then Σ* = L3 = {Λ a b c aa ab ac ba bb bc ca cb cc aaa …..} 15 15 15 15 15

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

17 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

18 End of Chapter


Download ppt "Introduction to Theory of Automata"

Similar presentations


Ads by Google