7.1 Job Sequencing with Deadline - Branch and Bound

  Рет қаралды 330,929

Abdul Bari

Abdul Bari

6 жыл бұрын

Job Sequencing using Branch and Bound
PATREON : www.patreon.com/bePatron?u=20...
Courses on Udemy
================
Java Programming
www.udemy.com/course/java-se-...
Data Structures using C and C++
www.udemy.com/course/datastru...
C++ Programming
www.udemy.com/course/cpp-deep...

Пікірлер: 109
@anirudh7137
@anirudh7137 Жыл бұрын
Just to clear things out. The problem statement is that Pi stands for the penalty to be paid for not doing ith job before its deadline. So our goal is to try and do as many jobs possible before their deadlines and hence decrease our total penalty. u = Total penalty for jobs not in solution. The jobs that are in solution are completed hence we don't pay for them. We must pay penalty for the remaining jobs. So u represents a max bound that this is the maximum penalty we have to ever pay. So this is like a lower bound. c = Total penalty for job not is solution till now. So, the jobs that we have missed till now will never be done afterwards as well in this path. So we are sure that we must pay at least 'c' penalty if not more. So, whenever we encounter a node with c>upper_bound we know that we have already missed jobs for which we have to give penalty more than the upper bound(worst case) of some other path. Hence we prune/discard this node.
@deltechdiaries5907
@deltechdiaries5907 Жыл бұрын
tompr
@Lullurluli
@Lullurluli 9 ай бұрын
I would like to acknowledge your contributions, which have not gone unnoticed
@anirudh7137
@anirudh7137 9 ай бұрын
@@Lullurluli I would like to acknowledge your acknowledgement for my contribution, which have not gone unnoticed. My job here is done. My comment has fulfilled its purpose.
@viratkohli4863
@viratkohli4863 4 ай бұрын
op topi popi
@my_j.a.r.v.i.s.
@my_j.a.r.v.i.s. 4 жыл бұрын
This was so confusing !
@shlokakulkarni9739
@shlokakulkarni9739 Жыл бұрын
Gave an exam yesterday for which I had studied using your videos, and we had a 5 marker question on job sequencing. Turns out, it was this exact question, that you had taught so well! Very thankful for your amazing videos!
@MaruhanPark
@MaruhanPark Жыл бұрын
At 1:36 it would be nice if you explain why we are using "upper bound" and "cost" because the relationship is not clear to me. For example, it's not entirely clear to me why we are tracking a "sum of penalties considering until the last job"
@HetPandya-gz7ep
@HetPandya-gz7ep 7 ай бұрын
If you understood this thing, Kindly explain here too
@kyusiv9026
@kyusiv9026 Ай бұрын
For all those having a doubt that if we do j2 -> j3 , j3 cant be done as its d=2 and processing time for j2 is 2, so j3 cant be done, i think the explanation for that is as follows Here in branch and bound you are just exploring the different combinations of jobs which will give the min penalties, that is why at 9:50 , he says if we do j2 and j3 *together* take 3 units of time and deadline of j2 is 3. So it means a combination of j2 and j3 is giving you minimum penalty, order can be anything which satisfies deadline
@shreechatane9215
@shreechatane9215 Жыл бұрын
Thank you sir you covered our whole syllabus. I have been watching your playlist from the beginning and your explanations are butter smooth . I am very grateful for your videos🙏🏻🙏🏻
@hotaru6765
@hotaru6765 6 жыл бұрын
Sir can we do this with the help of Set Method like you told in "0/1 Knapsack Dynamic programming two method " video ?
@devalkathrecha110
@devalkathrecha110 4 жыл бұрын
6:30 in case of J1, J4 . Deadline of J4 is 1, then how can it be executed after J1 ???
@S4i._k
@S4i._k 4 жыл бұрын
Sir isnt Job 3's deadline equal to 2? 9:04
@MaskVlogs
@MaskVlogs 4 ай бұрын
Anyways we can't traverse that node
@WeillingHu
@WeillingHu 3 ай бұрын
At first level, why not discard J1 as well? U=19 which is greater than 14
@smaxiso
@smaxiso 4 жыл бұрын
09:33 when we are doing J2 first it takes 2 units of time. But J3's deadline is 2. So how can we start J3 when J2 finishes at 2, which is J3's deadline. In that case J3 will finish at 3 which is after it's deadline. Someone explain this please...
@sanjaydokula5140
@sanjaydokula5140 3 жыл бұрын
yeah man, j3 can't do it, he messed up.
@vincentjonathan
@vincentjonathan 2 жыл бұрын
I think this algorithm only use to know which job we need to take and which not, to get minimum penalty. So in this case, J2 and J3 is taken and the finish order is J3 first and then J2. So the jobs finished on time (at 3 unit of time)
@avinashmishra6622
@avinashmishra6622 3 жыл бұрын
Thankyou sir...how fortunate you are as you have lot of blessings and positive vibes from all students...this blessings (gratitude) will always make you fly (inner lightness).
@abdul_bari
@abdul_bari 3 жыл бұрын
So nice of you Avinash
@mubeenabegummohammed4875
@mubeenabegummohammed4875 5 жыл бұрын
sir what if you get the upper bound greater than previous do we need to kill that?
@rajeevradnair
@rajeevradnair Жыл бұрын
Sorry - I did not understand the logic behind the cost at a certain node being the penalty associated to the prior job skipped. Can someone explain the logic? Thank you.
@paulvanides8049
@paulvanides8049 11 ай бұрын
I love all Abdul Bari's videos. I have gone through them and they are great. Regarding this solution however, is the order of doing jobs right in the state space tree? It seems to me that if you do job 2 first, then there would be no time to do job 3 because the deadline would have passed. It seems to me you need to do job 3 first, and then job 2. Is this a misinterpretation of the question or answer?
@srivardhani9981
@srivardhani9981 6 жыл бұрын
very nice explanation sir...very nice....nice....
@sonalithakker6517
@sonalithakker6517 3 жыл бұрын
can't we jobs in different order, is it necessary to do in sequence
@saipraneeth4030
@saipraneeth4030 4 жыл бұрын
Sir...i see no use of cost in this example...since if cost exceeds upper then upper bound also get exceeds..then why it is necessary to take that..i mean cost
@mohammedadel8948
@mohammedadel8948 2 жыл бұрын
Thank you for your efforts
@sayantansen6732
@sayantansen6732 Жыл бұрын
Sir in J2 and J3 if the deadline are 3 and 2 .and time is 2 and 1 so, j2 job is done in 2 hr which has a deadline of 2 ..but then how is the next job (j3) is done? since 2 hrs are spend on j2 and the next job does not meet the deadline...
@yasirnaeem7192
@yasirnaeem7192 2 жыл бұрын
sirdo you have any lecture on VRP using branch and bound algo
@Pritamdas-bg7fp
@Pritamdas-bg7fp 6 жыл бұрын
sir please make videos on tsp using branch and bound
@syedchand995
@syedchand995 6 жыл бұрын
Thnk q sir very nicely explained
@robinhouston788
@robinhouston788 6 жыл бұрын
How is ordering taken into account? The job order is always ascending down the depth of the tree. How would this find a solution where Job 4 comes before Job 2?
@pratyushgoel99
@pratyushgoel99 4 жыл бұрын
I have same question .. can someone tell?
@EpsilonCodes
@EpsilonCodes 2 жыл бұрын
Yeah the algorithm seems flawed
@prem1998rocks
@prem1998rocks 5 жыл бұрын
--doubt How do we come to know that we need to switch from cost and upper bound to time method?
@dhruvchaudhary1310
@dhruvchaudhary1310 5 жыл бұрын
when the total time exceeds the maximum deadline time then we should not do further calculations.Time is just to check whether we sholuld calculate further or not.
@prathmeshraut7232
@prathmeshraut7232 2 ай бұрын
Thank Sir Pass ho gaya exam ke pehle
@mridulkapil675
@mridulkapil675 5 жыл бұрын
Thank you so much sir. Because of you I can pass my engineering. Love from Faridabad and EIT. REGARDS MRIDUL AND CSE-6B
@my_j.a.r.v.i.s.
@my_j.a.r.v.i.s. 4 жыл бұрын
Job lag gyi kya ?
@dharmendra.pandit
@dharmendra.pandit 7 ай бұрын
@@my_j.a.r.v.i.s. job lag gyi kya ?
@dharmendra.pandit
@dharmendra.pandit 2 ай бұрын
@Jgkioskenkal Bhai Mai abhi third year me hu , next year puch mere se
@sauravchauhan4172
@sauravchauhan4172 6 жыл бұрын
In the left most part of tree ... cost is zero ...why have we not taken that sequence
@kerem5619
@kerem5619 5 жыл бұрын
time matter
@avijitmullick6099
@avijitmullick6099 4 жыл бұрын
Sir, I think your last logic is doesn't execute . Because node 9 J4 also have no time for last work as usual node 11 or 12. I can't find any difference in this three nodes. Sir, Please can you explain this....
@Lullurluli
@Lullurluli 9 ай бұрын
Can you succeeded in finding the difference, I'd like to know about it.
@aishwaryakulkarni1196
@aishwaryakulkarni1196 6 жыл бұрын
Sir please provide job sequencing using lifo and fifo branch and bound
@sunilkumargadhetharia728
@sunilkumargadhetharia728 2 жыл бұрын
we have total 84 view can write book and consolidate all problems in one book. it is easy for us to review after watching this viedo
@mayanktiwari2209
@mayanktiwari2209 6 жыл бұрын
very nice explanation sir.... sir can you please suggest a good reference book for this subject..
@hrhistory
@hrhistory 5 жыл бұрын
The sequence we got here is {J2,J3}but we need to get {J3,J2}
@AnitShrestha
@AnitShrestha 5 жыл бұрын
Thank you.
@Harini.R
@Harini.R 6 жыл бұрын
But we don't check the feasibility of the minimum upper bound, then how can we kill the other nodes which have a greater upper bound?
@Harini.R
@Harini.R 6 жыл бұрын
Abdul Bari That means, before updating the upper bound, we need to check if the jobs can meet their deadlines right?
@hotaru6765
@hotaru6765 6 жыл бұрын
yes
@harshithvenkataraghavavutu7591
@harshithvenkataraghavavutu7591 3 жыл бұрын
Sir could you please make video again on this topic ,I didn't get the logic even I had watched for several times.. It looks some what difficult to understand
@hurrykrishna
@hurrykrishna 2 жыл бұрын
check how jobs & time should be calculated or considered here kzfaq.info/get/bejne/sLakfJuins3aiGw.html
@thesai5
@thesai5 6 жыл бұрын
Sir , can you please explain how node 8 is feasible because the time required for job 1 and job 4 are the same and their deadlines are also the same .
@chaoluncai4300
@chaoluncai4300 Жыл бұрын
it's infeasible
@joshidev4316
@joshidev4316 Жыл бұрын
Cause of penalties
@user-lr1ub3el2g
@user-lr1ub3el2g Ай бұрын
Thank you sir❤❤❤
@sivasai2535
@sivasai2535 9 ай бұрын
@Abdul Bari 8:47 isn't J3's deadline 2?
@anuzravat
@anuzravat 2 ай бұрын
exactly
@hirakmondal6174
@hirakmondal6174 5 жыл бұрын
Sir, is its time complexity O(n!)?? If so, then why use this technique??? greedy was serving us better in O(n^2) time and was also giving the optimal solution each and every time..!
@hirakmondal6174
@hirakmondal6174 5 жыл бұрын
@@abdul_bari Thanks Sir.. :)
@ljkb23
@ljkb23 5 жыл бұрын
Greedy doesn't work on this problem since there is the time constraint here along with the deadline. For example, using the example above change the 5 to a 6 and the 3 to a 2. With the greedy approach it would get 6, then it get the other 6, then it would get the 2 since it doesnt have capacity for the 10. This is assuming we are picking greedily based on the per unit of work (divide the penalty by the time it takes to do). If we don't do it that way it also fails. To prove that, just change the time it takes for 10 to complete to 3, then when you greedily choose 10 thatat's all you can take. Whereas if you chose the other 3 you would have 14.
@MegaDomce
@MegaDomce 5 жыл бұрын
Does anyone have a working code for this? Literally can't find a solution for this anywhere.
@member828
@member828 4 жыл бұрын
Have you found the code for this?
@sudalaitech4019
@sudalaitech4019 3 ай бұрын
How to do it if profits are given?
@sowmyah.s.81
@sowmyah.s.81 9 ай бұрын
Is this topic have for 21 scheme🤔
@_summer_season5886
@_summer_season5886 Жыл бұрын
Thank you!
@mansimandlik9013
@mansimandlik9013 4 жыл бұрын
We have got cost 0, we must do J1 ,J2 then why we are going for J2,J3?
@fajarzuliansyaht
@fajarzuliansyaht 3 жыл бұрын
because of minimalization of pinalty value
@kushwanthkapa2041
@kushwanthkapa2041 4 жыл бұрын
is this FIFO branch and bound...............
@nitinsisodiya5950
@nitinsisodiya5950 6 жыл бұрын
Great explanation sir
@albatrossgeez6637
@albatrossgeez6637 Жыл бұрын
big fan sir
@mamidipakasripranav7951
@mamidipakasripranav7951 4 ай бұрын
i think the answer here is just j2 bcz forj3 we have already crossed te deadline
@abdonmuhammad
@abdonmuhammad 6 жыл бұрын
I don't understand when using time, could everybody explain in the comment? Thanks
@rezaadventures
@rezaadventures 4 жыл бұрын
*anybody
@hurrykrishna
@hurrykrishna 2 жыл бұрын
@@rezaadventures check how jobs & time should be calculated or considered here kzfaq.info/get/bejne/sLakfJuins3aiGw.html
@S4i._k
@S4i._k 4 жыл бұрын
Also. How is maximum time 3h. I couldnt get your logic sir.
@moviesnight248
@moviesnight248 4 жыл бұрын
Where is it
@mdliksonali4728
@mdliksonali4728 5 жыл бұрын
sir, is it FIFOBB or LCBB ?
@CSEFamily
@CSEFamily 4 жыл бұрын
@@mahaboobbasha2337 fifo
@heathledger7291
@heathledger7291 4 жыл бұрын
fifo
@amankumar-zu3nh
@amankumar-zu3nh 2 жыл бұрын
Where it's mentioned that total available time is 3 hrs?
@hurrykrishna
@hurrykrishna 2 жыл бұрын
check how jobs & time should be calculated or considered here kzfaq.info/get/bejne/sLakfJuins3aiGw.html
@srivathsanv9116
@srivathsanv9116 3 жыл бұрын
Don't worry is u face trouble implementing it! It's an expert level problem!
@user-wd8tg9mr1h
@user-wd8tg9mr1h Жыл бұрын
Does anyone have the code for this?
@albatrossgeez6637
@albatrossgeez6637 Жыл бұрын
google bro
@lazy7172
@lazy7172 2 жыл бұрын
what is the actual meaning of cost here ?? Here cost value is depend on order of jobs . the order in which we will perform the job. here doubt is==> "when we are doing J2 first it takes 2 units of time. But J3's deadline is 2. So how can we start J3 when J2 finishes at 2." suppose here , if we exchange the order of job 2 and job 3. So now job 3 is processed in 2nd branch(node 1 to node 3) of tree and job 2 will be processed in 3rd branch(node1 to node 4) of tree. if u exchange, there will be no problem of time and deadline. My calculation says that this is not a good way to calculate cost in job sequencing with deadlines by branch and bound. we should keep track the time and deadlines at each node. And the cost calculation at each node in state space tree should depend on time and deadlines of each job.
@Thepankaz1
@Thepankaz1 5 жыл бұрын
Why did we even explore doing job 1 where penalty was more.
@ANKITVERMA-fl1zn
@ANKITVERMA-fl1zn 4 жыл бұрын
penalty was 0 and upper bound was infinity we had to explore it.
@jyotideore2001
@jyotideore2001 4 жыл бұрын
Can u explain me how to calculate u and c I am very confused? please replay me......
@shivanshusuryakar8692
@shivanshusuryakar8692 3 жыл бұрын
i was going to comment the same, did you get the answer?
@pritamsarkar8830
@pritamsarkar8830 6 жыл бұрын
that's a very good explanation sir, but a little bit confusing, at last, I am trying to solve it,,,, >m=max(deadline);//maximum time slot >upperbound=999....; loop_____________________ >rs=m-T; //rs=remaining slot //T=time taken by the jobs which are already been done //update (rs) in each steps with (c) and (u) >c=remaining penalty before last job,taken >u=remaining penalties >if(upperbound>u) upperbound=u; _________________terminating condition ...(1) rm=0 (2)c>upperbound
@pritamsarkar8830
@pritamsarkar8830 6 жыл бұрын
all of yours algorithm videos are best
@bariskocer
@bariskocer 4 жыл бұрын
Perfect
@puneet5396
@puneet5396 4 жыл бұрын
node 4 is kil
@MrVrtex
@MrVrtex Жыл бұрын
i like all you videos and how you explain but I am seriously disappointed today. You taught like you were teaching yourself. Didn't understand a single logic. Please take into consideration that not all students studying here are quick to catch on like you. there are also slow learners. Hope that helps
@user-er7sy3qb2k
@user-er7sy3qb2k 11 ай бұрын
job 3 deadline is 2 then why you are mentioning job 3 deadline is 1
@yatharthleekha7878
@yatharthleekha7878 Жыл бұрын
sir aap starting mei wrong ho galat baat
@dhruvtoshniwal7
@dhruvtoshniwal7 4 жыл бұрын
sabka badla lega tera faizal
@devashishbawa8236
@devashishbawa8236 3 жыл бұрын
Those who are having problem with the job 3's deadline.....can see this video also kzfaq.info/get/bejne/Y956rJt7lrirqGg.html No promotion just a student who face the same problem like you in this video. No offence Abdul Bari sir is a great teacher.
@jeetmehta2330
@jeetmehta2330 2 жыл бұрын
thanks bro
@shubhambhamare2094
@shubhambhamare2094 5 жыл бұрын
Sir in this during considering Job 3 its 10+5+3=18 you have considered 10+5=15 its wrong
@EpsilonCodes
@EpsilonCodes 2 жыл бұрын
Unclear.
@DarkOceanShark
@DarkOceanShark Жыл бұрын
yeah...
@kiwi4916
@kiwi4916 8 ай бұрын
sir are you fascist??? 🤌🤌🤌🤌
7.2 0/1 Knapsack using Branch and Bound
10:48
Abdul Bari
Рет қаралды 1,1 МЛН
7.3 Traveling Salesman Problem - Branch and Bound
24:42
Abdul Bari
Рет қаралды 1,7 МЛН
БАБУШКИН КОМПОТ В СОЛО
00:23
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 15 МЛН
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 10 МЛН
Clown takes blame for missing candy 🍬🤣 #shorts
00:49
Yoeslan
Рет қаралды 40 МЛН
7 Branch and Bound Introduction
9:40
Abdul Bari
Рет қаралды 900 М.
3.2 Job Sequencing with Deadlines - Greedy Method
13:29
Abdul Bari
Рет қаралды 1,3 МЛН
The Knapsack Problem & Genetic Algorithms - Computerphile
12:13
Computerphile
Рет қаралды 226 М.
6.1 N Queens Problem using Backtracking
13:41
Abdul Bari
Рет қаралды 1,9 МЛН
8. NP-Hard and NP-Complete Problems
31:53
Abdul Bari
Рет қаралды 1,8 МЛН
6.4 Hamiltonian Cycle - Backtracking
18:35
Abdul Bari
Рет қаралды 994 М.
Dynamic Programming - 0/1 Knapsack Problem Tutorial
46:18
freeCodeCamp.org
Рет қаралды 32 М.
4.7 Traveling Salesperson Problem - Dynamic Programming
15:25
Abdul Bari
Рет қаралды 1,5 МЛН
БАБУШКИН КОМПОТ В СОЛО
00:23
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 15 МЛН