COMPILER DESIGN

LEXICAL ANALYSIS

REGULAR EXPRESSIONS AND FINITE AUTOMATA

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
The complement of a language will only be defined when and only when the ____ over the language is defined.
A
String
B
Word
C
Alphabet
D
Grammar
Explanation: 

Detailed explanation-1: -7. The complement of a language will only be defined when and only when the over the language is defined. Explanation: It is not possible to define the complement of a language without defining the input alphabets.

Detailed explanation-2: -In grammar, a complement is a word, phrase, or clause that is necessary to complete the meaning of a given expression. Complements are often also arguments (expressions that help complete the meaning of a predicate).

Detailed explanation-3: -Defination: The complement of a language is defined in terms of set difference from * (sigma star). that is L’ = *-L. And the complement language (L’) of L has all strings from * (sigma star) except the strings in L. * is all possible strings over the alphabet .

Detailed explanation-4: -A language is a set of strings over an alphabet. Thus a, ab, baa is a language (over alphabert a, b) and 0, 111 is a language (over alphabet 0, 1). The number of symbols in a string is called the length of the string. For a string w its length is represented by |w|.

Detailed explanation-5: -The complement of any regular language is a regular language. is also a regular language. – The formal construction will just have a bunch of unreachable states in its set of states that have no impact on the language accepted by the machine.

There is 1 question to complete.