SlideShare a Scribd company logo
1 of 8
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

What's hot

Backtracking-N Queens Problem-Graph Coloring-Hamiltonian cycle
Backtracking-N Queens Problem-Graph Coloring-Hamiltonian cycleBacktracking-N Queens Problem-Graph Coloring-Hamiltonian cycle
Backtracking-N Queens Problem-Graph Coloring-Hamiltonian cyclevarun arora
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notationsEhtisham Ali
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy methodhodcsencet
 
Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)guest251d9a
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSGayathri Gaayu
 
Unit1 principle of programming language
Unit1 principle of programming languageUnit1 principle of programming language
Unit1 principle of programming languageVasavi College of Engg
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notationsNikhil Sharma
 
9 big o-notation
9 big o-notation9 big o-notation
9 big o-notationirdginfo
 
Data structures and Big O notation
Data structures and Big O notationData structures and Big O notation
Data structures and Big O notationMuthiah Abbhirami
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)swapnac12
 
Algorithms Lecture 2: Analysis of Algorithms I
Algorithms Lecture 2: Analysis of Algorithms IAlgorithms Lecture 2: Analysis of Algorithms I
Algorithms Lecture 2: Analysis of Algorithms IMohamed Loey
 
Line Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPUR
Line Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPURLine Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPUR
Line Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPURNA000000
 
DATA STRUCTURE AND ALGORITHM FULL NOTES
DATA STRUCTURE AND ALGORITHM FULL NOTESDATA STRUCTURE AND ALGORITHM FULL NOTES
DATA STRUCTURE AND ALGORITHM FULL NOTESAniruddha Paul
 
358 33 powerpoint-slides_6-strings_chapter-6
358 33 powerpoint-slides_6-strings_chapter-6358 33 powerpoint-slides_6-strings_chapter-6
358 33 powerpoint-slides_6-strings_chapter-6sumitbardhan
 

What's hot (20)

Backtracking-N Queens Problem-Graph Coloring-Hamiltonian cycle
Backtracking-N Queens Problem-Graph Coloring-Hamiltonian cycleBacktracking-N Queens Problem-Graph Coloring-Hamiltonian cycle
Backtracking-N Queens Problem-Graph Coloring-Hamiltonian cycle
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy method
 
Introduction to algorithms
Introduction to algorithmsIntroduction to algorithms
Introduction to algorithms
 
Algorithm
AlgorithmAlgorithm
Algorithm
 
Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
 
Unit1 principle of programming language
Unit1 principle of programming languageUnit1 principle of programming language
Unit1 principle of programming language
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
9 big o-notation
9 big o-notation9 big o-notation
9 big o-notation
 
Introduction to c++ ppt
Introduction to c++ pptIntroduction to c++ ppt
Introduction to c++ ppt
 
C# Arrays
C# ArraysC# Arrays
C# Arrays
 
Data structures and Big O notation
Data structures and Big O notationData structures and Big O notation
Data structures and Big O notation
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)
 
Algorithms Lecture 2: Analysis of Algorithms I
Algorithms Lecture 2: Analysis of Algorithms IAlgorithms Lecture 2: Analysis of Algorithms I
Algorithms Lecture 2: Analysis of Algorithms I
 
Line Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPUR
Line Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPURLine Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPUR
Line Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPUR
 
DATA STRUCTURE AND ALGORITHM FULL NOTES
DATA STRUCTURE AND ALGORITHM FULL NOTESDATA STRUCTURE AND ALGORITHM FULL NOTES
DATA STRUCTURE AND ALGORITHM FULL NOTES
 
358 33 powerpoint-slides_6-strings_chapter-6
358 33 powerpoint-slides_6-strings_chapter-6358 33 powerpoint-slides_6-strings_chapter-6
358 33 powerpoint-slides_6-strings_chapter-6
 
AVL Tree
AVL TreeAVL Tree
AVL Tree
 
Divide and Conquer
Divide and ConquerDivide and Conquer
Divide and Conquer
 

Similar to Job sequencing in Data Strcture

470614683-CHAPTER-7-Project-Management-and-Network-Analysis-ppt.ppt
470614683-CHAPTER-7-Project-Management-and-Network-Analysis-ppt.ppt470614683-CHAPTER-7-Project-Management-and-Network-Analysis-ppt.ppt
470614683-CHAPTER-7-Project-Management-and-Network-Analysis-ppt.pptNitin137794
 
data structures and algorithms Unit 4
data structures and algorithms Unit 4data structures and algorithms Unit 4
data structures and algorithms Unit 4infanciaj
 
Application of branch and bound technique for nx3 flow shop scheduling, in wh...
Application of branch and bound technique for nx3 flow shop scheduling, in wh...Application of branch and bound technique for nx3 flow shop scheduling, in wh...
Application of branch and bound technique for nx3 flow shop scheduling, in wh...Alexander Decker
 
11.optimal three stage flow shop scheduling in which processing time, set up ...
11.optimal three stage flow shop scheduling in which processing time, set up ...11.optimal three stage flow shop scheduling in which processing time, set up ...
11.optimal three stage flow shop scheduling in which processing time, set up ...Alexander Decker
 
Optimal three stage flow shop scheduling in which processing time, set up tim...
Optimal three stage flow shop scheduling in which processing time, set up tim...Optimal three stage flow shop scheduling in which processing time, set up tim...
Optimal three stage flow shop scheduling in which processing time, set up tim...Alexander Decker
 
Chapter One.pdf
Chapter One.pdfChapter One.pdf
Chapter One.pdfabay golla
 
Chapter 5 - PERT-CPM
Chapter 5 - PERT-CPM Chapter 5 - PERT-CPM
Chapter 5 - PERT-CPM maggieget
 
Operations Research_18ME735_module 5 sequencing notes.pdf
Operations Research_18ME735_module 5 sequencing notes.pdfOperations Research_18ME735_module 5 sequencing notes.pdf
Operations Research_18ME735_module 5 sequencing notes.pdfRoopaDNDandally
 
FIND MINIMUM TIME TO FINISH ALL JOBS WITH GIVEN CONSTRAINTS.pptx
FIND MINIMUM TIME TO FINISH ALL JOBS WITH GIVEN CONSTRAINTS.pptxFIND MINIMUM TIME TO FINISH ALL JOBS WITH GIVEN CONSTRAINTS.pptx
FIND MINIMUM TIME TO FINISH ALL JOBS WITH GIVEN CONSTRAINTS.pptxYastee Shah
 
Bicriteria in n x 2 flow shop scheduling problem under specified rental polic...
Bicriteria in n x 2 flow shop scheduling problem under specified rental polic...Bicriteria in n x 2 flow shop scheduling problem under specified rental polic...
Bicriteria in n x 2 flow shop scheduling problem under specified rental polic...Alexander Decker
 
11.bicriteria in n x 0002www.iiste.org call for paper flow shop scheduling pr...
11.bicriteria in n x 0002www.iiste.org call for paper flow shop scheduling pr...11.bicriteria in n x 0002www.iiste.org call for paper flow shop scheduling pr...
11.bicriteria in n x 0002www.iiste.org call for paper flow shop scheduling pr...Alexander Decker
 
CS-102 DS-class_01_02 Lectures Data .pdf
CS-102 DS-class_01_02 Lectures Data .pdfCS-102 DS-class_01_02 Lectures Data .pdf
CS-102 DS-class_01_02 Lectures Data .pdfssuser034ce1
 
Network Techniques for Project Management
Network Techniques for Project ManagementNetwork Techniques for Project Management
Network Techniques for Project ManagementIshan Gandhi
 

Similar to Job sequencing in Data Strcture (20)

deadline.pptx
deadline.pptxdeadline.pptx
deadline.pptx
 
470614683-CHAPTER-7-Project-Management-and-Network-Analysis-ppt.ppt
470614683-CHAPTER-7-Project-Management-and-Network-Analysis-ppt.ppt470614683-CHAPTER-7-Project-Management-and-Network-Analysis-ppt.ppt
470614683-CHAPTER-7-Project-Management-and-Network-Analysis-ppt.ppt
 
data structures and algorithms Unit 4
data structures and algorithms Unit 4data structures and algorithms Unit 4
data structures and algorithms Unit 4
 
Flowshop scheduling
Flowshop schedulingFlowshop scheduling
Flowshop scheduling
 
Application of branch and bound technique for nx3 flow shop scheduling, in wh...
Application of branch and bound technique for nx3 flow shop scheduling, in wh...Application of branch and bound technique for nx3 flow shop scheduling, in wh...
Application of branch and bound technique for nx3 flow shop scheduling, in wh...
 
11.optimal three stage flow shop scheduling in which processing time, set up ...
11.optimal three stage flow shop scheduling in which processing time, set up ...11.optimal three stage flow shop scheduling in which processing time, set up ...
11.optimal three stage flow shop scheduling in which processing time, set up ...
 
Optimal three stage flow shop scheduling in which processing time, set up tim...
Optimal three stage flow shop scheduling in which processing time, set up tim...Optimal three stage flow shop scheduling in which processing time, set up tim...
Optimal three stage flow shop scheduling in which processing time, set up tim...
 
8282967.ppt
8282967.ppt8282967.ppt
8282967.ppt
 
Chapter One.pdf
Chapter One.pdfChapter One.pdf
Chapter One.pdf
 
Chapter 5 - PERT-CPM
Chapter 5 - PERT-CPM Chapter 5 - PERT-CPM
Chapter 5 - PERT-CPM
 
pert_n_cpm.ppt
pert_n_cpm.pptpert_n_cpm.ppt
pert_n_cpm.ppt
 
pert_n_cpm.ppt
pert_n_cpm.pptpert_n_cpm.ppt
pert_n_cpm.ppt
 
algorithms
algorithmsalgorithms
algorithms
 
Ch 06 - CPM PERT (1).pptx
Ch 06 - CPM  PERT (1).pptxCh 06 - CPM  PERT (1).pptx
Ch 06 - CPM PERT (1).pptx
 
Operations Research_18ME735_module 5 sequencing notes.pdf
Operations Research_18ME735_module 5 sequencing notes.pdfOperations Research_18ME735_module 5 sequencing notes.pdf
Operations Research_18ME735_module 5 sequencing notes.pdf
 
FIND MINIMUM TIME TO FINISH ALL JOBS WITH GIVEN CONSTRAINTS.pptx
FIND MINIMUM TIME TO FINISH ALL JOBS WITH GIVEN CONSTRAINTS.pptxFIND MINIMUM TIME TO FINISH ALL JOBS WITH GIVEN CONSTRAINTS.pptx
FIND MINIMUM TIME TO FINISH ALL JOBS WITH GIVEN CONSTRAINTS.pptx
 
Bicriteria in n x 2 flow shop scheduling problem under specified rental polic...
Bicriteria in n x 2 flow shop scheduling problem under specified rental polic...Bicriteria in n x 2 flow shop scheduling problem under specified rental polic...
Bicriteria in n x 2 flow shop scheduling problem under specified rental polic...
 
11.bicriteria in n x 0002www.iiste.org call for paper flow shop scheduling pr...
11.bicriteria in n x 0002www.iiste.org call for paper flow shop scheduling pr...11.bicriteria in n x 0002www.iiste.org call for paper flow shop scheduling pr...
11.bicriteria in n x 0002www.iiste.org call for paper flow shop scheduling pr...
 
CS-102 DS-class_01_02 Lectures Data .pdf
CS-102 DS-class_01_02 Lectures Data .pdfCS-102 DS-class_01_02 Lectures Data .pdf
CS-102 DS-class_01_02 Lectures Data .pdf
 
Network Techniques for Project Management
Network Techniques for Project ManagementNetwork Techniques for Project Management
Network Techniques for Project Management
 

More from Rabin BK

Artificial Intelligence in E-commerce
Artificial Intelligence in E-commerceArtificial Intelligence in E-commerce
Artificial Intelligence in E-commerceRabin BK
 
Three address code generation
Three address code generationThree address code generation
Three address code generationRabin BK
 
Consumer Oriented Application, Mercantile process and Mercantile models
Consumer Oriented Application, Mercantile process and Mercantile modelsConsumer Oriented Application, Mercantile process and Mercantile models
Consumer Oriented Application, Mercantile process and Mercantile modelsRabin BK
 
Clang compiler `
Clang compiler `Clang compiler `
Clang compiler `Rabin BK
 
Simple Mail Transfer Protocol
Simple Mail Transfer ProtocolSimple Mail Transfer Protocol
Simple Mail Transfer ProtocolRabin BK
 
HTML text formatting tags
HTML text formatting tagsHTML text formatting tags
HTML text formatting tagsRabin BK
 
Data encryption in database management system
Data encryption in database management systemData encryption in database management system
Data encryption in database management systemRabin BK
 
Object Relational Database Management System(ORDBMS)
Object Relational Database Management System(ORDBMS)Object Relational Database Management System(ORDBMS)
Object Relational Database Management System(ORDBMS)Rabin BK
 
Kolmogorov Smirnov
Kolmogorov SmirnovKolmogorov Smirnov
Kolmogorov SmirnovRabin BK
 
Stack Data Structure
Stack Data StructureStack Data Structure
Stack Data StructureRabin BK
 
Data Science
Data ScienceData Science
Data ScienceRabin BK
 
Graphics_3D viewing
Graphics_3D viewingGraphics_3D viewing
Graphics_3D viewingRabin BK
 
Neural Netwrok
Neural NetwrokNeural Netwrok
Neural NetwrokRabin BK
 
Watermarking in digital images
Watermarking in digital imagesWatermarking in digital images
Watermarking in digital imagesRabin BK
 
Heun's Method
Heun's MethodHeun's Method
Heun's MethodRabin BK
 
Mutual Exclusion
Mutual ExclusionMutual Exclusion
Mutual ExclusionRabin BK
 
Systems Usage
Systems UsageSystems Usage
Systems UsageRabin BK
 
Manager of a company
Manager of a companyManager of a company
Manager of a companyRabin BK
 
Profile of Organizations
Profile of OrganizationsProfile of Organizations
Profile of OrganizationsRabin BK
 

More from Rabin BK (20)

Artificial Intelligence in E-commerce
Artificial Intelligence in E-commerceArtificial Intelligence in E-commerce
Artificial Intelligence in E-commerce
 
Three address code generation
Three address code generationThree address code generation
Three address code generation
 
Consumer Oriented Application, Mercantile process and Mercantile models
Consumer Oriented Application, Mercantile process and Mercantile modelsConsumer Oriented Application, Mercantile process and Mercantile models
Consumer Oriented Application, Mercantile process and Mercantile models
 
Clang compiler `
Clang compiler `Clang compiler `
Clang compiler `
 
Simple Mail Transfer Protocol
Simple Mail Transfer ProtocolSimple Mail Transfer Protocol
Simple Mail Transfer Protocol
 
HTML text formatting tags
HTML text formatting tagsHTML text formatting tags
HTML text formatting tags
 
Data encryption in database management system
Data encryption in database management systemData encryption in database management system
Data encryption in database management system
 
Object Relational Database Management System(ORDBMS)
Object Relational Database Management System(ORDBMS)Object Relational Database Management System(ORDBMS)
Object Relational Database Management System(ORDBMS)
 
Kolmogorov Smirnov
Kolmogorov SmirnovKolmogorov Smirnov
Kolmogorov Smirnov
 
Stack Data Structure
Stack Data StructureStack Data Structure
Stack Data Structure
 
Bluetooth
BluetoothBluetooth
Bluetooth
 
Data Science
Data ScienceData Science
Data Science
 
Graphics_3D viewing
Graphics_3D viewingGraphics_3D viewing
Graphics_3D viewing
 
Neural Netwrok
Neural NetwrokNeural Netwrok
Neural Netwrok
 
Watermarking in digital images
Watermarking in digital imagesWatermarking in digital images
Watermarking in digital images
 
Heun's Method
Heun's MethodHeun's Method
Heun's Method
 
Mutual Exclusion
Mutual ExclusionMutual Exclusion
Mutual Exclusion
 
Systems Usage
Systems UsageSystems Usage
Systems Usage
 
Manager of a company
Manager of a companyManager of a company
Manager of a company
 
Profile of Organizations
Profile of OrganizationsProfile of Organizations
Profile of Organizations
 

Recently uploaded

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsBert Jan Schrijver
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburgmasabamasaba
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...masabamasaba
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 

Recently uploaded (20)

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 

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