I'm trying to write pseudocode for the Activity Selection Problem in dynamic programming as opposed to Greedy Algorithm. The recurrence I have is:
c[i,j] = max(c[i,k] + c[k,j] + 1), where c[i,j] denotes the size of an optimal solution for set of activities.
So far, I have:
ACTIVITY-DYNAMIC(s, f) n = length(s) c =  for i to n c[i] = max(c[i,k] + c[k,j] + 1)
But I can't seem to figure out what to do next. Any suggestions, pointers?