Theory of Automata in Urdu|Hindi CSC312 LECTURE 01
Theory of Automata in Urdu|Hindi What does Theory of automata mean? The word “Theory” means that this subject is a more mathematical subject and less practical. It is not like your other courses such as programming. However, this subject is the foundation for many other practical subjects. Automata is the plural of the word Automaton which means “self-acting” In general, this subject focuses on the theoretical aspects of computer science. Theory of Automa Applications This subject plays a major role in: Theory of Computation Compiler Construction Parsing Formal Verification Defining computer languages Types of languages There are two types of languages Formal Languages are used as a basis for defining computer languages A predefined set of symbols and string Formal language theory studies purely syntactical aspects of a language (e.g., word abcd) Informal Languages such as English has many different versions. Basic Element of a Formal Language – Alphabets Definition: A finite non-empty set of symbols (letters), is called an alphabet. It is denoted by Greek letter sigma Σ. Example: Σ={1,2,3} Σ={0,1} //Binary digits Σ={i,j,k} What are Strings A String is formed by combining various symbols from an alphabet. Example: If Σ= {1,0} then 0, 1, 110011, ….. Similarly, If Σ= {a,b} then a, b, abbbbbb, aaaabbbbb, ….. What is an EMPTY or NULL String A string with no symbol is denoted by (Small Greek letter Lambda) λ or (Capital Greek letter Lambda) Λ. It is called an empty string or null string. We will prefer Λ in this course. Please don’t confuse it with logical operator ‘and’. One important thing to note is that we never allow Λ to be part of alphabet of a language What are Words Words are strings that belong to some specific language. Thus, all words are strings, but vice versa is not true. Example: If Σ= {a} then a language L can be defined as L={a,aa,aaa,….} where L is a set of words of the language. Also a,aa,… are the words of L but not ab. Defining Alphabets – Guidelines The following are three important rules for defining Alphabets for a language: Should not contain empty symbol Λ Should be finite. Thus, the number of symbols are finite Should not be ambiguous Example: an alphabet may contain letters consisting of group of symbols for example Σ1= {A, aA, bab, d}. Now consider an alphabet Σ2= {A, Aa, bab, d} and a string AababA. This string can be factored in two different ways (Aa), (bab), (A) (A), (abab), (A) Which shows that the second group cannot be identified as a string, defined over Σ = {a, b}. Ambiguity Rule:- The Alphabets should be defined in a way that letters consisting of more than one symbols should not start with a letter, already being used by some other letter. Ambiguity Examples Σ1= {A, aA, bab, d} Σ2= {A, Aa, bab, d} Σ1 is a valid alphabet while Σ2 is an in-valid alphabet. Similarly, Σ1= {a, ab, ac} Σ2= {a, ba, ca} Reverse of a String Definition: The reverse of a string s denoted by Rev(s) or sr,
Похожие видео
Показать еще