Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Notes  >  Theory of Computation  >  Previous Year Questions: Recursive Language

Previous Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE) PDF Download

Q1: Which of the following statements is/are TRUE?  (2022)
(a) Every subset of a recursively enumerable language is recursive.
(b) If a language L and its complement Previous Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)are both recursively enumerable, then L must be recursive.
(c) Complement of a context-free language must be recursive.
(d) If L1 and L2 are regular, then L∩ Lmust be deterministic context-free.
Ans: 
(b, c, d)
Sol: 

If a language and its complement is Recursively enumerable Then L is Recursive. It is the standard result And proof is also very easy.
So option B is true.
Complement of CFL must be Recursive. It is also True.
As we know the complement of CFL may or may not be CFL but it is bound to be Context sensitive language which means it is recursive As well.
So option C is also True.
Option D,
L1 and L2 both are Regular languages, so their intersection is also regular as regular language is closed under intersection.
Now Regular language is also deterministic context free language
so option D is also true.
Option A,
every subset of recursive enumerable language is Recursive.
This statement is false.
Counter example,
Say Sigma* is set of all strings which is an RE language.
Now every language is subset of sigma*.
Now any Recursively enumerable language is also subset of sigma* which is not recursive.

Q2: Let < M > denote an encoding of an automaton M. Suppose that ∑ = {0, 1}. Which of the following languages is/are NOT recursive?  (2021 SET-1)
(a) L = {<M> | M is a DFA such that L (M) = ∅}
(b) L = {<M> | M is a DFA such that L (M) = ∑*}
(c) L = {<M> | M is a PDA such that L (M) = ∅}
(d) L = {
<M> | M is a PDA such that L (M) = ∑*}
Ans: 
(d)
Sol: 

We can get minimal DFA for both A and B, as minimal DFAs for both of them are just single state DFAs,
And we know minimal DFA for any regular language is always unique. So they should be isomorphic to DFAmin (∅ ) and DFAmin (∑*) respectively.
It's easy to check if DFAmin for A is isomorphic to DFAmin (∅) as there's only 1 state, if they are isomorphic we say 'Yes', otherwise we say 'No'.
Same procedure can be applied to check if DFAmin for B = DFAmin (∑*).
Hence both (A) and (B) are decidable.
For every PDA we can covert it into a CFG, minimize the CFG (removing all useless symbols and productions), if Start symbol is useless then we can say 'Yes', otherwise we can say 'No'. Hence (C) is decidable.
Only option left is (D). It is undecidable, There's no way to determine if a CFG can generate everything or not.
Final ans is D.

Q3The set of all recursively enumerable languages is  (2018)
(a) closed under complementation
(b) closed under intersection.
(c) a subset of the set of all recursive languages.
(d) an uncountable set
Ans: 
(b)
Sol:

C is false as the set of all recursively enumerable languages (semi-decidable) is a STRICT super set of the set of all recursive languages (decidable).
D is false as the set of all recursively enumerable languages (set of all Turing machines) is an infinite but countable set.

Q4: Let X be a recursive language and Y be a recursively enumerable but not recursive language. Let W and Z be two languages such that Y reduces to W, and Z reduces to X (reduction means the standard many-one-reduction).  (2016 SET-1)
Which one of the following statements is TRUE?
(a) W can be recursively enumerable and Z is recursive.
(b) W can be recursive and Z is recursively enumerable
(c) W is not recursively enumerable and Z is recursive
(d) W is not recursively enumerable and Z is not recursive.

Ans: (c)
Sol: 
X is recursive language, soPrevious Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)is also recursive.
Y is recursively enumerable, but not recursive soPrevious Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)is not recursively enumerable language.
A ≤ B, (A is reducible to B), i. e, solving A cannot be "harder" than solving B.

  1. If A is reducible to B, and B is decidable, then A is decidable.
     i) if A is reducible to B, and B is recursive, then A is recursive.
  2. If A is undecidable and reducible to B, then B is undecidable.
     i) if B is recursively enumerable, and A is reducible to B, then A is recursively enumerable.
     ii) if A is not recursively enumerable, and reducible to B, then B is not recursively enumerable.

Now Back to question.
Previous Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)is not recursively enumerable, and reducible to W, then W is not recursively enumerable (using 2(ii)).
Z is reducible toPrevious Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)andPrevious Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)is recursive, then Z is recursive (using 1(i)).
Option C is correct.

Q5: Let L be a language and I be its complement. Which of the following is NOT a viable possibility?  (2014 SET-1)
(a) Neither L norPrevious Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)is recursively enumerable (r.e.).

(b) One of L andPrevious Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)is r.e. but not recursive; the other is not r.e.
(c) Both L andPrevious Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)are r.e. but not recursive
(d) Both L andPrevious Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)are recursive.

Ans: (c)
Sol: 
(C) is not possible. If L is re we have a TM that accepts a string in L. IfPrevious Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)is re, we have a TM that accepts strings inPrevious Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE).
So, using both these TMs we can make a new TM M which accepts strings in L and rejects strings inPrevious Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)- that is M decides L, making L recursive.

Q6: Let L1 be a recursive language. Let L2 and Lbe languages that are recursively enumerable but not recursive. Which of the following statements is not necessarily true?  (2010)
(a) L2 - L1 is recursively enumerable.
(b) L1 - L3 is recursively enumerable.
(c) L2 ∪ L1 is recursively enumerable.
(d) L2 ∩ L1 is recursively enumerable.
Ans: (b)
Sol:
Previous Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)
Recursive languages are closed under complement, and soPrevious Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)is recursive and hence recursively enumerable also. SoPrevious Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE) is recursively enumerable is always TRUE.
Previous Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)
Recursively enumerable languages are not closed under complement. So,Previous Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)may or may not be recursively enumerable and hence we can't say anything ifPrevious Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)is recursively enumerable or not.
C. Intersection of two recursively enumerable languages is always recursively enumerable (RE closed under intersection).
D. Union of two recursively enumerable languages is always recursively enumerable(RE closed under union).
Correct Answer: B

The document Previous Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE) is a part of the Computer Science Engineering (CSE) Course Theory of Computation.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)
18 videos|69 docs|44 tests

Top Courses for Computer Science Engineering (CSE)

FAQs on Previous Year Questions: Recursive Language - Theory of Computation - Computer Science Engineering (CSE)

1. What is a recursive language in computer science?
Ans. A recursive language in computer science is a language that can be recognized by a Turing machine that always halts on every input.
2. How is recursion used in programming languages?
Ans. Recursion is a programming technique where a function calls itself in order to solve a problem. It is commonly used to solve problems that can be broken down into smaller, similar subproblems.
3. What is the difference between a recursive language and a recursively enumerable language?
Ans. A recursive language is a language that is decidable, meaning a Turing machine can determine whether a given input is in the language or not. A recursively enumerable language, on the other hand, is a language for which a Turing machine can enumerate all the strings in the language, but may not halt on inputs not in the language.
4. Can all recursive languages be recognized by a Turing machine?
Ans. Yes, all recursive languages can be recognized by a Turing machine that always halts on every input. This is because a recursive language is decidable, meaning there exists a Turing machine that can determine whether a given input is in the language or not.
5. What are some common examples of recursive languages in computer science?
Ans. Some common examples of recursive languages include regular languages, context-free languages, and context-sensitive languages. These languages can be recognized by deterministic or non-deterministic Turing machines that always halt on every input.
18 videos|69 docs|44 tests
Download as PDF
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

mock tests for examination

,

Previous Year Questions with Solutions

,

Previous Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)

,

Previous Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)

,

Sample Paper

,

Exam

,

Extra Questions

,

pdf

,

Summary

,

ppt

,

past year papers

,

MCQs

,

practice quizzes

,

Previous Year Questions: Recursive Language | Theory of Computation - Computer Science Engineering (CSE)

,

Free

,

Semester Notes

,

study material

,

video lectures

,

Important questions

,

shortcuts and tricks

,

Objective type Questions

,

Viva Questions

;