A context-free grammar $G$ is ambiguous if and only if
- some string $w \in L(G)$ has different leftmost and rightmost derivations.
- some string $w \in L(G)$ has at least two different parse trees.
- every string $w \in L(G)$ has at least two different parse trees.
- some string $w \in L(G)$ has at least two different leftmost derivations.