Does all unary language belongs to P questions?

112 Views Asked by At

It's a simple and maybe silly question. Does all unary language aka belongs to {1*} a P language. It seems I can always check the input unary string in linear time to see if there exists one in the language.

1

There are 1 best solutions below

0
On BEST ANSWER

The answer is no. Take a non recursive subset $S$ of $\Bbb{N}$. Then the language $\{1^n \mid n \in S\}$ will not even be decidable.