How many polynomials P ( x ) are there such that the coefficients of P ( x ) are integers from 0 to 24 (inclusive) and P ( 5 ) = 1 2 0 0 ?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Can you explain how you came up with the generating function? (As in I don't really understand what that function represents) Thanks!
Log in to reply
Let's say we want to make a sum of 1 0 using exactly one element from each of the following two sets: { 2 , 3 , 6 , 7 } and { 3 , 4 , 5 , 8 } .
Consider the two polynomials x 2 + x 3 + x 6 + x 7 and x 3 + x 4 + x 5 + x 8 . Note that the coefficient of x n is the number of ways of making a sum of n using one element from the first set for the first polynomial, and similarly for the second. The coefficient of x 4 in the second polynomial is 1 , and there is 1 way of making a sum of 4 using only one element from the second set.
Now consider the product of the polynomials: ( x 2 + x 3 + x 6 + x 7 ) ( x 3 + x 4 + x 5 + x 8 )
Before we expand it out, let us consider what the coefficient of x n means in this new polynomial: it represents the number of ways of making a sum of n taking exactly one number from each set. Let us expand it out: ( x 2 + x 3 + x 6 + x 7 ) ( x 3 + x 4 + x 5 + x 8 ) = x 5 + 2 x 6 + 2 x 7 + x 8 + x 9 + 3 x 1 0 + 3 x 1 1 + x 1 2 + x 1 4 + x 1 5
Note that the coefficient of x n is 0 for n > 1 5 , since we cannot make a sum greater than 1 5 using one from each set. The same goes for n < 5 .
When n = 1 0 , the coefficient is 3 . This means that there are 3 ways of making 1 0 . If we had expanded the product fully using the distributive formula, we would see that the three x 1 0 terms came from the products of x 2 with x 8 , x 6 with x 4 , and x 7 with x 3 .
The idea of attaching meaning the coefficient of x n without attaching any meaning at all to x is the idea of a generating function. Generating functions are simply polynomials in this meaningless x , finite or infinite, for which the interesting part is the coefficients.
Although they were unhelpful in this case, since we could have simply counted the number of ways of making 1 0 by inspection, they are incredibly more useful if the polynomials may be expressed in a more compact form (such as using the geometric series sum), and then multiplication may lead to cancellation and an easier calculation, as Logan D. so beautifully demonstrated here.
Log in to reply
Thank you, I understand the generating functions now :) But I am still confused on the part x 1 − 1 x 2 5 × 5 k − 1 x 5 − 1 x 2 5 × 5 × 5 k − 1 . Why is there an addition of 5 k now from the previous equation? Also, how is the above expression same as ( 1 + x + x 2 + . . . ) ( 1 + x 5 + x 2 5 + . . . ) ? Thanks!
Log in to reply
@Fan Zhang – The genfunc for each part looks like 1 + x n + x 2 n + ⋯ + x 2 4 n , which is rewritten as a quotient of polynomials. The parts all have n equal to a power of 5 , since P ( x ) 's coefficients are being multiplied by powers of 5 . Notice, however, that there are infinitely many parts: we may have up to 2 4 of any positive power (even if it is clear that we cannot have 5 5 , all that means is that that part of the genfunc will contribute 1 and a bunch of terms well above 1 2 0 0 ).
This infinite product of polynomials has the following form: ( x − 1 a 1 ) ( x 5 − 1 a 2 ) ( a 1 a 3 ) ( a 2 a 4 ) ⋯
Note the massive cancellation: if we were to halt this sum when the numerator is a n , then all numerators but a n − 1 and a n would cancel with all denominators but x − 1 and x 5 − 1 .
Since the infinite limit is the same as taking the finite case extended infinitely, it is simply the terms a k and a k + 1 (evidently he used k instead of n for indexing here) divided by the first denominators, in the limit as k goes to infinity! The k came from showing how the product would look like in the finite case; it is an intermediate step.
Before taking that limit, the quotient would represent the product of finite geometric series with common ratios x and x 5 . In the infinite limit, the quotients become infinite geometric series. The second polynomial seems like it should be multiples of 5 , not powers of 5 . I believe that was an error in uploading the solution instead of finding it, since his statement immediately afterward implies that he is adding multiples of 1 and 5 , not multiples of 1 and powers of 5 .
Hope this helps.
Log in to reply
@Alexander Bourzutschky – Great explanation! Would you be interested in converting your comments into a writeup which we can post on the techniques page?
Log in to reply
@Calvin Lin – It is a great honor, but I don't feel that comfortable making a full writeup of it all. You may take my words freely, if you wish.
@Alexander Bourzutschky – Thank you Alexander B.! :) your explanation really clear things up for me :)
@Alexander Bourzutschky – Oh thank you so much for clearing up my mistake (As well as the wonderful write up, I'm not surprised in the least that the staff is offering you the opportunity to formally publish a write up.)
But yes, it should have read ( 1 + x + x 2 + x 3 + . . . ) ( 1 + x 5 + x 1 0 + x 1 5 + . . . ) This is because we know we can factorize x n − 1 into ( x − 1 ) ( 1 + x + x 2 + . . . + x n − 1 ) If we divide both sides by ( x − 1 ) and replace x with x 5 we see that x 5 − 1 x 5 n − 1 = 1 + x 5 + x 1 0 + . . . + x 5 ( n − 1 ) By taking n → ∞ we arrive at the infinite sum 1 + x 5 + x 1 0 + . . .
Excellent explanation! Thank you!
Since 5 5 > 1 2 0 0 we only need to consider polynomials of degree at most 4 .
P ( x ) = a 4 x 4 + a 3 x 3 + a 2 x 2 + a 1 x + a 0 , and then set x = 5 and rearrange.
We can write P ( 5 ) = 1 2 0 0 as 1 2 0 0 = ( a 4 2 5 2 + a 2 2 5 + a 0 ) + 5 ( a 3 2 5 + a 1 ) = c + 5 d
where c represented in base 2 5 has digits a 4 a 2 a 0 , and d has digits a 3 a 1 .
So there is a bijection between pairs { c , d } and polynomials P with coefficients that are valid digits in base 2 5 .
Since d can range from 0 to 2 4 0 , and for each d there is exactly one c such that 1 2 0 0 = c + 5 d , there are 2 4 1 possible polynomials.
Ingenious. I'm completely flattered.
What's the motivation for using base 25 and finding the bijection?
Log in to reply
It occurred to me when all the coefficients were restricted to being 0-24, and bearing in mind that the place-value system is a polynomial that can go on forever in both directions
Log in to reply
What do you mean by
the place-value system is a polynomial that can go on forever in both directions ?
WOW!!!
Typo noticed just after submitting (as usual!), a 2 should read a 2 .
Also, I could have added an extra line of working before my first line: P ( x ) = a 4 x 4 + a 3 x 3 + a 2 x 2 + a 1 x + a 0 , and then set x = 5 and rearrange.
Log in to reply
Updated. Please check.
Log in to reply
Thanks. The language could probably read a bit more smoothly , e.g. take out the "We can write" line, but I'm sure everyone reading it will understand.
Nice!
Genius
How will u prove that fir that value of c , ur coefficients will have integral solution and that too unique
Log in to reply
Are you asking how to get the a i values from the c ? If so then you write c in base 25. My solution relies on the fact there is a unique way to write an integer in a given base.
Just to pick a random example, let's say d = 3 9 . Then c = 1 0 0 5 . Writing those in base 25 are { 1 , 1 4 } and { 1 , 1 5 , 5 } respectively. So the polynomial is ( x 4 + 1 5 x 2 + 5 ) + ( x 3 + 1 4 x ) .
What happens when d is negative? Isn't "d = -1, c = 1205" also a solution?
Log in to reply
That would require 2 5 a 3 + a 1 = − 1 which would mean a negative coefficient. But they were specified as being in the range 0 to 24.
How is the maximum value of d equal to 2 4 0 ?
Log in to reply
Because c + 5 d = 1 2 0 0 and c , d are non-negative integers. If d = 2 4 0 then c = 0 , and of d > 2 4 0 there is no value for c .
They are non-negative because they are equal to polynomials with non-negative coefficients and 5 as the parameter.
What does valid in the base 25 mean??
Log in to reply
By "valid digit in base 25" I mean a value from 0 to 24. (similar to how 0-9 are the digits in base 10).
Can you explain why you only need to count d and not c? Ie why there is only 1 c for every d??
Write P ( x ) as
P ( x ) = ∑ k = 0 ∞ ( a k + 5 b k ) x k
for some sequences a k , b k ∈ { 0 , 1 , 2 , 3 , 4 } (only finitely many of which are non-zero). Then P ( 5 ) = 1 2 0 0 means that a 0 = 0 and
2 4 0 = ∑ k = 1 ∞ a k 5 k − 1 + ∑ k = 0 ∞ b k 5 k
Now notice that for each N ∈ { 0 , 1 , . . . , 2 4 0 } the equations:
∑ k = 1 ∞ a k 5 k − 1 = N
∑ k = 0 ∞ b k 5 k = 2 4 0 − N
each have one unique solution. (Just consider the base- 5 representations of N and 2 4 0 − N .) Hence, the total number of polynomials is ∣ { 0 , . . . , 2 4 0 } ∣ = 2 4 1 .
When speaking of a polynomial P , let's denote its coefficients with p i . Let's denote the number of polynomials P ( x ) such that P ( 5 ) = a with C ( a ) . Obviously, for 0 ≤ a < 5 , C ( a ) = 1 (the only such polynomial is P ( x ) = a ).
For a > 5 , 5 ∣ ( P ( 5 ) − p 0 ) , therefore P ( 5 ) ≡ p 0 m o d 5 . Hence, C ( a ) = ∑ 0 ≤ i ≤ 2 4 w h e r e i ≡ a m o d 5 C ( 5 a − i ) (such polynomials have form P ( x ) = i + x ∗ P ′ ( x ) ).
Using this, we can easily calculate pretty much any value of C . Here are the ones we need:
C ( 5 ) = C ( 5 5 − 0 ) + C ( 5 5 − 5 ) = C ( 0 ) + C ( 1 ) = 2
C ( 6 ≤ a ≤ 9 ) = C ( 0 ) + C ( 1 ) = 2
C ( 4 3 ) = C ( 4 4 ) = C ( 8 ) + C ( 7 ) + C ( 6 ) + C ( 5 ) + C ( 4 ) = 9
C ( 4 5 ) = C ( 4 6 ) = C ( 4 7 ) = C ( 9 ) + C ( 8 ) + C ( 7 ) + C ( 6 ) + C ( 5 ) = 1 0
C ( 2 3 6 ≤ a ≤ 2 3 9 ) = C ( 4 7 ) + C ( 4 6 ) + C ( 4 5 ) + C ( 4 4 ) + C ( 4 3 ) = 4 9
C ( 2 4 0 ) = C ( 4 8 ) + C ( 4 7 ) + C ( 4 6 ) + C ( 4 5 ) + C ( 4 4 ) = 4 9
C ( 1 2 0 0 ) = C ( 2 4 0 ) + C ( 2 3 9 ) + C ( 2 3 8 ) + C ( 2 3 7 ) + C ( 2 3 6 ) = 2 4 1
We know that maximum degree of polynomial can be 4 and minimum 3...Let the polynomial be ax^4 + bx^3 + cx^2 + dx+e.(e is always 0,5,10,15 or 20) With this in the mind we do it for two cases.. first one when degree=4 that is. a=1 then 125b+25c+5d+e=575(for x=5)
now keeping b=0,1,2,3,4 we get 25c+5d+e=575,450,325,200,75 respectively.
now taking each case individually . we get total (25+25+25+25+16) =116 solutions.
Which can be obtained easily. As we know that maximum value of 5d+e can be 125 only as it has to be a multiple of 25 (so it cant be 130 to 140) taking maximum value of c=23 then 5d+e=0 , similarly for (c=22 to 18) 5d+e varies from 125 to 25. for 5d+e=125(for d,e=(24,5),(23,10),(22,15),(21.20) .
for 5d+e=100(d,e=(20,0),19,5),(18,10),(17,15),(16,20) .
similarly for 5d+e=(75,50,25) gives 5 solutions each.
which in total giving (5into4 +4 +1=25) solutions..
similarly for b=1,2,3,4 25c+5d+e=450,325,200 gives 25 solutions each.
and for last case 75 gives16 solutions . as 5d+e=75,50,25 only.. each giving 5 solutions like before. and 1 more comes when 5d+e=0.totaling 5into3+1=16 solutions
so in total (25+25+25+25+16) =116 solutions.
now for case two we keep a=0 and degree 3 then minimum value of b=4 as 25c+5d+e has maximum value 744.. so for b=4 25c+5d+e=700 for c=23 5d+e=125 has 4 solutions and c=22 5d+e=100 gives 5 solutions.. and now for b=5 25c+5d+e=575 same as case 1 which gives again 116 solutions. so in all we have 116into2 +5+4=241 solutions..
First observe that the degree of P ( x ) is either 3 or 4 . Case 1: Let P ( x ) = a x 3 + b x 2 + c x + d where a , b , c , d lie in the given range, and a = 0 .
P ( 5 ) = 1 2 0 0 = 2 5 ⋅ 4 8 = 1 2 5 a + 2 5 b + 5 c + d
We note that since LHS is a multiple of 2 5 so must be LHS. Thus, it follows that 5 c + d must be a multiple of 2 5 . 0 ≤ 5 c + d ≤ 1 4 4 ⇒ 5 c + d ∈ ( 0 , 2 5 , 5 0 , 7 5 , 1 0 0 , 1 2 5 ) We further note that d is a multiple of 5 . Let d = 5 k . Then, 0 ≤ k ≤ 4 . c + k ∈ ( 0 , 5 , 1 0 , 1 5 , 2 0 , 2 5 ) Now, its easy to spot that we have 5 solutions to all except when c + k = 0 , and c + k = 2 5 . For c + k = 0 there is a just 1 solution, and 4 solutions when c + k = 2 5 , since c < 2 5 ⇒ k = 0 in this particular case.
We now establish that 2 5 ( 5 a + b ) ∈ ( 1 2 0 0 , 1 1 7 5 , 1 1 5 0 , 1 1 2 5 , 1 1 0 0 , 1 0 7 5 ) ( 5 a + b ) ∈ ( 4 8 , 4 7 , 4 6 , 4 5 , 4 4 , 4 3 ) Via modular arithmetic or simple reasoning, we have that b ∈ ( 5 t + 3 , 5 t + 2 , 5 t + 1 , 5 t , 5 t + 4 , 5 t + 3 ) for the the above cases, respectively. Hence, ( a + t ) ∈ ( 9 , 9 , 9 , 9 , 8 , 8 ) . Clearly , 0 ≤ t ≤ 4 satisfies all the cases. 5 solutions exist in each case, which can easily be checked. Thus number of solutions in this case: = 5 ⋅ 1 + 4 ⋅ 5 2 + 4 ⋅ 5 = 1 2 5 .
Case 2: P ( x ) = a x 4 + b x 3 + c x 2 + d x + e P ( 5 ) = 2 5 ⋅ 4 8 = 6 2 5 a + 1 2 5 b + 2 5 c + 5 d + e = 1 2 0 0 Note that 6 2 5 a ≤ 1 2 0 0 ⇒ a = 1 1 2 5 b + 2 5 c + 5 d + e = 5 7 5 An analogous argument as in the previous case, tell us that we have 5 d + e ∈ ( 0 , 2 5 , 5 0 , 7 5 , 1 0 0 , 1 2 5 ) .We already know the number of solutions for each case here.
And then we have : 5 b + c ∈ ( 2 3 , 2 2 , 2 1 , 2 0 , 1 9 , 1 8 ) - 5 b + c = 2 3 , 2 2 , 2 1 , 2 0 ---> 0 ≤ b ≤ 4 ----> 5 solutions for each. - 5 b + c = 1 9 , 1 8 ---> 0 ≤ b ≤ 3 ----> 4 solutions for each.
Total solutions in this case : = 5 ⋅ 1 + 3 ( ⋅ 5 2 ) + 4 ⋅ 5 + 5 ⋅ 4 = 1 1 6
TOTAL number of solutions : = 2 4 1
Nicely held out of basic facts!
Consider the polynomials f ( x ) = 1 + x + x 2 + . . . + x 2 4 and g ( x ) = 1 + x + x 2 + . . . + x 5 .
The problem is asking us to find the coefficient of x 1 2 0 0 in the expansion f ( x ) f ( x 5 ) f ( x 2 5 ) f ( x 1 2 5 ) . . .
Note that we have the factorization f ( x ) = g ( x ) g ( x 5 ) . Thus, we want to compute the coefficent of x 1 2 0 0 in ( g ( x ) g ( x 5 ) g ( x 2 5 ) . . . ) ( g ( x 5 ) g ( x 2 5 ) . . . ) .
However, since every number has a unique base five expression, we have g ( x ) g ( x 5 ) g ( x 2 5 ) . . . = 1 + x + x 2 + x 3 + . . . = 1 − x 1 .
Substituting in to the earlier expression, we want the coefficient of x 1 2 0 0 in 1 − x 1 ⋅ 1 − x 5 1 which upon expansion is clearly [ 5 1 2 0 0 ] + 1 = 2 4 1 .
Problem Loading...
Note Loading...
Set Loading...
Our polynomial is P ( x ) = a 0 + a 1 x + a 2 x 2 + … such that for each a i we have 0 ≤ a i ≤ 2 4 . We are looking for polynomials such that P ( 5 ) = a 0 + a 1 5 + a 2 2 5 + ⋯ = 1 2 0 0 . This problem is equivalent to finding the number of unordered partitions of 1200 into parts of size 5 k for some non-negative integer k such that each part occurs no more than 24 times. We proceed with generating functions.
The Generating function for parts of size n that don't appear more than 24 times is 1 + x n + x 2 n + ⋯ + x 2 4 n , which we can rewrite as
x n − 1 x 2 5 n − 1
Thus, we are looking for the coefficient of x 1 2 0 0 in
x 1 − 1 x 2 5 × 1 − 1 x 5 − 1 x 2 5 × 5 − 1 x 2 5 − 1 x 2 5 × 2 5 − 1 x 1 2 5 − 1 x 2 5 × 1 2 5 − 1 ⋯
Notice that the numerator of the n t h term cancels with the denominator of the ( n + 2 ) t h term, so we are left with
x 1 − 1 x 2 5 × 5 k − 1 x 5 − 1 x 2 5 × 5 × 5 k − 1
as k → ∞ .
This is the same as
( 1 + x + x 2 + … ) ( 1 + x 5 + x 2 5 + … )
Since we want to find the coefficient of x 1 2 0 0 in the previous expression, our problem now is to find the number of ordered pairs ( a , b ) such that a + 5 b = 1 2 0 0 , which is far easier to work with.
Since each choice for b uniquely determines a valid a and we can choose b on [ 0 , 2 4 0 ] , we have 241 solutions, and as a result, 241 distinct polynomials P ( x ) . So our answer is 2 4 1