A regular expression enables a quick test to determine objects and text strings with undependable values.
Explanation: Because it checks for all the values and determines whether the output string matches with the given string.
RE can be used only for values of type string and number.
No not for all values the string and numbers can we use the RE.
You can use RE, if you expect the value of a property to change in an unpredictable way each time its run.
Explanation: For every cycle the values does not change unpredictably because the type of grammar that it accepts is defined.
All ___________ Are automatically treated as regular expressions.
Explanation: The programmatic description is genuinely treated as regular expression.
If a ‘/’ is used before a character that has no special meaning, ‘/’ is ignored.
Explanation: The backslash carries no significance and it is ignored.
The regular expression denote a language comprising all possible strings of even length over the alphabet (0, 1)
Explanation: Option A does not consider even length criteria for the question.
Option B it can so happen here that from the former bracket it takes 0 or 1 and takes null from the latter then it forms a string of odd length
Option C it gives either 1 or 0.
Hence Option D is the answer.
The RE gives none or many instances of an x or y is
Explanation: Whether x or y is denoted by x+y and for zero or more instances it is denoted but (x+y)*.
The RE in which any number of 0′s is followed by any number of 1′s followed by any number of 2′s is
Explanation: The order for the desired string is 012 and foe any number of 0s we write 0* for any number of 1s we denote it by 1* and similarly for 2*.Thus 0*1*2*.
The regular expression have all strings of 0′s and 1′s with no two consecutive 0′s is :
From the former bracket we choose 0 or epsilon. Then from the latter part 1 or 10 which can be followed by 1 or 10.
The regular expression with all strings of 0′s and 1′s with at least two consecutive 0′s is:
Explanation: The expression (0+1)*00(0+1)* is where either it initially takes 0 or 1 or 00 followed by string of combination of 0 and 1.
Which of the following is NOT the set of regular expression R = (ab + abb)* bbab
String generated byS->aS/bA,A->d/ccA
Explanation: S->aS (substitute S->aS)
S->aaS (substitute S->bA)
S->aabA (substitute A->ccA)
S->aabccA (substitute A->d)
Consider the production of the grammar S->AA A->aa A->bb Describe the language specified by the production grammar.
Explanation: S->AA (substitute A->aa)
S->AA (substitute A->aa )
S->aaA (substitute A->bb)
S->AA (substitute A->bb the A->aa)
S->AA (substitute A->bb)
If R is regular language and Q is any language (regular/ non regular), then Pref (Q in R) is _____________
Explanation: So says the definition of Regular Grammar.
The production of the form non terminal → Λ is said to be null production.
The productions of type ‘A -> λ’ are called λ productions ( also called lambda productions and null productions) . These productions can only be removed from those grammars that do not generate λ (an empty string). It is possible for a grammar to contain null productions and yet not produce an empty string.