P1 : RE but not REC

P2: REC

plz check??

The Gateway to Computer Science Excellence

+1 vote

Ans is **1**

First lets look at P2, P2 is finite as it is less than 100, so it is regular therefore also **Recursive**

Now lets look at P1, for P1 we can generate infinite strings of different length and the TM may or may not accept those strings, so we need to check for infinite amount of time whether there exist any string whose length does not matches with any string that is accepted by the TM, so we are not sure whether our TM will halt or not. So it is definitely **Non-Recursive, **but **Recursively Enumerable.**

0

According to my concept, there are finite number of inputs which have length less than 100, so our Turing machine will **definitely **halt after a time, be it 100 years or 10000 years it doesn't matter, but we can assure that it will halt, because **there are finite number of input less than 100 **and one day we should have checked all those inputs!

0

See this link--> https://gateoverflow.in/39596/gate2016-2-44

See the part where Arjun sir has proved why L2 is recursive. This thing relates to our problem.

And specially this line--> ** "we can just give it all possible inputs of length less than 2016 and see if it reaches a halt state within 2016 steps**".

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.6k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.4k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.5k
- Admissions 595
- Exam Queries 573
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,833 questions

57,748 answers

199,476 comments

108,120 users