# Recursively enumerable sets and Turing machines

Question 1 |

Which of the following statements is/are FALSE?

1. For every non-deterministic Turing machine, there exists an equivalent deterministic Turing machine. 2. Turing recognizable languages are closed under union and complementation. 3. Turing decidable languages are closed under intersection and complementation. 4. Turing recognizable languages are closed under union and intersection.

1 and 4 only | |

1 and 3 only | |

2 only | |

3 only |

**Explanation:**

A recognizer of a language is a machine that recognizes that language. A decider of a language is a machine that decides that language. Both types of machine halt in the Accept state on strings that are in the language A Decider also halts if the string is not in the language A Recognizer MAY or MAY NOT halt on strings that are not in the language On all input: A Decider MUST halt (in Accept or Reject state) A Recognizer MAY or MAY NOT halt on some strings (Q: Which ones?) A language is Turing-decidable (or decidable) if some Turing machine decides it. Aka Recursive Language. A language is Turing-recognizable if some Turing machine recognizes it. Aka Recursively Enumerable Language. Source: http://www.radford.edu/~nokie/classes/420/Chap3-Langs.html Recursive (Turing Decidable) languages are closed under following Kleene star, concatenation, union, intersection, complement and set difference. Recursively enumerable language are closed under Kleene star, concatenation, union, intersection. They are NOT closed under complement or set difference.

Question 2 |

L2 – L1 is recursively enumerable. | |

L1 – L3 is recursively enumerable | |

L2 ∩ L1 is recursively enumerable | |

L2 ∪ L1 is recursively enumerable |

**Explanation:**

A) Always True (Recursively enumerable - Recursive ) is Recursively enumerable B) Not always true L1 - L3 = L1 intersection ( Complement L3 ) L1 is recursive , L3 is recursively enumerable but not recursive Recursively enumerable languages are NOT closed under complement. C) and D) Always true Recursively enumerable languages are closed under intersection and union.

Question 3 |

It is not accepted by a Turing Machine | |

It is regular but not context-free | |

It is context-free but not regular | |

It is neither regular nor context-free, but accepted by a Turing machine |

**Explanation:**

^{p}using the concept of ‘Sieve of Eratosthenes’.

Suppose we are given an integer ‘n’ and we want to find out all the prime numbers less than or equal to ‘n’. We repeat the following steps : We find the smallest number in the list, declare it prime and eliminate all the multiples of that number from the list. We keep doing this until each element has been declared prime or eliminated from the list.

Now, if p = 0 or p = 1, we reject the input. Else, we replace the first and the last ‘a’ with symbol $.

In the above steps, what we do is we find the first non-black symbol from the left. Let this symbol occur at position ‘x’. Suppose ‘x’ is a prime number. If this non-blank symbol is $, input string will be accepted. But, if the symbol is ‘a’, we mark it as a* and replace all the multiples of ‘x’ with the symbol ‘blank’. If at the end, symbol $ is replaced with 'blank’, we reject the input string (because p will be multiple of some ‘x’ in that case). Else, we go back and repeat the steps.

Thus, the input is neither regular nor context-free, but is accepted by a Turing machine.

Please comment below if you find anything wrong in the above post.

Question 4 |

regular | |

context-free | |

context-sensitive | |

recursive |

**Explanation:**

Question 5 |

Neither L nor L' is recursively enumerable (r.e.). | |

One of L and L' is r.e. but not recursive; the other is not r.e. | |

Both L and L' are r.e. but not recursive. | |

Both L and L' are recursive |

**Explanation:**

Question 6 |

_{m}B denotes that language A is mapping reducible (also known as many-to-one reducible) to language B. Which one of the following is FALSE?

If A ≤ _{m} B and B is recursive then A is recursive. | |

If A ≤ _{m} B and A is undecidable then B is undecidable. | |

If A ≤ _{m} B and B is recursively enumerable then A is recursively enumerable. | |

If A ≤ _{m} B and B is not recursively enumerable then A is not recursively enumerable. |

**Explanation:**

- A ≤
_{m}B means language A is mapping reducible to language B.Thus, A cannot be harder than B. Since, A can be reduced to B, instead of deciding A we can now decide B.**So, the first three options are correct.** - As B is not recursively enumerable, it doesn't guarantee A is not recursively enumerable.Thus, if A ≤
_{m}B and B is not recursively enumerable then A is not recursively enumerable.**Therefore, answer is D is correct**

Question 7 |

L is recursively enumerable, but not recursive | |

L is recursive, but not context-free | |

L is context-free, but not regular | |

L is regular |

**Explanation:**

Question 8 |

L1' --> Complement of L1 L2' --> Complement of L2

L1' is recursive and L2' is recursively enumerable | |

L1' is recursive and L2' is not recursively enumerable | |

L1' and L2' are recursively enumerable | |

L1' is recursively enumerable and L2' is recursive |

**Explanation:**

**type-0**languages in the Chomsky hierarchy of formal languages. All regular, context-free, context-sensitive and

**recursive**languages are recursively enumerable (Source: http://en.wikipedia.org/wiki/Recursively_enumerable_language ) Recursive Languages are closed under complementation, but recursively enumerable are not closed under complementation. If a languages L is recursively enumerable, then the complement of

*it*is recursively enumerable if and only if L is also recursive. Since L2 is recursively enumerable, but not recursive, L2' is not recursively enumerable.

Question 9 |

S1 : L1 is recursive implies L2 is recursive S2 : L2 is recursive implies L1 is recursiveWhich of the following statements is true ?

Both S1 and S2 are true | |

S1 is true but S2 is not necessarily true | |

S2 is true but S1 is not necessarily true | |

Neither is necessarily true |

**Explanation:**

Question 10 |

L is recursive | |

L is recursively enumerable but not recursive | |

L is not recursively enumerable | |

Whether L is recursive or not will be known after we find out if P = NP |

**Explanation:**