อัปเดต (ขอบคุณ Yuval Filmus)
ให้สองภาษาและYของA ∗ , ให้
X - 1 YXYA∗
ผมอ้างว่าXYเป็นที่ชัดเจนและถ้าหากภาษาX-1X∩YY-1∩+เป็นที่ว่างเปล่า
X−1YYX−1={u∈A∗∣there exists x∈X such that xu∈Y}={u∈A∗∣there exists x∈X such that ux∈Y}
XYX−1X∩YY−1∩A+
Proof. Suppose that XY is ambiguous. Then there exists a word u which has
two decompositions over XY, say u=x1y2=x2y1, where x1,x2∈X and y1,y2∈Y. Without loss of generality, we may assume that x1 is a prefix of x2, that is, x2=x1zz∈A+u=x1y2=x1zy1y2=zy1z∈X−1X∩YY−1
X−1X∩YY−1 contains some nonempty word z. Then there exist x1,x2∈X and y1,y2∈Y such that x2=x1z and y2=zy1. It follows that x2y1=x1zy1=x1y2 and hence the product XY is ambiguous.
If X and Y are regular, then both X−1X and YY−1 are regular and thus X−1X∩YY−1 is also regular (see Yuval's answer for an automaton accepting this language).