Each trellis cell keeps the best predecessor path into that state.

highlighted = computed this step

Each step keeps the best predecessor

For each current state, multiply the emission probability by the best previous trellis value times the transition probability.

V(t,s)=es(ot)maxpV(tone,p)ap,sV(t,s)=e_s(o_t)\max_p V(t-\text{one},p)a_{p,s}
Viterbi recurrenceThe next column keeps only the best predecessor for each state.Statet0t1Best prevI3/827/128IN1/83/128I

The second column comes from state I

For the second G, state I gets 27/128. State N gets 3/128; its predecessor tie breaks to I.

V(I)=27128,V(N)=3128V(I)=\frac{27}{128},\quad V(N)=\frac{3}{128}
Viterbi recurrenceThe next column keeps only the best predecessor for each state.Statet0t1Best prevI3/827/128IN1/83/128I