190 likes | 382 Views
Decidable Problems of Regular Languages. Answer:. Take the DFA that accepts and check if is accepted . Membership Question. Question:. Given regular language and string how can we check if ? . DFA. DFA. Question:. Given regular language how can we check
E N D
Decidable ProblemsofRegular Languages Costas Busch - RPI
Answer: Take the DFA that accepts and check if is accepted Membership Question Question: Given regular language and string how can we check if ? Costas Busch - RPI
DFA DFA Costas Busch - RPI
Question: Given regular language how can we check if is empty: ? Answer: Take the DFA that accepts Check if there is any path from the initial state to an accepting state Costas Busch - RPI
DFA DFA Costas Busch - RPI
Question: Given regular language how can we check if is finite? Answer: Take the DFA that accepts Check if there is a walk with cycle from the initial state to a final state Costas Busch - RPI
DFA is infinite DFA is finite Costas Busch - RPI
Answer: Find if Question: Given regular languages and how can we check if ? Costas Busch - RPI
and Costas Busch - RPI
or Costas Busch - RPI
Decidable Problemsof Context-Free Languages Costas Busch - RPI
Parsers Membership Algorithms: • Exhaustive search parser • CYK parsing algorithm Membership Question: for context-free grammar find if string Costas Busch - RPI
Algorithm: • Remove useless variables • Check if start variable is useless Empty Language Question: for context-free grammar find if Costas Busch - RPI
Infinite Language Question: Algorithm: 1. Remove useless variables 2. Remove unit and productions 3. Create dependency graph for variables 4. If there is a loop in the dependency graph then the language is infinite for context-free grammar find if is infinite Costas Busch - RPI
Example: Infinite language Dependency graph Costas Busch - RPI