Expected number of slots required for channel access - Birthday paradox











up vote
1
down vote

favorite












Let $n$ be the number of users who want to access a channel divided into with $s$ time-slots and let $n<<s$.
Each user randomly chooses one time-slot (out of $s$) for accessing the channel.
A collision occurs if more than one user chooses a given time-slot.

The probability of successful access for everybody without any collisions ( considering $n<<s$) can be approximated by $e^{-n^2/2s}$.
The expected number of users who experience a collision is also given by $n(1-(1-1/s)^{n-1})$.

This part of the problem is actually equivalent to the birthday problem where a year is assumed to have $s$ days.



Now, assume that in the case of a collision in the first round $i=1$ (time-slots $1,..., s$), the users who experience a collision will back off and try to access the channel, again randomly, during the next round $i = 2$ with $s$ time-slots (time-slots in $[s+1, 2s]$) and this procedure goes on during the next $s$ time-slots, if a collision occurs, until everybody accesses the channel.



The question is, how many rounds are required on average so that all the users access the channel once?
What would be a closed-form approximation?










share|cite|improve this question




























    up vote
    1
    down vote

    favorite












    Let $n$ be the number of users who want to access a channel divided into with $s$ time-slots and let $n<<s$.
    Each user randomly chooses one time-slot (out of $s$) for accessing the channel.
    A collision occurs if more than one user chooses a given time-slot.

    The probability of successful access for everybody without any collisions ( considering $n<<s$) can be approximated by $e^{-n^2/2s}$.
    The expected number of users who experience a collision is also given by $n(1-(1-1/s)^{n-1})$.

    This part of the problem is actually equivalent to the birthday problem where a year is assumed to have $s$ days.



    Now, assume that in the case of a collision in the first round $i=1$ (time-slots $1,..., s$), the users who experience a collision will back off and try to access the channel, again randomly, during the next round $i = 2$ with $s$ time-slots (time-slots in $[s+1, 2s]$) and this procedure goes on during the next $s$ time-slots, if a collision occurs, until everybody accesses the channel.



    The question is, how many rounds are required on average so that all the users access the channel once?
    What would be a closed-form approximation?










    share|cite|improve this question


























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      Let $n$ be the number of users who want to access a channel divided into with $s$ time-slots and let $n<<s$.
      Each user randomly chooses one time-slot (out of $s$) for accessing the channel.
      A collision occurs if more than one user chooses a given time-slot.

      The probability of successful access for everybody without any collisions ( considering $n<<s$) can be approximated by $e^{-n^2/2s}$.
      The expected number of users who experience a collision is also given by $n(1-(1-1/s)^{n-1})$.

      This part of the problem is actually equivalent to the birthday problem where a year is assumed to have $s$ days.



      Now, assume that in the case of a collision in the first round $i=1$ (time-slots $1,..., s$), the users who experience a collision will back off and try to access the channel, again randomly, during the next round $i = 2$ with $s$ time-slots (time-slots in $[s+1, 2s]$) and this procedure goes on during the next $s$ time-slots, if a collision occurs, until everybody accesses the channel.



      The question is, how many rounds are required on average so that all the users access the channel once?
      What would be a closed-form approximation?










      share|cite|improve this question















      Let $n$ be the number of users who want to access a channel divided into with $s$ time-slots and let $n<<s$.
      Each user randomly chooses one time-slot (out of $s$) for accessing the channel.
      A collision occurs if more than one user chooses a given time-slot.

      The probability of successful access for everybody without any collisions ( considering $n<<s$) can be approximated by $e^{-n^2/2s}$.
      The expected number of users who experience a collision is also given by $n(1-(1-1/s)^{n-1})$.

      This part of the problem is actually equivalent to the birthday problem where a year is assumed to have $s$ days.



      Now, assume that in the case of a collision in the first round $i=1$ (time-slots $1,..., s$), the users who experience a collision will back off and try to access the channel, again randomly, during the next round $i = 2$ with $s$ time-slots (time-slots in $[s+1, 2s]$) and this procedure goes on during the next $s$ time-slots, if a collision occurs, until everybody accesses the channel.



      The question is, how many rounds are required on average so that all the users access the channel once?
      What would be a closed-form approximation?







      probability expected-value birthday






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Nov 17 at 11:54

























      asked Nov 17 at 2:31









      Mahdi

      6910




      6910






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          The expected number of people who experience collisions in a round is
          $$n(1 - (1 - 1/s)^{n-1}) approx n(1 - (1 - n/s)) = n^2 / s$$
          as you noted. So we expect the number of people $P_i$ still participating after $i$ rounds to satisfy the recurrence
          $$P_0 = n qquad P_{i+1} = frac{P_i^2}{s}$$
          The first few values are $n, frac{n^2}{s}, frac{n^4}{s^3}, frac{n^8}{s^7}, cdots$ and the closed form is
          $$P_i = frac{n^{2^i}}{s^{2^i-1}}$$
          Solving for when this is less than 1,
          $$n^{2^i} = s^{2^i - 1}$$
          $$2^i log n = (2^i - 1)log s$$
          $$log s = 2^i(log s - log n)$$
          $$log log s = i + log(log s - log n)$$
          $$i = log log s - log(log s - log n) = log(1 + frac{log n}{log s - log n})$$
          which is approximately $log log n$ assuming $n << s$.



          This is just a heuristic estimation of the expected number of rounds in total.






          share|cite|improve this answer





















          • Great! Found something similar but not as clean as yours.
            – Mahdi
            Nov 17 at 11:54










          • Just two points. The number of rounds required at the end is $r=i+1$. Further, when I solve the problem for n less than 2 the approximation is much closer to the simulation. Perhaps because when we have less than two users, there would be no collision. I am not sure if this makes sense. I tried to approximate $(1-1/s)^{(n-1)}$ by $e^{(-n/s)}$ but could not find a closed form.
            – Mahdi
            Nov 20 at 9:14











          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',
          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%2f3001903%2fexpected-number-of-slots-required-for-channel-access-birthday-paradox%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








          up vote
          1
          down vote



          accepted










          The expected number of people who experience collisions in a round is
          $$n(1 - (1 - 1/s)^{n-1}) approx n(1 - (1 - n/s)) = n^2 / s$$
          as you noted. So we expect the number of people $P_i$ still participating after $i$ rounds to satisfy the recurrence
          $$P_0 = n qquad P_{i+1} = frac{P_i^2}{s}$$
          The first few values are $n, frac{n^2}{s}, frac{n^4}{s^3}, frac{n^8}{s^7}, cdots$ and the closed form is
          $$P_i = frac{n^{2^i}}{s^{2^i-1}}$$
          Solving for when this is less than 1,
          $$n^{2^i} = s^{2^i - 1}$$
          $$2^i log n = (2^i - 1)log s$$
          $$log s = 2^i(log s - log n)$$
          $$log log s = i + log(log s - log n)$$
          $$i = log log s - log(log s - log n) = log(1 + frac{log n}{log s - log n})$$
          which is approximately $log log n$ assuming $n << s$.



          This is just a heuristic estimation of the expected number of rounds in total.






          share|cite|improve this answer





















          • Great! Found something similar but not as clean as yours.
            – Mahdi
            Nov 17 at 11:54










          • Just two points. The number of rounds required at the end is $r=i+1$. Further, when I solve the problem for n less than 2 the approximation is much closer to the simulation. Perhaps because when we have less than two users, there would be no collision. I am not sure if this makes sense. I tried to approximate $(1-1/s)^{(n-1)}$ by $e^{(-n/s)}$ but could not find a closed form.
            – Mahdi
            Nov 20 at 9:14















          up vote
          1
          down vote



          accepted










          The expected number of people who experience collisions in a round is
          $$n(1 - (1 - 1/s)^{n-1}) approx n(1 - (1 - n/s)) = n^2 / s$$
          as you noted. So we expect the number of people $P_i$ still participating after $i$ rounds to satisfy the recurrence
          $$P_0 = n qquad P_{i+1} = frac{P_i^2}{s}$$
          The first few values are $n, frac{n^2}{s}, frac{n^4}{s^3}, frac{n^8}{s^7}, cdots$ and the closed form is
          $$P_i = frac{n^{2^i}}{s^{2^i-1}}$$
          Solving for when this is less than 1,
          $$n^{2^i} = s^{2^i - 1}$$
          $$2^i log n = (2^i - 1)log s$$
          $$log s = 2^i(log s - log n)$$
          $$log log s = i + log(log s - log n)$$
          $$i = log log s - log(log s - log n) = log(1 + frac{log n}{log s - log n})$$
          which is approximately $log log n$ assuming $n << s$.



          This is just a heuristic estimation of the expected number of rounds in total.






          share|cite|improve this answer





















          • Great! Found something similar but not as clean as yours.
            – Mahdi
            Nov 17 at 11:54










          • Just two points. The number of rounds required at the end is $r=i+1$. Further, when I solve the problem for n less than 2 the approximation is much closer to the simulation. Perhaps because when we have less than two users, there would be no collision. I am not sure if this makes sense. I tried to approximate $(1-1/s)^{(n-1)}$ by $e^{(-n/s)}$ but could not find a closed form.
            – Mahdi
            Nov 20 at 9:14













          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          The expected number of people who experience collisions in a round is
          $$n(1 - (1 - 1/s)^{n-1}) approx n(1 - (1 - n/s)) = n^2 / s$$
          as you noted. So we expect the number of people $P_i$ still participating after $i$ rounds to satisfy the recurrence
          $$P_0 = n qquad P_{i+1} = frac{P_i^2}{s}$$
          The first few values are $n, frac{n^2}{s}, frac{n^4}{s^3}, frac{n^8}{s^7}, cdots$ and the closed form is
          $$P_i = frac{n^{2^i}}{s^{2^i-1}}$$
          Solving for when this is less than 1,
          $$n^{2^i} = s^{2^i - 1}$$
          $$2^i log n = (2^i - 1)log s$$
          $$log s = 2^i(log s - log n)$$
          $$log log s = i + log(log s - log n)$$
          $$i = log log s - log(log s - log n) = log(1 + frac{log n}{log s - log n})$$
          which is approximately $log log n$ assuming $n << s$.



          This is just a heuristic estimation of the expected number of rounds in total.






          share|cite|improve this answer












          The expected number of people who experience collisions in a round is
          $$n(1 - (1 - 1/s)^{n-1}) approx n(1 - (1 - n/s)) = n^2 / s$$
          as you noted. So we expect the number of people $P_i$ still participating after $i$ rounds to satisfy the recurrence
          $$P_0 = n qquad P_{i+1} = frac{P_i^2}{s}$$
          The first few values are $n, frac{n^2}{s}, frac{n^4}{s^3}, frac{n^8}{s^7}, cdots$ and the closed form is
          $$P_i = frac{n^{2^i}}{s^{2^i-1}}$$
          Solving for when this is less than 1,
          $$n^{2^i} = s^{2^i - 1}$$
          $$2^i log n = (2^i - 1)log s$$
          $$log s = 2^i(log s - log n)$$
          $$log log s = i + log(log s - log n)$$
          $$i = log log s - log(log s - log n) = log(1 + frac{log n}{log s - log n})$$
          which is approximately $log log n$ assuming $n << s$.



          This is just a heuristic estimation of the expected number of rounds in total.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Nov 17 at 4:12









          Chris Jones

          787514




          787514












          • Great! Found something similar but not as clean as yours.
            – Mahdi
            Nov 17 at 11:54










          • Just two points. The number of rounds required at the end is $r=i+1$. Further, when I solve the problem for n less than 2 the approximation is much closer to the simulation. Perhaps because when we have less than two users, there would be no collision. I am not sure if this makes sense. I tried to approximate $(1-1/s)^{(n-1)}$ by $e^{(-n/s)}$ but could not find a closed form.
            – Mahdi
            Nov 20 at 9:14


















          • Great! Found something similar but not as clean as yours.
            – Mahdi
            Nov 17 at 11:54










          • Just two points. The number of rounds required at the end is $r=i+1$. Further, when I solve the problem for n less than 2 the approximation is much closer to the simulation. Perhaps because when we have less than two users, there would be no collision. I am not sure if this makes sense. I tried to approximate $(1-1/s)^{(n-1)}$ by $e^{(-n/s)}$ but could not find a closed form.
            – Mahdi
            Nov 20 at 9:14
















          Great! Found something similar but not as clean as yours.
          – Mahdi
          Nov 17 at 11:54




          Great! Found something similar but not as clean as yours.
          – Mahdi
          Nov 17 at 11:54












          Just two points. The number of rounds required at the end is $r=i+1$. Further, when I solve the problem for n less than 2 the approximation is much closer to the simulation. Perhaps because when we have less than two users, there would be no collision. I am not sure if this makes sense. I tried to approximate $(1-1/s)^{(n-1)}$ by $e^{(-n/s)}$ but could not find a closed form.
          – Mahdi
          Nov 20 at 9:14




          Just two points. The number of rounds required at the end is $r=i+1$. Further, when I solve the problem for n less than 2 the approximation is much closer to the simulation. Perhaps because when we have less than two users, there would be no collision. I am not sure if this makes sense. I tried to approximate $(1-1/s)^{(n-1)}$ by $e^{(-n/s)}$ but could not find a closed form.
          – Mahdi
          Nov 20 at 9:14


















          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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.


          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%2f3001903%2fexpected-number-of-slots-required-for-channel-access-birthday-paradox%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

          Plaza Victoria

          In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

          How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...