So I remember attempting (and failing) Treedepth last year and then hearing that the full solution required generating functions. Recently though, Mostafa gave me Treedepth again and told me to solve it using DP.
Does anyone have any idea how to do this? I have no idea how to approach this problem.