alphabet = {'a', 'b'},
states = {0, 1, 2, 3},
initial = 0,
finals = {3},
map = {(0): {'a': 1, 'b': 2}, (1): {'a': 0, 'b': 3}, (2): {'a': 3, 'b': 0},
    (3): {'a': 2, 'b': 1}}
Can we use regular expressions to check if there are an odd number of each type of character?