Activity Scheduling Problem
In this lesson, we go through a simple problem and solve it with the Greedy Approach.
We'll cover the following
Problem Statement
Say you are given activities with their start and finish times. Select the maximum number of activities that can be performed by a single person, assuming that a person can only work on a single activity at a time.
Mathematically, Let be the set of activities that compete for a resource. Each activity has its starting time and finish time with , namely, if selected, i takes place during time [ , ). No two activities can share the resource at any time point. We say that activities and are compatible if their time periods are disjoint.
The activity-selection problem is the problem of selecting the largest set of mutually compatible activities.
Create a free account to view this lesson.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Educative's Terms of Service and Privacy Policy