Actualizado (gracias a Yuval Filmus).
Dados dos idiomas e Y de A ∗ , dejemos
X - 1 YXYA∗
Yo afirmo queXYno es ambiguo si y solo si el lenguajeX-1X∩YY-1∩A+está vacío.
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+
XYuXYu=x1y2=x2y1x1,x2∈Xy1,y2∈Yx1x2x2=x1zz∈A+u=x1y2=x1zy1y2=zy1. Thus z∈X−1X∩YY−1.
Suppose now that 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).