title: Numericals on Token Bucket
body: <p><strong>Question</strong></p>
  
  <p>For a host machine that uses the token bucket algorithm for congestion control, the token bucket has a capacity of 1 mega byte and the maximum output rate is 20 mega bytes per second. Tokens arrive at a rate to sustain output at a rate of 10 mega bytes per second. The token bucket is currently full and the machine needs to send 12 mega bytes of data. The minimum time required to transmit the data is _____________ seconds.</p>
  
  <p><strong>My Approach</strong></p>
  
  <p>Initially token bucket is full. the rate at which it is emptying is (20-10) Mbps. time take to empty token bucket of 1 mb is 1/10 i.e  0.1 sec</p>
  
  <p>But answer is given as 1.2sec .</p>