Open In App

Objective Function

Last Updated : 19 Jul, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Objective Function is the objective of the Linear Programming Problem as the name suggests. In linear programming or linear optimization, we use various techniques and methods to find the optimal solution to the linear problem with some constraints. The technique can also include inequality constraints as well. The objective function in Linear Programming is to optimize to find the optimum solution for a given problem.

In this article, we will learn all about the Objective Function including its definition, types, how to formulate an objective function for any given problem, etc. We will also learn various representations of Objective Functions such as Linear Objective Functions or Non-linear objective functions. So, let’s start learning about this fundamental concept in Linear Programming i.e., “Objective Function”.

What is Objective Function?

As the name suggests, the objective function basically sets the objective of the Problem. It focuses on decision-making based on constraints. It is a real-valued function that is either to be maximized or minimized depending upon the constraints. It is like a Profit or a Loss function. It is usually denoted by Z. 

The terminologies associated with Objective Function are as follows:

  • Constraints: They are basically the conditional equations that govern the Linear function
  • Decision Variables: The variables whose values are to be found out. The equations are solved so as to get the optimal value of these variables.
  • Feasible Region: It is the region in the graph where the constraints are satisfied and the decision variables are found at the corners of the region.
  • Optimum Solution: The best possible solution that satisfies all constraints and achieves the highest or lowest objective.
  • Infeasible Solution: A solution that violates one or more constraints and cannot be implemented or executed.

Objective Function in Linear Programming

In Linear Programming an objective function is a linear function comprising two decision variables. It is a linear function that is to be maximized or minimized depending upon the constraints. If a and b are constants and x and y are decision variables where x > 0 and y > 0, then the Objective function is

Z = ax + by

So in order to get the optimal value of the Optimization function first we need to solve the constraints using any of the techniques and find out the decision variables. Then we put the values of Decision variables in the Objective function to generate the optimal value.

Objective Function in Linear Programming

Formulating an Objective Function

Linear Programming is all about finding the optimal values of the decision variables and putting those values in the objective function so as to generate maximum or minimum value. There are many techniques such as Simplex Method, and Graphical Method to solve Linear Programming. However, Graphical Method is usually preferred because of its simplicity. The steps to get the optimal values of the objective function are as follows:

  • Generate the constraint equations and the objective function from the problem.
  • Plot the constraint equations on the graph.
  • Now identify the feasible region where the constraints are satisfied.
  • Generate the values of Decision variables that are located at the corners of the feasible region.
  • Put all the generated values in the objective function and generate the optimal value.

Common Types of Objective Functions

There are two types of objective functions.

  • Maximization Objective Function
  • Minimization Objective Function

Let’s discuss these two types in detail as follows:

Maximization Objective Function

In this type, we usually aim to maximize the objective function. The vertices that are found after graphing the constraints have a tendency to generate the maximum value of the objective function. Let us illustrate with the help of an example

Example: A man invests at most 8 hrs of time in making wallets and school bags. He invests 2 hrs in making wallets and 4 hr in school bags. He targets to make at most 5 wallets and school bags and wants to sell them and generate a profit of Rs 20 on a wallet and Rs 100 on a school bag. Find the objective function.

Solution:

Let x be the number of rotis and y be the number of bread.

A man can invest a maximum of 8 hours by investing 2 hours on making a wallet and 4 hour on making a school bag. Therefore the first constraint equation is

2x + 4y ⩽ 8

⇒ x + 2y ⩽ 4

The maximum number he can make is 5

x+y ⩽ 5

Let the objective function be denoted by Z

Therefore Z = 20x + 100y

Minimization Objective Function

In this type, we usually aim to minimize the objective function. The vertices that are found after graphing the constraints have a tendency to generate the minimum value of the objective function. Let us illustrate with the help of an example

Example: Given the sum of the two variables is at least 20. It is given one variable is greater than equal to 9. Derive the objective function if the cost of one variable is 2 units and the cost of another variable is 9 units.

Solution:

Let x and y be the two variables. It is given sum of the two variables should be at least 20.

x+y ⩾ 20

and x ⩾ 9

Above two inequalities are constraints for the following objective function.

Let the objective function be denoted by Z. Therefore Z is

Z = 2x + 9y 

Mathematical Representation of Objective Function

As we discussed on objective function in the context of linear programming, but objective function can be non-linear as well.

  • Linear Objective Functions: In this type of objective function, both the constraints and objective functions are linear in nature. The exponents of the variables are 1.
  • Non-Linear Objective Functions: In this type of objective function, both the constraints and objective functions are linear in nature. The exponents of the variables are either 1 or greater than 1.

Applications of Objective Functions

Objective functions are important in real-life scenarios. For instance, these functions are used by businessmen. Businessmen use it to maximize their profit. Objective functions are also useful for Transportation problems. By setting up a function, one can analyze how much fuel consumption is taking place and how the user can accordingly cut the prices for the same. Objective functions are also useful in distance problems as well.

Solved Problems on Objective Function

Problem 1: A person wants some belts and wallets. He has total savings of Rs 6000 and wishes to spend all his savings on purchasing belts and wallets so that he can sell it later. The value of the wallet is Rs 20 and the value of the belt is Rs 10. He wants to store them in a cupboard and the maximum capacity of the cupboard is 50 units. He expects a profit of Rs 2 on the belt and Rs 3 on the wallet. Find the constraints and the resulting objective function.

Solution:

Let the x be the number of wallets to be purchased and y be the number of belts to be purchased. It is to be noted whenever maximum is mentioned in the problem we should use ‘⩽’ to find the constraints

The maximum investment is Rs 6000. The first constraint equation is

20x+10y⩽6000

The max storage capacity of the cupboard is 50

x+y⩽50

Here profit function is basically the objective function. Let this be denoted by P. Therefore the profit function is

P = 3x + 2y

Problem 2: Identify the constraint equations and the objective function from the given set

  • 2x + 3y ⩾ 50
  • x + y ⩽ 50
  • 5x + 4y ⩽ 40
  • Z = 7x + 8y

Where x and y are greater than 0.

Solution:

The constraints can be inequality or inequality format. But an objective function has always an equality symbol

Therefore the constraint equations are

2x + 3y ⩾ 50

x + y ⩽ 50

5x + 4y ⩽ 40

The objective equation is Z = 7x + 8y

Problem 3: A woman invests at most 7 hrs of time in making rotis and bread. She invests 2 hrs on rotis and 4 hr on bread. She targets to make at most 20 bread and rotis and wants to sell them and generate a profit of Rs 2 on roti and Rs 1 on bread. Find the objective function.

Solution:

Let x be the number of rotis and y be the number of bread.

A woman can invest a maximum of 7 hours by investing 2 hours on making a roti and 4 hour on making a bread. Therefore the first constraint equation is

2x + 4y ⩽ 7

The maximum number of bread and rotis she can make is 20

x + y ⩽ 20

Let the objective function be denoted by Z

Therefore Z = 2x + y.

Problem 4: The company wants to manufacture Product A and Product B. Product A requires 4 units of cocoa powder and 1 unit of milk powder Product B requires 3 units of cocoa powder and 2 units of milk powder. There are 87 units of cocoa powder available and 45 units of milk powder available. The profit to be earned on each product is $3 and $5 respectively. Find the objective function.

Solution:

Let x denote the number of Product A and y denote the number of items of type B.

The maximum quantity of cocoa powder is 87 units. So the first constraint equation is

4x + 3y ⩽ 87

The maximum amount of milk powder available is 45 units. So the second constraint equation is

x + 2y ⩽ 45

Here our aim is to maximize the profit. So our profit function is the Objective function. Let it be denoted by Z

Z = 3x + 5y

Problem 5: Two types of food packets A and B are to be generated which comprise of vitamins. There are at least 45 units of food packet A to be made available and the manufacture of both food packets should be at least 30. Generate the objective function to be generated where food packet A has 6 units of vitamins and food packet B has 8 units.

Solution:

Let x be the number of food packets A and y be the number of food packets B

At least 45 food packets are to be made available. Therefore the first constraint equation is

x ⩾ 45

The second constraint equation is

x + y ⩾ 30

The objective function is as follows:

Z = 6x + 8y

FAQs on Objective Function

Q1: What is the Objective Function in Linear Programming Problem?

Answer:

An objective function is a real-valued function that is either to be maximized or minimized depending upon the constraints. It comprises two decision variables.

Q2: What is the Aim of the Objective Function?

Answer:

The aim of the objective function is to maximize or minimize the resultant value. It is an equation that is expressed in terms of decision variables and plays a crucial role in Linear Programming.

Q3: How do we Understand if a Function is to be Maximized or Minimized?

Answer:

To check if a function is to be maximized or not we should be familiar with terms like ‘at most’, ‘at least’. If the term ‘at least’ is given in question then the objective function is to be minimized. For the term ‘at most’ the function should be maximized.

Q4: Name the Common Types of Objective Functions.

Answer:

There are two types of Objective functions:

  • Maximization Objective function
  • Minimization Objective Function

Q5: What are the Applications of the Objective Function?

Answer:

There are different applications of the Objective function. They are useful in real-life scenarios. They are basically used to estimate profit or loss in each case. Objective functions are useful in transportation problems, time constraint problems etc.



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads