Theory of Automata CS3434 Lecture 01
The Course Course Code: CS3434 Course Title: Advance Theory of Computation Instructor: Muhammad Mukhtar Qureshi Email Address: Muhammad.mukhtar@cs.uol.edu.pk Office: Room G-14(Ground floor) Web Address: https://sites.google.com/a/cs.uol.edu.pk/bstoa Term (Semester): Spring 2014 Duration: 15/16 Weeks
Text and Reference Material Introduction to Computer Theory, by Daniel I. Cohen, John Wiley and Sons, Inc., 1991, Second Edition Introduction to Languages and Theory of Computation, by J. C. Martin, McGraw Hill Book Co., 1997, Second Edition Theory Of Automata
Grading Following is the division of marks: Mid-Term Exam 25 Assignments 10 Quizzes 15 Final Exams. 50 Marks division might change during the semester
Purpose of Course In this Course our concern is not with actual hardware and software. More interested in capability of computers. specifically, what can and what cannot be done by any existing computer or any computer ever built in the future. We will study different types of theoretical machines that are mathematical models for actual physical processes.
Cont…. By considering the possible inputs on which these machines can work,we can analyze their various strengths and weaknesses. We can then develop what we may believe to be the most powerful machine possible. Surprisingly, it will not be able to perform every task.
Cont…. 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. The collection of these successful inputs is called the language of the machine
Cont…. 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. 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? 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? Automata theory is the study of abstract computing devices or “machines.” 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? Turing’s goal was to describe precisely the boundary between what a computing machine could do and what it couldn’t. His conclusions apply not only to his abstract Turing machine, but also to today’s real machine. 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 In English, there are at least three different types of entities: letters, words, sentences. Letters are from a finite alphabet { a, b, c, . . . , z } Words are made up of certain combinations of letters from the alphabet. Not all combinations of letters lead to a valid English word.
Sentences are made up of certain combinations of words. Not all combinations of words lead to a valid English sentence. So we see that some basic units are combined to make bigger units.
Languages 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 Rules give a clue to forming as well as validating sentences.
Formal vs. Informal Rules Informal language -> abstract languages Incoherent strings are also understandable Slang, idiom, dialect etc. Raise ambiguity Interpretation varies with region I am through (BrE/AmE) Same words have multiple meanings. Like, light, base, etc.
Informal languages Natural languages are generally defined informally 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 ? Need a language: what sort Machines don’t have human mind though may have its partial imitation Would fail on incorrect or ambiguous input Some recovery or input corrections may be proposed but again very limited. Thus need a precise, explicit and universal definition of communication language
Summary of Languages Three aspects/specifications Lexical Syntactic 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 Rules defined explicitly and clearly No ambiguities Universally uniform understanding 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 Need uniformly understandable notation Representations Alphabet Represents a finite set of fundamental units of lanauges, e.g. for English ={a,b,….z.A,…Z,} ∑ = {0,1} ∑ = {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. Strings: A string a finite sequence of symbols chosen from alphabet. For example 0111100 , 123045, abbbcdeg etc.
String Variable: A letter used for denoting a string 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 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 Countable set of words Can be defined by rigorously listing the words in E.g. English-Words Infinite Languages Infinite set of valid words Cant be listed completely E.g. English_Sentences
Infinite Languages Most of the languages are infinite 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 Define alphabet set Define rules for 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 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 Set closure 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.
∑* : 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…………… ∑+ : 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 Λ represents an empty string (not alphabet thus not a part of ) ε also represents the same ε is not equivalent to If = then * = {Λ} Is S* == (S*)* and so on