14,001 views
38 38 votes

Which of the following is true for the language

$$\left\{ a^p \mid p \text{ is a prime } \right \}?$$

  1. It is not accepted by a Turing Machine
  2. It is regular but not context-free
  3. It is context-free but not regular
  4. It is neither regular nor context-free, but accepted by a Turing machine

4 Answers

Best answer
50 50 votes

We have algorithms to generate prime numbers $\implies$ we can generate sequence of $p$ for the given language, hence strings as defined by the language definition.

So, by Church Turing Thesis we can say that there exists a Turing Machine which can accept the given language.

Answer is option D.

• edited by
4 4 votes

There ar some languages which except by LBA.( Must for Gate Aspirants)

See the 4th point which says the given language is CSL.

so it is neither Regular nor CFL, but it is CFL so it is must it is accepted by Turing machine. 

 

3 3 votes
There is Theorem which says that language on single alphabet If regular then Context free also and If not regular then also not context free...
0 0 votes
Ans is (D)
Answer:
Position:
Show:

Related questions

74 74 votes
4 answers 4 answers
35.4k
35.4k views
Kathleen asked Sep 12, 2014
35,365 views
Which of the following are NOT true in a pipelined processor?Bypassing can handle all RAW hazardsRegister renaming can eliminate all register carried WAR hazardsControl h...
84 84 votes
4 answers 4 answers
21.3k
21.3k views
Kathleen asked Sep 12, 2014
21,285 views
Match the following:$$\small{\begin{array}{|ll|ll|}\hline \text{E.} & \text{Checking that identifiers are declared before their use} & \text{P.} & \text{$L \: = \: \lef...
34 34 votes
5 answers 5 answers
13.1k
13.1k views
Kathleen asked Sep 12, 2014
13,127 views
Which of the following statements is false?Every NFA can be converted to an equivalent DFAEvery non-deterministic Turing machine can be converted to an equivalent determi...
40 40 votes
6 answers 6 answers
17.5k
17.5k views
Kathleen asked Sep 11, 2014
17,486 views
If $L$ and $\overline{L}$ are recursively enumerable then $L$ isregularcontext-freecontext-sensitiverecursive