Plain simple combinatorics formula vs. using polynomials for counting the number of balls which can be picked...












1












$begingroup$


I am really confused by the usage of polynomials for counting problem, for instance :




Number of ways of picking $5$ balls from $5$ red, $5$ green, $5$ blue balls.



Condition : At least one of each colour has to be picked.




My approach for the above problem was quite simple, i.e. given the fact that at least one ball for each colour should be picked, we are left with $2$ more balls to be picked of any colour, so that would be: $${15-3choose 2} = {12choose 2} = 66$$



But, the source from where I am learning this course on Combinatorics had a different approach, here's a screenshot from the video where the instructor solved the given problem with the help of Polynomials, i.e. getting the coefficient of $x^5$ in the expansion of the given polynomial:



enter image description here



Clearly the solution I ended up with and the solution by the instructor are completely different. I have understood the solution of the instructor, but what I am still confused with is that I am not unable to understand where I want wrong with my approach?



Here is the link to the video










share|cite|improve this question









$endgroup$








  • 2




    $begingroup$
    You cannot use $binom{12}2$, because the balls are not distinct. All that matters is how many of each color you picked, not which particular ball you picked.
    $endgroup$
    – Mike Earnest
    Dec 3 '18 at 15:11






  • 1




    $begingroup$
    Given the answer, it's clear that the problem intends balls of the same color to be indistinguishable, although that's not always clear in the wording. The solution shown uses generating functions, but you can solve this particular problem by "stars and bars" as well. You want to know how many ways you can write 5 as an ordered sum of three positive integers (#red,#blue,#green). Imagine 5 blank balls inn a row, then place bars in 2 from the 4 gaps in between adjacent balls, which can be done in C(4,2)=6 ways. Color balls by red up to the first bar, blue between bars, etc.
    $endgroup$
    – Ned
    Dec 3 '18 at 15:54










  • $begingroup$
    @MikeEarnest and Ned really appreciate your help. And for anyone reading this, and would want to learn more about Stars and Bars approach, here's a video for you : youtube.com/watch?v=UTCScjoPymA
    $endgroup$
    – The Room
    Dec 4 '18 at 3:56


















1












$begingroup$


I am really confused by the usage of polynomials for counting problem, for instance :




Number of ways of picking $5$ balls from $5$ red, $5$ green, $5$ blue balls.



Condition : At least one of each colour has to be picked.




My approach for the above problem was quite simple, i.e. given the fact that at least one ball for each colour should be picked, we are left with $2$ more balls to be picked of any colour, so that would be: $${15-3choose 2} = {12choose 2} = 66$$



But, the source from where I am learning this course on Combinatorics had a different approach, here's a screenshot from the video where the instructor solved the given problem with the help of Polynomials, i.e. getting the coefficient of $x^5$ in the expansion of the given polynomial:



enter image description here



Clearly the solution I ended up with and the solution by the instructor are completely different. I have understood the solution of the instructor, but what I am still confused with is that I am not unable to understand where I want wrong with my approach?



Here is the link to the video










share|cite|improve this question









$endgroup$








  • 2




    $begingroup$
    You cannot use $binom{12}2$, because the balls are not distinct. All that matters is how many of each color you picked, not which particular ball you picked.
    $endgroup$
    – Mike Earnest
    Dec 3 '18 at 15:11






  • 1




    $begingroup$
    Given the answer, it's clear that the problem intends balls of the same color to be indistinguishable, although that's not always clear in the wording. The solution shown uses generating functions, but you can solve this particular problem by "stars and bars" as well. You want to know how many ways you can write 5 as an ordered sum of three positive integers (#red,#blue,#green). Imagine 5 blank balls inn a row, then place bars in 2 from the 4 gaps in between adjacent balls, which can be done in C(4,2)=6 ways. Color balls by red up to the first bar, blue between bars, etc.
    $endgroup$
    – Ned
    Dec 3 '18 at 15:54










  • $begingroup$
    @MikeEarnest and Ned really appreciate your help. And for anyone reading this, and would want to learn more about Stars and Bars approach, here's a video for you : youtube.com/watch?v=UTCScjoPymA
    $endgroup$
    – The Room
    Dec 4 '18 at 3:56
















1












1








1


2



$begingroup$


I am really confused by the usage of polynomials for counting problem, for instance :




Number of ways of picking $5$ balls from $5$ red, $5$ green, $5$ blue balls.



Condition : At least one of each colour has to be picked.




My approach for the above problem was quite simple, i.e. given the fact that at least one ball for each colour should be picked, we are left with $2$ more balls to be picked of any colour, so that would be: $${15-3choose 2} = {12choose 2} = 66$$



But, the source from where I am learning this course on Combinatorics had a different approach, here's a screenshot from the video where the instructor solved the given problem with the help of Polynomials, i.e. getting the coefficient of $x^5$ in the expansion of the given polynomial:



enter image description here



Clearly the solution I ended up with and the solution by the instructor are completely different. I have understood the solution of the instructor, but what I am still confused with is that I am not unable to understand where I want wrong with my approach?



Here is the link to the video










share|cite|improve this question









$endgroup$




I am really confused by the usage of polynomials for counting problem, for instance :




Number of ways of picking $5$ balls from $5$ red, $5$ green, $5$ blue balls.



Condition : At least one of each colour has to be picked.




My approach for the above problem was quite simple, i.e. given the fact that at least one ball for each colour should be picked, we are left with $2$ more balls to be picked of any colour, so that would be: $${15-3choose 2} = {12choose 2} = 66$$



But, the source from where I am learning this course on Combinatorics had a different approach, here's a screenshot from the video where the instructor solved the given problem with the help of Polynomials, i.e. getting the coefficient of $x^5$ in the expansion of the given polynomial:



enter image description here



Clearly the solution I ended up with and the solution by the instructor are completely different. I have understood the solution of the instructor, but what I am still confused with is that I am not unable to understand where I want wrong with my approach?



Here is the link to the video







combinatorics polynomials combinations generating-functions






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Dec 3 '18 at 15:05









The RoomThe Room

15017




15017








  • 2




    $begingroup$
    You cannot use $binom{12}2$, because the balls are not distinct. All that matters is how many of each color you picked, not which particular ball you picked.
    $endgroup$
    – Mike Earnest
    Dec 3 '18 at 15:11






  • 1




    $begingroup$
    Given the answer, it's clear that the problem intends balls of the same color to be indistinguishable, although that's not always clear in the wording. The solution shown uses generating functions, but you can solve this particular problem by "stars and bars" as well. You want to know how many ways you can write 5 as an ordered sum of three positive integers (#red,#blue,#green). Imagine 5 blank balls inn a row, then place bars in 2 from the 4 gaps in between adjacent balls, which can be done in C(4,2)=6 ways. Color balls by red up to the first bar, blue between bars, etc.
    $endgroup$
    – Ned
    Dec 3 '18 at 15:54










  • $begingroup$
    @MikeEarnest and Ned really appreciate your help. And for anyone reading this, and would want to learn more about Stars and Bars approach, here's a video for you : youtube.com/watch?v=UTCScjoPymA
    $endgroup$
    – The Room
    Dec 4 '18 at 3:56
















  • 2




    $begingroup$
    You cannot use $binom{12}2$, because the balls are not distinct. All that matters is how many of each color you picked, not which particular ball you picked.
    $endgroup$
    – Mike Earnest
    Dec 3 '18 at 15:11






  • 1




    $begingroup$
    Given the answer, it's clear that the problem intends balls of the same color to be indistinguishable, although that's not always clear in the wording. The solution shown uses generating functions, but you can solve this particular problem by "stars and bars" as well. You want to know how many ways you can write 5 as an ordered sum of three positive integers (#red,#blue,#green). Imagine 5 blank balls inn a row, then place bars in 2 from the 4 gaps in between adjacent balls, which can be done in C(4,2)=6 ways. Color balls by red up to the first bar, blue between bars, etc.
    $endgroup$
    – Ned
    Dec 3 '18 at 15:54










  • $begingroup$
    @MikeEarnest and Ned really appreciate your help. And for anyone reading this, and would want to learn more about Stars and Bars approach, here's a video for you : youtube.com/watch?v=UTCScjoPymA
    $endgroup$
    – The Room
    Dec 4 '18 at 3:56










2




2




$begingroup$
You cannot use $binom{12}2$, because the balls are not distinct. All that matters is how many of each color you picked, not which particular ball you picked.
$endgroup$
– Mike Earnest
Dec 3 '18 at 15:11




$begingroup$
You cannot use $binom{12}2$, because the balls are not distinct. All that matters is how many of each color you picked, not which particular ball you picked.
$endgroup$
– Mike Earnest
Dec 3 '18 at 15:11




1




1




$begingroup$
Given the answer, it's clear that the problem intends balls of the same color to be indistinguishable, although that's not always clear in the wording. The solution shown uses generating functions, but you can solve this particular problem by "stars and bars" as well. You want to know how many ways you can write 5 as an ordered sum of three positive integers (#red,#blue,#green). Imagine 5 blank balls inn a row, then place bars in 2 from the 4 gaps in between adjacent balls, which can be done in C(4,2)=6 ways. Color balls by red up to the first bar, blue between bars, etc.
$endgroup$
– Ned
Dec 3 '18 at 15:54




$begingroup$
Given the answer, it's clear that the problem intends balls of the same color to be indistinguishable, although that's not always clear in the wording. The solution shown uses generating functions, but you can solve this particular problem by "stars and bars" as well. You want to know how many ways you can write 5 as an ordered sum of three positive integers (#red,#blue,#green). Imagine 5 blank balls inn a row, then place bars in 2 from the 4 gaps in between adjacent balls, which can be done in C(4,2)=6 ways. Color balls by red up to the first bar, blue between bars, etc.
$endgroup$
– Ned
Dec 3 '18 at 15:54












$begingroup$
@MikeEarnest and Ned really appreciate your help. And for anyone reading this, and would want to learn more about Stars and Bars approach, here's a video for you : youtube.com/watch?v=UTCScjoPymA
$endgroup$
– The Room
Dec 4 '18 at 3:56






$begingroup$
@MikeEarnest and Ned really appreciate your help. And for anyone reading this, and would want to learn more about Stars and Bars approach, here's a video for you : youtube.com/watch?v=UTCScjoPymA
$endgroup$
– The Room
Dec 4 '18 at 3:56












1 Answer
1






active

oldest

votes


















1












$begingroup$

When dealing with counting problems you have to be very careful to use the correct construct; as was pointed out in a comment, using binomial coefficients implicitly assumes that each ball also has a number written on it to make it distinct from the others (in particular, distinct from the others of the same color), which is not what we are actually trying to count; you will find vastly over-inflated numbers by using binomial coefficients.



So what construct can you use for this problem? The best place to start is the Twelvefold way. Also in the comments is the correct interpretation of your problem (stars and bars), which you can find in the linked article (though there is difficulty with extremal cases of $n=0$).






share|cite|improve this answer









$endgroup$













    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3024177%2fplain-simple-combinatorics-formula-vs-using-polynomials-for-counting-the-number%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1












    $begingroup$

    When dealing with counting problems you have to be very careful to use the correct construct; as was pointed out in a comment, using binomial coefficients implicitly assumes that each ball also has a number written on it to make it distinct from the others (in particular, distinct from the others of the same color), which is not what we are actually trying to count; you will find vastly over-inflated numbers by using binomial coefficients.



    So what construct can you use for this problem? The best place to start is the Twelvefold way. Also in the comments is the correct interpretation of your problem (stars and bars), which you can find in the linked article (though there is difficulty with extremal cases of $n=0$).






    share|cite|improve this answer









    $endgroup$


















      1












      $begingroup$

      When dealing with counting problems you have to be very careful to use the correct construct; as was pointed out in a comment, using binomial coefficients implicitly assumes that each ball also has a number written on it to make it distinct from the others (in particular, distinct from the others of the same color), which is not what we are actually trying to count; you will find vastly over-inflated numbers by using binomial coefficients.



      So what construct can you use for this problem? The best place to start is the Twelvefold way. Also in the comments is the correct interpretation of your problem (stars and bars), which you can find in the linked article (though there is difficulty with extremal cases of $n=0$).






      share|cite|improve this answer









      $endgroup$
















        1












        1








        1





        $begingroup$

        When dealing with counting problems you have to be very careful to use the correct construct; as was pointed out in a comment, using binomial coefficients implicitly assumes that each ball also has a number written on it to make it distinct from the others (in particular, distinct from the others of the same color), which is not what we are actually trying to count; you will find vastly over-inflated numbers by using binomial coefficients.



        So what construct can you use for this problem? The best place to start is the Twelvefold way. Also in the comments is the correct interpretation of your problem (stars and bars), which you can find in the linked article (though there is difficulty with extremal cases of $n=0$).






        share|cite|improve this answer









        $endgroup$



        When dealing with counting problems you have to be very careful to use the correct construct; as was pointed out in a comment, using binomial coefficients implicitly assumes that each ball also has a number written on it to make it distinct from the others (in particular, distinct from the others of the same color), which is not what we are actually trying to count; you will find vastly over-inflated numbers by using binomial coefficients.



        So what construct can you use for this problem? The best place to start is the Twelvefold way. Also in the comments is the correct interpretation of your problem (stars and bars), which you can find in the linked article (though there is difficulty with extremal cases of $n=0$).







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Dec 3 '18 at 16:07









        ImNotTheSaxManImNotTheSaxMan

        1172




        1172






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3024177%2fplain-simple-combinatorics-formula-vs-using-polynomials-for-counting-the-number%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to change which sound is reproduced for terminal bell?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Can I use Tabulator js library in my java Spring + Thymeleaf project?