Which of the following statements are correct?
(i) An alphabet is a finite set of symbols.
(ii) A word is a finite sequence of symbols over a given alphabet.
(iii) A language is an infinite set of words.
(iv) A finite language is never regular.
(v) A context-free language is never regular.
Solution:
Correct: i, ii
Incorrect:
iii A language may be infinite, but does not have to be.
iv All finite languages are regular.
v All regular languages are also context-free.
(ii) A word is a finite sequence of symbols over a given alphabet.
(iii) A language is an infinite set of words.
(iv) A finite language is never regular.
(v) A context-free language is never regular.
Solution:
Correct: i, ii
Incorrect:
iii A language may be infinite, but does not have to be.
iv All finite languages are regular.
v All regular languages are also context-free.
0 comments:
Feel free to contact the admin for any suggestions and help.