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

0 Members and 1 Guest are viewing this topic.

#### Happybobjr

• James Oldiges
• LV11 Super Veteran (Next: 3000)
• Posts: 2325
• Rating: +128/-20
• Howdy :)
##### 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: １.０.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

#### harold

• Posts: 226
• Rating: +41/-3
##### 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
Check the haroldbot thread for the supported commands and syntax.
You can use haroldbot from this website.

#### Happybobjr

• James Oldiges
• LV11 Super Veteran (Next: 3000)
• Posts: 2325
• Rating: +128/-20
• Howdy :)
##### 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: １.０.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

#### harold

• Posts: 226
• Rating: +41/-3
##### 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.
Check the haroldbot thread for the supported commands and syntax.
You can use haroldbot from this website.

#### Happybobjr

• James Oldiges
• LV11 Super Veteran (Next: 3000)
• Posts: 2325
• Rating: +128/-20
• Howdy :)
##### 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: １.０.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

#### harold

• Posts: 226
• Rating: +41/-3
##### 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).
Check the haroldbot thread for the supported commands and syntax.
You can use haroldbot from this website.

#### Happybobjr

• James Oldiges
• LV11 Super Veteran (Next: 3000)
• Posts: 2325
• Rating: +128/-20
• Howdy :)
##### 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: １.０.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

#### Happybobjr

• James Oldiges
• LV11 Super Veteran (Next: 3000)
• Posts: 2325
• Rating: +128/-20
• Howdy :)
##### 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: １.０.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

#### harold

• Posts: 226
• Rating: +41/-3
##### 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)
Check the haroldbot thread for the supported commands and syntax.
You can use haroldbot from this website.

#### digitalpandey23

• LV0 Newcomer (Next: 5)
• Posts: 1
• Rating: +0/-0
• Digital Marketing Executive
##### Re: Queueing problems in Data and Structures class [C]
« Reply #9 on: Yesterday at 08:53:50 am »
What is the latest trends in programming language which can bring a wave in the travel Industry?

#### NonstickAtom785

• LV2 Member (Next: 40)
• Posts: 37
• Rating: +3/-0
##### Re: Queueing problems in Data and Structures class [C]
« Reply #10 on: Yesterday at 09:00:30 am »
Not sure if I'm understanding your question completely but....

The Travel Industry uses alot of android technology to develop apps usually based upon google api's. I know that where I live we have a service called EMT and they use tablets with an app that accesses google maps and tells you the location of the next person. All of that is coded with Android Studio I'm guessing.

If your looking for other suggestions, theres always Python 3(and older python versions if you choose), and C/C++. All of these are very popular coding platforms.
{BASIC | Grammer | Axe}