In case you have any questions please put them in the comments section below. The terms in this expansion are alternatively positive and negative and the last term is positive or negative according as n is even or odd. This is also called as the binomial theorem formula which is used for solving many problems. More Lessons for Algebra. (ii) In the successive terms of the expansion, the index of the first term is n and it goes on decreasing by unity. Exponent of 1. Application of binomial theorem. Answer 2: There are three choices for the first letter and two choices for the second letter, for a total of . For example, when n =3: Equation 2: The Binomial Theorem as applied to n=3. Alternate Implementation Advanced Higher Maths - binomial theorem, Pascal's triangle, general term and specific term of a binomial expansion. If you are preparing for NEET, JEE, Medical and Engineering Entrance Exam you are at perfect place. These notes covers the complete syllabus of Binomial Theorem Class 11 including competitive exams like JEE mains and advanced, NEET and others. 1+2+1. Binomial Theorem is one of the main sections of Algebra in the JEE syllabus. Corollary 2.2. 1. a. Soln: Or, $\frac{1}{{1 + {\rm{x}}}}$ = (1 + x)-1 We know that, (1 + x) n = 1 + nx + $\frac{{{\rm{n}}\left( {{\rm{n}} - 1} \right)}}{{2! Binomial Theorem Class 11 Notes. Class 11 Mathematics Notes - Chapter 8 - Mathematical Induction and Binomial Theorem - Exercise 8.1. Your pre-calculus teacher may ask you to use the binomial theorem to find the coefficients of this expansion. In this section we are going to relate a line integral to a surface integral. Class 11 Binomial Theorem Notes Pdf.

Exponent of 2 For more information about IBDP Maths/Yoga, contact: balvindermaths@gmail.com The binomial theorem describes the algebraic expansion of powers of a binomial. (ii) In the successive terms of the expansion, the index of the first term is n and it goes on decreasing by unity. Easy notes that contain all questions. Then Binomial Random Variable Probability is given by: Let X be a binomial random variable with the number of trials n and probability of success in each trial be p. Expected number of success is given by . PTU. Coefficients. The NCERT Solutions Class 11 Chapter 8 Binomial Theorem can be downloaded at BYJUS without any hassle. (c) 1760 x 9 y 3. Advanced Higher Notes (Unit 1) The Binomial Theorem M Patel (April 2012) 9 St. Machar Academy Obviously, a calculator should be used for questions similar in spirit to Example 10. We have already read square and cube of expressions of Binomials as: (a + b) 2 = a 2 + 2ab + b 2 (a b) 2 = a 2 2ab + b 2 (a + b) 3 = a 3 + 3a 2 b + 3 ab 2 + b 3 (a b) 3 = a 3 3a 2 b + 3 ab 3 b 3 The ancient Indian mathematician knew about the coefficients in the expansion of (a + b) n, in third century.The arrangement of a theorem giving the expansion of a binomial raised to a given power We can use the Binomial theorem to show some properties of the function. The below is Pascals Triangle which is used to find binomial coefficients. The coefficients of the expansions are arranged in an array. In this section we will give the Binomial Theorem and illustrate how it can be used to quickly expand terms in the form (a+b)^n when n is an integer. The binomial expansion is briefly written as. For example, the rst step in the expansion is JEE Main Study Notes for Binomial Theorem include binomial expansion, binomial coefficients, and binomial series. 1. Binomial Theorem Class 11 Notes Chapter 8 solved by our expert teachers for academic year 2021-22. The binomial theorem is written as: Q Use the Pascals Triangle to find the expansion of Solution: As the power of the expression is 3, we look at the 3rd line in Pascals Triangle to find the coefficients. Recent Posts. General and Middle term(s) of the Binomial Expansion. (d) None of these. Proof: Take . You can also read: These are very detailed and comprehensive notes developed by team of expert faculties. The 4th term in the expansion of (x 2y)12 is. LECTURE NOTES ON BINOMIAL THEOREM By Mritunjay Kumar Singh 1 Abstract In this lecture note, we give detailed explanation and set of problems related to Binomial theorem for negative index. Useful De nition Before presenting the Binomial theorem, we need to de ne Binomial expression. We have already read square and cube of expressions of Binomials as: (a + b) 2 = a 2 + 2ab + b 2 (a b) 2 = a 2 2ab + b 2 (a + b) 3 = a 3 + 3a 2 b + 3 ab 2 + b 3 (a b) 3 = a 3 3a 2 b + 3 ab 3 b 3 The ancient Indian mathematician knew about the coefficients in the expansion of (a + b) n, in third century.The arrangement of We note that the coefficients (the numbers in front of each term) follow a pattern. The binomial theorem is stated as follows: where n! The coefficients of three consecutive terms in the expansion of (1 + a)n are in the ratio 1:7:42. (1) 3. Binomial Expansions Examples. These solutions are compliant with the latest edition books, CBSE syllabus and NCERT guidelines. When such terms are needed to expand to any large power or index say n, then it requires a method to solve it. We hope you liked the above MCQ Questions for Class 11 Binomial Theorem. Proof: Take the expansion of and substitute .

Binomial Theorem for Positive Integral Indices. Chapter 8 Binomial Theorem class 11 is very important chapter which tells/shows how all basic formulas were created using Binomial theorem. Some observations : (i) Number of terms in binomial expansion = Index of the binomial + 1 = n + 1. The binomial theorem formula is used in the expansion of any power of a binomial in the form of a series. We have provided below the latest CBSE NCERT Notes for Class 11 Binomial Theorem which can be downloaded by you for free. Study at Advanced Higher Maths level will provide excellent preparation for your studies when at university. These notes covers the complete syllabus of Binomial Theorem Class 11 including competitive exams like JEE mains and advanced, NEET and others. In this section we will give the Binomial Theorem and illustrate how it can be used to quickly expand terms in the form (a+b)^n when n is an integer. The binomial theorem is a useful formula for determining the algebraic expression that results from raising a binomial to an integral power. Some chief properties of binomial expansion of the term (x+y) n : The number of terms in the expansion is (n+1) i.e. Putting a for a, we have. E[X] = np. Write a similar result for odd. normal distribution derivation from binomial. Second, we use complex values of n to extend the definition of the binomial coefficient. The Binomial Theorem states that. Binomial theorem - Docmerit. Let be an even number. it is one more than the index. BINOMIAL THEOREM 131 5. Class 11, Mathematics. Applications of the Binomial Theorem The Binomial Theorem is often used to solve probabilistic problems. When the exponent is 1, we get the original value, unchanged: (a+b) 1 = a+b. Therefore, a theorem called Binomial Theorem is introduced which is an efficient way to expand or to multiply a binomial expression.Binomial Theorem is defined as Expanding many binomials takes a rather extensive application of the distributive property and quite a bit of time. Binomial. 1+1. The sum of the powers of x and y in each term is equal to the power of the binomial i.e equal to n. The powers of x in the expansion of are in descending order while the powers of y are in ascending order. Variance of number of There are many patters in the triangle, that grows indefinitely. n. is given by: k = 0 n ( n k) = 2 n. We can prove this directly via binomial theorem: 2 n = ( 1 + 1) n = k = 0 n ( n k) 1 n k 1 k = k = 0 n ( n k) This identity becomes even clearer when we recall that. binomial theorem, statement that for any positive integer n, the n th power of the sum of two numbers a and b may be expressed as the sum of n + 1 terms of the form in the sequence of terms, the index r takes on the successive values 0, 1, 2,, n. The coefficients, called the binomial coefficients, are defined by the formula Download Revision Notes for CBSE Class 11 Binomial Theorem.Short notes, brief explanation, chapter summary, quick revision notes, mind maps and formulas made for all important topics in Binomial Theorem in Class 11 available for free download in pdf, click on the below links to access topic wise chapter notes based on syllabus and guidelines issued for Grade 11. An Indian mathematician, Halayudha, explains this method using Pascals triangle in the 10th century AD. Answer 1: There are two words that start with a, two that start with b, two that start with c, for a total of . The binomial theorem is stated as follows: where n! Example #1. Mathmatics. Kabubbu Development Project Teachers undergo training in Digital Pedagogy and Online learning. 2. Putting x = 1 and a = x in the expansion of (x + a)n, we have. 2. These notes are very handy to revise the complete Binomial Theorem in very short time. 1. (b) Whenever the numerical occur as a fraction of binomial coefficients, integration is useful Subscribe to YouTube Channel for JEE Main All the best! k! Output: Value of nCr % p is 8. This theorem was given by newton where he explains the expansion of (x + y) n for different values of n. As per his theorem, the general term in the expansion of (x + y) n can be expressed in the form of pxqyr, where q and r are the non-negative integers and also satisfies q + r = n. Here, p is called as the binomial coefficient. + ?) 07 Binomial Theorem [BANSAL] Download PDF : 08 P_C [BANSAL] Download PDF : 09 Straight Line [BANSAL] Download PDF : 11 Inverse Trig Functions [BANSAL] Download PDF : 12 ITF [BANSAL] Download PDF : 13 Determinant_Matrices [BANSAL] Download PDF : 14 Limit, Continuity and Differentiability [BANSAL] Download PDF it is usually much easier just to remember the patterns:The first term's exponents start at n and go downThe second term's exponents start at 0 and go upCoefficients are from Pascal's Triangle, or by calculation using n! k! (n-k)! (i) Total number of terms in the expansion of (x + a) n is (n + 1). Binomial Theorem Class 11 Formulae & Notes is prepared strictly according to the NCERT Syllabus which not only reduces the pressure on the students but also, offer them a simple way to study or revise the chapter. The document Binomial Theorem, Chapter Notes, Class 11, Mathematics Notes - Class 11 is a part of Class 11 category.

Here, we are providing chapter notes of Binomial theorem including important concepts, formulae and previous year solved questions. (ii) The sum of the indices of x and a in each term is n. (iii) The above expansion is also true when x and a are complex numbers.

2. We use the binomial theorem to help us expand binomials to any given power without direct multiplication. Using Pascals triangle, find (? Applications of Binomial Theorem . Answer 1: Question 2: What is the coefficient of x^5 in the expansion of (1 + x^2)^5 (1 + x)^4? Note that in the binomial theorem, gives us the 1st term, gives us the 2nd term, gives us the 3rd term, and so on. 1. View binomial theorem notes - worked out.pdf from MATH AB at The Woodlands College Park. 1. . Also every binomial theorem formula is explained. Proof: Take and set . In Theorem 2.2, for special choices of i, a, b, p, q, the following result can be obtained. Working rule to get expansion of (a + b) using pascal triangleGeneral rule :In pascal expansion, we must have only "a" in the first term , only "b" in the last term and "ab" in all other middle terms.If we are trying to get expansion of (a + b), all the terms in the expansion will be positive.Note : This rule is not only applicable for power "4". It has been clearly explained below. More items These solutions are compliant with the latest edition books, CBSE syllabus and NCERT guidelines. Binomial Theorem for Negative Index Theorem 1. 8. The binomial theorem Binomial Theorem Maths Notes. A binomial is a polynomial with exactly two terms. In addition, when n is not an integer an extension to the Binomial Theorem can be used to give a power series representation of the term. The binomial theorem is used to expand polynomials of the form (x + y) n into a sum of terms of the form ax b y c, where a is a positive integer coefficient and b and c are non-negative integers that sum to n.It is useful for expanding binomials raised to larger powers without having to repeatedly multiply binomials. This is expansion of (1 + x)n is ascending powers of x.

From an academic perspective, having an interest in Maths will open up various opportunities. in the expansion of binomial theorem is called the General term or (r + 1)th term. Use the binomial theorem to express ( x + y) 7 in expanded form. 8. CBSE Class 11 Maths Notes Chapter 8 Binomial Theorem Binomial Expression An expression consisting of two terms, connected by + or sign is called binomial expression. These free chapter-wise CBSE Revision Notes have been designed based on the latest NCERT books and curriculum issued for current academic year. Read complete Binomial Theorem notes for Class 11 Math. Binomial Theorem Notes Class 11 Maths Chapter 8. Class 12 mathmatics 3d notes. Proof: Take and set . Binomial Theorem Class 11 Notes Chapter 8 contains all the tricks and tips to help students answer quicker and better understand the concept. Let be an even number. Avail 25% off on study pack. Here you will also get JEE and NEET Previous Year Chapter Finding the (k + 1)-st Term. Class 11: Binomial Theorem Lecture Notes Date: November 17, 2020 Author: ICSE CBSE ISC Board Mathematics Portal for Students 0 Comments Binomial Expression: An expression consisting of two terms, connected by or sign is called binomial expression. Topic Covered: Binomial theorem for negative index, Approximate value (only formula) 1. Exponent of 0. Binomial Theorem Class 11 Notes Chapter 8 solved by our expert teachers for academic year 2021-22. 1+3+3+1. C n, k = n! Answer. 2. Place a if you can use the Binomial Theorem to expand the expression. (iv) The coefficient of terms equidistant from the beginning and the end are equal. and declare that 0! The Binomial Theorem Welcome to advancedhighermaths.co.uk A sound understanding of the Binomial Theorem is essential to ensure exam success. Binomial Theorem Notes PDF: The traces of the binomial theorem were known to human beings since the 4th century BC. 3. Example 5 Find the 5th term in the expansion of (2x - 5y) 6. Theorem 11.1 Cn,k = n! Place an if you cannot. The binomial theorem states a formula for the expression of the powers of sums. Linkage / binomial-theorem-notes-senior-five; binomial theorem notes senior five. To recall, the binomial distribution is a type of distribution in statistics that has two possible outcomes. is the factorial function of n, defined as. binomial Pascals Triangle Binomial Th eorem Rate how well you can expand a binomial. Multiplying out a binomial raised to a power is called binomial expansion . Evaluate: . etc. The binomial for cubes were used in the 6th century AD. In this section we are going to take a look at a theorem that is a higher dimensional version of Greens Theorem. Team Gradeup Thats why providing the Class 11 Maths Notes helps you ease any stress before your examinations. 1 2 1. The Binomial theorem lets us know how to extend expressions of the form (a+b), for instance, (x+y). Class 12 mathmatics 3d notes. ( n k) gives the number of. Using binomial theorem, we have . Every student can easily understand the concepts used by Subject Teacher. Binomial Theorem Class 11 notes describe how we get pascals triangle from the expansion of where n=1, 2, 3. The topic Binomial Theorem is easier in comparison to the other chapters under Algebra. Then we have . For example, n C0 = n Cn, n C1 = n Cn 1, n C2 = n Cn 2 ,. Evaluate: . The binomial probability formula can be used to calculate the probability of success for binomial distributions. in terms of binomial sums in Theorem 2.2. Choosing some suitable values on i, a, b, p and q, one can also obtain the binomial sums of the well known Fibonacci, Lucas, Pell, Jacobsthal numbers, etc. Example 2: Expand (x + y)4 by binomial theorem: Solution: (x + y)4 = CAT Previous Years Solved Sample Questions on Binomial Theorems. Easy notes that contain all questions. Replacing a by 1 and b by x in (1), we get (1 x)n =nC 0 x0 nC 1 x + nC 2 x2 + nC n1 (1)n1 xn-1 + nC n (1)n xn i.e., (1 x)n = 0 ( 1) C n r n r r r x = 8.1.5 The pth term from the end The p th term from the end in the expansion of (a + b)n is (n p + 2) term from the beginning. Binomial Theorem is a speedy method of growing a binomial expression with huge powers. It is denoted by T. r + 1. Question 1: By using the Binomial Theorem, expand (2x-3)^6. Some results which are applied in binomial theorem problems are n C r + n C r-1 = n+1 C r. n C r = n/r (n-1 C r-1) n C r / n C r-1 = (n r + 1)/r [(n+1)/(r+1)] n C r = n+1 C r+1. Chapter-8.

In elementary algebra, the binomial theorem (or binomial expansion) describes the algebraic expansion of powers of a binomial.According to the theorem, it is possible to expand the polynomial (x + y) n into a sum involving terms of the form ax b y c, where the exponents b and c are nonnegative integers with b + c = n, and the coefficient a of each term is a specific positive T. r + 1 = Note: The General term is used to find out the specified term or . (b) 1760 x 9 y 3.

3. Binomial Theorem Notes PDF for Class 12, December 16, 2021 . In addition, when n is not an integer an extension to the Binomial Theorem can be used to give a power series representation of the term. We can test this by manually multiplying ( a + b ). Section 6-5 : Stokes' Theorem. T r+1 = general term = n C r a n-r b r . It provides one with a quick method for finding the coefficients and literal factors of the resulting expression. Download PDFs for free at CoolGyan.Org The binomial theorem formula is used in the expansion of any power of a binomial in the form of a series. Applications of Binomial Theorem . The binomial theorem is a useful formula for determining the algebraic expression that results from raising a binomial to an integral power. Binomial theorem. 3 2. Students can learn new tricks to answer a particular question in different ways giving them an edge with the exam preparation. 2. The sum of all binomial coefficients for a given. Introduced. 50. Notes, videos and examples. We. Binomial expression is an algebraic expression with two terms only, e.g. 11.2 Binomial coefficients. Understand Binomial theorem and its simple applications with the help of notes, formula and questions shared b Binomial Theorem - Get complete study material including notes, formulas, equations, definition, books, tips and tricks, practice questions, preparation plan prepared by subject matter experts on careers360.com. The Binomial Theorem Expanding binomials: x y 0 x y 1 x y 2 x y 3 x y 4 Characteristics of binomial Note that: The powers of a decreases from n to 0. Using binomial theorem, we have . Properties of Binomial Theorem for Positive Integer. The binomial coefficient of the middle term is the greatest binomial coefficient of the expansion. Topic Covered: Binomial theorem for positive index. is the factorial function of n, defined as. All the notes are arranged in a specific order to make it easy for you to understand. Binomial probability distribution along with normal probability distribution are the two probability distribution types. YaakaDn Students Seminar; YaakaDn Students Seminar; Yaaka Digital Network hosts virtual spelling bee contest; 1 11 121 1331 14641 15. binomial theorem binomial theorem . This formula is known as the binomial theorem. Proof: Take the expansion of and substitute . Example 1. De nition 1. The binomial theorem formula is (a+b) n = n r=0 n C r a n-r b r, where n is a positive integer and a, b are real numbers, and 0 < r n.This formula helps to expand the binomial expressions such as (x + a) 10, (2x + 5) 3, (x - (1/x)) 4, and so on. Find n. We will use the simple binomial a+b, but it could be any binomial. 40. It provides one with a quick method for finding the coefficients and literal factors of the resulting expression. (1) 3. The single number This can be generalized as follows. We have provided Binomial theorem class 11 NCERT solutions step by step Explained. The (k + 1)-st term of (a + b) n is . Equation 1: Statement of the Binomial Theorem. All you need of Class 11 at this link: Class 11. Let us start with an exponent of 0 and build upwards. (2a2 6)4 (5x2 1 1)5 (x2 2 3x2 4)3 Reasoning Using Pascals Triangle, determine the number of terms in the expansion of (x 1 a)12.

Then we have . You can also read: These are very detailed and comprehensive notes developed by team of expert faculties. Some observations : (i) Number of terms in binomial expansion = Index of the binomial + 1 = n + 1. Avail Offer. Practising these solutions can help the students clear their doubts as well as to solve the problems faster. Class 11 math chapter 8 notes cover the main topics that are a number of terms of an expansion, how to use combination formula to the expanded form, the middle term of when n is an even or odd. According to the theorem, it is possible to expand the power (a + x) n into a sum involving terms of the form C(n,r) a n- r x r . This is known as the binomial theorem. (b) Whenever the numerical occur as a fraction of binomial coefficients, integration is useful Subscribe to YouTube Channel for JEE Main All the best! Since n = 13 and k = 10, In this lecture note, we give detailed explanation and set of problems related to Binomial theorem. Hence . An important takeout while doing the binomial expansion is that the coefficients that are placed at an equal distance from the end as well as from the beginning are equal. = 1 0! the method of expanding an expression that has been raised to any finite power. Introduced. Register now! All the binomial coefficients follow a particular pattern which is known as Pascals Triangle. Write a similar result for odd. Binomial Theorem Maths Notes.

Using Binomial theorem, expand (a + 1/b)11. Using Differentiation and Integration in Binomial Theorem (a) Whenever the numerical occur as a product of binomial coefficients, differentiation is useful. Example 11 A fair coin is flipped 5 times. 2 + 2 + 2. Question.

Describe at least 3 patterns that you can find. Since the two answers are both answers to Ostrowski's theorem for Q: Ostrowski's theorem for Q Ostrowski's theorem for F Ostrowski's theorem for number fields The p-adic expansion of rational numbers Binomial coefficients and p-adic limits p-adic harmonic sums Hensel's lemma A multivariable Hensel's lemma Equivalence of absolute values Equivalence of norms Using Differentiation and Integration in Binomial Theorem (a) Whenever the numerical occur as a product of binomial coefficients, differentiation is useful. Class 11 Mathematics Notes - Chapter 8 -Mathematical Induction and Binomial Theorem - Exercise 8.2. Now on to the binomial. 1. . Write the general term in the expansion of (a2 b )6. [This was noticed long before Pascal, by the Chinese.] Binomial Theorem Notes Class 11 Maths Chapter 8. Use the binomial theorem to determine the general term of the expansion. Find the tenth term of the expansion ( x + y) 13. In that topic, the problems cover its properties, coefficient of a specific term, binomial coefficients, middle term, greatest binomial coefficient etc and so on. xnyn k Proof: We rst begin with the following polynomial: (a+b)(c+d)(e+ f) To expand this polynomial we iteratively use the distribut.ive property. When an exponent is 0, we get 1: (a+b) 0 = 1. How do you solve a binomial equation by factoring? Set the equation equal to zero for each set of parentheses in the fully-factored binomial. For 2x^3 16 = 0, for example, the fully factored form is 2 (x 2) (x^2 + 2x + 4) = 0. Set each individual equation equal to zero to get x 2 = 0 and x^2 + 2x + 4 = 0. Example: What is the coefficient of a 4 in the expansion of (1 + a ) 8. In this article, we will read about binomial theorem, its usual expansion, properties and examples. Binomial Theorem: The expansion of a binomial for any positive integral n is given by Binomial Theorem, which is. Binomial Theorem class 11 Notes Mathematics. These formulae are cumulated from past 15 years of examination material preferred by CBSE so that no important formulae should be left behind for the Learn Binomial Theorem & get access to important questions, mcq's, videos & revision notes of CBSE Class 11-commerce Maths chapter at TopperLearning. k! (nk)! The triangle you just made is called Pascals Triangle! The binomial theorem Proof: Take . Notice the following pattern: In general, the kth term of any binomial expansion can be expressed as follows: Example 2. ( n k)! Time Complexity: Time complexity of this solution is O(p 2 * Log p n). 24 Evaluate (101)4 using the binomial theorem; Using the binomial theorem, show that 6n5n always leaves remainder 1 when divided by 25. We can use the Binomial theorem to show some properties of the function. The symbol (n/r) is often used in place of n C r to denote binomial coefficient. Download PDFs for free at CoolGyan.Org In Greens Theorem we related a line integral to a double integral over some region. PTU. Binomial Theorem If a and b are real numbers and n is a positive integer, then The general term of (r + 1)th term in the expression is [] General and Middle Terms.

Starting early can help you score better! 1. the required co-efficient of the term in the binomial expansion . T r+1 = general term = n C r a n-r b r . 6 without having to multiply it out. Team Gradeup Binomial Theorem for Negative Index. Binomials are expressions that contain two terms such as (x + y) and (2 x). Binomial Theorem Class 11 notes describe how we get pascals triangle from the expansion of where n=1, 2, 3. The powers of b increases from 0 to n. The powers of a and b always add up to n. Binomial theorem - Docmerit. 4x 2 +9. Download Free IIT JEE Mains and Advanced, NEET, AIIMS, JIPMER, PGIMER, CBSE, ICSE Boards Notes and Study Materials PDF. = 1. (a) 1760 x 3 y 9. When applying the binomial theorem to negative integers, we first set the upper limit of the sum to infinity; the sum will then only converge under specific conditions. The binomial theorem formula is (a+b) n = n r=0 n C r a n-r b r, where n is a positive integer and a, b are real numbers, and 0 < r n.This formula helps to expand the binomial expressions such as (x + a) 10, (2x + 5) 3, (x - (1/x)) 4, and so on. Mathmatics. The expansion is expressed in the sigma notation as Note that, the sum of the degrees of the variables in each term is n . The binomial theorem The binomial Theorem provides an alternative form of a binomial expression raised to a power: Theorem 1 (x +y)n = Xn k=0 n k! Note: The number Cn,k C n, k is also denoted by (n k) ( n k), read n n choose k k 2. 1 1. Class 11 math chapter 8 notes cover the main topics that are a number of terms of an expansion, how to use combination formula to the expanded form, the middle term of when n is an even or odd. There are O(Log p n) digits in base p representation of n. Each of these digits is smaller than p, therefore, computations for individual digits take O(p 2).Note that these computations are done using DP method which takes O(n*r) time.