Author Topic: Queueing problems in Data and Structures class [C]  (Read 5059 times)

0 Members and 1 Guest are viewing this topic.

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Queueing problems in Data and Structures class [C]
« on: January 26, 2015, 03:27:31 am »
I don't really understand these, nor how to utilize google for help so if any of you have an idea where to start, I would appreciate it :)

Q1. If an array holding a queue is not considered circular, then each remove operation must shift down every remaining element of a queue.  An alternative method is to postpone shifting until rear equals the last index of the array.  When that situation occurs and an attempt is made to insert an element into the queue, the entire queue is shifted down, so that the first element of the queue is in position 0 of the array.  What are the advantages of this method over performing a shift at each remove operation?  What are the disadvantages?
 
Q2.  Given that jobs are serviced at a rate of 30 jobs per hour, determine the arrival rate in jobs per hour which will achieve the expected queue length to be 9.
 
Q3. Jobs arrive at the rate of 20 jobs per minute, and each job requires 2 seconds of service time, on the average. Determine the average waiting time in the queue. What is the probability that at a given time the system is not empty?
 
Q 4. Given that on the average 2 customers can be serviced per minute, determine the average arrival rate of the customers that achieves the average waiting time in the system (including the service time) to be 5 minutes per customer.

 
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline harold

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 226
  • Rating: +41/-3
    • View Profile
Re: Queueing problems in Data and Structures class [C]
« Reply #1 on: January 26, 2015, 03:41:53 am »
It depends on whether the service rate is deterministic or also random, and that's not clear in Q2
Blog about bitmath: bitmath.blogspot.nl
Check the haroldbot thread for the supported commands and syntax.
You can use haroldbot from this website.

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Queueing problems in Data and Structures class [C]
« Reply #2 on: January 26, 2015, 03:43:47 am »
Could you tell me how to do it both ways then?
thank you, and sorry for the trouble.
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline harold

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 226
  • Rating: +41/-3
    • View Profile
Re: Queueing problems in Data and Structures class [C]
« Reply #3 on: January 26, 2015, 03:46:46 am »
Actually on second thought I think they're all supposed to be M/M/1, so the formulas are:

Waiting time = arrival_rate / (service_rate * (service_rate - arrival_rate))
Expected queue length = arrival_rate * waiting time

Those questions are then just applying those or solving for some parameter.
Blog about bitmath: bitmath.blogspot.nl
Check the haroldbot thread for the supported commands and syntax.
You can use haroldbot from this website.

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Queueing problems in Data and Structures class [C]
« Reply #4 on: January 26, 2015, 03:51:58 am »
Thank you. I think I slightly understand.  Shouldn't there be factorial in there?

So I need to use a PDF function?
What does M stand for? Exponential?
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline harold

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 226
  • Rating: +41/-3
    • View Profile
Re: Queueing problems in Data and Structures class [C]
« Reply #5 on: January 26, 2015, 03:59:23 am »
The first M means the arrivals are determined by a Poisson process, the second M means the service times have an exponential distribution. The 1 means there is 1 server. There are no PDFs or factorials involved under these circumstances, though in general there may be (for example for more than one server, the factorial of the number of servers shows up all over the place - of course in this special case that's just 1).
Blog about bitmath: bitmath.blogspot.nl
Check the haroldbot thread for the supported commands and syntax.
You can use haroldbot from this website.

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Queueing problems in Data and Structures class [C]
« Reply #6 on: January 26, 2015, 04:03:05 am »
Thank you very much
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Queueing problems in Data and Structures class [C]
« Reply #7 on: January 26, 2015, 07:25:43 pm »
How did you derive those formulas?
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline harold

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 226
  • Rating: +41/-3
    • View Profile
Re: Queueing problems in Data and Structures class [C]
« Reply #8 on: January 27, 2015, 04:10:13 am »
I just looked them up, they were probably derived by someone much smarter than me (but I don't know who)
Blog about bitmath: bitmath.blogspot.nl
Check the haroldbot thread for the supported commands and syntax.
You can use haroldbot from this website.