LEXICAL ANALYSIS
REGULAR EXPRESSIONS AND FINITE AUTOMATA
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
True
|
|
False
|
|
Either A or B
|
|
None of the above
|
Detailed explanation-1: -Regular languages all have finite descriptions. But the set of strings in the language can be infinite. For example the language A* consists of all strings containing zero or more A symbols, and nothing else, and is certainly infinite.
Detailed explanation-2: -(1) There are a countably infinite number of regular languages. This true because every description of a regular language is of finite length, so there is a countably infinite number of such descriptions. (2) There are an uncountable number of languages.
Detailed explanation-3: -The following theorem shows that any finite language is regular. We say a language is finite if it consists of a finite number of strings, that is, a finite language is a set of n strings for some natural number n. Theorem 2: A finite language is regular.
Detailed explanation-4: -True; all finite languages are regular languages and regular languages are closed under union.
Detailed explanation-5: -Example 3.4. Note that languages can be either finite or infinite. Because ∗ is infinite, it clearly has an infinite number of subsets, and so there are an infinite number of languages over .