A course homework for dual decomposition for hmm and cky