Which of the following are decidable?I. Whether the intersection of tw...
(A) Intersection of two regular languages is regular and checking if a regular language is infinite is decidable.
(B) Deciding regularity of a context free language is undecidable. We check if L(CFG) contains any string with length between n and 2n−1 , where n is the pumping lemma constant. If so, L(CFG) is infinite otherwise it is finite.
(C) Equality problem is undecidable for all languages except in case of finite automata i.e. for regular languages.
(D) We have to check if the grammar obeys the rules of CFG. If, it obeys such rules then it is decidable. Thus, option (B) is correct. Please comment below if you find anything wrong in the above post.
View all questions of this test
Which of the following are decidable?I. Whether the intersection of tw...
Decidability is a property that refers to whether a problem can be solved by an algorithm. A problem is considered decidable if there exists an algorithm that can always determine the correct answer in a finite amount of time. In this question, we need to determine which of the given statements are decidable.
I. Whether the intersection of two regular languages is infinite
The intersection of two regular languages can be either finite or infinite. To determine if it is infinite, we can construct a Deterministic Finite Automaton (DFA) for each language and check if there exists a reachable state in both DFAs such that it can loop indefinitely. If such a state is found, it means the intersection is infinite. Therefore, this problem is decidable.
II. Whether a given context-free language is regular
A context-free language is a superset of regular languages. Therefore, any regular language is also a context-free language. However, not all context-free languages are regular. Determining whether a given context-free language is regular requires checking if it can be generated by a Regular Grammar or can be recognized by a Deterministic Finite Automaton (DFA). Since there is no algorithm that can always determine this in a finite amount of time, this problem is undecidable.
III. Whether two push-down automata accept the same language
To determine if two push-down automata (PDA) accept the same language, we can perform the following steps:
1. Convert both PDAs into their equivalent Context-Free Grammars (CFG).
2. Convert the CFGs into Chomsky Normal Form (CNF).
3. Check if the CNFs are equivalent by comparing their productions.
If the CNFs are equivalent, it means the PDAs accept the same language. Therefore, this problem is decidable.
IV. Whether a given grammar is context-free
Determining whether a given grammar is context-free can be done by checking if it can be recognized by a Push-Down Automaton (PDA). If the PDA can recognize the grammar, it means the grammar is context-free. Therefore, this problem is decidable.
Conclusion
Based on the above analysis, the decidable problems are:
- Whether the intersection of two regular languages is infinite (I)
- Whether a given grammar is context-free (IV)
Hence, the correct answer is option B (I and IV).
To make sure you are not studying endlessly, EduRev has designed Computer Science Engineering (CSE) study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Computer Science Engineering (CSE).