Sunday 2 September 2012

Cauchy-Schwarz inequality.

Cauchy-Schwarz inequality offers a quick solution to certain inequality problems. I myself came across at least 1 such question in last year's CAT itself, which, fortunately, having known Cauchy-Schwarz, I could solve in a matter of seconds.

Cauchy-Schwarz states that:


(x1² + x2² + x3²)(y1² + y2² + y3²) ≥ (x1y1 + x2y2 + x3y3)², for real xi and yj


Without wasting anytime, we will discuss some relevant problems.
For further reference on Cauchy-Schwarz inequality, follow this link.


Problem 1:
If a, b, c ,d are real numbers with a² + b² + c² + d² = 100, then what is the maximum value of 2a + 3b + 6c + 24d.
Using Cauchy-Schwarz, we can say

(a² + b² + c² + d²)(2² + 3² + 6² + 24²) ≥ (2a + 3b + 6c + 24d)²

(100)(625≥ (2a + 3b + 6c + 24d)²

So, 2a + 3b + 6c + 24d  250


Problem 2:
Find the least value of x² + 4y² + 9z², if x + y + z = 14
{x² + (2y)² + (3z)²}{1 + (1/2)² + (1/3)² {x + 2y(1/2) + 3z(1/3)}² 

=> (x
² + 4y² + 9z²) ≥ (x + y + z)²/{1 + (1/2) + (1/3)}²

=> (x² + 4y² + 9z²)   ≥ 196/(49/36)

=> (x² + 4y² + 9z²)   ≥ 144

Problem 3:
If x² + y² - 6x + 4y = 4, find the maximum value of 3x + 4y.
Given equation is: (x-3)² + (y+2)² = 9

Using Cauchy Schwarz, we get

[(x - 3)² + (y + 2)²][3² + 4²] ≥ [3(x - 3) + 4(y + 2]²

9 * 25    (3x + 4y -1)²

3x + 4y -1 ≤ 15

3x + 4y ≤ 16


Regards & Best Wishes,
-Angadbir

Nature of Permutations and Combinations



Pascal's Triangle.( Each number in the triangle is the sum of the two directly above it)
Source: Wikipedia.org

(a + b)2 = a2 + 2ab + b2

The above expression is something that everyone is familiar with. However, does it only signify a convenient method of computing the whole square of a number?

Let us bring in the context of events and probability and see what we learn.

Suppose we have an event with 2 possible results: ‘a’ & ‘b’. (eg, if the event is a toss of a coin, then ‘a’ could be the result of having obtained a heads, and ‘b’, a tails).

If we toss the coin once, the outcome is 'a' OR 'b' :- (a + b).
If we toss the coin twice, then the result is: (a+b)(a+b) 
The above mathematical expression efficiently represents the different permutation and combination of all outcomes possible.
If we revisit the equation for (a+b)2, we’d see that in the RHS, each term represents different sets of combination possible, where the coefficient of each term represent the number of permutations of each combination

So, the end result in this case is either both heads (a.a) OR 2 combination of heads and tails occurring in different order (a.b + b.a) OR both tails (b.b).



Similarly, if we toss the coin thrice:
(a + b)3 = a3 + 3a2b + 3ab2 + b3
Again, each term above on RHS represents each possible combination of results, with the additional info that it occurs 'its coefficient' no. of times


Finding the coefficients of each term is easy using Binomial expansion.
(a + b)n = C(n,0)an + C(n,1)an-1b + C(n,2)an-2b2 + .... + C(n,n)bn
A nice representation of these coefficients can also be done using the Pascal's Triangle. 



The little piece of knowledge in the above article is enough to give us a good perspective to solve the below example problems:


Example 1: If a fair coin is tossed 10 times, what is the probability of obtaining 2 heads and 8 tails.
All we are looking for is the coefficient of a2b8 in the expansion of (a+b)10 => C(10,2) or C(10,8) = 45.
Total sample space = 210 
Prob = 45/210

Example 2: Find out the number of terms in the expansion of (A + B + C)20
We know that each term (result set of outcomes) is a different combination of total no. of A,B and Cs. 
In each of the terms, the total no. of all of A, B and Cs = 20. 
ie, (Total As) + (Total Bs) + (Total Cs) = 20.

So the question boils down to different non-negative integral solns for: 
a + b + c = 20 
Above equation has C(22,2) solns = 231 
(Refer previous article on P&C Concept 1 for learning how to deduce this result)

Example 3What is the sum of coefficients of all the terms in the expansion
 of (a + b + c)20
In other words, the question asks for total no. of all possible results (Regardless of the permutation orders) out of an event of 3 outcomes repeated 20 times.
So the answer is nothing but: (No. of different outcomes)20  = 320

To explain more, (a+b+c)20 = k1a20 + k2a19b + k3a18bc + .... + k231c20
Where ki are different coefficients.
Here, on plugging a value of 1 to each of a,b,c leaves us with nothing but the sum of coefficients on the RHS.
Thus, sum of coefficients = (1 + 1 +1)20 = 320

Example 4: Amit is standing at Point A and needs to reach Point B. The path exists as a 5*5 Grid and he can take only 1 step to the right, or 1 step front up. Amit's 1 step equals length/width of each grid cell. In how many ways can he reach Point B. 
Amit needs to take 10 steps to reach point B. Of these he needs to make 5 right steps and 5 up steps.
If, 
R -> Amit takes a Right Step
U -> Amit takes an Up step.
Then coefficient of R5U5 in (R+U)10  represents the number of ways in which he can make 5R steps and 5U Steps, thus reaching B.

Coefficient = Total ways = C(10,5) = 252


Regards & Best Wishes,
-Angadbir