Possible transitions calcualtion and file output implemented.