activity selection problem proof