Cycle rank of transition graphs and the star height of regular events.