Implementing Dyanmic programming and Taking amtch to penalty sudden death