Monday, July 28, 2014

Pascal's rule - Wikipedia, the free encyclopedia

In mathematics, Pascal's rule is a combinatorial identity about binomial coefficients. It states that for any natural number n we have
{n-1\choose k} + {n-1\choose k-1} = {n\choose k}\quad\text{for }1 \le k \le n
where {n\choose k} is a binomial coefficient. This is also commonly written

{n \choose k} + {n \choose k-1} = {n + 1 \choose k} \quad\text{for } 1 \le k \le n + 1

When X is not in the subset, you need to choose all the k elements in the subset from the n − 1 objects that are not X. This can be done in n-1\choose k ways.
We conclude that the numbers of ways to get a k-subset from the n-set, which we know is {n\choose k}, is also the number {n-1\choose k-1} + {n-1\choose k}.
See also Bijective proof.

Read full article from Pascal's rule - Wikipedia, the free encyclopedia

Pascal's Triangle

To build the triangle, start with "1" at the top, then continue placing numbers below it in a triangular pattern. 

Each number is the two numbers above it added together (except for the edges, which are all "1").

A Formula for Any Entry in The Triangle

In fact there is a formula from Combinations for working out the value at any place in Pascal's triangle:
It is commonly called "n choose k" and written like this:
 
Notation: "n choose k" can also be written C(n,k), nCk or even nCk.
 So Pascal's Triangle could also be an "n choose k" triangle like this
Pascals Triangle Combinations

Read full article from Pascal's Triangle

Sunday, July 27, 2014

Coprime integers - Wikipedia, the free encyclopedia

In number theory, two integers a and b are said to be relatively prime, mutually prime, or coprime (also spelled co-prime)[1] if the only positive integer that evenly divides both of them is 1. That is, the only common positive factor of the two numbers is 1. This is equivalent to their greatest common divisor being 1.[2] The numerator and denominator of a reduced fraction are coprime. In addition to \gcd(a, b) = 1\; and (a, b) = 1,\; the notation a\perp b is sometimes used to indicate that a and b are relatively prime.[3]

For example, 14 and 15 are coprime, being commonly divisible by only 1, but 14 and 21 are not, because they are both divisible by 7. The numbers 1 and −1 are coprime to every integer, and they are the only integers to be coprime with 0.


Read full article from Coprime integers - Wikipedia, the free encyclopedia

Sunday, July 20, 2014

Catalan number - Wikipedia, the free encyclopedia


The nth Catalan number is given directly in terms of binomial coefficients by
C_n = \frac{1}{n+1}{2n\choose n} = \frac{(2n)!}{(n+1)!\,n!} = \prod\limits_{k=2}^{n}\frac{n+k}{k} \qquad\mbox{ for }n\ge 0.
The first Catalan numbers for n = 0, 1, 2, 3, … are
1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796
Using Binomial Coefficient 
C_0 = 1 \quad \mbox{and} \quad C_{n+1}=\frac{2(2n+1)}{n+2}C_n,

  C_0 = 1 \quad \mbox{and} \quad C_{n+1}=\sum_{i=0}^{n}C_i\,C_{n-i}\quad\text{for }n\ge 0;

Application
Cn is the number of different ways n + 1 factors can be completely parenthesized (or the number of ways ofassociating n applications of a binary operator). 

Cn is the number of different ways a convex polygon with n + 2 sides can be cut into triangles by connecting vertices withstraight lines

http://mathforum.org/advanced/robertd/catalan.html
  • the number of ways a polygon with n+2 sides can be cut into n triangles
  • the number of ways to use n rectangles to tile a stairstep shape (1, 2, ..., n−1, n).
  • the number of ways in which parentheses can be placed in a sequence of numbers to be multiplied, two at a time
  • the number of planar binary trees with n+1 leaves
  • the number of paths of length 2n through an n-by-n grid that do not rise above the main diagonal
The nth Catalan number counts the number of different ways n pairs of brackets can be correctly matched.
E.g. for n=3 there are these distinct correctly matched pairs of brackets:
((()))  ()(())  ()()()  (())()  (()())
(Etc.)

Properties
C0=1 and Cn+1=∑ni=0CiCn−i for n≥0
Total number of possible Binary Search Trees with n keys
http://www.geeksforgeeks.org/g-fact-18/
Total number of possible Binary Search Trees with n different keys = Catalan number Cn = (2n)!/(n+1)!*n!

Read full article from Catalan number - Wikipedia, the free encyclopedia

Sunday, July 13, 2014

Prime Factorization


Read full article from Prime Factorization

Saturday, July 12, 2014

Sørensen-Dice coefficient - Wikipedia, the free encyclopedia

Sørensen's original formula was intended to be applied to presence/absence data, and is

 QS = \frac{2C}{A + B} = \frac{2 |A \cap B|}{|A| + |B|}

where A and B are the number of species in samples A and B, respectively, and C is the number of species shared by the two samples; QS is the quotient of similarity and ranges from 0 to 1.[5] which is always in [0, 1] range.

It can be viewed as a similarity measure over sets:

s = \frac{2 | X \cap Y |}{| X | + | Y |}

Similarly to Jaccard, the set operations can be expressed in terms of vector operations over binary vectors A and B:

s_v = \frac{2 | A \cdot B |}{| A |^2 + | B |^2}

which gives the same outcome over binary vectors and also gives a more general similarity metric over vectors in general terms.


Read full article from Sørensen–Dice coefficient - Wikipedia, the free encyclopedia

Friday, July 11, 2014

Order statistic - Wikipedia, the free encyclopedia

The order statistics would be denoted

x_{(1)}=3,\ \ x_{(2)}=6,\ \ x_{(3)}=8,\ \ x_{(4)}=9,\,

where the subscript (i) enclosed in parentheses indicates the ith order statistic of the sample.

The first order statistic (or smallest order statistic) is always the minimum of the sample, that is,

X_{(1)}=\min\{\,X_1,\ldots,X_n\,\}

where, following a common convention, we use upper-case letters to refer to random variables, and lower-case letters (as above) to refer to their actual observed values.

Similarly, for a sample of size n, the nth order statistic (or largest order statistic) is the maximum, that is,

X_{(n)}=\max\{\,X_1,\ldots,X_n\,\}.

The sample range is the difference between the maximum and minimum. It is clearly a function of the order statistics:

{\rm Range}\{\,X_1,\ldots,X_n\,\} = X_{(n)}-X_{(1)}.

A similar important statistic in exploratory data analysis that is simply related to the order statistics is the sample interquartile range.

The sample median may or may not be an order statistic, since there is a single middle value only when the number n of observations is odd. More precisely, if n = 2m+1 for some m, then the sample median is X_{(m+1)} and so


Read full article from Order statistic - Wikipedia, the free encyclopedia

Labels

Popular Posts