Theory of Automata CS 3434 Lecture 01 The






























- Slides: 30
Theory of Automata CS 3434 Lecture 01
The Course Code: CS 3434 n Course Title: Advance Theory of Computation n Instructor: Muhammad Mukhtar Qureshi – Email Address: Muhammad. mukhtar@cs. uol. edu. pk – Office: Room G-14(Ground floor) n Web Address: https: //sites. google. com/a/cs. uol. edu. pk/bstoa n Term (Semester): Spring 2014 n Duration: 15/16 Weeks n
Text and Reference Material 1. Introduction to Computer Theory, by Daniel I. Cohen, John Wiley and Sons, Inc. , 1991, Second Edition 2. Introduction to Languages and Theory of Computation, by J. C. Martin, Mc. Graw Hill Book Co. , 1997, Second Edition Theory Of Automata 3
Grading n Following is the division of marks: Mid-Term Exam n Assignments n Quizzes n Final Exams. n 25 10 15 50 – Marks division might change during the semester 4
Purpose of Course n In this Course our concern is not with actual hardware and software. n More interested in capability of computers. n specifically, what can and what cannot be done by any existing computer or any computer ever built in the future. n We will study different types of theoretical machines that are mathematical models for actual physical processes.
Cont…. n By considering the possible inputs on which these machines can work, we can analyze their various strengths and weaknesses. n We can then develop what we may believe to be the most powerful machine possible. n Surprisingly, it will not be able to perform every task.
Cont…. n In particular, the way we shall be studying about computers is to build mathematical models, called machines, and then to study their limitations by analyzing the types of inputs on which they can operate successfully. n The collection of these successful inputs is called the language of the machine
Cont…. n Every time we introduce a new machine, we will learn its language; and every time we develop a new language, we will try to find a machine that corresponds to it. n We will study different types of theoretical machines that are mathematical models for actual physical processes. By considering the possible inputs on which these machines can work, we can analyze their various strengths and weaknesses.
What does automata mean? n Automata is Greek letters. Automata is a word formulated from automation, which means machine designing or replacing human beings with machines It is the plural of automaton, and it means “something that works automatically”.
Why study automata? n Automata theory is the study of abstract computing devices or “machines. ” n A. Turing in the 1930’s studied an abstract machine that had all the capabilities of today’s computers, at least as far as in what they could compute.
Why study automata? n Turing’s goal was to describe precisely the boundary between what a computing machine could do and what it couldn’t. n His conclusions apply not only to his abstract Turing machine, but also to today’s real machine. n Turing machine”, whose core design is automata, help us understand what the computer can do, and what we can expect from our software.
Introduction
Language n In English, there at least three different types of entities: letters, words, sentences. n Letters are from a finite alphabet { a, b, c, . . . , z} n Words are made up of certain combinations of letters from the alphabet. Not all combinations of letters lead to a valid English word.
n Sentences are made up of certain combinations of words. Not all combinations of words lead to a valid English sentence. n So we see that some basic units are combined to make bigger units.
Languages n How can you tell whether a given sentence belongs to a particular languages – Black is cat the – The tea is hot – I like chocolates two much n Rules give a clue to forming as well as validating sentences.
Formal vs. Informal Rules n Informal language -> abstract languages n Incoherent strings are also understandable § Slang, idiom, dialect etc. n Raise ambiguity – Interpretation varies with region § I am through (Br. E/Am. E) – Same words have multiple meanings. § Like, light, base, etc.
Informal languages n Natural languages are generally defined informally n Human brain – Capable to understand incoherent even invalid sentences. § You mangoes like – Rectify grammatical errors etc. – Resolve ambiguity § Interpret according to context § Supporting aids such as Facial expressions and body language etc.
How to Communicate with machines ? n Need a language: what sort n Machines don’t have human mind though may have its partial imitation n Would fail on incorrect or ambiguous input – Some recovery or input corrections may be proposed but again very limited. n Thus need a precise, explicit and universal definition of communication language
Summary of Languages n Three aspects/specifications – Lexical § Defines valid words/units of a language – Syntactic § Defines rules for combining the units to form valid sentences (computer programs in context of machines) – Semantic § Concerned with the interpretation or meaning of a sentence (what output to produce in context of machines) § Affected by ambiguity the most.
Formal languages n Rules defined explicitly and clearly n No ambiguities n Universally uniform understanding n Lets the machine – Interpret an input uniformly every time. i. e. always produces same output for a particular input – Avoid crashes because of ambiguity. – Explicitly and categorically reject invalid input
Formal Languages n Need uniformly understandable notation n Representations – Alphabet § Represents a finite set of fundamental units of lanauges, e. g. for English ={a, b, …. z. A, …Z, } ∑ = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
Formal Languages – List of words § Set of all valid words of a given language, e. g. , a language English_Words that contains all valid words of English would have a �= {all entries of the dictionary + punctuation marks and blank space} § Denoted by � § Is �Finite or Infinite set. n Strings: A string a finite sequence of symbols chosen from alphabet. For example 0111100 , 123045, abbbcdeg etc.
n String Variable: A letter used for denoting a string. The author uses w, x, y and z as string variable. For example w = 0111100 , x = 123045, z = abbbcdeg n Length of String: The number of positions for symbols in the string. For simplicity we can say that it is the number of symbols in the string. For example |w| = 7 , |x| = ? , |z| = ?
Finite vs. Infinite Languages n Finite Languages – Countable set of words – Can be defined by rigorously listing the words in � – E. g. English-Words n Infinite Languages – Infinite set of valid words – Cant be listed completely – E. g. English_Sentences
Infinite Languages n Most of the languages are infinite n How can u check whether a word belongs to a language if it is – Finite § Checking its entry in � – Infinite § Validating against rules
Defining Languages n Define alphabet set n Define rules forming valid words and sequences of words from Called grammar(Rules for defining words) – Can be descriptive § Limitations of informalism – Can be mathematical § Can also define supporting functions e. g. , length(X), reverse(x)
Defining languages n Example ={a, b, …z} – L = {all words formed only of odd number of xs} – L = {xn | n is odd} – L = {all words of length less than or equal to 4} – PALINDROME ={Λ, all strings x such that reverse (x) = x}
Kleene Closure n Set closure n Kleene Closure (applied to ) – A set of all the strings (finite) that can be formed by the elements of where the elements may be repeated any number of times. – Denoted by * – Also called Kleene star.
n ∑* : The set of all strings over an alphabet ∑ and called Kleene Star Closure of alphabet. So we have ∑* = ∑ 0 U ∑ 1 U ∑ 2 U ∑ 3 U…………… n ∑+ : The set of all strings over an alphabet ∑ excluding empty string, ε, and called plus operation. So we have ∑+ = ∑ 1 U ∑ 2 U ∑ 3 U……………
Some observations nΛ represents an empty string (not alphabet thus not a part of ) n ε also represents the same n ε is not equivalent to n If = then – * = {Λ } n Is S* == (S*)* and so on