Decision properties of reular languages.Different Problems in Decision Properties
Size: 1.67 MB
Language: en
Added: Oct 07, 2021
Slides: 26 pages
Slide Content
Decision Properties Of Regular Languages Guide : Prof. Saraswati Patil Somnath More(08) Vishwajeet Mote(10) Akanksha Pokale(68) Amit Puranik(79)
Content Introduction Representation of regular languages Decision properties Why decision properties? Decision problems Applications Conclusion References
Introduction Regular Languages: A language that can be defined by regular expressions and are accepted by finite automata. L = {abb, aabb, aaabb, ……..} Language Properties: Decision properties and Closure properties.
Representation of Regular Languages Representations can be formal or informal. Example of Formal Representation : Regular expressions and Deterministic finite automata defining it. Example of Informal Representation : Logical or Prose statement about strings:- {0^n1^n| n is a nonnegative integer}.
Decision Properties Decision property for a class of languages is an algorithm that takes a formal description of a language. E.g : Is given language L empty?
Why Decision Properties? We might want a “smallest” representation for a language. If we can’t decide “Are the languages same?” then we can’t find a “smallest”.
Continued... When we talk about protocols represented as DFA’s we noted that important properties of a good protocol were related to the language of the DFA. Example: “Does the protocol terminate?” = “Is the language finite?” Example: “Can the protocol fail?” = “Is the language nonempty?”
Problem Types Decidable Problem : We can always construct a corresponding algorithm the can answer the problem correctly .It answer maybe “Yes” or “NO”.eg.Prime numbers in the range of 1000 to 2000 eg.Are Two Regular Languages L and M Equivalent. Undecidable Problem : The problems for which we can’t construct an algorithm that can answer the problem correctly in finite time are termed as Undecidable Problems. eg. Whether a CFG generates all the strings or not?. Semi Decidable Problem :Eg::Turing Recognisable Problems. .
Decision Properties Emptiness and Non emptiness Finiteness and Infiniteness Membership Equivalence
Emptiness and Non Emptiness To check whether a given FA accepts empty language or non-empty language. Steps to check emptiness: Select the state that cannot be reached from the initial states & delete them (remove unreachable states).
Emptiness and Non Emptiness 2) If the resulting machine contains at least one final states, so then the finite automata accepts the non-empty language. 3)If the resulting machine is free from final state, then finite automata accepts empty language.
Finiteness and Infiniteness It states that the language accepted by a given FA is finite or not. Steps: Select the state that cannot be reached from the initial state & delete them (remove unreachable states).
Finiteness and Infiniteness 2) Select the state from which we cannot reach the final state & delete them (remove dead states). 3) If the resulting machine contains loops or cycles then the finite automata accepts infinite language. 4) If the resulting machine do not contain loops or cycles then the finite automata accepts infinite language.
b a Fig. A Fig. B Fig. C
Membership Membership is a property to verify an arbitrary string is accepted by a finite automata or not. It is decidable, because by reading the string if it reaches the final state, then it is a member. Otherwise, if the string halts in a non-final state then it is said to be not a member of the FA.
Is string w accepted by given FA? w=01011.
Equivalence Steps to identify equivalence: If initial state is final state for one automaton, then in second automaton also initial state must be final state for them to be equivalent. For any pair of states {qi,qj} the transition for the input a ∈ Σ is defined by {qa,qb} where δ {qi,a} = qa and δ {qj,a} = qb. The two automata are not equivalent if for a pair {qa,qb} one is intermediate state and other is final state.
Example: A B
Continued... States C D (q1,q4) (q1,q4) Both final states (q2,q5) Both intermediate states (q2,q5) (q3,q6) Both intermediate states (q1,q4) Both final states (q3,q6) (q2,q7) Both intermediate states (q3,q6) Both intermediate states (q2,q7) (q3,q6) Both intermediate states (q1,q4) Both final states A and B are equivalent . :
Example A B
Continued... States C D (q1,q4) (q1,q4) Both final states (q2,q5) Both intermediate states (q2,q5) (q3,q7) Both intermediate states (q1,q6) Here q1 is final state and q6 is intermediate state A and B are not equivalent.
Applications Data Validation Data Scraping(Web Scraping), Data Wrangling, simple Parsing The Production Of Syntax Highlighting Systems and many other tasks.
Conclusion Regular Languages and their representation. Decision properties and why do we need them. (Emptiness, Equivalence, Finiteness, Membership) Types of problems Applications