Optimal Play Strategy: Math, DP, and Recursion Problem Breakdown