SlideShare a Scribd company logo
5
Most read
JOB
SEQUENCING
1
Presented by: Rabin BK
BSc.CSIT 5th Semester
 Introduction
 Algorithm
 Example
 References
2
Introduction
3
 The objective is to find a sequence of jobs, which is completed within
their deadlines with maximum profit
 Because we are using two loops one within another, the complexity of
this algorithm is O(n2)
Algorithm
4
Algorithm Job_seq (d, 1, n){
d [0] = 0;
JS [1] = 1;
i = 1;
for j= 2 to n do;{
k = i;
while ((d[JS[k] > d[j]]) and (d[JS[k]] != k)) do
k = k -1;
if ((d[JS[k] < d[j]]) and (d[j] > k)) then {
For m= i to (k+1) step-1 do
JS [m+1] = JS [m];
JS [K+1] = j;
i = i+1;
}
}
Return i;
}
1
1
1
n
1
2*n
2
2*n
n*n
1*n*n
1*n*n
2*n*n
Time complexity = O(n2)
Example
5
Value of maximum deadline = 5
• First, we take job J4.
• Since, its deadline is 2, so we
place it in the first empty cell
before deadline 2 as-
• Now, we take job J1.
• Since, its deadline is 5, so we
place it in the first empty cell
before deadline 5 as-
• Now, we take job J3.
• Since, its deadline is 3, so we
place it in the first empty cell
before deadline 3 as-
Example
6
Value of maximum deadline = 5
• Now, we take job J2.
• Since, its deadline is 3, so we
place it in the first empty cell
before deadline 3.
• Since, the second and third cells
are already filled, so we place job
J2 in the first cell as-
• Now, we take job J5.
• Since, its deadline is 4, so we
place it in the first empty cell
before deadline 4 as-
• The only job left is job J6 whose deadline is 2.
• All the slots before deadline 2 are already occupied.
• Thus, job J6 can not be completed.
• Maximum earned profit = Sum of profits of all jobs in optimal schedule
= Profit of job J2 + Profit of job J4 + Profit of job J3 + Profit of job J5 +
Profit of job J1
= 180 + 300 + 190 + 120 + 200
= 990 units
References
• https://www.gatevidyalay.com/job-sequencing-with-deadlines/
• https://www.includehelp.com/operating-systems/job-sequencing.aspx
• https://www.geeksforgeeks.org/job-sequencing-problem-set-1-greedy-algorithm/
• http://www.cs.sfu.ca/~kabanets/307/sched307.pdf
• https://www.techiedelight.com/job-sequencing-problem-deadlines/
• http://ggn.dronacharya.info/CSEDept/Downloads/QuestionBank/Even/VI%20sem/
ADA/Section-B/job-scheduling1.pdf
• http://www.ques10.com/p/9083/write-short-notes-on-job-sequencing-with-
deadlines/
7
Queries
8

More Related Content

PPTX
Shortest path algorithm
PPTX
Job sequencing with deadline
PPTX
Job sequencing with Deadlines
PPTX
Job sequencing with deadlines(with example)
PPTX
Knapsack problem using greedy approach
PPTX
Asymptotic Notations
PPT
5.1 greedy
PPTX
Travelling salesman problem
Shortest path algorithm
Job sequencing with deadline
Job sequencing with Deadlines
Job sequencing with deadlines(with example)
Knapsack problem using greedy approach
Asymptotic Notations
5.1 greedy
Travelling salesman problem

What's hot (20)

PPTX
Lecture optimal binary search tree
PDF
Daa notes 1
PDF
PPTX
Divide and Conquer - Part 1
PPT
Backtracking Algorithm.ppt
PPT
12-greedy.ppt
PPTX
AI_ppt.pptx
PDF
PPTX
sum of subset problem using Backtracking
PPTX
Module 3_DAA (2).pptx
PPTX
Quick sort
PPT
Bellman Ford's Algorithm
PPTX
All pair shortest path
PPTX
Asymptotic notations
PPT
Merge sort
PPT
Graph algorithm
PPTX
What Is Dynamic Programming? | Dynamic Programming Explained | Programming Fo...
PPTX
Single source Shortest path algorithm with example
PDF
Approximation Algorithms
PPT
Minimum spanning tree
Lecture optimal binary search tree
Daa notes 1
Divide and Conquer - Part 1
Backtracking Algorithm.ppt
12-greedy.ppt
AI_ppt.pptx
sum of subset problem using Backtracking
Module 3_DAA (2).pptx
Quick sort
Bellman Ford's Algorithm
All pair shortest path
Asymptotic notations
Merge sort
Graph algorithm
What Is Dynamic Programming? | Dynamic Programming Explained | Programming Fo...
Single source Shortest path algorithm with example
Approximation Algorithms
Minimum spanning tree
Ad

Similar to Job sequencing in Data Strcture (20)

PPTX
Job Sequencing with Deadlines
PPTX
deadline.pptx
PPT
job scheduling ppt DSA and DAA with theory
PPTX
data structures and algorithms Unit 4
PPTX
Algorithm
PPTX
Scheduling jobs on identical parallel machines
PDF
Design analysis and algorithm topic Job sequencing with deadline.pdf
PDF
Chapter 6 Job Scheduling in Production Planning.pdf
PPTX
Loading and Sequencing under Operations Management
PDF
04greedy 2x2
PPTX
Ch3(1).pptxbbbbbbbbbbbbbbbbbbbhhhhhhhhhh
PDF
Approximation Algorithms Part Two: More Constant factor approximations
PDF
N job m machine.pdf OR job Sequencing problems
PDF
Exam100412
PPTX
Design and analysis of algorithms
PDF
Exam110121
PDF
Sequencing model
PDF
05. greedy method
PDF
Modified heuristic time deviation Technique for job sequencing and Computatio...
PDF
Interval Scheduling application and problem.pdf
Job Sequencing with Deadlines
deadline.pptx
job scheduling ppt DSA and DAA with theory
data structures and algorithms Unit 4
Algorithm
Scheduling jobs on identical parallel machines
Design analysis and algorithm topic Job sequencing with deadline.pdf
Chapter 6 Job Scheduling in Production Planning.pdf
Loading and Sequencing under Operations Management
04greedy 2x2
Ch3(1).pptxbbbbbbbbbbbbbbbbbbbhhhhhhhhhh
Approximation Algorithms Part Two: More Constant factor approximations
N job m machine.pdf OR job Sequencing problems
Exam100412
Design and analysis of algorithms
Exam110121
Sequencing model
05. greedy method
Modified heuristic time deviation Technique for job sequencing and Computatio...
Interval Scheduling application and problem.pdf
Ad

More from Rabin BK (20)

PPTX
Artificial Intelligence in E-commerce
PPTX
Three address code generation
PPTX
Consumer Oriented Application, Mercantile process and Mercantile models
PPTX
Clang compiler `
PPTX
Simple Mail Transfer Protocol
PPTX
HTML text formatting tags
PPTX
Data encryption in database management system
PPTX
Object Relational Database Management System(ORDBMS)
PPTX
Kolmogorov Smirnov
PPTX
Stack Data Structure
PPTX
Bluetooth
PPTX
Data Science
PPTX
Graphics_3D viewing
PPTX
Neural Netwrok
PPTX
Watermarking in digital images
PPTX
Heun's Method
PPTX
Mutual Exclusion
PPTX
Systems Usage
PPTX
Manager of a company
PPTX
Profile of Organizations
Artificial Intelligence in E-commerce
Three address code generation
Consumer Oriented Application, Mercantile process and Mercantile models
Clang compiler `
Simple Mail Transfer Protocol
HTML text formatting tags
Data encryption in database management system
Object Relational Database Management System(ORDBMS)
Kolmogorov Smirnov
Stack Data Structure
Bluetooth
Data Science
Graphics_3D viewing
Neural Netwrok
Watermarking in digital images
Heun's Method
Mutual Exclusion
Systems Usage
Manager of a company
Profile of Organizations

Recently uploaded (20)

PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Digital Strategies for Manufacturing Companies
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
System and Network Administraation Chapter 3
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
System and Network Administration Chapter 2
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Understanding Forklifts - TECH EHS Solution
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
Digital Strategies for Manufacturing Companies
How Creative Agencies Leverage Project Management Software.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Odoo POS Development Services by CandidRoot Solutions
L1 - Introduction to python Backend.pptx
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
System and Network Administraation Chapter 3
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Odoo Companies in India – Driving Business Transformation.pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Softaken Excel to vCard Converter Software.pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
How to Choose the Right IT Partner for Your Business in Malaysia
System and Network Administration Chapter 2
wealthsignaloriginal-com-DS-text-... (1).pdf
Understanding Forklifts - TECH EHS Solution

Job sequencing in Data Strcture

  • 1. JOB SEQUENCING 1 Presented by: Rabin BK BSc.CSIT 5th Semester
  • 2.  Introduction  Algorithm  Example  References 2
  • 3. Introduction 3  The objective is to find a sequence of jobs, which is completed within their deadlines with maximum profit  Because we are using two loops one within another, the complexity of this algorithm is O(n2)
  • 4. Algorithm 4 Algorithm Job_seq (d, 1, n){ d [0] = 0; JS [1] = 1; i = 1; for j= 2 to n do;{ k = i; while ((d[JS[k] > d[j]]) and (d[JS[k]] != k)) do k = k -1; if ((d[JS[k] < d[j]]) and (d[j] > k)) then { For m= i to (k+1) step-1 do JS [m+1] = JS [m]; JS [K+1] = j; i = i+1; } } Return i; } 1 1 1 n 1 2*n 2 2*n n*n 1*n*n 1*n*n 2*n*n Time complexity = O(n2)
  • 5. Example 5 Value of maximum deadline = 5 • First, we take job J4. • Since, its deadline is 2, so we place it in the first empty cell before deadline 2 as- • Now, we take job J1. • Since, its deadline is 5, so we place it in the first empty cell before deadline 5 as- • Now, we take job J3. • Since, its deadline is 3, so we place it in the first empty cell before deadline 3 as-
  • 6. Example 6 Value of maximum deadline = 5 • Now, we take job J2. • Since, its deadline is 3, so we place it in the first empty cell before deadline 3. • Since, the second and third cells are already filled, so we place job J2 in the first cell as- • Now, we take job J5. • Since, its deadline is 4, so we place it in the first empty cell before deadline 4 as- • The only job left is job J6 whose deadline is 2. • All the slots before deadline 2 are already occupied. • Thus, job J6 can not be completed. • Maximum earned profit = Sum of profits of all jobs in optimal schedule = Profit of job J2 + Profit of job J4 + Profit of job J3 + Profit of job J5 + Profit of job J1 = 180 + 300 + 190 + 120 + 200 = 990 units
  • 7. References • https://www.gatevidyalay.com/job-sequencing-with-deadlines/ • https://www.includehelp.com/operating-systems/job-sequencing.aspx • https://www.geeksforgeeks.org/job-sequencing-problem-set-1-greedy-algorithm/ • http://www.cs.sfu.ca/~kabanets/307/sched307.pdf • https://www.techiedelight.com/job-sequencing-problem-deadlines/ • http://ggn.dronacharya.info/CSEDept/Downloads/QuestionBank/Even/VI%20sem/ ADA/Section-B/job-scheduling1.pdf • http://www.ques10.com/p/9083/write-short-notes-on-job-sequencing-with- deadlines/ 7