Slide 1 Dynamic Programming Adapted from Introduction and Algorithms by Kleinberg and Tardos. Slide 2 2 Weighted Activity Selection Weighted activity selection problem (generalization…