Content of the queue at the beginning

Assignment Help Data Structure & Algorithms
Reference no: EM13692265

Question: Assume you are at the airport, waiting for the security check. There is one line (which is a FIFO queue), and 5 security check gates. Each person reaching in front of the queue is checked by the first available security gate.

Each security check gate has its pace of handling passengers, as follows: gate #1, 1 person/minute, gates #2 and #3, 2 persons/minute, and gates #4 and #5, 3 persons/minute.

Assume that initially there are 20 people in the line and each minute other 10 people are coming to the line.

Show the evolution of the line in the first 10 minutes. For this, use a queue to model the line, add the initial passengers (give them names Passenger1, Passenger2, ..., Passenger20), and start distributing them to security check gates every minute. In each minute (for 10 minutes), show the status as follows:

-Content of the line (the queue) at the beginning, and at end of the given minute (remember that each minute other 10 passengers enter the line);

-Content (that is people checked) of each of the 5 security check gates during the given minute.

The status should be displayed in the output window of the IDE.

I'm not sure how to solve the question. Any assistance would be appreciated.

Reference no: EM13692265

Questions Cloud

End-of-aisle price promotions changes the price elasticity : An end-of-aisle price promotions changes the price elasticity of a good from -2 to -3. If the normal price is $10, what should the promotional price be? Use (P - MC)/P = 1/?e? to calculate MC and then use the same equation to find out the new price.
Which type of validity process is being violated : Normal 0 false false false EN-US X-NONE X-NONE If a non-private company ..
What are public saving-private saving and national saving : What are public saving, private saving, and national saving? Solve these equations for the equilibrium values of C, I, NX, and Explain what you find using a graph.
Content of the queue at the beginning : Assume you are at the airport, waiting for the security check. There is one line (which is a FIFO queue), and 5 security check gates. Each person reaching in front of the queue is checked by the first available security gate.
Requirements for an automated home bottle : Flexible design enables a quick change from one bottle to another and easy adjustment of the cutting locations according to the size and shape of the container
Demonstrate that this mac scheme is not secure : Demonstrate that this MAC scheme is not secure for variable length messages - Write pseudocode for an algorithm, F, that, given a tagging oracle
Make a python program that uses the getcwd : Make a Python program that uses the getcwd() function to provide a string of the current working directory. Save the string in the variable current folder and display the value.
Write a generic class called pair that stores two values : Write a generic class called Pair that stores two values of the generic type. It should have a constructor to set them, two methods getfirst()

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Linked lists give a program to implement the insert

give a program to implement the insert operation and delete operations on a queue using linked

  Develop an online shopping system for the stakeholders

Online shopping becomes increasing popular nowadays. It brings many advantages to both sellers and buyers. Metro Shopping (MS) is planning to develop an online shopping system for the stakeholders.

  Find the minimum cost path from a designated node

Find the Minimum Cost Path from a designated start node to a designated destination node in a graph.

  Complete binary tree

Think about an n-node complete binary tree T, where n=2^d - 1 for some d. Each node v of T is labeled with a real number x_v.

  Creating entity-relationship model

The manager for the Clearwater Traders wishes to collect the following information for each order placed by a consumer: consumer's name and address, item's size or color if applicable and the retail price of each item.

  Use sequential search algortithm to locate the number

These numbers should be stored in an array. Use the sequential search algortithm to locate the number entered by the user. If the number is in the array, the program should display a message.

  1decryption speeda certain cryptography vendor was

1.decryption speeda certain cryptography vendor was providing an encryption technology that was breakable within 10

  Write algorithm that allows the customer to enter amount

An ATM allows a customer to withdraw a maximum of $500 per day. If a customer withdraws more than $300, the service charge is 4% of the amount over $300.

  Algorithm to minimize average difference between height

The problem is to assign each skier a ski to minimize the average difference between height of a skier and his/her ski. Give pseudocode and write its asymptotic running time.

  Designing and populating a course table

Use data to design and populate a course table. Designate the CourseID field as a Primary Key and permit your database to automatically produce a value for this field.

  Evaluate algebraic expression by code with three-operand

Evaluate a short algebraic expression using code with three-operand instructions. The expression should have a minimum of three operands and 2 operators.

  C program that accepts a month and day

Make a C program that accepts a month and day for example, June 14 from the keyboard as input. Store this data in a string called date.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd