P, O, R be regular expression over ∑, P is not ε, then R=Q + RP has a unique solution:

P, O, R be regular expression over ∑, P is not ε, then
R=Q + RP has a unique solution:
A. Q*P
B. QP*
C. Q*P*
D. (P*O*) *
 
Answer: B
Explanation: The given statement is the Arden’s Theorem and it tends to have a unique solution as QP*.
Let P and Q be regular expressions,
R=Q+RP
R=Q+(Q+RP) P
R=Q+((Q+RP) +RP) +P=Q+QP+RPP+RPP=Q+QP+(Q+RP) PP+(Q+RP) PP=Q+QP+QPP+RPPP+QPP+RPPP,
If we do this recursively, we get:
R= QP*
 

Tìm kiếm

Back
Top