Skip to content
Related Articles
Open in App
Not now

Related Articles

GATE | GATE CS 2008 | Question 9

Improve Article
Save Article
Like Article
  • Difficulty Level : Medium
  • Last Updated : 28 Jun, 2021
Improve Article
Save Article
Like Article

Which of the following are decidable?

I. Whether the intersection of two regular languages is infinite
II. Whether a given context-free language is regular
III. Whether two push-down automata accept the same language
IV. Whether a given grammar is context-free

(A) I and II
(B) I and IV
(C) II and III
(D) II and IV


Answer: (B)

Explanation: (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.

Quiz of this Question

My Personal Notes arrow_drop_up
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!