Which of the folowing pairs of regular expressions are equivalent ?
A. 1 (01)* and (10)* 1
B. x (xx) * and (xx) * X
C. X* and x x**
D. All of these
Answers
Answer:
B
Explanation:
jesiiikswiiwkxjcjdi iwkskdkdidoeiekej
Answer:
Concept:
A regular expression is a string of letters that designates a text search pattern. The majority of the time, thread algorithms will use these patterns to validate input or perform "find" or "find and replace" actions on strings. In formal language theory and theoretical computer science, regular expression techniques are developed. When American mathematician Stephen Cole Kleene formalized the idea of a regular language in the 1950s, the concept of regular expressions was born. With the introduction of Unix text-processing tools, they were widely used. Since the 1980s, there have been several different regular expression writing syntaxes, including the POSIX standard and the Perl syntax, which is very popular.
Given:
Which pair of regular expressions from the list below is equivalent?
(a) 1(01)* and (10)*1
(b) X(xx)* and (xx)*x
(c) 1(01)* & (10)*1 & X(xx)* & (xx)*x
(d) None of the mentioned
Find:
Find the correct answer for the given question
Answer:
The correct answer is option (c). 1(01)* and (10)*1 & X(xx)* and (xx)*x
R1 and R2 are the opposite of one another. The other one can also be generated if an ant can generate one of them. Rk represents the concatenation of k rs, where r denotes a regular expression. As a result, the regular expression (a + (b(c*))) is written as a + bc*. So, for instance, rr = r2. Lrk is the language that corresponds to the regular expression r, and Lr is the language that corresponds to the regular expression r.
Take the regular equation (a + b)*a, for example. To work with this regular expression, we will now create a regular grammar. We construct a regular grammar with the rule S arrow a, start symbol S for each terminal symbol a. The transformations are then applied to these regular grammars, gradually creating the regular grammar.
#SPJ3