Generate transitions relation