The Viterbi dynamic program for finding the shortest derivation is quite simple: it requires CKY to store only bytevalued switch-counts s(X p , i, j) (i.e., the number of switches) for each chart item and compute the derivation with the least switch-count.
in the dynamic program, if we use a SWITCH rule X p → X q , then we update If we use a continue rule X p → Y q Z r , then the update is where k is a split point in the chart.