I have 3 pieces of candy to place in 4 lunch boxes. In how many ways can I do this if…












1












$begingroup$


I am a middle school student, so it would be super helpful if anyone could explain this problem with simple words. I was able to do (a) and (b), but I got stuck on (c) and onwards.



For (c), I think there are three general cases, 3-0-0-0, 2-1-0-0, and 1-1-1-0. For 3-0-0-0, I know there would be 4 ways, because the 3 candies could go into any of the 4 boxes. I don't know how to tackle the other two cases, though.



I have 3 pieces of candy to place in 4 lunch boxes. In how many ways can I do this if:



(a) The candies are all different and the lunch boxes are all different?



(b) The candies are all the same and the lunch boxes are all the same?



(c) The candies are all the same and the lunch boxes are all different?



(d) The candies are all different and the lunch boxes are all the same?



(e) Exactly two of the candies are the same (but the third is different) and all of the lunch boxes are different?










share|cite|improve this question











$endgroup$












  • $begingroup$
    Hint: when the candies are all the same, you’re just looking for sets of non-negative integers that add up to 3.
    $endgroup$
    – G Tony Jacobs
    Mar 19 '18 at 2:31










  • $begingroup$
    @GTonyJacobs it can be also expressed in binary, ways of forming a 4 digits number from 1 and 0 with 3 occurences of 1 at max.
    $endgroup$
    – Abr001am
    Mar 19 '18 at 2:50


















1












$begingroup$


I am a middle school student, so it would be super helpful if anyone could explain this problem with simple words. I was able to do (a) and (b), but I got stuck on (c) and onwards.



For (c), I think there are three general cases, 3-0-0-0, 2-1-0-0, and 1-1-1-0. For 3-0-0-0, I know there would be 4 ways, because the 3 candies could go into any of the 4 boxes. I don't know how to tackle the other two cases, though.



I have 3 pieces of candy to place in 4 lunch boxes. In how many ways can I do this if:



(a) The candies are all different and the lunch boxes are all different?



(b) The candies are all the same and the lunch boxes are all the same?



(c) The candies are all the same and the lunch boxes are all different?



(d) The candies are all different and the lunch boxes are all the same?



(e) Exactly two of the candies are the same (but the third is different) and all of the lunch boxes are different?










share|cite|improve this question











$endgroup$












  • $begingroup$
    Hint: when the candies are all the same, you’re just looking for sets of non-negative integers that add up to 3.
    $endgroup$
    – G Tony Jacobs
    Mar 19 '18 at 2:31










  • $begingroup$
    @GTonyJacobs it can be also expressed in binary, ways of forming a 4 digits number from 1 and 0 with 3 occurences of 1 at max.
    $endgroup$
    – Abr001am
    Mar 19 '18 at 2:50
















1












1








1





$begingroup$


I am a middle school student, so it would be super helpful if anyone could explain this problem with simple words. I was able to do (a) and (b), but I got stuck on (c) and onwards.



For (c), I think there are three general cases, 3-0-0-0, 2-1-0-0, and 1-1-1-0. For 3-0-0-0, I know there would be 4 ways, because the 3 candies could go into any of the 4 boxes. I don't know how to tackle the other two cases, though.



I have 3 pieces of candy to place in 4 lunch boxes. In how many ways can I do this if:



(a) The candies are all different and the lunch boxes are all different?



(b) The candies are all the same and the lunch boxes are all the same?



(c) The candies are all the same and the lunch boxes are all different?



(d) The candies are all different and the lunch boxes are all the same?



(e) Exactly two of the candies are the same (but the third is different) and all of the lunch boxes are different?










share|cite|improve this question











$endgroup$




I am a middle school student, so it would be super helpful if anyone could explain this problem with simple words. I was able to do (a) and (b), but I got stuck on (c) and onwards.



For (c), I think there are three general cases, 3-0-0-0, 2-1-0-0, and 1-1-1-0. For 3-0-0-0, I know there would be 4 ways, because the 3 candies could go into any of the 4 boxes. I don't know how to tackle the other two cases, though.



I have 3 pieces of candy to place in 4 lunch boxes. In how many ways can I do this if:



(a) The candies are all different and the lunch boxes are all different?



(b) The candies are all the same and the lunch boxes are all the same?



(c) The candies are all the same and the lunch boxes are all different?



(d) The candies are all different and the lunch boxes are all the same?



(e) Exactly two of the candies are the same (but the third is different) and all of the lunch boxes are different?







combinatorics combinations






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Mar 19 '18 at 3:01







starsinajar

















asked Mar 19 '18 at 2:29









starsinajarstarsinajar

787




787












  • $begingroup$
    Hint: when the candies are all the same, you’re just looking for sets of non-negative integers that add up to 3.
    $endgroup$
    – G Tony Jacobs
    Mar 19 '18 at 2:31










  • $begingroup$
    @GTonyJacobs it can be also expressed in binary, ways of forming a 4 digits number from 1 and 0 with 3 occurences of 1 at max.
    $endgroup$
    – Abr001am
    Mar 19 '18 at 2:50




















  • $begingroup$
    Hint: when the candies are all the same, you’re just looking for sets of non-negative integers that add up to 3.
    $endgroup$
    – G Tony Jacobs
    Mar 19 '18 at 2:31










  • $begingroup$
    @GTonyJacobs it can be also expressed in binary, ways of forming a 4 digits number from 1 and 0 with 3 occurences of 1 at max.
    $endgroup$
    – Abr001am
    Mar 19 '18 at 2:50


















$begingroup$
Hint: when the candies are all the same, you’re just looking for sets of non-negative integers that add up to 3.
$endgroup$
– G Tony Jacobs
Mar 19 '18 at 2:31




$begingroup$
Hint: when the candies are all the same, you’re just looking for sets of non-negative integers that add up to 3.
$endgroup$
– G Tony Jacobs
Mar 19 '18 at 2:31












$begingroup$
@GTonyJacobs it can be also expressed in binary, ways of forming a 4 digits number from 1 and 0 with 3 occurences of 1 at max.
$endgroup$
– Abr001am
Mar 19 '18 at 2:50






$begingroup$
@GTonyJacobs it can be also expressed in binary, ways of forming a 4 digits number from 1 and 0 with 3 occurences of 1 at max.
$endgroup$
– Abr001am
Mar 19 '18 at 2:50












4 Answers
4






active

oldest

votes


















2












$begingroup$

a) If the candies are all different, and so are the lunch boxes, then placing each candy in each box affects which outcome we get. Each candy has four lunch boxes to choose from, and there are three candies, making the number of possible choices
$4 times 4 times 4 = 64.$



b) If the candies are the same and the lunch boxes are the same, then the possibilities are threefold: all the candy is in one box, two candies are in one and one is in another, or all three candies are in different boxes. The total number of possibilities is
$$3.$$



c) If the candies are the same and the lunch boxes are all different, then there are cases, which are the three possibilities from b):



i) One box holds all three candies. In this case, there are $4$ boxes to choose from.



ii) One box holds two, another holds one. In this case, we have $4$ boxes to choose from putting the two in, and $3$ remaining boxes to choose to put the remaining one in. So, in total, this gives us $12$ possibilities.



iii) Each candy lies in a different box. In that case, since the candies are all identical, this means we are just choosing a box to not contain anything. We can choose our empty boxes in $4$ ways.



In total, the number of choices are
$$4 + 12 + 4 = 20.$$



d) If the candies are different and the lunch boxes are the same, then again, we tackle this with cases:



i) The first case, with $1$ possibility, is that all three candies are in the same box.



ii) Two candies could be in one box, and one in the other. Since the candies are now different, there are $3$ ways to do this, as we have three ways to choose the lone candy.



iii) All three candies are in separate boxes. Since the boxes are indistinct, there is $1$ way to do this.



Thus, the number of ways to do this is
$$1 + 3 + 1 = 5.$$



e) We do this in two steps: choose where the different candy goes, then choose where the same candies go. Note that these processes are totally independent, in that doing one first does not change the number of ways we can do the other. By choosing the different candy to go in one of the $4$ possible boxes, the boxes become no more or less distinct than they did previously.



Then, the question becomes, how many ways can we put two identical candies in four similar boxes? The answer becomes similar to c): we use cases.



i) Both candies are in the same box. There are $4$ boxes to choose from.



ii) The candies line in different boxes. We can choose one of the $4$ boxes first to host one candy, then one of the remaining $3$ to host the other.



This produces a total of $4 + 4 times 3 = 16$. Putting in our initial choice of box for our distinct candy, we get
$$4 times 16 = 64$$
possibilities.






share|cite|improve this answer











$endgroup$





















    1












    $begingroup$


    I have $3$ pieces of candy to place in $4$ lunch boxes. In how many ways can I do this if the candies are all the same and the lunch boxes are all different?




    Method 1: You have correctly identified the possible cases:




    1. Three candies are placed in a single box: There are four ways to choose the box.

    2. Two candies are placed in one box and the third candy is placed in a different box: There are $4$ ways to select the box which will receive two candies and three ways to choose which of the remaining boxes will receive the remaining candy. Hence, there are $4 cdot 3 = 12$ such distributions.

    3. One candy is placed in each of three boxes: There are four ways to select the empty box.


    Hence, there are a total of $4 + 12 + 4 = 20$ such distributions.



    Method 2: Let $x_k$ be the number of candies placed in the $k$th box. Then
    $$x_1 + x_2 + x_3 + x_4 = 3 tag{1}$$
    Equation 1 is an equation in the nonnegative integers. A particular solution of equation 1 corresponds to the placement of three addition signs in a row of three ones. For instance,
    $$1 + + 1 1 +$$
    corresponds to the solution $x_1 = 1$, $x_2 = 0$, $x_3 = 2$, $x_4 = 0$. The number of such solutions is
    $$binom{3 + 3}{3} = binom{6}{3} = 20$$
    since we must choose which three of the six positions required for three ones and three addition signs will be filled with addition signs.






    share|cite|improve this answer









    $endgroup$





















      1












      $begingroup$

      Divide and conquer, and you are already almost there. For 2-1-0-0, there are four places the two candies could go. For each of these possibilities, there are three places the remaining candy could go. For your 1-1-1-0 situation, think of this in terms of which box gets no candies.






      share|cite|improve this answer









      $endgroup$













      • $begingroup$
        For (d), since all the candies are different, it matters where each one is. So each candy could be in its own box, all three could be in one box, Candy A could be in one box and candies B&C in another,,,, etc.
        $endgroup$
        – Grant M
        Mar 19 '18 at 2:52



















      -1












      $begingroup$

      Exactly two of the candies are the same (but the third is different) and all of the lunch boxes are different?



      All in 1 4ways



      2 the same in 1 box and the odd one in another 4*3=12



      2 different in 1 box and the other in another 4*3=12



      all in different boxes 4C2*2 = 6*2=12ways



      4+12+12+12 = 40ways



      From web 2.0 calc
      BTW the answer in your last part is wrong I think so because in ii) you have to also consider the different candy.






      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%2f2698175%2fi-have-3-pieces-of-candy-to-place-in-4-lunch-boxes-in-how-many-ways-can-i-do-th%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        4 Answers
        4






        active

        oldest

        votes








        4 Answers
        4






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        2












        $begingroup$

        a) If the candies are all different, and so are the lunch boxes, then placing each candy in each box affects which outcome we get. Each candy has four lunch boxes to choose from, and there are three candies, making the number of possible choices
        $4 times 4 times 4 = 64.$



        b) If the candies are the same and the lunch boxes are the same, then the possibilities are threefold: all the candy is in one box, two candies are in one and one is in another, or all three candies are in different boxes. The total number of possibilities is
        $$3.$$



        c) If the candies are the same and the lunch boxes are all different, then there are cases, which are the three possibilities from b):



        i) One box holds all three candies. In this case, there are $4$ boxes to choose from.



        ii) One box holds two, another holds one. In this case, we have $4$ boxes to choose from putting the two in, and $3$ remaining boxes to choose to put the remaining one in. So, in total, this gives us $12$ possibilities.



        iii) Each candy lies in a different box. In that case, since the candies are all identical, this means we are just choosing a box to not contain anything. We can choose our empty boxes in $4$ ways.



        In total, the number of choices are
        $$4 + 12 + 4 = 20.$$



        d) If the candies are different and the lunch boxes are the same, then again, we tackle this with cases:



        i) The first case, with $1$ possibility, is that all three candies are in the same box.



        ii) Two candies could be in one box, and one in the other. Since the candies are now different, there are $3$ ways to do this, as we have three ways to choose the lone candy.



        iii) All three candies are in separate boxes. Since the boxes are indistinct, there is $1$ way to do this.



        Thus, the number of ways to do this is
        $$1 + 3 + 1 = 5.$$



        e) We do this in two steps: choose where the different candy goes, then choose where the same candies go. Note that these processes are totally independent, in that doing one first does not change the number of ways we can do the other. By choosing the different candy to go in one of the $4$ possible boxes, the boxes become no more or less distinct than they did previously.



        Then, the question becomes, how many ways can we put two identical candies in four similar boxes? The answer becomes similar to c): we use cases.



        i) Both candies are in the same box. There are $4$ boxes to choose from.



        ii) The candies line in different boxes. We can choose one of the $4$ boxes first to host one candy, then one of the remaining $3$ to host the other.



        This produces a total of $4 + 4 times 3 = 16$. Putting in our initial choice of box for our distinct candy, we get
        $$4 times 16 = 64$$
        possibilities.






        share|cite|improve this answer











        $endgroup$


















          2












          $begingroup$

          a) If the candies are all different, and so are the lunch boxes, then placing each candy in each box affects which outcome we get. Each candy has four lunch boxes to choose from, and there are three candies, making the number of possible choices
          $4 times 4 times 4 = 64.$



          b) If the candies are the same and the lunch boxes are the same, then the possibilities are threefold: all the candy is in one box, two candies are in one and one is in another, or all three candies are in different boxes. The total number of possibilities is
          $$3.$$



          c) If the candies are the same and the lunch boxes are all different, then there are cases, which are the three possibilities from b):



          i) One box holds all three candies. In this case, there are $4$ boxes to choose from.



          ii) One box holds two, another holds one. In this case, we have $4$ boxes to choose from putting the two in, and $3$ remaining boxes to choose to put the remaining one in. So, in total, this gives us $12$ possibilities.



          iii) Each candy lies in a different box. In that case, since the candies are all identical, this means we are just choosing a box to not contain anything. We can choose our empty boxes in $4$ ways.



          In total, the number of choices are
          $$4 + 12 + 4 = 20.$$



          d) If the candies are different and the lunch boxes are the same, then again, we tackle this with cases:



          i) The first case, with $1$ possibility, is that all three candies are in the same box.



          ii) Two candies could be in one box, and one in the other. Since the candies are now different, there are $3$ ways to do this, as we have three ways to choose the lone candy.



          iii) All three candies are in separate boxes. Since the boxes are indistinct, there is $1$ way to do this.



          Thus, the number of ways to do this is
          $$1 + 3 + 1 = 5.$$



          e) We do this in two steps: choose where the different candy goes, then choose where the same candies go. Note that these processes are totally independent, in that doing one first does not change the number of ways we can do the other. By choosing the different candy to go in one of the $4$ possible boxes, the boxes become no more or less distinct than they did previously.



          Then, the question becomes, how many ways can we put two identical candies in four similar boxes? The answer becomes similar to c): we use cases.



          i) Both candies are in the same box. There are $4$ boxes to choose from.



          ii) The candies line in different boxes. We can choose one of the $4$ boxes first to host one candy, then one of the remaining $3$ to host the other.



          This produces a total of $4 + 4 times 3 = 16$. Putting in our initial choice of box for our distinct candy, we get
          $$4 times 16 = 64$$
          possibilities.






          share|cite|improve this answer











          $endgroup$
















            2












            2








            2





            $begingroup$

            a) If the candies are all different, and so are the lunch boxes, then placing each candy in each box affects which outcome we get. Each candy has four lunch boxes to choose from, and there are three candies, making the number of possible choices
            $4 times 4 times 4 = 64.$



            b) If the candies are the same and the lunch boxes are the same, then the possibilities are threefold: all the candy is in one box, two candies are in one and one is in another, or all three candies are in different boxes. The total number of possibilities is
            $$3.$$



            c) If the candies are the same and the lunch boxes are all different, then there are cases, which are the three possibilities from b):



            i) One box holds all three candies. In this case, there are $4$ boxes to choose from.



            ii) One box holds two, another holds one. In this case, we have $4$ boxes to choose from putting the two in, and $3$ remaining boxes to choose to put the remaining one in. So, in total, this gives us $12$ possibilities.



            iii) Each candy lies in a different box. In that case, since the candies are all identical, this means we are just choosing a box to not contain anything. We can choose our empty boxes in $4$ ways.



            In total, the number of choices are
            $$4 + 12 + 4 = 20.$$



            d) If the candies are different and the lunch boxes are the same, then again, we tackle this with cases:



            i) The first case, with $1$ possibility, is that all three candies are in the same box.



            ii) Two candies could be in one box, and one in the other. Since the candies are now different, there are $3$ ways to do this, as we have three ways to choose the lone candy.



            iii) All three candies are in separate boxes. Since the boxes are indistinct, there is $1$ way to do this.



            Thus, the number of ways to do this is
            $$1 + 3 + 1 = 5.$$



            e) We do this in two steps: choose where the different candy goes, then choose where the same candies go. Note that these processes are totally independent, in that doing one first does not change the number of ways we can do the other. By choosing the different candy to go in one of the $4$ possible boxes, the boxes become no more or less distinct than they did previously.



            Then, the question becomes, how many ways can we put two identical candies in four similar boxes? The answer becomes similar to c): we use cases.



            i) Both candies are in the same box. There are $4$ boxes to choose from.



            ii) The candies line in different boxes. We can choose one of the $4$ boxes first to host one candy, then one of the remaining $3$ to host the other.



            This produces a total of $4 + 4 times 3 = 16$. Putting in our initial choice of box for our distinct candy, we get
            $$4 times 16 = 64$$
            possibilities.






            share|cite|improve this answer











            $endgroup$



            a) If the candies are all different, and so are the lunch boxes, then placing each candy in each box affects which outcome we get. Each candy has four lunch boxes to choose from, and there are three candies, making the number of possible choices
            $4 times 4 times 4 = 64.$



            b) If the candies are the same and the lunch boxes are the same, then the possibilities are threefold: all the candy is in one box, two candies are in one and one is in another, or all three candies are in different boxes. The total number of possibilities is
            $$3.$$



            c) If the candies are the same and the lunch boxes are all different, then there are cases, which are the three possibilities from b):



            i) One box holds all three candies. In this case, there are $4$ boxes to choose from.



            ii) One box holds two, another holds one. In this case, we have $4$ boxes to choose from putting the two in, and $3$ remaining boxes to choose to put the remaining one in. So, in total, this gives us $12$ possibilities.



            iii) Each candy lies in a different box. In that case, since the candies are all identical, this means we are just choosing a box to not contain anything. We can choose our empty boxes in $4$ ways.



            In total, the number of choices are
            $$4 + 12 + 4 = 20.$$



            d) If the candies are different and the lunch boxes are the same, then again, we tackle this with cases:



            i) The first case, with $1$ possibility, is that all three candies are in the same box.



            ii) Two candies could be in one box, and one in the other. Since the candies are now different, there are $3$ ways to do this, as we have three ways to choose the lone candy.



            iii) All three candies are in separate boxes. Since the boxes are indistinct, there is $1$ way to do this.



            Thus, the number of ways to do this is
            $$1 + 3 + 1 = 5.$$



            e) We do this in two steps: choose where the different candy goes, then choose where the same candies go. Note that these processes are totally independent, in that doing one first does not change the number of ways we can do the other. By choosing the different candy to go in one of the $4$ possible boxes, the boxes become no more or less distinct than they did previously.



            Then, the question becomes, how many ways can we put two identical candies in four similar boxes? The answer becomes similar to c): we use cases.



            i) Both candies are in the same box. There are $4$ boxes to choose from.



            ii) The candies line in different boxes. We can choose one of the $4$ boxes first to host one candy, then one of the remaining $3$ to host the other.



            This produces a total of $4 + 4 times 3 = 16$. Putting in our initial choice of box for our distinct candy, we get
            $$4 times 16 = 64$$
            possibilities.







            share|cite|improve this answer














            share|cite|improve this answer



            share|cite|improve this answer








            edited Jan 24 at 2:25









            Namaste

            1




            1










            answered Mar 19 '18 at 3:05









            Theo BenditTheo Bendit

            19.6k12353




            19.6k12353























                1












                $begingroup$


                I have $3$ pieces of candy to place in $4$ lunch boxes. In how many ways can I do this if the candies are all the same and the lunch boxes are all different?




                Method 1: You have correctly identified the possible cases:




                1. Three candies are placed in a single box: There are four ways to choose the box.

                2. Two candies are placed in one box and the third candy is placed in a different box: There are $4$ ways to select the box which will receive two candies and three ways to choose which of the remaining boxes will receive the remaining candy. Hence, there are $4 cdot 3 = 12$ such distributions.

                3. One candy is placed in each of three boxes: There are four ways to select the empty box.


                Hence, there are a total of $4 + 12 + 4 = 20$ such distributions.



                Method 2: Let $x_k$ be the number of candies placed in the $k$th box. Then
                $$x_1 + x_2 + x_3 + x_4 = 3 tag{1}$$
                Equation 1 is an equation in the nonnegative integers. A particular solution of equation 1 corresponds to the placement of three addition signs in a row of three ones. For instance,
                $$1 + + 1 1 +$$
                corresponds to the solution $x_1 = 1$, $x_2 = 0$, $x_3 = 2$, $x_4 = 0$. The number of such solutions is
                $$binom{3 + 3}{3} = binom{6}{3} = 20$$
                since we must choose which three of the six positions required for three ones and three addition signs will be filled with addition signs.






                share|cite|improve this answer









                $endgroup$


















                  1












                  $begingroup$


                  I have $3$ pieces of candy to place in $4$ lunch boxes. In how many ways can I do this if the candies are all the same and the lunch boxes are all different?




                  Method 1: You have correctly identified the possible cases:




                  1. Three candies are placed in a single box: There are four ways to choose the box.

                  2. Two candies are placed in one box and the third candy is placed in a different box: There are $4$ ways to select the box which will receive two candies and three ways to choose which of the remaining boxes will receive the remaining candy. Hence, there are $4 cdot 3 = 12$ such distributions.

                  3. One candy is placed in each of three boxes: There are four ways to select the empty box.


                  Hence, there are a total of $4 + 12 + 4 = 20$ such distributions.



                  Method 2: Let $x_k$ be the number of candies placed in the $k$th box. Then
                  $$x_1 + x_2 + x_3 + x_4 = 3 tag{1}$$
                  Equation 1 is an equation in the nonnegative integers. A particular solution of equation 1 corresponds to the placement of three addition signs in a row of three ones. For instance,
                  $$1 + + 1 1 +$$
                  corresponds to the solution $x_1 = 1$, $x_2 = 0$, $x_3 = 2$, $x_4 = 0$. The number of such solutions is
                  $$binom{3 + 3}{3} = binom{6}{3} = 20$$
                  since we must choose which three of the six positions required for three ones and three addition signs will be filled with addition signs.






                  share|cite|improve this answer









                  $endgroup$
















                    1












                    1








                    1





                    $begingroup$


                    I have $3$ pieces of candy to place in $4$ lunch boxes. In how many ways can I do this if the candies are all the same and the lunch boxes are all different?




                    Method 1: You have correctly identified the possible cases:




                    1. Three candies are placed in a single box: There are four ways to choose the box.

                    2. Two candies are placed in one box and the third candy is placed in a different box: There are $4$ ways to select the box which will receive two candies and three ways to choose which of the remaining boxes will receive the remaining candy. Hence, there are $4 cdot 3 = 12$ such distributions.

                    3. One candy is placed in each of three boxes: There are four ways to select the empty box.


                    Hence, there are a total of $4 + 12 + 4 = 20$ such distributions.



                    Method 2: Let $x_k$ be the number of candies placed in the $k$th box. Then
                    $$x_1 + x_2 + x_3 + x_4 = 3 tag{1}$$
                    Equation 1 is an equation in the nonnegative integers. A particular solution of equation 1 corresponds to the placement of three addition signs in a row of three ones. For instance,
                    $$1 + + 1 1 +$$
                    corresponds to the solution $x_1 = 1$, $x_2 = 0$, $x_3 = 2$, $x_4 = 0$. The number of such solutions is
                    $$binom{3 + 3}{3} = binom{6}{3} = 20$$
                    since we must choose which three of the six positions required for three ones and three addition signs will be filled with addition signs.






                    share|cite|improve this answer









                    $endgroup$




                    I have $3$ pieces of candy to place in $4$ lunch boxes. In how many ways can I do this if the candies are all the same and the lunch boxes are all different?




                    Method 1: You have correctly identified the possible cases:




                    1. Three candies are placed in a single box: There are four ways to choose the box.

                    2. Two candies are placed in one box and the third candy is placed in a different box: There are $4$ ways to select the box which will receive two candies and three ways to choose which of the remaining boxes will receive the remaining candy. Hence, there are $4 cdot 3 = 12$ such distributions.

                    3. One candy is placed in each of three boxes: There are four ways to select the empty box.


                    Hence, there are a total of $4 + 12 + 4 = 20$ such distributions.



                    Method 2: Let $x_k$ be the number of candies placed in the $k$th box. Then
                    $$x_1 + x_2 + x_3 + x_4 = 3 tag{1}$$
                    Equation 1 is an equation in the nonnegative integers. A particular solution of equation 1 corresponds to the placement of three addition signs in a row of three ones. For instance,
                    $$1 + + 1 1 +$$
                    corresponds to the solution $x_1 = 1$, $x_2 = 0$, $x_3 = 2$, $x_4 = 0$. The number of such solutions is
                    $$binom{3 + 3}{3} = binom{6}{3} = 20$$
                    since we must choose which three of the six positions required for three ones and three addition signs will be filled with addition signs.







                    share|cite|improve this answer












                    share|cite|improve this answer



                    share|cite|improve this answer










                    answered Mar 19 '18 at 2:40









                    N. F. TaussigN. F. Taussig

                    44.7k103358




                    44.7k103358























                        1












                        $begingroup$

                        Divide and conquer, and you are already almost there. For 2-1-0-0, there are four places the two candies could go. For each of these possibilities, there are three places the remaining candy could go. For your 1-1-1-0 situation, think of this in terms of which box gets no candies.






                        share|cite|improve this answer









                        $endgroup$













                        • $begingroup$
                          For (d), since all the candies are different, it matters where each one is. So each candy could be in its own box, all three could be in one box, Candy A could be in one box and candies B&C in another,,,, etc.
                          $endgroup$
                          – Grant M
                          Mar 19 '18 at 2:52
















                        1












                        $begingroup$

                        Divide and conquer, and you are already almost there. For 2-1-0-0, there are four places the two candies could go. For each of these possibilities, there are three places the remaining candy could go. For your 1-1-1-0 situation, think of this in terms of which box gets no candies.






                        share|cite|improve this answer









                        $endgroup$













                        • $begingroup$
                          For (d), since all the candies are different, it matters where each one is. So each candy could be in its own box, all three could be in one box, Candy A could be in one box and candies B&C in another,,,, etc.
                          $endgroup$
                          – Grant M
                          Mar 19 '18 at 2:52














                        1












                        1








                        1





                        $begingroup$

                        Divide and conquer, and you are already almost there. For 2-1-0-0, there are four places the two candies could go. For each of these possibilities, there are three places the remaining candy could go. For your 1-1-1-0 situation, think of this in terms of which box gets no candies.






                        share|cite|improve this answer









                        $endgroup$



                        Divide and conquer, and you are already almost there. For 2-1-0-0, there are four places the two candies could go. For each of these possibilities, there are three places the remaining candy could go. For your 1-1-1-0 situation, think of this in terms of which box gets no candies.







                        share|cite|improve this answer












                        share|cite|improve this answer



                        share|cite|improve this answer










                        answered Mar 19 '18 at 2:46









                        Grant MGrant M

                        664




                        664












                        • $begingroup$
                          For (d), since all the candies are different, it matters where each one is. So each candy could be in its own box, all three could be in one box, Candy A could be in one box and candies B&C in another,,,, etc.
                          $endgroup$
                          – Grant M
                          Mar 19 '18 at 2:52


















                        • $begingroup$
                          For (d), since all the candies are different, it matters where each one is. So each candy could be in its own box, all three could be in one box, Candy A could be in one box and candies B&C in another,,,, etc.
                          $endgroup$
                          – Grant M
                          Mar 19 '18 at 2:52
















                        $begingroup$
                        For (d), since all the candies are different, it matters where each one is. So each candy could be in its own box, all three could be in one box, Candy A could be in one box and candies B&C in another,,,, etc.
                        $endgroup$
                        – Grant M
                        Mar 19 '18 at 2:52




                        $begingroup$
                        For (d), since all the candies are different, it matters where each one is. So each candy could be in its own box, all three could be in one box, Candy A could be in one box and candies B&C in another,,,, etc.
                        $endgroup$
                        – Grant M
                        Mar 19 '18 at 2:52











                        -1












                        $begingroup$

                        Exactly two of the candies are the same (but the third is different) and all of the lunch boxes are different?



                        All in 1 4ways



                        2 the same in 1 box and the odd one in another 4*3=12



                        2 different in 1 box and the other in another 4*3=12



                        all in different boxes 4C2*2 = 6*2=12ways



                        4+12+12+12 = 40ways



                        From web 2.0 calc
                        BTW the answer in your last part is wrong I think so because in ii) you have to also consider the different candy.






                        share|cite|improve this answer









                        $endgroup$


















                          -1












                          $begingroup$

                          Exactly two of the candies are the same (but the third is different) and all of the lunch boxes are different?



                          All in 1 4ways



                          2 the same in 1 box and the odd one in another 4*3=12



                          2 different in 1 box and the other in another 4*3=12



                          all in different boxes 4C2*2 = 6*2=12ways



                          4+12+12+12 = 40ways



                          From web 2.0 calc
                          BTW the answer in your last part is wrong I think so because in ii) you have to also consider the different candy.






                          share|cite|improve this answer









                          $endgroup$
















                            -1












                            -1








                            -1





                            $begingroup$

                            Exactly two of the candies are the same (but the third is different) and all of the lunch boxes are different?



                            All in 1 4ways



                            2 the same in 1 box and the odd one in another 4*3=12



                            2 different in 1 box and the other in another 4*3=12



                            all in different boxes 4C2*2 = 6*2=12ways



                            4+12+12+12 = 40ways



                            From web 2.0 calc
                            BTW the answer in your last part is wrong I think so because in ii) you have to also consider the different candy.






                            share|cite|improve this answer









                            $endgroup$



                            Exactly two of the candies are the same (but the third is different) and all of the lunch boxes are different?



                            All in 1 4ways



                            2 the same in 1 box and the odd one in another 4*3=12



                            2 different in 1 box and the other in another 4*3=12



                            all in different boxes 4C2*2 = 6*2=12ways



                            4+12+12+12 = 40ways



                            From web 2.0 calc
                            BTW the answer in your last part is wrong I think so because in ii) you have to also consider the different candy.







                            share|cite|improve this answer












                            share|cite|improve this answer



                            share|cite|improve this answer










                            answered Jan 30 at 23:07









                            IncognitoIncognito

                            1




                            1






























                                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%2f2698175%2fi-have-3-pieces-of-candy-to-place-in-4-lunch-boxes-in-how-many-ways-can-i-do-th%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

                                MongoDB - Not Authorized To Execute Command

                                How to fix TextFormField cause rebuild widget in Flutter

                                in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith