Probability of n balls in n cells, one remaining empty Announcing the arrival of Valued...

How can I reduce the gap between left and right of cdot with a macro?

How to install press fit bottom bracket into new frame

Sum letters are not two different

How could we fake a moon landing now?

Performance gap between vector<bool> and array

Most bit efficient text communication method?

Central Vacuuming: Is it worth it, and how does it compare to normal vacuuming?

If Windows 7 doesn't support WSL, then what does Linux subsystem option mean?

What is the appropriate index architecture when forced to implement IsDeleted (soft deletes)?

Why is the AVR GCC compiler using a full `CALL` even though I have set the `-mshort-calls` flag?

A term for a woman complaining about things/begging in a cute/childish way

How do living politicians protect their readily obtainable signatures from misuse?

Crossing US/Canada Border for less than 24 hours

Putting class ranking in CV, but against dept guidelines

Why do early math courses focus on the cross sections of a cone and not on other 3D objects?

Do I really need to have a message in a novel to appeal to readers?

AppleTVs create a chatty alternate WiFi network

How to react to hostile behavior from a senior developer?

Is there any word for a place full of confusion?

Time to Settle Down!

Illegal assignment from sObject to Id

Amount of permutations on an NxNxN Rubik's Cube

Is there hard evidence that the grant peer review system performs significantly better than random?

Effects on objects due to a brief relocation of massive amounts of mass



Probability of n balls in n cells, one remaining empty



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)Seven balls are to be distributed randomly into seven cells. Let X4= # of cells containing exactly 4 balls.probability of n balls in n cells two remaining empty$n$ balls in $n$ cells one remaining empty clarificationProbability of finding exactly $m$ cells emptyProbability of finding $m$ or more cells emptyProbability $k$ bins are non-emptyAlternative interpretation of ball and urns problemCombinatorics problems: termination at rth stepQuestion about how we count the number of ways to do a task.What is my problem with combination/permutation problems?Put $7$ balls into $7$ cells. Probability that exactly $2$ cells containing $3$ balls?Probability of having m groups of at least 2 empty consecutive cells by putting k balls in n binsProbability of having k groups of r consecutive empty bins throwing n balls in n bins












3












$begingroup$


Counting problems have always intrigued me, and I'm working on some out of interest. The other thread on this topic had unsatisfactory answers, because they don't match the answer in my book.



My question is: If $n$ balls are placed at random into $n$ cells, find the probability that exactly one cell remains empty.



My book gives $binom{n}{2} frac{n!}{n^n}$.



But I'm not sure which answer is right?










share|cite|improve this question











$endgroup$

















    3












    $begingroup$


    Counting problems have always intrigued me, and I'm working on some out of interest. The other thread on this topic had unsatisfactory answers, because they don't match the answer in my book.



    My question is: If $n$ balls are placed at random into $n$ cells, find the probability that exactly one cell remains empty.



    My book gives $binom{n}{2} frac{n!}{n^n}$.



    But I'm not sure which answer is right?










    share|cite|improve this question











    $endgroup$















      3












      3








      3


      4



      $begingroup$


      Counting problems have always intrigued me, and I'm working on some out of interest. The other thread on this topic had unsatisfactory answers, because they don't match the answer in my book.



      My question is: If $n$ balls are placed at random into $n$ cells, find the probability that exactly one cell remains empty.



      My book gives $binom{n}{2} frac{n!}{n^n}$.



      But I'm not sure which answer is right?










      share|cite|improve this question











      $endgroup$




      Counting problems have always intrigued me, and I'm working on some out of interest. The other thread on this topic had unsatisfactory answers, because they don't match the answer in my book.



      My question is: If $n$ balls are placed at random into $n$ cells, find the probability that exactly one cell remains empty.



      My book gives $binom{n}{2} frac{n!}{n^n}$.



      But I'm not sure which answer is right?







      combinatorics






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Mar 25 at 9:00









      Jaroslaw Matlak

      4,288930




      4,288930










      asked Aug 25 '13 at 21:54







      user85362





























          3 Answers
          3






          active

          oldest

          votes


















          12












          $begingroup$

          There are $n^n$ equally likely ways to distribute the $n$ balls among the cells. We find the number of ways in which precisely one cell is empty.



          The empty cell can be chosen in $n$ ways. For each such choice, the cell that will have two balls can be chosen in $n-1$ ways.



          For each such choice, the two balls that go into the lucky cell can be chosen in $binom{n}{2}$ ways. That leaves $n-2$ balls and $n-2$ cells. The balls can be permuted among these cells in $(n-2)!$ ways.



          So with a denominator of $n^n$, the numerator is
          $$binom{n}{1}binom{n-1}{1}binom{n}{2}(n-2)!.$$



          This simplifies to $binom{n}{2}n!$.



          Remark: For fun, we obtain $binom{n}{2}n!$ "directly." The balls that are to be glued together can be chosen in $binom{n}{2}$ ways. Now we have $n$ "abstract" balls: the $n-2$ remaining ordinary balls, our glued pair, and the invisible ball. These $n$ objects are to be assigned, one object to a cell, to our $n$ cells. That can be done in $n!$ ways.






          share|cite|improve this answer











          $endgroup$













          • $begingroup$
            How incredibly clear! Thank you.
            $endgroup$
            – user85362
            Aug 25 '13 at 22:38






          • 1




            $begingroup$
            You are welcome. I added a less clear analysis in which the $n!$ arises directly, and not as the product $binom{n}{1}binom{n-1}{1}(n-2)!$.
            $endgroup$
            – André Nicolas
            Aug 25 '13 at 22:45










          • $begingroup$
            Sorry @AndréNicolas, I cannot get the first step, why there are actually $n^n$ ways to distribute the $n$ balls among the cells. Could you please elaborate a little bit.
            $endgroup$
            – user16168
            Oct 3 '13 at 18:33






          • 1




            $begingroup$
            Call the balls $b_1,cdots,b_n$. One at a time we throw them toward the urns, with each urn equally likely as a landing place. Record the result of the tossing as a sequence of length $n$, where the $i$-th term of the sequence records where ball $b_i$ landed.There are $n^n$ such sequences. It would be more obvious if number of was $k$, then the answer would be $k^n$, like tossing a fair $k$-sided die $n$ times. Here we have an $n$-sided die tossed $n$ times.
            $endgroup$
            – André Nicolas
            Oct 3 '13 at 18:45










          • $begingroup$
            Could you tell me how would the answer change for distinguishable/indistinguishable balls and cells?
            $endgroup$
            – StubbornAtom
            Jul 22 '16 at 17:42



















          2












          $begingroup$

          There are $n^n$ ways of mapping balls to cells altogether, so as user84413 says the denominator $n^n$ is correct. The numerator $C^n_2cdot n!$ is also correct: if there is exactly 1 empty cell, than all the other cells contain 1 ball except for 1 cell which contains 2. There are $C^n_2$ ways of choosing the 2 balls that occupy the same cell, $n$ cells to choose for the empty cell and $(n-1)!$ ways of assigning the non-empty cells. So the numerator is correctly given as $C^n_2cdot n! = C^n_2 cdot n cdot (n-1)!$.






          share|cite|improve this answer









          $endgroup$









          • 1




            $begingroup$
            Wow! The wrong answer disappeared pretty quickly!
            $endgroup$
            – Rob Arthan
            Aug 25 '13 at 22:27






          • 1




            $begingroup$
            Yes, someone pointed out that it wasn't correct at all.
            $endgroup$
            – user84413
            Aug 25 '13 at 22:34



















          0












          $begingroup$

          Someone asked what about the case of indistinguishable balls. Well, they all have covered the distinguishable case so I'm answering about the case where the balls are indistinguishable.



          Let n indistinguishable balls are placed randomly in n cells. In this case, a configuration corresponds to a vector (X1, X2, ...., Xn), where Xi is the number of balls in the i-th cell. So we now determine all such configurations. Let us consider about the intermediate walls of the cells. There're n - 1 such walls.



          Thus the total number of place taken by a ball or a wall is n+(n-1)=2n-1 . And we can place n balls in 2n-1 places in (2n-1 choose n )ways. Therefore the total number of such configurations is (2n-1 choose n).



          Now we find out the number of ways that exactly one cell is empty. So we can choose the empty cell in n ways. And for each such choice there are n-1 choices of placing two balls in a cell. And there's only one way of placing n-2 indistinguishable balls in n-2 cells. So the total number of ways such that exactly one cell remains empty is n(n-1).
          Therefore the probability of this event is n(n-1)/(2n-1 choose n).






          share|cite|improve this answer











          $endgroup$














            Your Answer








            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%2f476114%2fprobability-of-n-balls-in-n-cells-one-remaining-empty%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown
























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            12












            $begingroup$

            There are $n^n$ equally likely ways to distribute the $n$ balls among the cells. We find the number of ways in which precisely one cell is empty.



            The empty cell can be chosen in $n$ ways. For each such choice, the cell that will have two balls can be chosen in $n-1$ ways.



            For each such choice, the two balls that go into the lucky cell can be chosen in $binom{n}{2}$ ways. That leaves $n-2$ balls and $n-2$ cells. The balls can be permuted among these cells in $(n-2)!$ ways.



            So with a denominator of $n^n$, the numerator is
            $$binom{n}{1}binom{n-1}{1}binom{n}{2}(n-2)!.$$



            This simplifies to $binom{n}{2}n!$.



            Remark: For fun, we obtain $binom{n}{2}n!$ "directly." The balls that are to be glued together can be chosen in $binom{n}{2}$ ways. Now we have $n$ "abstract" balls: the $n-2$ remaining ordinary balls, our glued pair, and the invisible ball. These $n$ objects are to be assigned, one object to a cell, to our $n$ cells. That can be done in $n!$ ways.






            share|cite|improve this answer











            $endgroup$













            • $begingroup$
              How incredibly clear! Thank you.
              $endgroup$
              – user85362
              Aug 25 '13 at 22:38






            • 1




              $begingroup$
              You are welcome. I added a less clear analysis in which the $n!$ arises directly, and not as the product $binom{n}{1}binom{n-1}{1}(n-2)!$.
              $endgroup$
              – André Nicolas
              Aug 25 '13 at 22:45










            • $begingroup$
              Sorry @AndréNicolas, I cannot get the first step, why there are actually $n^n$ ways to distribute the $n$ balls among the cells. Could you please elaborate a little bit.
              $endgroup$
              – user16168
              Oct 3 '13 at 18:33






            • 1




              $begingroup$
              Call the balls $b_1,cdots,b_n$. One at a time we throw them toward the urns, with each urn equally likely as a landing place. Record the result of the tossing as a sequence of length $n$, where the $i$-th term of the sequence records where ball $b_i$ landed.There are $n^n$ such sequences. It would be more obvious if number of was $k$, then the answer would be $k^n$, like tossing a fair $k$-sided die $n$ times. Here we have an $n$-sided die tossed $n$ times.
              $endgroup$
              – André Nicolas
              Oct 3 '13 at 18:45










            • $begingroup$
              Could you tell me how would the answer change for distinguishable/indistinguishable balls and cells?
              $endgroup$
              – StubbornAtom
              Jul 22 '16 at 17:42
















            12












            $begingroup$

            There are $n^n$ equally likely ways to distribute the $n$ balls among the cells. We find the number of ways in which precisely one cell is empty.



            The empty cell can be chosen in $n$ ways. For each such choice, the cell that will have two balls can be chosen in $n-1$ ways.



            For each such choice, the two balls that go into the lucky cell can be chosen in $binom{n}{2}$ ways. That leaves $n-2$ balls and $n-2$ cells. The balls can be permuted among these cells in $(n-2)!$ ways.



            So with a denominator of $n^n$, the numerator is
            $$binom{n}{1}binom{n-1}{1}binom{n}{2}(n-2)!.$$



            This simplifies to $binom{n}{2}n!$.



            Remark: For fun, we obtain $binom{n}{2}n!$ "directly." The balls that are to be glued together can be chosen in $binom{n}{2}$ ways. Now we have $n$ "abstract" balls: the $n-2$ remaining ordinary balls, our glued pair, and the invisible ball. These $n$ objects are to be assigned, one object to a cell, to our $n$ cells. That can be done in $n!$ ways.






            share|cite|improve this answer











            $endgroup$













            • $begingroup$
              How incredibly clear! Thank you.
              $endgroup$
              – user85362
              Aug 25 '13 at 22:38






            • 1




              $begingroup$
              You are welcome. I added a less clear analysis in which the $n!$ arises directly, and not as the product $binom{n}{1}binom{n-1}{1}(n-2)!$.
              $endgroup$
              – André Nicolas
              Aug 25 '13 at 22:45










            • $begingroup$
              Sorry @AndréNicolas, I cannot get the first step, why there are actually $n^n$ ways to distribute the $n$ balls among the cells. Could you please elaborate a little bit.
              $endgroup$
              – user16168
              Oct 3 '13 at 18:33






            • 1




              $begingroup$
              Call the balls $b_1,cdots,b_n$. One at a time we throw them toward the urns, with each urn equally likely as a landing place. Record the result of the tossing as a sequence of length $n$, where the $i$-th term of the sequence records where ball $b_i$ landed.There are $n^n$ such sequences. It would be more obvious if number of was $k$, then the answer would be $k^n$, like tossing a fair $k$-sided die $n$ times. Here we have an $n$-sided die tossed $n$ times.
              $endgroup$
              – André Nicolas
              Oct 3 '13 at 18:45










            • $begingroup$
              Could you tell me how would the answer change for distinguishable/indistinguishable balls and cells?
              $endgroup$
              – StubbornAtom
              Jul 22 '16 at 17:42














            12












            12








            12





            $begingroup$

            There are $n^n$ equally likely ways to distribute the $n$ balls among the cells. We find the number of ways in which precisely one cell is empty.



            The empty cell can be chosen in $n$ ways. For each such choice, the cell that will have two balls can be chosen in $n-1$ ways.



            For each such choice, the two balls that go into the lucky cell can be chosen in $binom{n}{2}$ ways. That leaves $n-2$ balls and $n-2$ cells. The balls can be permuted among these cells in $(n-2)!$ ways.



            So with a denominator of $n^n$, the numerator is
            $$binom{n}{1}binom{n-1}{1}binom{n}{2}(n-2)!.$$



            This simplifies to $binom{n}{2}n!$.



            Remark: For fun, we obtain $binom{n}{2}n!$ "directly." The balls that are to be glued together can be chosen in $binom{n}{2}$ ways. Now we have $n$ "abstract" balls: the $n-2$ remaining ordinary balls, our glued pair, and the invisible ball. These $n$ objects are to be assigned, one object to a cell, to our $n$ cells. That can be done in $n!$ ways.






            share|cite|improve this answer











            $endgroup$



            There are $n^n$ equally likely ways to distribute the $n$ balls among the cells. We find the number of ways in which precisely one cell is empty.



            The empty cell can be chosen in $n$ ways. For each such choice, the cell that will have two balls can be chosen in $n-1$ ways.



            For each such choice, the two balls that go into the lucky cell can be chosen in $binom{n}{2}$ ways. That leaves $n-2$ balls and $n-2$ cells. The balls can be permuted among these cells in $(n-2)!$ ways.



            So with a denominator of $n^n$, the numerator is
            $$binom{n}{1}binom{n-1}{1}binom{n}{2}(n-2)!.$$



            This simplifies to $binom{n}{2}n!$.



            Remark: For fun, we obtain $binom{n}{2}n!$ "directly." The balls that are to be glued together can be chosen in $binom{n}{2}$ ways. Now we have $n$ "abstract" balls: the $n-2$ remaining ordinary balls, our glued pair, and the invisible ball. These $n$ objects are to be assigned, one object to a cell, to our $n$ cells. That can be done in $n!$ ways.







            share|cite|improve this answer














            share|cite|improve this answer



            share|cite|improve this answer








            edited Aug 25 '13 at 22:42

























            answered Aug 25 '13 at 22:18









            André NicolasAndré Nicolas

            455k36432822




            455k36432822












            • $begingroup$
              How incredibly clear! Thank you.
              $endgroup$
              – user85362
              Aug 25 '13 at 22:38






            • 1




              $begingroup$
              You are welcome. I added a less clear analysis in which the $n!$ arises directly, and not as the product $binom{n}{1}binom{n-1}{1}(n-2)!$.
              $endgroup$
              – André Nicolas
              Aug 25 '13 at 22:45










            • $begingroup$
              Sorry @AndréNicolas, I cannot get the first step, why there are actually $n^n$ ways to distribute the $n$ balls among the cells. Could you please elaborate a little bit.
              $endgroup$
              – user16168
              Oct 3 '13 at 18:33






            • 1




              $begingroup$
              Call the balls $b_1,cdots,b_n$. One at a time we throw them toward the urns, with each urn equally likely as a landing place. Record the result of the tossing as a sequence of length $n$, where the $i$-th term of the sequence records where ball $b_i$ landed.There are $n^n$ such sequences. It would be more obvious if number of was $k$, then the answer would be $k^n$, like tossing a fair $k$-sided die $n$ times. Here we have an $n$-sided die tossed $n$ times.
              $endgroup$
              – André Nicolas
              Oct 3 '13 at 18:45










            • $begingroup$
              Could you tell me how would the answer change for distinguishable/indistinguishable balls and cells?
              $endgroup$
              – StubbornAtom
              Jul 22 '16 at 17:42


















            • $begingroup$
              How incredibly clear! Thank you.
              $endgroup$
              – user85362
              Aug 25 '13 at 22:38






            • 1




              $begingroup$
              You are welcome. I added a less clear analysis in which the $n!$ arises directly, and not as the product $binom{n}{1}binom{n-1}{1}(n-2)!$.
              $endgroup$
              – André Nicolas
              Aug 25 '13 at 22:45










            • $begingroup$
              Sorry @AndréNicolas, I cannot get the first step, why there are actually $n^n$ ways to distribute the $n$ balls among the cells. Could you please elaborate a little bit.
              $endgroup$
              – user16168
              Oct 3 '13 at 18:33






            • 1




              $begingroup$
              Call the balls $b_1,cdots,b_n$. One at a time we throw them toward the urns, with each urn equally likely as a landing place. Record the result of the tossing as a sequence of length $n$, where the $i$-th term of the sequence records where ball $b_i$ landed.There are $n^n$ such sequences. It would be more obvious if number of was $k$, then the answer would be $k^n$, like tossing a fair $k$-sided die $n$ times. Here we have an $n$-sided die tossed $n$ times.
              $endgroup$
              – André Nicolas
              Oct 3 '13 at 18:45










            • $begingroup$
              Could you tell me how would the answer change for distinguishable/indistinguishable balls and cells?
              $endgroup$
              – StubbornAtom
              Jul 22 '16 at 17:42
















            $begingroup$
            How incredibly clear! Thank you.
            $endgroup$
            – user85362
            Aug 25 '13 at 22:38




            $begingroup$
            How incredibly clear! Thank you.
            $endgroup$
            – user85362
            Aug 25 '13 at 22:38




            1




            1




            $begingroup$
            You are welcome. I added a less clear analysis in which the $n!$ arises directly, and not as the product $binom{n}{1}binom{n-1}{1}(n-2)!$.
            $endgroup$
            – André Nicolas
            Aug 25 '13 at 22:45




            $begingroup$
            You are welcome. I added a less clear analysis in which the $n!$ arises directly, and not as the product $binom{n}{1}binom{n-1}{1}(n-2)!$.
            $endgroup$
            – André Nicolas
            Aug 25 '13 at 22:45












            $begingroup$
            Sorry @AndréNicolas, I cannot get the first step, why there are actually $n^n$ ways to distribute the $n$ balls among the cells. Could you please elaborate a little bit.
            $endgroup$
            – user16168
            Oct 3 '13 at 18:33




            $begingroup$
            Sorry @AndréNicolas, I cannot get the first step, why there are actually $n^n$ ways to distribute the $n$ balls among the cells. Could you please elaborate a little bit.
            $endgroup$
            – user16168
            Oct 3 '13 at 18:33




            1




            1




            $begingroup$
            Call the balls $b_1,cdots,b_n$. One at a time we throw them toward the urns, with each urn equally likely as a landing place. Record the result of the tossing as a sequence of length $n$, where the $i$-th term of the sequence records where ball $b_i$ landed.There are $n^n$ such sequences. It would be more obvious if number of was $k$, then the answer would be $k^n$, like tossing a fair $k$-sided die $n$ times. Here we have an $n$-sided die tossed $n$ times.
            $endgroup$
            – André Nicolas
            Oct 3 '13 at 18:45




            $begingroup$
            Call the balls $b_1,cdots,b_n$. One at a time we throw them toward the urns, with each urn equally likely as a landing place. Record the result of the tossing as a sequence of length $n$, where the $i$-th term of the sequence records where ball $b_i$ landed.There are $n^n$ such sequences. It would be more obvious if number of was $k$, then the answer would be $k^n$, like tossing a fair $k$-sided die $n$ times. Here we have an $n$-sided die tossed $n$ times.
            $endgroup$
            – André Nicolas
            Oct 3 '13 at 18:45












            $begingroup$
            Could you tell me how would the answer change for distinguishable/indistinguishable balls and cells?
            $endgroup$
            – StubbornAtom
            Jul 22 '16 at 17:42




            $begingroup$
            Could you tell me how would the answer change for distinguishable/indistinguishable balls and cells?
            $endgroup$
            – StubbornAtom
            Jul 22 '16 at 17:42











            2












            $begingroup$

            There are $n^n$ ways of mapping balls to cells altogether, so as user84413 says the denominator $n^n$ is correct. The numerator $C^n_2cdot n!$ is also correct: if there is exactly 1 empty cell, than all the other cells contain 1 ball except for 1 cell which contains 2. There are $C^n_2$ ways of choosing the 2 balls that occupy the same cell, $n$ cells to choose for the empty cell and $(n-1)!$ ways of assigning the non-empty cells. So the numerator is correctly given as $C^n_2cdot n! = C^n_2 cdot n cdot (n-1)!$.






            share|cite|improve this answer









            $endgroup$









            • 1




              $begingroup$
              Wow! The wrong answer disappeared pretty quickly!
              $endgroup$
              – Rob Arthan
              Aug 25 '13 at 22:27






            • 1




              $begingroup$
              Yes, someone pointed out that it wasn't correct at all.
              $endgroup$
              – user84413
              Aug 25 '13 at 22:34
















            2












            $begingroup$

            There are $n^n$ ways of mapping balls to cells altogether, so as user84413 says the denominator $n^n$ is correct. The numerator $C^n_2cdot n!$ is also correct: if there is exactly 1 empty cell, than all the other cells contain 1 ball except for 1 cell which contains 2. There are $C^n_2$ ways of choosing the 2 balls that occupy the same cell, $n$ cells to choose for the empty cell and $(n-1)!$ ways of assigning the non-empty cells. So the numerator is correctly given as $C^n_2cdot n! = C^n_2 cdot n cdot (n-1)!$.






            share|cite|improve this answer









            $endgroup$









            • 1




              $begingroup$
              Wow! The wrong answer disappeared pretty quickly!
              $endgroup$
              – Rob Arthan
              Aug 25 '13 at 22:27






            • 1




              $begingroup$
              Yes, someone pointed out that it wasn't correct at all.
              $endgroup$
              – user84413
              Aug 25 '13 at 22:34














            2












            2








            2





            $begingroup$

            There are $n^n$ ways of mapping balls to cells altogether, so as user84413 says the denominator $n^n$ is correct. The numerator $C^n_2cdot n!$ is also correct: if there is exactly 1 empty cell, than all the other cells contain 1 ball except for 1 cell which contains 2. There are $C^n_2$ ways of choosing the 2 balls that occupy the same cell, $n$ cells to choose for the empty cell and $(n-1)!$ ways of assigning the non-empty cells. So the numerator is correctly given as $C^n_2cdot n! = C^n_2 cdot n cdot (n-1)!$.






            share|cite|improve this answer









            $endgroup$



            There are $n^n$ ways of mapping balls to cells altogether, so as user84413 says the denominator $n^n$ is correct. The numerator $C^n_2cdot n!$ is also correct: if there is exactly 1 empty cell, than all the other cells contain 1 ball except for 1 cell which contains 2. There are $C^n_2$ ways of choosing the 2 balls that occupy the same cell, $n$ cells to choose for the empty cell and $(n-1)!$ ways of assigning the non-empty cells. So the numerator is correctly given as $C^n_2cdot n! = C^n_2 cdot n cdot (n-1)!$.







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered Aug 25 '13 at 22:25









            Rob ArthanRob Arthan

            29.6k42967




            29.6k42967








            • 1




              $begingroup$
              Wow! The wrong answer disappeared pretty quickly!
              $endgroup$
              – Rob Arthan
              Aug 25 '13 at 22:27






            • 1




              $begingroup$
              Yes, someone pointed out that it wasn't correct at all.
              $endgroup$
              – user84413
              Aug 25 '13 at 22:34














            • 1




              $begingroup$
              Wow! The wrong answer disappeared pretty quickly!
              $endgroup$
              – Rob Arthan
              Aug 25 '13 at 22:27






            • 1




              $begingroup$
              Yes, someone pointed out that it wasn't correct at all.
              $endgroup$
              – user84413
              Aug 25 '13 at 22:34








            1




            1




            $begingroup$
            Wow! The wrong answer disappeared pretty quickly!
            $endgroup$
            – Rob Arthan
            Aug 25 '13 at 22:27




            $begingroup$
            Wow! The wrong answer disappeared pretty quickly!
            $endgroup$
            – Rob Arthan
            Aug 25 '13 at 22:27




            1




            1




            $begingroup$
            Yes, someone pointed out that it wasn't correct at all.
            $endgroup$
            – user84413
            Aug 25 '13 at 22:34




            $begingroup$
            Yes, someone pointed out that it wasn't correct at all.
            $endgroup$
            – user84413
            Aug 25 '13 at 22:34











            0












            $begingroup$

            Someone asked what about the case of indistinguishable balls. Well, they all have covered the distinguishable case so I'm answering about the case where the balls are indistinguishable.



            Let n indistinguishable balls are placed randomly in n cells. In this case, a configuration corresponds to a vector (X1, X2, ...., Xn), where Xi is the number of balls in the i-th cell. So we now determine all such configurations. Let us consider about the intermediate walls of the cells. There're n - 1 such walls.



            Thus the total number of place taken by a ball or a wall is n+(n-1)=2n-1 . And we can place n balls in 2n-1 places in (2n-1 choose n )ways. Therefore the total number of such configurations is (2n-1 choose n).



            Now we find out the number of ways that exactly one cell is empty. So we can choose the empty cell in n ways. And for each such choice there are n-1 choices of placing two balls in a cell. And there's only one way of placing n-2 indistinguishable balls in n-2 cells. So the total number of ways such that exactly one cell remains empty is n(n-1).
            Therefore the probability of this event is n(n-1)/(2n-1 choose n).






            share|cite|improve this answer











            $endgroup$


















              0












              $begingroup$

              Someone asked what about the case of indistinguishable balls. Well, they all have covered the distinguishable case so I'm answering about the case where the balls are indistinguishable.



              Let n indistinguishable balls are placed randomly in n cells. In this case, a configuration corresponds to a vector (X1, X2, ...., Xn), where Xi is the number of balls in the i-th cell. So we now determine all such configurations. Let us consider about the intermediate walls of the cells. There're n - 1 such walls.



              Thus the total number of place taken by a ball or a wall is n+(n-1)=2n-1 . And we can place n balls in 2n-1 places in (2n-1 choose n )ways. Therefore the total number of such configurations is (2n-1 choose n).



              Now we find out the number of ways that exactly one cell is empty. So we can choose the empty cell in n ways. And for each such choice there are n-1 choices of placing two balls in a cell. And there's only one way of placing n-2 indistinguishable balls in n-2 cells. So the total number of ways such that exactly one cell remains empty is n(n-1).
              Therefore the probability of this event is n(n-1)/(2n-1 choose n).






              share|cite|improve this answer











              $endgroup$
















                0












                0








                0





                $begingroup$

                Someone asked what about the case of indistinguishable balls. Well, they all have covered the distinguishable case so I'm answering about the case where the balls are indistinguishable.



                Let n indistinguishable balls are placed randomly in n cells. In this case, a configuration corresponds to a vector (X1, X2, ...., Xn), where Xi is the number of balls in the i-th cell. So we now determine all such configurations. Let us consider about the intermediate walls of the cells. There're n - 1 such walls.



                Thus the total number of place taken by a ball or a wall is n+(n-1)=2n-1 . And we can place n balls in 2n-1 places in (2n-1 choose n )ways. Therefore the total number of such configurations is (2n-1 choose n).



                Now we find out the number of ways that exactly one cell is empty. So we can choose the empty cell in n ways. And for each such choice there are n-1 choices of placing two balls in a cell. And there's only one way of placing n-2 indistinguishable balls in n-2 cells. So the total number of ways such that exactly one cell remains empty is n(n-1).
                Therefore the probability of this event is n(n-1)/(2n-1 choose n).






                share|cite|improve this answer











                $endgroup$



                Someone asked what about the case of indistinguishable balls. Well, they all have covered the distinguishable case so I'm answering about the case where the balls are indistinguishable.



                Let n indistinguishable balls are placed randomly in n cells. In this case, a configuration corresponds to a vector (X1, X2, ...., Xn), where Xi is the number of balls in the i-th cell. So we now determine all such configurations. Let us consider about the intermediate walls of the cells. There're n - 1 such walls.



                Thus the total number of place taken by a ball or a wall is n+(n-1)=2n-1 . And we can place n balls in 2n-1 places in (2n-1 choose n )ways. Therefore the total number of such configurations is (2n-1 choose n).



                Now we find out the number of ways that exactly one cell is empty. So we can choose the empty cell in n ways. And for each such choice there are n-1 choices of placing two balls in a cell. And there's only one way of placing n-2 indistinguishable balls in n-2 cells. So the total number of ways such that exactly one cell remains empty is n(n-1).
                Therefore the probability of this event is n(n-1)/(2n-1 choose n).







                share|cite|improve this answer














                share|cite|improve this answer



                share|cite|improve this answer








                edited Mar 25 at 8:58

























                answered Mar 25 at 8:36









                PritamPritam

                11




                11






























                    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%2f476114%2fprobability-of-n-balls-in-n-cells-one-remaining-empty%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

                    Nidaros erkebispedøme

                    Birsay

                    Where did Arya get these scars? Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Favourite questions and answers from the 1st quarter of 2019Why did Arya refuse to end it?Has the pronunciation of Arya Stark's name changed?Has Arya forgiven people?Why did Arya Stark lose her vision?Why can Arya still use the faces?Has the Narrow Sea become narrower?Does Arya Stark know how to make poisons outside of the House of Black and White?Why did Nymeria leave Arya?Why did Arya not kill the Lannister soldiers she encountered in the Riverlands?What is the current canonical age of Sansa, Bran and Arya Stark?