If a young man rides his motor - cycle at 25 km per hour, he has to spend Rs. 2 per km on petrol ; if he rides it at a faster speed of 40 km per hour, the petrol cost increases to Rs. 5 per km. He has Rs. 100 to spend on petrol and wishes to find what is the maximum distance he can travel within one hour. Express this as a linear programming problem and then solve it.
Let the young man ride x km at the speed of 25 km per hour and y km at the speed of 40 km per hour. Let f be the total distance covered, which is to be maximized.
∴ f = x + y is the objective function.
Cost of travelling per km is Rs. 2 at the speed of 25 km per hour and cost of travelling per km is Rs. 5 at the speed of 40 km per hour.
∴ total cost of travelling = 2x + 5y
Also Rs. 100 are available for petrol
∴ 2x + 5y ≤ 100
Time taken to cover x km at the speed of 25 km per hour =
Time taken to cover y km at the speed of 40 km per hour =
Total time available = 1 hours
∴ we are to maximize f = x + y
subjecl to the constraints
2x + 5y ≤ 100
8x + 5y ≤ 200
x ≥ 0, y ≥ 0.
Consider a set of rectangular cartesian axes OXY in the plane.
It is clear that any point which satisfies x ≥ 0, y ≥ 0 lies in the first quadrant.
Let us draw the graph of the line 2 x + 5 y = 100
For x = 0, 5 y - 100 or y = 20
For y = 0, 2 x = 100 or x = 50
∴ line meets OX in A (50, 0) and OY in L (0, 20)
Again we draw the graph of the line
8x + 5y = 200
For x = 0, 5 y = 200 or y = 40
For y = 0, 8 x = 200 or x = 25
∴ line meets OX in B (25, 0) and OY in M (0, 40)
Since feasible region is the region which satisfies all the constraints,
∴ feasible region is the quadrilateral OBCL. The comer points are
∴ the young man covers the maximum distance of 30 km when he rides km at the speed of 25 km per hour and
km at the speed of 40 km per hour.