Use your 6th Sense

Algebra Level 5

Find the coefficient of x 6 x^{6} in

( 1 2 x + 3 x 2 4 x 3 + 5 x 4 ) 3 . { (1-2x+3{ x }^{ 2 }-4{ x }^{ 3 }+5{ x }^{ 4 }) }^{ 3 }.


The answer is 369.

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.

2 solutions

Rajat De
Dec 16, 2014

A bruteforce approach can solve this problem easily


include<bits/stdc++.h>

using namespace std;

int main(){

int a[]={1,-2,3,-4,5};

int ans=0;

for(int i=0;i<5;i++){

    for(int j=0;j<5;j++){

        for(int k=0;k<5;k++){

            if(i+j+k==6){

                ans+=a[i]*a[j]*a[k];

            }

        }

    }

}

cout<<ans;

}

The unique products of powers that matter in this problem are those of the form that add up to the 6th power. Namely, ( 0 , 2 , 4 ) ( 0 , 3 , 3 ) ( 1 , 1 , 4 ) ( 1 , 2 , 3 ) ( 2 , 2 , 2 ) \\ \\ (0 , 2 , 4) \\ (0 , 3 , 3) \\ (1 , 1 , 4) \\ (1 , 2 , 3) \\ (2 , 2 , 2) \\

Each product repeats depending on the possible permutations.

0 , 2 , 4 3 different numbers, (3!/1!) = 6 permutations
0 , 3 , 3 2 different numbers,(3!/2!) = 3 permutations
1 , 1 , 4 2 different numbers, 3 permutations
1 , 2 , 3 3 different numbers, 6 permutations
2 , 2 , 2 1 number, 1 permutation

These are called permutations with repetition.

Then, only 5 products are to be calculated.

0 , 2 , 4 0, 2, 4 \rightarrow the coefficients product is ( 1 3 5 ) = 15 , (1 * 3 * 5) = 15, which is repeated 6 times 15 6 = 90 0 , 3 , 3 ( 1 4 4 ) = 16 , 16 3 = 48 1 , 1 , 4 ( 2 2 5 ) = 20 , 20 3 = 60 1 , 2 , 3 ( 2 3 4 ) = 24 , 24 6 = 144 2 , 2 , 2 ( 3 3 3 ) = 27 , 27 1 = 27 15 *6 = 90 \\ 0, 3, 3 \rightarrow (1 * -4 * -4) = 16, \qquad 16 * 3 = 48 \\ \\ 1, 1, 4 \rightarrow (-2 * -2 * 5) = 20, \qquad 20 * 3 = 60 \\ \\ 1, 2, 3 \rightarrow (-2 * 3 * -4) = 24, \qquad 24*6 = 144 \\ \\ 2, 2, 2 \rightarrow (3 * 3 * 3) = 27, \qquad 27 * 1 = 27 \\

So, the coefficient we look for is

90 + 48 + 60 + 144 + 27 = 369. 90 + 48 + 60 + 144 + 27 = 369.

Notice that this approach is valid for a harder problem of this type.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...