|
|
Subject:
Formula to determine values 2000, 3720, 5361, 6924 .....?
Category: Science > Math Asked by: guyyy-ga List Price: $5.00 |
Posted:
25 Feb 2006 22:35 PST
Expires: 27 Mar 2006 22:35 PST Question ID: 701055 |
What is the formula to determine the values 2000, 3720, 5361, 6924, 8410, 9820 .....? Here's the finite differences triangle: T2 2000 3720 5361 6924 8410 9820 ... T1 1720 1641 1563 1486 1410 ... CN 80 79 78 77 ..... 1 1 1 .... I am not a mathematician but a programmer. It is difficult to express this algorithm into mathematical terms. Simple Basic program do describe the behavior of the algorithm. . T1=1800 :CN =81 : T2=2000 :X1 =0 PRINT "X1=";X1;" CN=";CN; " T1="; T1 ;" T2=";T2 FOR X1 = 1 TO 26 CN=CN-1 T1 = T1-CN T2= T1+T2 PRINT "X1=";X1;" CN=";CN; " T1="; T1 ;" T2=";T2 NEXT X1 Note: X1 is only there to structure the loop. Not part of any value. How do you calculate the formula? In this case, what do you call the different parts of the Pascal Triangle? Any web references which treat of the same problem, would be appreciated? Note: The value of the variables CN & T1 have been sized down. The original value of CN > 100 000000 and T1>800 000000 . I need a formula because going through the loops takes too many iterations + enormous computing time. If you do not understand what I am talking about, please ask me . I'll be too happy to explain. gnh888 |
|
There is no answer at this time. |
|
Subject:
Re: Formula to determine values 2000, 3720, 5361, 6924 .....?
From: kottekoe-ga on 26 Feb 2006 07:22 PST |
You've written your question much more clearly now. I'm not going to provide the answer for what looks like a homework problem, but I will give you one way to proceed. Each row is a polynomial starting with zeroth order at the bottom and 3rd order at the top. There are four coefficients in a cubic polynomial and you have four rows of results. You can solve for the coefficients, or follow this procedure. Row 0: R0(N) = 1 (Zeroth order polynomial) Row 1: R1(N) = 80 - N (First order polynomial) Row 2: R2(N) = Use the formula for summing an arithmetic series that I gave in answer to your earlier question. It yields a quadratic in N. Row 3: R3(N) = Use a similar formula for summing a sequence of squares. Use this in conjunction with the formula for summing an arithmetic sequence to yield your result. Note that the sum from one to N of N^2 is: N(N+1)(2N+1)/6 |
Subject:
Re: Formula to determine values 2000, 3720, 5361, 6924 .....?
From: brix24-ga on 26 Feb 2006 19:35 PST |
guyyy, If you don't mind, I would like to ask four questions. (You don't have to answer any of them.) 1) Two people think that this is a homework problem. Is this for a discrete mathematics course of some type? For a programming course? 2) How did you go about choosing the value of 26 for the end of the loop? (It gives a local maximum for T2.) Was there a reason for not going past 26? 3) How far did you get in using either of kottekoe's two methods? 4) In your course, have you covered polynomials in relation to Pascal triangles? Were tetrahedral numbers covered? |
Subject:
Re: Formula to determine values 2000, 3720, 5361, 6924 .....?
From: manuka-ga on 27 Feb 2006 21:31 PST |
I actually feel it isn't a homework problem, since in that case he probably would have left the original numbers intact - and the first question would probably have been written clearly. But I'll provide my own set of numbers and skip some parts, just in case. T2 1000000 1220000 1592300 2116899 2793796 3622990 T1 220000 372300 524599 676897 829194 CN 152300 152299 152298 152297 As kottekoe said, the values for T2 will follow a cubic equation, which means there are four coefficients; and you can approach it either by direct substitution of known values, or by working it out from the summation formula. By substitution: We know T2(n) = An^3 + Bn^2 + Cn + D for some A, B, C and D. T2(1) = 1000000 ==> A.1 + B.1 + C.1 + D.1 = 1000000 T2(2) = 1220000 ==> A.(2^3) + B.(2^2) + C.2 + D = 1220000 T2(3) = 1592300 ==> A.(3^3) + B.(3^2) + C.3 + D = 1592300 T2(4) = 2116899 ==> A.(4^3) + B.(4^2) + C.4 + D = 2116899 So we get four equations: A + B + C + D = 1000000 8A + 4B + 2C + D = 1220000 27A + 9B + 3C + D = 1592300 64A + 16B + 4C + D = 2116899 These equations can be solved simultaneously, either directly or using matrices, if you remember how to do that. For these values I get A = -1/6 B = 76151 C = -50711/6 D = 932301 which you can check by putting them in the formula and calculating the first four (or more) values. The other method kottekoe suggested is to find formulae successively for CN, T1 and T2. CN(n) is obviously 152301 - n in this case (I'll set n=1 for the first element in each line). Now T1(n) = 220000 + CN(1) + CN(2) + ... + CN(n-1) = 220000 + (152301 - 1) + (152301 - 2) + ... + (152301 - n + 1) = 220000 + (152301 + ... + 152301) - (1 + 2 + ... + (n-1)) [where there are (n-1) terms in each of the two sequences] = 220000 + (n-1)*152301 - (n-1)(n)/2 using the formula for the sum of the first N integers, which is N(N+1)/2 - here N = n-1. = 220000-152301 + 152301 n - n^2 / 2 + n/2 = 67699 + (304603/2)n - (1/2)n^2 Then we do the same thing for T2. I'll approach it a bit differently this time - instead of expanding and regrouping, we'll consider it as a sum of the formula for T1. This is both faster and cleaner... T2(n) = 1000000 + T1(1) + T1(2) + ... + T1(n-1) = 1000000 + sum(i=1..n-1, 67699 + (304603/2)i - (1/2)i^2) = 1000000 + 67699 (n-1) + (304603/2)(n-1)(n)/2 - (1/2)(n-1)(n)(2n-1)/6 using the formula from the last step and the formula kottekoe gave for the sum of the first N squares. If you simplify this, you get the same formula that we got before (as you'd expect). Personally I find substitution and solving the equations to be an easier way to do it, but that is just a personal preference - you probably get a better feel for the process by doing it the other way. But really it comes down to which approach you're most comfortable with. And remember to check your answers by calculating the first several terms! |
Subject:
Re: Formula to determine values 2000, 3720, 5361, 6924 .....?
From: brix24-ga on 28 Feb 2006 19:42 PST |
guyyy, This comment may be more for my benefit than yours. (Prior to your problem, I would have sworn - and probably will still swear - that I've never seen this type of problem before; but, then in one of the sites mentioned below, the author says he learned how to do this in the 7th to the 9th grade. Of course, he/she turns out to be a mathematician.) You asked for a web site having another example. I think that I have found some that may be what you want. I was aided greatly by the comments of others and by terms you used. Here is a site that does a good job of explaining the problem and how to tackle it: http://mathforum.org/library/drmath/view/53223.html A proof that the polynomial method works is given at: http://mathforum.org/library/drmath/view/56953.html Here is another site that goes through an example, but I prefer work-through in the first site listed above. http://www.math.ilstu.edu/day/courses/old/305/contentfinitedifferences.html The reason I mention this site is that the sequence used are tetrahedral numbers (more on this below). The key to finding these sites were two terms you used. The search I used was "finite differences" polynomial. I've heard of the term "finite differences" before, but I know that I've never had a course in it. Anyway, kottekoe's methods were also helpful to me in another way; they led me to search on "pascal's triangle" square which led to square numbers, then to tetrahedral numbers. I recognized these as the way to finish the incomplete solution I had in your first post. This gives a third way to solve the problem. Here is the formula I get when the formula for tetrahedral numbers is substituted for the series I had in my incomplete solution. (This formula has been adjusted to account for the use of both 2000 as the base number and 1800 as the starting number for the added part.) 200 + 1800*n - 80*n *(n-1)/2 +n(n-1)(n-2)/6 This is mathematically identical to what I get by the polynomial method listed by kottekoe (and in the sites listed above). I never was able to discern the "squares" in the second method listed by kottekoe (probably something obvious that I missed), but that forced me to searching that led me to the tetrahedral number solution. |
Subject:
Re: Formula to determine values 2000, 3720, 5361, 6924 .....?
From: berkeleychocolate-ga on 19 Mar 2006 20:46 PST |
The third differences are constant. So it is a cubic. Solving for the coefficients I get the nth term is 1/6*n^3 - 40*n^2 + 10559n/6 + 2000, where 2000 is the 0th term. |
Subject:
Re: Formula to determine values 2000, 3720, 5361, 6924 .....?
From: brix24-ga on 22 Mar 2006 05:27 PST |
berkeleychocolate-ga did not explicitly mention that the two solutions 200 + 1800*n - 80*n *(n-1)/2 +n(n-1)(n-2)/6 and 1/6*N^3 - 40*N^2 + 10559N/6 + 2000 give the same results (in case anyone's wondering). The forms of the formulas reflect their origins and their differences in numbering. The first formula uses n=1 in referring to the first result in the series (2000) while the second formula uses N=0 in referring to the first result in the series. The formulas can be interconverted by using n=N+1 (or N=n-1). |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |