Canonical regular expressions and minimal state graphs for definite events