Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
20.2. Greedy Strategies
This section
Practice test
10 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
2 cards from this lesson. Good the night before a test.
Try these first
- 1.
Define what a 'greedy algorithm' is.
Hint
Think about how it relates to local choices.
- 2.
What is 'lateness' in job scheduling?
Hint
Consider how this relates to deadlines.
- 3.
What is the primary goal of minimizing lateness in job scheduling?
- To complete all jobs as quickly as possible
- To reduce maximum lateness across all jobs
- To prioritize the longest jobs
Hint
Consider what it means to arrive before deadlines.
- 4.
True or False: The shortest job first strategy is guaranteed to minimize lateness.
- True
- False
Hint
Think of how choices impact overall outcomes.
- 5.
Consider three jobs: Job A (3 hours, deadline 9), Job B (5 hours, deadline 5), and Job C (2 hours, deadline 7). Arrange them using the deadline-first approach and calculate the maximum lateness.
Hint
Pay attention to how each job’s completion time relates to its deadline.
- 6.
Create a counterexample where the slack-first strategy leads to higher lateness than the deadline-first method.
Hint
Analyze job lengths and deadlines closely.
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
4 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
Get your answers marked and your progress tracked
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting