At position : If is '': (can't decode) Otherwise: (take one digit) If forms -: (also take two digits) The total is the sum of both valid choices.
The transition defines how the answer for the current state depends on answers for previous states. Notice that only looks at and , so you fill the table from right to left.