Sunday, 12 February 2017

TOPIC 10: Permutation and Combination

Permutation and Combination


In English we use the word "combination" loosely, without thinking if the order of things is important. In other words:
"My fruit salad is a combination of apples, grapes and bananas" We don't care what order the fruits are in, they could also be "bananas, grapes and apples" or "grapes, apples and bananas", its the same fruit salad.
"The combination to the safe is 472". Now we do care about the order. "724" won't work, nor will "247". It has to be exactly 4-7-2.
So, in Mathematics we use more precise language:
When the order doesn't matter, it is a Combination.
When the order does matter it is a Permutation.
In other words:
A Permutation is an ordered Combination.


  Example 1:
   For example, imagine putting the letters a, b, c, d into a hat, 
and then drawing two of them in succession.  
We can draw the first in 4 different ways:  either a or b or c or d
After that has happened, there are 3 ways to choose the second.  
That is, to each of those 4 ways there correspond 3. 
Therefore, there are 4· 3  or 12  possible ways to choose two letters from four.
abbacada
acbccbdb
adbdcddc
ab means that a was chosen first and b second; ba means that b was chosen first and a second; and so on.

Example 2: 
A code have 4 digits in a specific order, the digits are between 0-9.
 How many different permutations are there if one digit may only be used once?
A four digit code could be anything between 0000 to 9999, 
hence there are 10,000 combinations if every digit could be used more than 
one time but since we are told in the question that one digit only may be used once it limits our number of 
combinations. 
In order to determine the correct number of permutations 
we simply plug in our values into our formula:
P(n,r)=10!(104)!=10987654321654321=5040


In our example the order of the digits were important, if the order didn't matter 
we would have what is the definition of a combination. 
Example 3:
Combination: Picking a team of 3 people a group of 10. C(10,3) = 10!/(7! · 3!) = 10 · 9 · 8 / (3 · 2 · 1) = 120.
Permutation: Picking a President, VP and Waterboy from a group of 10. P(10,3) = 10!/7! = 10 · 9 · 8 = 720.

Questions for Permutation and Combination
In a group of 6 boys and 4 girls, four children are to be selected.
In how many different ways can they be selected such that at least one boy should be there?

From a group of 7 men and 6 women, five persons are to be
selected to form a committee so that at least 3 men are there in the committee.
 In how many ways can it be done?

There are 6 periods in each working day of a school. In how many
ways can one organize 5 subjects such that each subject is allowed at least one period?




TOPIC 9: Linear Programming

Linear Programming


Linear programming is the process of taking various linear inequalities relating to some situation, and finding the "best" value obtainable under those conditions. A typical example would be taking the limitations of materials and labor, and then determining the "best" production levels for maximal profits under those conditions.

Formula :

 Y > Mx + C
M = gradient



C = y-intercept

Example 1:

Find the maximal and minimal value of z = 3x + 4y subject to the following constraints:








The three inequalities in the curly braces are the constraints. The area of the plane that they mark off will be the feasibility region. The formula "z = 3x + 4y" is the optimization equation. I need to find the (xy) corner points of the feasibility region that return the largest and smallest values of z.

My first step is to solve each inequality for the more-easily graphed equivalent forms:









It's easy to graph the line:

    to find the corner points -- which aren't always clear from the graph -- I'll pair the lines equations and solve:

      y = –( 1/2 )x + 7y = 3x
      y = –( 1/2 )x + 7y = x – 2
      y = 3x
      y
       = x – 2
      –( 1/2 )x + 7 = 3xx + 14 = 6x14 = 7x
      2 = 
      x
      y = 3(2) = 6
      –( 1/2 )x + 7 = x – 2
      x + 14 = 2x – 4
      18 = 3
      x
      6 = 
      x
      y = (6) – 2 = 4
      3x = x – 2
      2
      x = –2x = –1
      y = 3(–1) = –3
      corner point at (2, 6)
      corner point at (6, 4)
      corner pt. at (–1, –3)

    So the corner points are (2, 6)(6, 4), and (–1, –3).
    Somebody really smart proved that, for linear systems like this, the maximum and minimum values of the optimization equation will always be on the corners of the feasibility region. So, to find the solution to this exercise, I only need to plug these three points into "z = 3x + 4y".
      (2, 6):      z = 3(2)   + 4(6)   =   6 + 24 =   30 
      (6, 4):      
      z = 3(6)   + 4(4)   = 18 + 16 =   34 
      (–1, –3):  z = 3(–1) + 4(–3) = –3 – 12 = –15
    Then the maximum of z = 34 occurs at (6, 4),
    and 
    the minimum of z = –15 occurs at (–1, –3).

    Example 2: 
Given the following constraints, maximize and minimize the value of z = –0.4x + 3.2y.


    First I'll solve the fourth and fifth constraints for easier graphing:






      The feasibility region looks like this:


      From the graph, I can see which lines cross to form the corners, so I know which lines to pair up in order to verify the coordinates. I'll start at the "top" of the shaded area and work my way clockwise around the edges:

          y = –x + 7y = x + 5
          y = –x + 7x = 5
          x = 5y = 0
          x + 7 = x + 5
          2 = 2
          x
          1 = 
          x
          y = (1) + 5 = 6
          y = –(5) + 7 = 2
          [nothing to do]
          corner at (1, 6)
          corner at (5, 2)
          corner at (5, 0)
          y = 0y = –( 1/2 )x + 2
          y = –( 1/2 )x + 2x = 0
          x = 0y = x + 5
          –( 1/2 )x + 2 = 0
          2 = (1/2)x
          4 = x
          y = –( 1/2 )(0) + 2
          y = 0 + 2
          y = 2
          y = (0) + 5 = 5
          corner at (4, 0)
          corner at (0, 2)
          corner at (0, 5)
        Now I'll plug each corner point into the optimization equation, z = –0.4x + 3.2y:
          (1, 6):  z = –0.4(1) + 3.2(6) = –0.4 + 19.2 = 18.8 
          (5, 2):  z = –0.4(5) + 3.2(2) = –2.0 + 6.4   =   4.4
           
          (5, 0):  z = –0.4(5) + 3.2(0) = –2.0 + 0.0   = –2.0
           
          (4, 0):  z = –0.4(4) + 3.2(0) = –1.6 + 0.0   = –1.6
           
          (0, 2):  z = –0.4(0) + 3.2(2) = –0.0 + 6.4   =   6.4
           
          (0, 5):  z = –0.4(0) + 3.2(5) = –0.0 + 16.0 = 16.0


        Then the maximum is 18.8 at (1, 6) and the minimum is –2 at (5, 0).

      Example 3:


      A calculator company produces a scientific calculator and a graphing calculator. Long-term projections indicate an expected demand of at least 100 scientific and 80 graphing calculators each day. Because of limitations on production capacity, no more than 200 scientific and 170 graphing calculators can be made daily. To satisfy a shipping contract, a total of at least 200 calculators much be shipped each day.
      If each scientific calculator sold results in a $2 loss, but each graphing calculator produces a $5 profit, how many of each type should be made daily to maximize net profits?

      The question asks for the optimal number of calculators, so my variables will stand for that:

      x: number of scientific calculators producedy: number of graphing calculators produced

      Since they can't produce negative numbers of calculators, I have the two constraints, x > 0 and y > 0. But in this case, I can ignore these constraints, because I already have that x > 100 and y > 80. The exercise also gives maximums: x < 200 and y < 170. The minimum shipping requirement gives me x + y > 200; in other words, y > –x + 200. The profit relation will be my optimization equation: P = –2x + 5y. So the entire system is:

          P = –2x + 5y, subject to: 
          100 < x < 200 
          80 <  y < 170
           
          y > –x + 200
           
        The feasibility region graphs as:   

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
        When you test the corner points at (100, 170), (200, 170), (200, 80), (120, 80), and (100, 100), you should obtain the maximum value of P = 650 at (xy) = (100, 170). That is, the solution is "100 scientific calculators and 170 graphing calculators".

         
        Questions for linear programming.

      1.  A gold processor has two sources of gold ore, source A and source B. In order to kep his plant running, at least three tons of ore must be processed each day. Ore from source A costs $20 per ton to process, and ore from source B costs $10 per ton to process. Costs must be kept to less than $80 per day. Moreover, Federal Regulations require that the amount of ore from source B cannot exceed twice the amount of ore from source A. If ore from source A yields 2 oz. of gold per ton, and ore from source B yields 3 oz. of gold per ton, how many tons of ore from both sources must be processed each day to maximize the amount of gold extracted subject to the above constraints

             2.   Find the equation of the line Passing through ( 3, -2) and (-1,4)


             3.   if (a, 2 ) lies on the line 3y = x+1, find a

      Saturday, 11 February 2017

      TOPIC 8:Sequence and Number Pattern

      Sequence and Number Pattern


      a sequence is an ordered list of objects. Like a set, it contains members (also called elements or terms). The number of ordered elements (possibly infinite) is called the length of the sequence. Unlike a set, order matters, and a particular term can appear multiple times at different positions in the sequence.


      string of objects, like numbers, that follow a particular pattern. The individual elements in a sequence are called terms. Some of the simplest sequences can be found in multiplication tables:

      • 3, 6, 9, 12, 15, 18, 21, …
        Pattern: “add 3 to the previous number to get the next number”
      • 0, 12, 24, 36, 48, 60, 72, …
        Pattern: “add 12 to the previous number to get the next number”
      Example 1: 


      1, 4, 7, 10, 13, 16......start at 1 and jumps 3



      Example 2:                            

                        3, 8. 13, 18, 23, 28, 33, 38, ...

      This sequence has a difference of 5 between each number and pattern shows to continued by adding 5 to the last number each time, it will shows you: 


      Question 1:

      1. Find the common difference?
      18,26,34,40


      Question 2:

      3, 10, 17, 24, 31, 38, ...

      What is the next number in the above sequence?
      A.      43
      B.      44
      C.      45
      D.      46

      Question 3:

      71, 62, 53, 44, ...
      What is the next number in the above sequence?
      1.       35
      2.       36
      3.       37
      4.       38