0% found this document useful (0 votes)
1K views

Daa Self Study Topic Presentation: Scheduling Identical Processors

This document summarizes a presentation on scheduling identical processors, which is an NP-hard problem. It begins with basic terms related to polynomial time and non-polynomial time algorithms. It then discusses deterministic vs non-deterministic algorithms and defines NP-hard and NP-complete problems. The document states the scheduling identical processors problem, provides two theorems showing it is reduced from the partition problem, and gives an example.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views

Daa Self Study Topic Presentation: Scheduling Identical Processors

This document summarizes a presentation on scheduling identical processors, which is an NP-hard problem. It begins with basic terms related to polynomial time and non-polynomial time algorithms. It then discusses deterministic vs non-deterministic algorithms and defines NP-hard and NP-complete problems. The document states the scheduling identical processors problem, provides two theorems showing it is reduced from the partition problem, and gives an example.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

DAA SELF STUDY TOPIC

PRESENTATION
SCHEDULING IDENTICAL PROCESSORS

MANVITA JOSHI – 2019130027


TRAIVIDYA KORGAONKAR – 2019130031
CHETASHRI MAHAJAN – 2019130035
Topic Hierarchy:

• NP – Hard and NP – Complete problems


• NP – Hard scheduling problems
• Scheduling identical processors
Outline :
• Basic terms
• Deterministic and non-deterministic algorithms
• NP – Hard and NP – Complete
• Partition algorithm
• Problem statement
• Theorem 1
• Theorem 2
Basic terms :
• Polynomial time complexity : O(nk)
Examples : Linear search (O(n2) ), bubble sort (O(n2) ),
Matrix chain multiplication (O(n3) ), etc.

• Non-Polynomial time complexity : O(cn)


Examples : 0/1 Knapsack problem (O(2n) ), Travelling
salesperson problem (O(2n) ), Hamiltonian cycle (O(2n) ),
etc.
Deterministic and non-deterministic
algorithms :
Deterministic algorithms :
• Have the result of each operation defined

Non-deterministic algorithms :
• Do not have result of each operation defined
• It has a range of probability
NP – HARD AND NP – COMPLETE :
• P : set of all decision problems solvable by deterministic
algorithm in Polynomial time.
• NP : set of all decision problems solvable by non-
deterministic algorithms in polynomial time.

• NP – Hard : a problem L can be directly/indirectly


reduced by satisfiability
• NP – Complete : a problem L is NP - Hard as well as has a
non-deterministic polynomial time algorithm
Partition Algorithm :
Given n non-negative integral values a1, a2, … , an as input.
Does there exist a subset S of the index-set {1, 2, 3, … , n} such
that the summation of the integral values corresponding to the
indices from the index-set subset S equals half times the
summation of all the integral values corresponding to the index-
set {1, 2, … , n} (i.e. summation of all the n integral values given)
Problem Statement :

SCHEDULING IDENTICAL PROCESSORS


Minimum finish time non preemptive schedule

M number of identical processors are required to complete n


number or jobs (or job segments) within a given amount of time.
Is such a schedule possible?

… … …
Problem Statement :
Terms used to denote:

• Pi → set of ‘m’ identical processors


• Ji → set of ‘n’ jobs
• ti → time required to complete a job Ji
• wi → weight associated with job Ji
• Ti → time at which processor Pi finishes processing
• fi → time taken for completion of Job Ji
• S → schedule
Problem Statement :
• NP – Hard problem
• Very similar to Optimal tape storage problem
• Reduced from Partition algorithm (NP – Hard)
• Belongs to the Optimization problem category
• Obtaining Mean finish time and Weighted mean finish time is a NP –
Hard problem
THEOREM 1 :

Theorem :
Minimum finish time non preemptive algorithm is reduced from
the Partition algorithm.
Prove that for the same set of inputs, the partition algorithm has
a solution or not.
Given :
• ‘n’ jobs to be scheduled
• ti is the processing requirement for a job of index i
THEOREM 1 :

Proof :
Proof for m = 2 i.e. 2 processors
Let ai be an instance of the partition problem where 1<= i <= n.
Suppose n jobs with processing times ti = ai where 1<= i <= n.
A non preemptive schedule exist iff –
✓Partition exists for the input ai for 1<= i <= n

Maximum schedule finish time = (∑ ti )/2


THEOREM 2 :

Theorem :
Weighted minimum finish time non preemptive algorithm is
reduced from the Partition algorithm
Prove that for the same set of inputs, the partition algorithm has
a solution or not.
Given :
• ‘n’ jobs to be scheduled
• ti is the processing requirement for a job of index I
• wi is the weight associated with a job of index i
THEOREM 2 :

Proof :
Proof for m = 2 i.e. 2 processors
Let ai be an instance of the partition problem where 1<= i <= n.
Suppose n jobs with processing times ti = ai = wi i.e. weight for
each job where 1<= i <= n.
A non preemptive schedule exist iff –
✓Partition exists for the input ai for 1<= i <= n
THEOREM 2 :
Proof :
Weights and times for processors P1 are
and P2 are

Maximum weighted mean finish time = 1/2 ∑ ai 2 + 1/4 (∑ ai )2


Examples :
Q. Suppose the set of time taken so solve each job is {5, 7, 4, 3,
10, 1} and there are 2 processors . Find whether a schedule is
possible or not, Also find the Max Finish Time and Max Weighted
Mean Finish Time.

Soln. This input has a solution for the partition algorithm, hence a
schedule is possible.
Schedule = {10, 4, 1} and {7, 5, 3}
MFT = (10+4+1+7+5+3)/2 = 15 units
WMTF = (100 + 16 + 1 + 49 + 25 + 9)/2 + (900)/4 = 325 units
THANK YOU!

You might also like