~/Home ~/Notes ~/Categories

Basic Math Theory

2 September, 2020  ·   Dsa Math

Progressions

Arithmetic Progression :

A sequence of numbers is said to be in an Arithmetic progression if the difference between any two consecutive terms is always the same. 2, 4, 6, 8, 10 is an AP series because they have a common difference (4-2=6-4=8-6=10-8)

Few facts about AP

Geometric Progression.

A sequence of numbers is said to be in a Geometric progression if the ratio of any two consecutive terms is always same. 2, 4, 8, 16 is a GP because they have common ratio. (4 / 2 = 8 / 4 = 16 / 8 = 2).

Few facts about GP

Harmonic Progression

A harmonic progression is a sequence of real numbers formed by taking the reciprocals of an arithmetic progression. If a,b,c,d are in an arithmetic progression, so its reciprocals 1/a, 1/b, 1/c, 1/d are in harmonic progression.

Few facts about HP


Mean and Median

Mean

Average of given set of data. Mean = Total sum / n. Its a very popular measure of central tendency, which can be used with both discrete and continous data, most often with continous data.

Median

Middle value of set of data . To get median value, numbers must be in sorted order.


Quadratic Equations

ax^2 + bx + c = 0 Where a,b and c are real known values and, a can’t be zero.

Roots of equation :

Roots are values for which the equation satisfies the given condition. the roots of equation x^2 - 7x - 12 = 0 are 3 and 4 respectively. If we replace the value of x by 3 and 4 individually in the equation, the equation will evaluate to zero.

We can have 2 roots for a QE:

r1,r2 = (-b ± √(b^2 - 4ac))/2a

There are 3 different cases while finding the roots:

Permutations and Combinations

Permutation: Permutation is defined as arrangement of ‘r’ things that can be done out of total ‘n’ things

Denoted by nPr = n!/(n-r)!

Combination: Combination is defined as Selection of ‘r’ things that can be done out of total ‘n’ things

Denoted by nCr = n!/r!(n-r)!

Modular Arithmetic

The remainder obtained after division operation on two operands is known as modulo arithmetic.

 math  ds-algo  programming  competitive-programming
React Lifecycle Methods↠ ↞Prime Numbers