Are all infinite languages undecidable?

落花浮王杯 提交于 2019-12-11 22:40:27

问题


I am wondering are all infinite languages undecidable?

They must be right, as the TM trying to decide an infinite language would just loop forever, which makes it a recgonizer, not a decider.

Thanks guys.


回答1:


No, there are many infinite languages that are decidable. One trivial example is the language {n € N | a^n}, i.e. the language of words that only contain the letter "a". This language can be matched by the regular expression a*. so it is a regular language and thus decidable.




回答2:


As sepp2k points out, a* is a regular language, hence decidable.

All finite languages are regular. Some infinite languages are regular. Only infinite languages can be undecidable.

To be undecidable, there must be individual strings in the language that cause the TM to fail. Indeed, there must be infinitely many such strings (otherwise, the poorly behaved ones could be handled by special-case logic).

That a language be infinite is therefore necessary, but not sufficient, for undecidability.



来源:https://stackoverflow.com/questions/14857316/are-all-infinite-languages-undecidable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!