• “Oil Industry Drills Data with Deep Learning”


    http://www.electronicdesign.com/industrialautomation/oil-industry-drills-data-deep-learning

    “Oil and gas companies are in the data business as much as they are in the hydrocarbon business,” said Mathew Binu, global head of digital products at Baker Hughes

    “To stay ahead of the competition, they need to derive insights from the massive amounts of sensor, geolocation, weather, drilling and seismic data they generate.”


    Lecture 3


    Counting – multiplication (product),
    permutation and combination rules
    Factorial
    Binomial coefficient
  • Counting

    There are three counting techniques which are used to determine the number of outcomes in events.
        • Multiplication (product) rule
        • Permutation rule
        • Combination rule

    Each technique must be applied properly in order to perform counting correctly


    Product (Multiplication) Rule

    Consider a procedure which involves k steps and there are
        • n1 ways of completing step 1,
        • n2 ways of completing step 2,
        • …
        • nk ways of completing step k.

    What is the total number of ways to performs those k steps?

    Total number of ways to perform those k steps is:

    • n1 · n2 · … · nk

    This result is known as a product (or multiplication) rule.

    Can be visualised with a tree diagram

    Product rule: example

    For widget design, there are 4 colours, 5 sizes, and 2 different materials to choose from. Determine how many designs are possible.

    Direct application of product rule gives the following answer: 4 · 5 · 2 = 40

    Observation: more steps and/or more ways of completing each step rapidly increase total number of ways
        • Doubling of ways of each step will result in 8 times higher number of total designs: 8 · 10 · 4 = 320

    Permutations rule

    Suppose that we are given n distinct objects and wish to arrange r of these objects in a line.

    nPr = n(n - 1)(n - 2)... (n - r +1)

    Since first object can be picked n ways, second (n-1) and r-th can be chosen in (n-r+1) ways

    Permutations: factorial

    A permutation is a unique, ordered sequence of distinct items (when n=r on previous slide)

    Number of permutations for a set of n items is n! where n! = n·(n-1)·(n-2)·…·2·1
        • Special case: By definition: 0! = 1 (not 0)

    5! = 5·4·3·2·1 = 120
        • factorial(n) in Matlab

    Permutations: examples

    If S = {a, b, c}, then there are 3!=1 · 2 · 3=6 permutations:

    abc, acb, bac, bca, cab, cba

    Number of permutations grows very fast with n: For example, 26 different letters can be arranged in 26! ways.
        Note that 26!=403291461126605635584000000. In other words, 26! happens to be a 27 digit number.

    Rapid Increase of Factorial

    1!=1
    2!=2
    3!=6
    4!=24
    5!=120
    6!=720
    7!=5,040
    8!=40,320
    9!=362,880
    10!=3,628,800
    11!=39,916,800
    12!=479,001,600
    13!=6,227,020,800

    Permutations with identical elements

    Suppose that a set consists of n elements of which n1 are of one type (i.e., indistinguishable from each other),
    n2 are of a second type,..., and nk are of a k-th type so that n=n1+n2+...+nk.

    Then the number of different permutations of these elements is - n!/(n1!n2!...nk!)

    Permutations with identical elements: example

    Determine the number of different permutations of letters S,I,N,A,N,O,V,I,C
    Click here to view the solution

    Combinations vs Permutations

    In a permutation, we are interested in the specific order of arrangement of the objects.
        For example, abc is a different permutation from cba.

    In combinations, we are interested only in selecting objects without regard to order.
        Such selections are called combinations. For example, abc and bca are the same combination (but different permutation)

    Combinations: simple example and formula

    combinations: simple example and formula

    Combinations

    combinations


    Solutions: Permutations with identical elements: example


    • 9 letters: 2 I's and 2 N's, rest unique
    • Then the number of different permutations of theses objects is 9!/(2!2!)=9!/4=90,720

  • Pascal’s Triangle and Binomial Coefficients

    Row number n contains the binomial coefficient Cn,r for r = 0,…,n.
    Pascal’s triangle allows the quick calculation of binomial coefficients.
    Example: By observing row number 5 of the triangle, one can easily see that (each number is sum of two numbers above it):

    (x + y)5 = 1 x5 + 5 x4y + 10 x3y2 + 10 x2y3 + 5 x y4 + 1 y5

    pascals triangle

    Combinations

    Remember that nPr = n(n - 1)(n - 2)... (n - r +1)

    We can think of combinations as
         Cn,r = nCr = nPr /r!
        because r objects have orderings which do not matter

    Example: The number of ways in which 3 machine parts can be chosen from a total of 8 different machine parts is …?

    Choosing Machine Parts example

    The number of ways in which 3 machine parts can be chosen from a total of 8 different machine parts is:
        8C3 = 8!/(3!*5!)=8*7*6/(1*2*3)=56

    Combinations: byte example

    Example: Byte has 8 bits. Each bit has either 0 or 1 value.
        a) Find the number of different bytes.
        b) Find the number of bytes which have exactly two ones.

    Combinations: byte example (solution)

    a) Product (multiplication) rule: 2^8=256
        b) The number of ways in which 2 bits can bechosen from a total of 8 bits
    8C2 = 8!/(2!*6!)=8*7/(1*2)=28