📚 Math in Society
⇩ Download ▾

7.5 Exercises

Skills

  1. Create a digraph for the following set of tasks:

TaskTime requiredTasks that must be completed first
A3
B4
C7
D6A, B
E5B
F5D, E
G4E

  1. Create a digraph for the following set of tasks:

TaskTime requiredTasks that must be completed first
A3
B4
C7
D6A
E5A
F5B
G4D, E

Use this digraph for the next 2 problems.

Digraph of seven tasks, task times in parentheses. T sub 1 (3) points to T sub 4 (12) and T sub 5 (5). T sub 2 (9) points to T sub 5. T sub 3 (11) points to T sub 7 (10). T sub 4 points to T sub 6 (8) and T sub 7. T sub 5 points to T sub 6 and T sub 7.
  1. Using the priority list T4,T1,T7,T3,T6,T2,T5, schedule the project with two processors.
  2. Using the priority list T5,T2,T3,T7,T1,T4,T6, schedule the project with two processors.

Use this digraph for the next 4 problems.

Directed graph of ten tasks, each drawn as a small open circle labelled with its name and, in brackets, the time it takes: T1 takes 8, T2 takes 6, T3 takes 7, T4 takes 4, T5 takes 9, T6 takes 3, T7 takes 2, T8 takes 5, T9 takes 2 and T10 takes 7. Arrows run from T1 to T5, from T2 to T5, from T2 to T6, from T3 to T7, from T6 to T8, from T7 to T8, from T5 to T9, from T5 to T10, and from T8 to T10. T4 sits alone at the lower left with no arrows in or out.

  1. Using the priority list T4,T3,T9,T10,T8,T5,T6,T1,T7,T2 schedule the project with two processors.
  2. Using the priority list T2,T4,T6,T8,T10,T1,T3,T5,T7,T9 schedule the project with two processors.
  3. Using the priority list T4,T3,T9,T10,T8,T5,T6,T1,T7,T2 schedule the project with three processors.
  4. Using the priority list T2,T4,T6,T8,T10,T1,T3,T5,T7,T9 schedule the project with three processors.
  1. Use the decreasing time algorithm to create a priority list for the digraph from #3, and schedule with two processors.
  1. Use the decreasing time algorithm to create a priority list for the digraph from #3, and schedule with three processors.
  1. Use the decreasing time algorithm to create a priority list for the digraph from #5, and schedule with two processors.
  1. Use the decreasing time algorithm to create a priority list for the digraph from #5, and schedule with three processors.
  1. Use the decreasing time algorithm to create a priority list for the problem from #1, and schedule with two processors.
  1. Use the decreasing time algorithm to create a priority list for the problem from #2, and schedule with two processors.
  1. With the digraph from #3:

a. Apply the backflow algorithm to find the critical time for each task

b. Find the critical path for the project and the minimum completion time

c. Use the critical path algorithm to create a priority list and schedule on two processors.

  1. With the digraph from #3, use the critical path algorithm to schedule on three processors.
  1. With the digraph from #5:

a. Apply the backflow algorithm to find the critical time for each task

b. Find the critical path for the project and the minimum completion time

c. Use the critical path algorithm to create a priority list and schedule on two processors.

  1. With the digraph from #5, use the critical path algorithm to schedule on three processors.
  1. Use the critical path algorithm to schedule the problem from #1 on two processors.
  1. Use the critical path algorithm to schedule the problem from #2 on two processors.

Concepts

  1. If an additional order requirement is added to a digraph, can the optimal finishing time ever become longer? Can the optimal finishing time ever become shorter?
  1. Will an optimal schedule always have no idle time?
  1. Consider the digraph below.
Digraph of five tasks, task times in parentheses. T sub 1 (6) points to T sub 2 (5), T sub 3 (3) and T sub 5 (4). T sub 2 points to T sub 4 (7) and T sub 5. T sub 3 points to T sub 5. So T sub 1 must come first and T sub 5 waits on T sub 1, T sub 2 and T sub 3.
  1. How many priority lists could be created for these tasks?
  2. How many unique schedules are created by those priority lists?
  1. Create a digraph and priority list that would lead to the schedule below.
Two processor schedule chart, given without its digraph, with boundary times 4, 5, 7, 10, 14 and 15. P sub 1 runs T sub 2 from 0 to 4, idles from 4 to 5, then runs T sub 3 from 5 to 7 and T sub 4 from 7 to 15. P sub 2 runs T sub 1 from 0 to 5, idles from 5 to 7, then runs T sub 5 from 7 to 10 and T sub 6 from 10 to 14, and idles from 14 to 15.
  1. Is it possible to create a digraph with three tasks for which every possible priority list creates a different schedule? If so, create it.
  1. Is it possible to create a digraph with four tasks for which every possible priority list creates a different schedule? If so, create it.

Exploration

  1. Independent tasks are ones that have no order requirements; they can be completed in any order.

a. Consider three tasks, with completion times 2, 2, and 4 hours respectively. Construct two different schedules on two processors with different completion times to show that the priority list still matters with independent tasks.

b. Choose a set of independent tasks with different completion times, and implement the decreasing time list algorithm and the critical path algorithm. What do you observe?

c. Will using the decreasing time list or critical path algorithms with independent tasks always produce an optimal schedule? Why or why not?

d. Will using the decreasing time list or critical path algorithms with independent tasks always produce the same schedule? Why or why not?

  1. In a group, choose ten tasks necessary to throw a birthday party for a friend or child (for example, cleaning the house or buying a cake). Determine order requirements for the tasks, create a digraph, and schedule the tasks for two people.

29-37: At the end of the chapter it was noted that no algorithm exists to determine if an arbitrary schedule is optimal, but there are special cases where we can determine that a schedule is indeed optimal. In each of the following scenarios, determine

  1. If the scenario is even possible
  2. Whether or not the schedule could be optimal
  3. Whether or not we can be sure that the schedule is optimal
  1. A job has a critical time of 30 hours, and the finishing time for the schedule on 2 processors is 30 hours.
  2. The sum of all task times for a job is 40 hours, and the finishing time for the schedule on 2 processors was 15 hours
  3. The sum of all task times for a job is 100 hours, the critical time of the job was 40 hours, and the finishing time for the schedule on 2 processors was 50 hours.
  4. The sum of all task times for a job is 50 hours, and the finishing time for the schedule on 2 processors was 40 hours.
  5. A job has a critical time of 30 hours, and the finishing time for the schedule on 3 processors is 20 hours.
  6. The sum of all task times for a job is 60 hours, and the finishing time for the schedule on 3 processors was 20 hours.
  7. The critical time for a job is 25 hours, and the finishing time for the schedule on 2 processors was 30 hours.
  8. The sum of all task times for a job is 20 hours, and the finishing time for the schedule on 2 processors was 25 hours.
  9. Based on your observations in the previous scenarios, write guidelines for when you can determine that a schedule is optimal.

Adapted from Math in Society by David Lippman, hosted on LibreTexts (math.libretexts.org) and licensed under CC BY-SA 3.0. Changes were made. License: CC-BY-SA-3.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.