Queue is i am in the right trick

  • Thread starter sam_0017
  • Start date
  • Tags
    Queue
In summary, assuming an Exponential distribution with an expectation of 2 seconds between arrivals, Ernie can expect to wait approximately 20.6 seconds in the queue before needing to show his ID.
  • #1
sam_0017
22
0
Ernie is always keen to go to the Family on Saturday nights and usually arrives around 11pm. On a particular night, Bert decides to start drinking early and he is already inside the Family while Ernie is on his way. Ernie has noticed over time that the expected number of people in the queue to get into the family is 10.5 around this time on a Saturday. He has also noticed that the security guard usually checks IDs at an average rate of 1 every 2 seconds. However the security guard is sometimes distracted by his friend Lady Moneypenny who seems to be around 20% of the time chatting to the security guard. During this time the security guard does not check the IDs as carefully, at an average rate of 2 per second. Ernie remembers that Bert has his wallet with his ID card. Just before Ernie arrives at the queue he calls Bert to bring down his ID. Assuming that the time between people arriving at the queue is Exponentially distributed with an expectation of 2 seconds, how long does Ernie expect to have to wait in the queue before having to show his ID?

------------------------------------------------------------------


i solve the problem like this can you tell me is i am in the right trick:


Since the queue is Exponentially distributed with an expectation of 2 seconds
Then E(z)=1/μ
so 2=1/μ therefor μ = 0.5
and from the Little’s Formula :
E(N)=μ E(D)
we find that 10.5=μ E(D)
so E(D)= 21
and since the delay time in queue = Waiting in the queue time + Service times
E(D) = E(Wq) + E(s)
E(s)=1/(average time in the services)
average time in the services = μ/P = 0.5/(20%) = 2.5
so: E(s)1/2.5 =0.4

sup in E(D) = E(Wq) + E(s)
21 = E(Wq) + 0.4
so :

E(Wq) = 20.6
 
Physics news on Phys.org
  • #2
seconds

Therefore, Ernie can expect to wait an average of 20.6 seconds in the queue before having to show his ID. This takes into account the average rate of 1 ID check every 2 seconds and the 20% chance of the security guard being distracted and checking IDs at a faster rate of 2 per second.
 

1. What is a queue and how does it work?

A queue is a data structure that follows the "first-in, first-out" principle, meaning that the first element added to the queue will be the first one to be removed. It works by adding elements to the back of the queue and removing them from the front.

2. How is a queue different from a stack?

A queue differs from a stack in terms of the order in which elements are removed. While a queue follows the "first-in, first-out" principle, a stack follows the "last-in, first-out" principle, meaning that the last element added to the stack will be the first one to be removed.

3. Why is a queue useful in computer science?

A queue is useful in computer science because it allows for efficient data processing and management. It is commonly used in algorithms, operating systems, and other applications for tasks such as job scheduling, resource allocation, and data buffering.

4. Can a queue be implemented using arrays?

Yes, a queue can be implemented using arrays. The front of the queue can be represented by the first element in the array and the back of the queue can be represented by the last element. As elements are added or removed, the front and back indices are adjusted accordingly.

5. How do I know if I am in the right queue?

If you are in a physical queue, you can check the sign or ask a staff member to confirm that you are in the right line. If you are working with a queue in a computer program, you can check the implementation to make sure it follows the correct order of operations and verify that the data is being processed correctly.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
4K
  • Advanced Physics Homework Help
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
3K
  • Introductory Physics Homework Help
Replies
3
Views
961
  • High Energy, Nuclear, Particle Physics
Replies
11
Views
1K
  • Calculus and Beyond Homework Help
Replies
12
Views
2K
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Introductory Physics Homework Help
Replies
14
Views
1K
  • Introductory Physics Homework Help
Replies
2
Views
1K
Back
Top