959 views
1 votes
1 votes

Consider the following languages
L1 = {< M, q > | M is a turing machine that visits state q on some input within 10 steps}
L2 = {< M > | M is a turing machine, |M| < 100 where |M| is number of states in machine}
Which of the following is correct?

  • L1 is decidable but L2 is not decidable
  • L2 is decidable but L1 is not decidable
  • Both L1 and L2 is decidable
  • Neither L1 nor L2 is decidable

According to Rice theorem's first part , any non-trivial property of TM is undecidable , so L1 should be undecidable , right ? Because , we can not tell whether it will not visit q on some input within 10 steps.

But , L2 is trivial property , right ?

Please correct me.

1 Answer

Best answer
4 votes
4 votes

Both are non-trivial properties. But Rice's theorem does not say anything about properties of TM. It says about properties of language of TM or about properties of r.e. set. So, it is not applicable to given question as here it talks about TM and not its language. 

L2 is easily decidable. We can just count the no. of states in the TM description. This is similar to counting the no. of lines in a given C code. 

L1 looks semi-decidable. But it is also decidable. With one move (step) a TM can read only 1 input letter. So, in 10 steps the maximum input a TM can read is 10 letters. So, to decide the problem just simulate the given TM on all inputs of length 10 for up to 10 steps. If the TM visits state $q$ on any of them we have answer "yes" and otherwise we have answer "no". No chance of an infinite lop here. 

selected by

Related questions

417
views
0 answers
0 votes
target2017 asked Nov 19, 2016
417 views
Please explain option A.
739
views
3 answers
1 votes
sh!va asked Jul 9, 2016
739 views
Which of the following is a valid word of the language (1*(01*01*)*) U (0*(10*10*)*) ?101100101011010101010000101010000001010001010
1.4k
views
1 answers
5 votes
Shefali asked Sep 11, 2015
1,423 views
Which of the following is not a recursive language?a. Regular languageb. {$\langle M,w \rangle$ | $M$ is a DFA that accepts $w$}c. {$\langle M \rangle$ | $M$ is a TM ... steps}d. {$\langle M \rangle$ | $M$ is a TM and $L(M)$ is regular }
1.2k
views
0 answers
0 votes
Akriti sood asked Dec 10, 2016
1,183 views
Which of the following statement/s is/are false for the following language:L = {am bn cq | m = n or n = q, m > 0, n > 0, q > 0}S1: The ... cannot be recognized by deterministic PDA. Only S2 Only S1 Both S1 and S2 Neither S1 nor S2