| [0.02s -> 5.54s] Now let's see of how to solve linear programming problem using dynamic programming technique. |
| [5.54s -> 16.18s] So, the problem given us is maximization objective function is 2x1 plus 5x2 subject to the constraints are 2x1 plus x2 less than or equal to 430. |
| [16.18s -> 26.86s] 2x2 less than or equal to 416 and x1 x2 greater than or equal to 0. In the first step we have to find the state, stage and the objective function. Step 1. |
| [29.14s -> 34.45s] State will be the number of constraints. Since we have two constraints, it is 2. |
| [40.11s -> 54.93s] Stage will be the number of variables. The variables used are x1 and x2. So it is also 2. And the objective function is z which is maximization. |
| [60.05s -> 70.45s] We make an assumption here where we consider two resources which is dependent on the number of constraints. Since we have two constraints here, we use two resources. |
| [73.90s -> 86.13s] b1 and b2. Using these two resources, we frame a function fi of b1, b2. This i represents the stage. |
| [88.59s -> 100.98s] Now we have two stages. So let's see two stages separately. Stage 1. So therefore i is equals to 1. So let's frame the function. |
| [102.77s -> 115.09s] f 1 of b 1 comma b 2 is equals to from the objective function we will be framing the function. So, it is maximum of since it is the first stage. |
| [115.09s -> 128.34s] we will use only the first variable 2x1 whose limits varies between 0 less than or equal to x1 less than or equal to b. So in this first step we have to calculate the value of b. To calculate b |
| [130.80s -> 139.86s] The formula used is minimum of b1 comma cx1 comma b2 comma cx2. |
| [139.95s -> 152.91s] where b 1 and b 2 are the resources and c x 1 is the coefficient of x 1 and c x sorry this is also x 1 and c x 1 this is the coefficient of x 1 of the second constraint b 1 |
| [152.91s -> 156.69s] will be the right hand side of the constraint number one so which will be |
| [157.42s -> 171.82s] minimum of right hand side of the constraint number 1 is 430 by the coefficient of x1 of the first constraint which will be 2 comma b2 right hand side of the constraint number 2 460 since there is no |
| [171.82s -> 184.18s] x1 in the second constraint it will be 0. As we solve this it results in minimum of 215. Anything divided by 0 will result in infinity. So the final value is 215. |
| [187.76s -> 202.13s] We substitute this b in the function f1 of b1 comma b2 is equals to max of 2x1 where limits varies between 0x1 to 215. |
| [202.13s -> 211.92s] Now we have to find the value of x1. So to find the value of x1 we have to find it from the constraint. First from the first constraint |
| [212.43s -> 224.82s] The value of x1 results in x1 is equals to 430 minus x2 by 2. Since we don't have the x1 in the second constraint, from the second constraint the value of x1 will be 0. |
| [225.26s -> 238.26s] So to find which x1 value to be used the formula used is minimum of x1 from the constraint number 1 and minimum of x1 from the constraint number 2. |
| [239.79s -> 241.46s] So minimum of |
| [242.96s -> 257.10s] 430 minus x2 by 2 comma 0. So since 0 is can be ignored the value will be x1 is equals to 430 minus x2 by 2. Now we substitute this x1 value in the function. |
| [257.26s -> 270.93s] So f1 of b1 value is the right hand side constraint of constraint number 1. So 430 and b2 is right hand side of the constraint number 2 460 equal to 2. |
| [271.60s -> 282.93s] minimum of x1 value. So minimum of 430 minus x2 by 2. Now let's go to stage number 2. |
| [285.23s -> 287.34s] Where i's value will be 2. |
| [287.76s -> 301.63s] The function frames here will be f2 of b1 comma b2 and the equation form will be max of will include both the variables up to second variable. So that will be 2x1. |
| [301.63s -> 308.94s] plus 5x2. Since we know the value of x1, we can substitute the maximum of |
| [309.30s -> 320.98s] 5x2 plus 2 into value of x1 from the above equation which will result in minimum of 430 minus x2 by 2. |
| [321.58s -> 325.20s] So now let's calculate the value of b for x2. |
| [333.20s -> 346.83s] The formula used is b or b is equals to minimum of b1 of cx2 comma b2 of cx2. This will be the coefficient of x2 from constraint number 1. |
| [346.83s -> 353.14s] and coefficient of x2 from constraint number 2. So this will result in minimum of |
| [353.46s -> 367.54s] 430 by 1 comma 430 comma 6. By solving this you will get minimum of 430 comma 230. So the final answer is B is equals to 230. |
| [368.69s -> 383.06s] sorry this will be 460. Now let's substitute in the function we have known it f2 of so b1 value will be 430 comma 460 is equals to maximum |
| [383.89s -> 397.97s] The limit varies between 0, x2 less than or equal to 230, 5x2 plus 2 into minimum of 430 minus x2 by 2. |
| [398.83s -> 407.31s] So to calculate minimum value to calculate this minimum of |
| [408.34s -> 421.54s] 430 minus x2 by 2. Using this we can calculate the value of x2. So here x2 value varies between 0 and 230. So this can be further simplified as minimum of |
| [421.54s -> 427.73s] For when x2 is equal to 0, this value will be 430 and when x2 will be 230. |
| [428.72s -> 437.81s] This results in 100. So, for minimum value will be 100 for which the x2 value is 230. Therefore, x2 value will be 230. |
| [441.46s -> 455.28s] Using the x2 value we can determine the x1 value. From the first stage we can determine the x1 value where x1 value will be minimum of 430 minus x2 by 2. |
| [455.28s -> 460.69s] So, substituting the x2 value will result in x1 is equals to 100. |
| [461.33s -> 476.18s] As we have found the x1 and x2 value we can substitute in our objective function which will be z is equals to 2x1 plus 5x2. x1's value will be 100 and x2 value will be 230. |
| [476.94s -> 491.09s] 2 into 100 will be 200 plus 5 into 230 will result in 1150. So, therefore the final answer is z is equals to 1350. Thank you. |
|
|