b36654efff9725ae.tex
1: \begin{abstract}
2: The {\em commutative ambiguity} $\camb_{G,X}$ of a context-free grammar $G$ with start symbol $X$ assigns to each Parikh vector $\vv$ the number of distinct leftmost derivations yielding a word with Parikh vector $\vv$. Based on the results on the generalization of Newton's method to $\omega$-continuous semirings \cite{EKL07:stacs,EKL07:dlt,DBLP:journals/jacm/EsparzaKL10}, we show how to approximate $\camb_{G,X}$ by means
3: of rational formal power series, and give a lower bound on the convergence speed of these approximations. From the latter result we deduce that $\camb_{G,X}$ itself is 
4: rational modulo the generalized idempotence identity $k=k+1$ (for $k$ some positive integer), and, subsequently, that it can be represented as a weighted sum of linear sets. This extends Parikh's well-known result that the commutative image of context-free languages is semilinear ($k=1$).
5: 
6: Based on the well-known relationship between context-free grammars and algebraic systems over semirings \cite{ChomskySch1963,DBLP:books/daglib/0067812,DBLP:journals/tcs/BerstelR82,Kui,DBLP:journals/mst/Bozapalidis99},
7: our results extend the work by Green et al.\ \cite{DBLP:conf/pods/GreenKT07} on the computation of the provenance of Datalog queries over commutative $\omega$-continuous semirings.
8: \end{abstract}
9: