CO 454 Midterm 1 flashcards

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/37

flashcard set

Earn XP

Description and Tags

University of Waterloo CO 454

Last updated 2:44 PM on 6/9/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

38 Terms

1
New cards

pjp_j

Processing time for job jj

2
New cards

djd_j

Due date for job jj

3
New cards

CjC_j

Completion time for job jj

4
New cards

CmaxC_{max}

Makespan, i.e. completion time of last job

5
New cards

rjr_j

release time (earliest starting time)

6
New cards

wjw_j

Weight of job jj

7
New cards

Preemption

the scheduler is allowed to interrupt the processing of a job (preempt) at any point in time and put a different job on the machine instead

8
New cards

Three field notation αβγ\alpha | \beta | \gamma

α\alpha Machine environment (e.g. number of machines

β\beta job characteristics and side constraints (e.g. precedence constraints, routing constraints, etc. Note: can be empty

γ\gamma objective criterion to be minimized

9
New cards

Routing constraint

In a job shop, each job $ is proccesed by a subset of the machines, in a specific sequence.
In a job shop, each machine has it's own routing constraint

10
New cards

Precedence constraint

Some job ii must be completed before some job jj can be processed. The precedence constraints of a valid set of jobs is represented by a DAG.

11
New cards

Non-delay/greedy schedule

no machine is kept idle while a task is waiting for processing (i.e. kept idle while a job is available to run on that idle machine)

12
New cards

Unforced idleness

A time interval when there exists an idle machine MM as well as a job jj that can run on MM.
note: this is not referring to waiting for release dates

13
New cards

Non-delay property

No non-delay schedule has unforced idleness

14
New cards

What is the optimal approach for 1Cj1|| \sum C_j? How is this proved?

SPT (shortest processing time first). Proven with an exchange argument, here it was Adjacent Pairwise Exchange.

15
New cards

Give the general format for exchange arguments in this course (largely for schedule optimality)

  1. Establish an optimal adversary sequence that doesn’t follow your rule.

  2. Establish a reference sequence that swaps 2 jobs in the adversary sequence

    1. Often we just use adjacent jobs, using API (Adjacent Pairwise Exchange)

  3. Do some calculations on the sequence (adjusting for the due date changes, lateness, whatever) and show that the reference sequence is at least as good as or strictly better (depending on the problem) than the adversary. Contradiction.

16
New cards

Regular objective function γ\gamma

Monotonically increasing (non-decreasing) with respect to completion times

17
New cards

Describe the optimal approach for 1wjcj1 || \sum w_j c_j, and how to prove it?

Weighted shortest processing time (WSPT, or Smith’s rule), order jobs by decreasing ratios wjpj\frac{w_j}{p_j} . Proven with API to derive contradiction.

18
New cards

Define the “value” of a chain in 1chainswjCj1|\text{chains}| \sum w_j C_j

sum up the weights, divide by the sum of the processing times

19
New cards

What doe the notation [k][k] refer to

The set of numbers {1,2,,k}\{ 1,2, \ldots ,k\}

20
New cards

Define rho factor/ρ\rho-factor in the context of job chains

knowt flashcard image
21
New cards

Describe the simple algorithm used to solve 1chainswjCj1|\text{chains}| \sum w_j C_j

Whenever a machine is free

  1. Pick the remaining chain with the highest ρ\rho-factor

  2. Process the jobs of that chain up to and including its determining job \ell^*

    1. the remaining tail becomes a new chain with its own newly computed ρ\rho-factor

22
New cards

Define the “determining job” \ell^* in the context of parallel chains

The index of the chain achieving the maximum ρ\rho-factor

23
New cards

What is the optimal approach for 1Lmax1 || L_{max} (max lateness), and how is it proven?

The EDD rule is optimal — order jobs by increasing due dates

Proven with exchange argument - apply API to "optimal" schedule S that violates EDD.

24
New cards

What is 1prechmax1 | \text{prec} | h_{max}? What is the optimal approach?

We have nn jobs with no precedence constraints, and non-decreasing functions of completion timesh1,h2,hnh_1, h_2, … h_n. hmax=max{h1(C1),h2(C2),,hn(Cn)}h_{max} = \text{max} \{h_1(C_1),h_2(C_2), \ldots , h_n(C_n) \}. Note that this is for a single machine, so the completion time of the last job is always pj\sum p_j

Optimal approach: Least Cost Last (LCL), where you go backwards from pj\sum p_j to 00 and schedule the job that is cheapest to place last at current time tt each time.

25
New cards

Explain the LCL approach for 1prechmax1 | \text{prec} | h_{max}

Least Cost Last (LCL) is a simply polytime DP algorithm, where you go backwards from pj\sum p_j to 00 and schedule the job that is cheapest to place last at current time tt each time.

26
New cards

Name the three main types of approx

  1. α\alpha-approx algos

  2. PTAs

  3. FPTAs

27
New cards

Explain α\alpha-approx algorithms

Algorithm that gives solution SS such that cost(S)αOPTcost(S) \leq \alpha \cdot \text{OPT}

28
New cards

Explain PTAs (polytime approximations)

For any \varepsilon > 0, we can find solution S:cost(S)(1+ε)OPTS: \text{cost}(S) \leq (1+ \varepsilon) \cdot \text{OPT} with running time poly(n)poly(n)

  • could be growing exponentially or worse with respect to 1/ε1/\varepsilon

29
New cards

Explain FPTAs (fully polytime approximations), and the 3 main things we need for it

For any \varepsilon > 0, we can find solution S:cost(S)(1+ε)OPTS: \text{cost}(S) \leq (1+ \varepsilon) \cdot \text{OPT} with running time poly(n,1ε)poly(n, \frac{1}{\varepsilon})

We need

  1. Feasibility: SS’ satisfies size(S)bsize(S’) \leq b

  2. Approximation: profit(S)(1ε)OPTprofit(S’) \geq (1- \varepsilon)\text{OPT} for any \varepsilon > 0

  3. Polynomial running time in poly(n,1/ε)poly(n, 1/ \varepsilon)

30
New cards

What method is used for developing FPTAS for knapsack, and some other NP complete problems?

See the value that you intend to scale, and scale each value by a parameter ρ=εmax for that val(1/n)\rho=\varepsilon \cdot \text{max for that val} (1/n)

  • (divide by parameter and truncate it so the error is 1. bounded and 2. close to original (rounding error per item is at most scaling parameter ρ\rho)

Note that FPTAS for knapsack runs in O(n3/ε)O(n^{3}/\varepsilon)

31
New cards

Weakly vs strongly NP hard

We can find FPTAS for weakly NP hard (where difficulty comes more from large numbers) but not strongly NP hard.

32
New cards

Describe Moore-Hodgson for 1Uj1|| \sum U_j.

Want to minimize total number of late jobs. Will do so using DP.

Repeat

  • scan EDD sequence σ=(σ1,σ2σ)\sigma = (\sigma_{1},\sigma_{2} \dots \sigma_{\ell}) left to right

  • find smallest k such that job σk\sigma_{k} is late (i.e. c_{\sigma_{k}} > d_{\sigma_{k}}, makesum up to that job is greater than due date of that job)

  • if no late job found: stop

  • else

    • among σ1,σ2σk\sigma_{1},\sigma_{2} \dots \sigma_{k}, find index mm with pσm=maxi[k]pσip_{\sigma_{m}}=max_{i\in[k]}p_{\sigma_{i}}

      • so find job with max processing time

      • note: this has nothing to do with the late job, it's just in the sequence prefix k

      • intuition: removing longest processing time job frees the most time for the remaining jobs

    • reject σm\sigma_{m} (remove it from σ\sigma)

Output: σ,ζ\sigma,\zeta, where ζ\zeta is any permutation off all rejected jobs.

Proven with the key lemma and induction.

33
New cards

What is the key lemma for Moore-Hodgson, and how do you prove it?

Let m be the job rejected in iteration #1\# 1.
Then there is an optimal schedule that rejects mm.

Proven via an exchange argument.

34
New cards

What is the dominance lemma for total tardiness

Suppose jobs jj and kkhave PjPkP_{j} \leq P_{k} and djdkd_{j} \leq d_{k}
Then \exists optimal sequence in which jj precedes kk.

Proved with standard exchange argument.

35
New cards

What does the notation [a][a]^\oplus

max(0,α)max(0, \alpha)

36
New cards

What is the DP shifting lemma for the DP algorithm for

Assume pjp_{j}'s are distinct, and let kk be the job with max processing time.

There is an integer δ\delta with δ{0,1,,nk}\delta\in \{ 0,1,\dots , n-k \} such that there is an optimal sequence SS^{*} such that job kk is preceded by all jobs jj with jk+δj \leq k+\delta, and job kk is followed by all jobs jj with j > k+\delta.

37
New cards

Describe the DP algorithm for Total Tardiness 1Tj1||\sum T_j

SS \equiv length of sub-interval following job kk
(DP tries all values of δ=0,1,2,nk\delta=0,1,2\dots ,n-k)

Lawler showed that such a sub-interval exists.

J(s,f,k)=J(s,f,k)= set of jobs from a sub-interval where

  • s=s= start index of sub-interval

  • f=f= last index of sub-interval

  • kk is job such that pkpj  jJ()p_{k} \geq p_{j} \; \forall j\in J(\cdot)

  • kk is excluded from J()J(\cdot)

V(J(),t)V(J(\cdot), t) \equiv optimal value (minimum tardiness) for subset J()J(\cdot) with start time tt

DP recurrence:

V(J(s,f,k),t)=minδ=0,1,,nk  V(J(s,+δ,),t)+[C(δ)d]+V(J(+δ+1,f,),C(δ))V(J(s,f,k), t)=\text{min}_{\delta=0,1,\dots,n-k}\;V(J(s, \ell+\delta, \ell), t) + [C_{\ell}(\delta)-d_{\ell}]^{\oplus} + V(J(\ell+\delta+1, f, \ell), C_{\ell}(\delta))

key idea: we split the interval into two based on the job with the max processing time

Where

  • =job in J(s,f,k) with max processing time\ell = \text{job in }J(s,f,k) \text{ with max processing time}

  • C(δ)= completion time of C_{\ell}(\delta)= \text{ completion time of }\ell for sub-interval of length =δ=\delta

  • [C(S)d]=[C_{\ell}(S)-d_{\ell}]^{\oplus}= Tardiness of job \ell

<p>$$S \equiv$$ length of sub-interval following job $$k$$<br>(DP tries all values of $$\delta=0,1,2\dots ,n-k$$)</p><p>Lawler showed that such a sub-interval exists.</p><p>$$J(s,f,k)=$$ set of jobs from a sub-interval where</p><ul><li><p>$$s=$$ start index of sub-interval</p></li><li><p>$$f=$$ last index of sub-interval</p></li><li><p>$$k$$ is job such that $$p_{k} \geq p_{j} \; \forall j\in J(\cdot)$$</p></li><li><p>$$k$$ is excluded from $$J(\cdot)$$</p></li></ul><p>$$V(J(\cdot), t) \equiv$$ optimal value (minimum tardiness) for subset $$J(\cdot)$$ with start time $$t$$</p><p>DP recurrence:</p><p>$$V(J(s,f,k), t)=\text{min}_{\delta=0,1,\dots,n-k}\;V(J(s, \ell+\delta, \ell), t) + [C_{\ell}(\delta)-d_{\ell}]^{\oplus} + V(J(\ell+\delta+1, f, \ell), C_{\ell}(\delta))$$</p><p><mark>key idea: we split the interval into two based on the job with the max processing time</mark></p><p>Where</p><ul><li><p>$$\ell = \text{job in }J(s,f,k) \text{ with max processing time}$$</p></li><li><p>$$C_{\ell}(\delta)= \text{ completion time of }\ell$$ for sub-interval of length $$=\delta$$</p></li><li><p>$$[C_{\ell}(S)-d_{\ell}]^{\oplus}=$$ Tardiness of job $$\ell$$</p></li></ul><p></p>
38
New cards

What is the FPTAS for Total Tardiness 1Tj1|| \sum T_j

Scale processing times and due dates by scaling factor KK, with K=2εn(n+1)K= \frac{2 \varepsilon}{n(n+1)}

  • the reasoning for this choice can be seen in the error bounding calculations