Saturday, April 10, 2021

Linear Programming in Artificial Intelligent ((Instructor Name: Nuruzzaman Faruqui)

 

Linear Programming

 

Introduction:

Linear Programming is the technique of portraying complicated relationships between elements by using linear functions to find optimum points. Linear Programming begins by taking the real-world data and translating it into a series of mathematical formulas.To find the optimum result, real-life problems are translated into mathematical models to better conceptualize linear inequalities and their constraints. Applications of linear programming are everywhere around you. You use linear programming at personal and professional fronts. You are using linear programming when you are driving from home to work and want to take the shortest route. Or when you have a project delivery you make strategies to make your team work efficiently for on-time delivery.

This is an important part of Artificial Intelligence course and this  lab report is done by myself under the supervision of Nuruzzaman Faruqui, lecturer of City University, Bangladesh. From this course we get to explore the real applicable approaches through AI and also acquires better knowledge of the functionality of AI and how AI is making our daily life easier. That's why this is the best Artificial Intelligence course in Bangladesh.

Problem Statement:

Applying the linear programming we can minimize a cost function i.e., c₁x₁ + c₂x₂ + … + cx. Here, x is a variable, and c_ is similar to co-efficient. In linear programming a constraint for sum of a variable can be shown as follows:

(ax + ax + + ax b) or (ax + ax + + ax = b). Here, x_ is a variable with a1_co-efficient and b is resources.

From the  above example we can illustrate the problem as like-

  1. Two machines, X₁ and X₂.
  2. X₁ costs $50/hour to run, X₂ costs $80/hour to run. The goal is to minimize cost.
  3. This can be formalized as a cost function: 50x₁ + 80x₂.
  4. X₁ requires 5 units of labor per hour.
  5. X₂ requires 2 units of labor per hour.
  6. Total of 20 units of labor to spend.
  7. This can be formalized as a constraint: 5x + 2x 20.
  8. X₁ produces 10 units of output per hour.
  9. X₂ produces 12 units of output per hour.
  10. The company needs 90 units of output.
  11. This is another constraint.
  12. Literally, it can be rewritten as 10x + 12x 90.
  13. However, constraints need to be of the form (ax + ax + + ax b) or (ax + ax + + ax = b).

Therefore, we multiply by (-1) to get to an equivalent equation of the desired form: (-10x) + (-12x) -90

Code Commentary:

 


Result: 

After implementing the code in python language we get the below result

 


Conclusion:

 As Linear Programming is a valuable way of displaying real-world data in a mathematical way, it is commonly used in manufacturing and the service industry. For example, many large distribution companies will use linear programming in the analysis of their supply chain operations, similar to the toy example above. Additionally, linear programming can be used outside the warehouse in the optimization of delivery routes. Companies like Amazon and FedEx use linear programming to find the shortest and most efficient delivery routes. Linear programming is also used in machine learning applications where a neural network is trained to fit model of a function in order to label input data and predict unknown future values. There is lot more in Machine Learning than linear programming or regression modeling. Linear programming is a method to achieve the best outcome (such as maximum profit or lowest cost) in a mathematical model whose requirements are represented by linear relationships. Linear programming is a special case of mathematical programming (mathematical optimization).

 

 

No comments:

Post a Comment

Linear Programming in Artificial Intelligent ((Instructor Name: Nuruzzaman Faruqui)

  Linear Programming   Introduction: Linear Programming is the technique of portraying complicated relationships between elements by using...