Skip to main content

SOLVING A REAL LIFE PROBLEM WITH A PICTURE

     John lives in a warm country. He has just 30 square meters of land. He can plant cocoa and pineapples. How much of pineapple and cocoa he has to plant in his plot to get maximum profit? This is a classical problem. It can be solved with graphs.

    Let x stand for the amount of cocoa and y for the amount of pineapple. When john harvests the crops, he will get a unit return of 3 dollars on the cocoa and of 2 dollars on the pineapples. His total return p will be  p = 3x+2y       ----(1)

    The profit p, we want to maximize. Planting comes with a cost. The unit cost of cocoa seed is 2 dollars and of pineapple, the seed is 1 dollar. Also, 4 dollars is required to cultivate both the crops in his land.

    Hence, the total cost c of growing the two crops is       c = 2x+y+4   -----(2)

     John has only 50 dollars in the bank. That is the first constraint. We write it mathematically as 

   c= 2x+y+4 < 50    ---(3)   constraint I

    The size of the field also provides the second constraint. The amount of space taken up by unit cocoa is one square meter and unit pineapple also takes one square meter land. The total amount of space s taken up by the two crops is   s=x+y -----(4)

   The size of the plot is 30 square meters. So s cannot exceed this value. s=x+y < 50    ----(5) constraint    -----II

                                                      

    It is clear that x and y both need to be greater than zero. They cannot be negative.

Solution:

     Take quantities of cocoa on the x-axis and that of pineapple on the y-axis. Convert the inequality (3) into an equation such as y = -2x+46 and plot the straight line for the equation in the graph. The points (x,y) that satisfy the inequality 3 are underneath that line (shaded area).

                        
                       ADVT: SELL ON AMAZON

    Next, we will convert inequality (5) into an equation y = -x+30 and also plot the straight line for it.



 Now the shaded region contains all the points (x,y) that satisfy both the constraints or in-equalities. The points are in the first quadrant and they are positive.

     "P is always maximized at one of the corner points of the shaded region". Here p is maximized at the corner point M.

    At M; x = 16, y = 14

hence p=3x+2y =3*16+2*14 =76

   76 dollars, maximum profit for 16 units of cocoa, and 14 units of pineapple. At other corner points, the p is smaller. You can verify yourself. The problem is solved.

    This method will work out when the equations are linear.  That is, the x and y should not have powers. Hence this process is called "linear programming".

    This method can be extended to work with more constraints (shaded region bounded by more lines) and also to work when more than two variables (crops) are involved. The extended method is called the "simplex algorithm" invented by George Dantzig. It has a wide variety of applications.

    A company makes many models of smartphones. How much quantity, the company has to manufacture in each model to maximize the profit? How to minimize the raw materials required? The simplex algorithm will answer this kind of question.  

Comments

Popular posts from this blog

THE EARTH, A SUPER ORGANISM

     JOIN MY COURSE: "Become a programmer in a day with python"       A man called 'love lock' (what a name) proposed a theory called Gaia theory, named after Greek Goddess.      It says, "Earth is a self-regulating organism like a human being.  The organic life in it interacts with in-organic matter and maintains atmosphere, temperature and environment".  Hence the earth is still suitable for the life to thrive.      Imagine, in a particular place, there are lot of flowers.  Some flowers are white and some are darkly coloured.  We know, white reflects light and heat while dark absorbs the same.  White flowers can thrive in hot climate.  But dark flowers requires cold climate.  The absorption and reflection balances and the environment reaches average, warm temperature at which both the flowers can co-exist.  This is the essence of "Gaia" theory.      On our earth, the oxygen constitute 20% of the atmosphere.  The oxygen level is always mai

THE PARABOLA

          A jet of water shooting from a hose pipe will follow a parabolic path.  What is the so special about parabola.    Y= x^2 Draw a graph for the above equation.  It will result in a parabola.  This parabola is also called unit parabola.  Any equation involving square will yield a parabola. Example:  Y = 2x^2 +3x+3 (also called quadratic equation)    X= 2 and -2, both  satisfies the equation 4 = X^2.  Parabolic equations always have two solutions.     Any motion taking place freely under gravity follows parabolic path. Examples:   An object dropped from a moving train,   A bomb dropped from flying plane,  A ball kicked upwards.      If a beam of light rays fall on the parabolic shaped mirror, they will be reflected and brought to focus on a point.  This fact is made use of in Dish Antenna, Telescope mirrors, etc.      Inverted parabola shape is used in the construction of buildings and bridges.  Because the shape is able to bear more weight.      A plane

DISORDER IS THE "ORDER OF THE DAY"

         Imagine a balloon full of air.  The air molecules are moving randomly inside the balloon.  Let us pierce the balloon with a pin.  The air rushes out.  Why should not the air molecules stay inside the balloon safely and ignore the little hole?  That is not the way the world works.  The molecules always "want to occupy as many states as possible".  Hence the air goes out in the open to occupy more volume.   The things always goes into disorder (entropy) and the disorder increases with time.  The above statement is what we call "second law of thermodynamics".      Consider a cup of coffee on the table. Suppose the heat from entire room flows to your cup of coffee, the coffee will boil and the rest of the room will freeze.  Freezing means bringing things to order and arrangement.  It violates the second law.  Hence it will never happen.  Hence heat must flow from high temperature to low temperature and not the other way.        The air molecules in y