Create Dynamic-programming