State 1: even number of a's and even number of b's

State 2: odd number of a's and even number of b's

State 3: even number of a's and odd number of b's

State 4: odd number of a's and odd number of b's