TITLE: Can regular expressions be made unambiguous?
QUESTION [15 upvotes]: When investigating regular languages, regular expressions are obviously a useful characterisation, not least because they are amenable to nice inductions. On the other hand ambiguity can get in the way of some proofs.
Every regular language is recognized by an unambiguous context-free grammar (take a deterministic automaton which recognises it, and make a production $R \rightarrow tS$ for every edge $R \stackrel{t}{\rightarrow} S$ in the DFA, and $R \rightarrow \epsilon$ for every accepting state $R$).
On the other hand, the natural "grammar" for a regular language is its regular expression. Can these be made unambiguous?
To be precise, let's define a parse for a regular expression (this is I think a natural definition, but not one I've seen named before).

$x$ is an $x$-parse of $x$, if $x$ is a symbol or $x=\varepsilon$
$(y, 0)$ is an $R\cup R'$-parse of $x$, if $y$ is an $R$-parse of $x$
Similarly, $(y,1)$ is an $R\cup R'$-parse of $x$, if $y$ is an $R'$-parse of $x$
$(y_1, y_2)$ is an $RR'$-parse for $x_1x_2$, if $y_i$ is an $R$-parse for $x_i$ for $i=1,2$
$[]$ is an $R^*$-parse for $\varepsilon$
$[y_1, y_2, \dots, y_n]$ is an $R^*$-parse of $x_1x_2\cdots x_n$, if $y_i$ is an $R$-parse for $x_i$ for $1 \le i \le n$

In short, the parses of a string tell us how a regular expression matches a string if it does.
A regular expression $R$ is unambiguous if, for every $x \in L(R)$, there is only one $R$-parse of $x$.

Given a regular expression, is there an unambiguous regular expression which matches the same language?

REPLY [3 votes]: Regarding your question about disambiguation without exponential increase: if you're willing to move to generalized regular expressions (regular expressions with the complement and intersection operators as primitives, rather than exponential-blowup-inducing derived operations), then yes: assuming longest-match-convention on the Kleene star the only source of ambiguity will be the alternation (vertical bar) construct, and you can disambiguate every instance of this by simply turning "a|b" into "a|(b&~a)" ("a or b-and-not-a").
Note that adding intersection and complementation does not alter the class of languages which may be defined.  The languages which can be defined are still exactly the regular languages.
I think this suggests that you probably can't disambiguate in general without exponential blowup because disambiguation is "pretty similar to" (vague term, I know) intersection with the complement.
Here's a nice paper which presents many of the results needed above.