List any four ways of theorem proving. Define Alphabets. Write short notes on Strings. What is the need for finite automata? What is finite automata? Give two examples.
|Published (Last):||13 January 2012|
|PDF File Size:||13.30 Mb|
|ePub File Size:||4.78 Mb|
|Price:||Free* [*Free Regsitration Required]|
What is deductive proof? A deductive proof consists of a sequence of statements, which starts from a hypothesis, or a given statement to a conclusion. Each step is satisfying some logical principle. Text editors and lexical analyzers are designed as finite state systems.
A lexical analyzer scans the symbols of a program to locate strings corresponding to identifiers, constants etc, and it has to remember limited amount of information. Define: i Finite Automaton FA ii Transition diagram FA consists of a finite set of states and a set of transitions from state to state that occur on input symbols chosen from an alphabet.
Transition diagram is a directed graph in which the vertices of the graph correspond to the states of FA. If there is a transition from state q to state p on input a, then there is an arc labeled a from q to p in the transition diagram. What are the applications of automata theory? In compiler construction. In switching theory and design of digital circuits.
To verify the correctness of a program. Design and analysis of complex software and hardware systems. To design finite state machines such as Moore and mealy machines. Define proof by contrapositive.
It is other form of if then statement. The contra positive of the statement if H A. Page 1. What are the components of Finite automaton model? The components of FA model are Input tape, Read control and finite control. Depending on the current state and input symbol read from the input tape it changes state. Deterministic Finite Automaton is a FA in which there is only one path for a specific input from current state to next state.
There is a unique transition on each input symbol. Write examples with diagrams. What is -closure of a state q0? FA accepts a string x if the sequence of transitions corresponding to the symbols of x leads from the start state to accepting state.
A language is regular if it is accepted by some finite automaton. Define Induction principle. Basis step: P 1 is true. Assume p k is true. PART-B 1. Page 2. Justify your answer. Define NFA with -transition. What is a regular expression? A regular expression is a string that describes the whole set of strings according to certain syntax rules. These expressions are used by many text editors and utilities to A. Page 3.
Definition is: Let be an alphabet. The regular expression over and the sets they denote are: i. What is Ardens Theorem? Ardens theorem helps in checking the equivalence of two regular expressions. Let P and Q be the two regular expressions over the input alphabet. Write a r. The r. Construct a r. What are the applications of Regular expressions and Finite automata Lexical analyzers and Text editors are two applications.
Lexical analyzers:The tokens of the programming language can be expressed using regular expressions. The lexical analyzer scans the input program and separates the tokens. Thus reg exp identifies token in a language. Text editors: These are programs used for processing the text.
What are the applications of pumping lemma? Pumping lemma is used to check if a language is regular or not. Page 5. Then L is not a regular language What is the closure property of regular sets? The regular sets are closed under union, concatenation and Kleene closure. What is the relationship between FA and regular expression. Page 6. Find whether the following languages are regular or not. What are the applications of Context free languages?
Context free languages are used in: Defining programming languages. Formalizing the notion of parsing. Translation of programming languages. String processing applications. What are the uses of Context free grammars?
Construction of compilers. Simplified the definition of programming languages. Page 7. Describes block structure in programming languages. Model neural nets.
V and T are disjoint. What is the language generated by CFG or G? That is a G string is in L G if: 1 The string consists solely of terminals. The language has strings with equal number of as and bs. Xk respectively then A X1X Xk must be in P. The label of the root may not be the start symbol of the grammar. Page 8. Find out the CFL soln. What is a ambiguous grammar? A grammar is said to be ambiguous if it has more than one derivation trees for a sentence or in other words if it has more than one leftmost derivation or more than one rightmost derivation.
Hence B is useless symbol and remove B from all productions. What are the three ways to simplify a context free grammar? By removing the useless symbols from the set of productions. By eliminating the empty productions. By eliminating the unit productions.
Differentiate sentences Vs sentential forms A sentence is a string of terminal symbols. A sentential form is a string containing a mix of variables and terminal symbols or all variables. This is an intermediate form in doing a derivation. What is a formal language? Language is a set of valid strings from some alphabet. The set may be empty,finite or infinite. The two notations for specifying formal languages are: Grammar or regular expression Generative approach Automaton Recognition approach Computer scientists describes the programming languages by a notation called Backus- Naur Form.
This is a context free grammar notation with minor changes in format and some shorthand. Find L G. What is a parser? A parser for grammar G is a program that takes as input a string w and produces as output either a parse tree for w ,if w is a sentence of G or an error message indicating that w is not a sentence of G.
CS1303 Theory of Computation B.E Question Bank : niceindia.com
Automata : 1. What is deductive proof? Each step is satisfying some logical principle. E Question Bank : www. A lexical analyzer scans the symbols of a program to locate strings corresponding to identifiers, constants etc, and it has to remember limited amount of information. What are the applications of automata theory? Define proof by contrapositive : It is other form of if then statement.
CS1303 Theory of Computation Syllabus