I come across this problem:
Consider the following regular languages:
$L_1= a^*b^*c^*$ over the alphabet $A=\{a,b,c\}$ and
$L_2= ( a b | b b | a )^*$ over the same alphabet as above.
Find the shortest strings (length $<5$) belonging to the regular language $L_3= L_1/L_2 (L_1-L_2)$.
I'd try this way:
find all the shortest $L_2$ strings.
find all the shortest $L_1$ string which suffix belongs to $L_2$.
erase the suffix from $L_1$ strings at point 2.
Performing this algorithm, do I find all the $L_1/L_2$ strings ?
Thanks.
If the length is < 5, then you can just enumerate all the strings consisting of a, b and c and for each,
suffixes don't enter the question here.