Let L be the language on A = {a, b, c} which consists of all words of the form…
2017
Let L be the language on A = {a, b, c} which consists of all words of the form w = aʳbˢcᵗ where r, s, t > 0. Which of the following is the valid regular expression r* such that L = L(r)?
- A.
r = a*b*c*
- B.
r = aa*bb*c*
- C.
r = aa*b*cc*
- D.
r = aa*bb*cc*
Attempted by 84 students.
Show answer & explanation
Correct answer: D
The given language definition states L = { a^r b^s c^t | r, s, t > 0 }. Since the exponents r, s, and t must be strictly greater than zero (> 0), each symbol a, b, and c must appear at least once in the string. In regular expressions, a minimum of one occurrence is represented as x+ or xx*. Thus, the language requires at least one a, followed by at least one b, followed by at least one c. This perfectly matches the expression aa*bb*cc*.