Computer Science, asked by abhisheksingh8452, 10 months ago

What is linear programming explain with examples?

Answers

Answered by Chaitanya1696
0

Linear programming is used to solve critical problems with unique solutions in the programming language.

  • Programmers can develop linear programming to solve very difficult situations with easy solutions.
  • It has a mathematical solution, for its programming is done to find ways to find d the optimal way.
  • It finds the most feasible solution that can be done with the minimum amount of resources.
  • For example- Finding a way by using the LPP or Linear programming to minimize the cost of allocating cost to transport.
Answered by sarahssynergy
0

Linear Programming is an optimization method in which constraints are applied to a linear function to maximize or minimize its value.

Explanation:

Linear programming is a method of solving problems by calculating the best possible outcome from a set of parameters or requirements. The parameters are represented as linear relationships. It is typically used in computer modelling or simulation to determine the best allocation of finite resources, such as money, energy, manpower, machine resources, time, space, and many others. The "best outcome" that linear programming needs to achieve is profit maximization or low costs.

Example:

The company manufactures two products (X and Y) using two machines (A and B). For each unit of X that is produced, machine A requires 50 minutes processing time and machine B requires 30 minutes processing time. For each unit of Y that is produced, machine A requires 24 minutes processing time and machine B requires 33 minutes processing time.

There are 30 units of X in stock and 90 units of Y at the beginning of the week. On machine A, the processing time is expected to be 40 hours, while on machine B, the processing time will be 35 hours.

According to the forecast, X is expected to sell 75 units this week, while Y is expected to sell 95 units. The company's policy is to maximize the combined number of units of X and Y in stock at the end of each week.

  • Using linear programming, determine how much of each product to produce for the current week.
  • Create a graphic representation of this linear program.

Solution

Let

  • The number of units of X produced in the current week is x
  • The number of units of Y produced in the current week is y

Therefore, the constraints are:

  • 50x + 24y <= 40(60) machine A time
  • 30x + 33y <= 35(60) machine B time
  • x >= 75 - 30
  • i.e., x >= 45 so production of X >= demand (75) - initial stock (30), which ensures we meet demand
  • y >= 95 - 90
  • i.e., y >= 5 so production of Y >= demand (95) - initial stock (90), which ensures we meet demand

Our objective is to maximize (x+30-75) + (y+90-95) = (x+y-50).

i.e., to maximize the number of units remaining in stock at the end of the week

It is clear from the graph attached below that the maximum occurs at the intersection of x=45 and 50x + 24y = 2400

We have x=45 and y=6.25 with the value of the objective function is 1.25

Attachments:
Similar questions