Implement the adt priority queue

Assignment Help Data Structure & Algorithms
Reference no: EM131306564

Project: Priority Queues

Generic implementations of priority queue

Educational Objectives: After completing this assignment, the student should be able to accomplish the following:

-Apply generic algorithms in solving programming problems

-Define and give examples of generic associative containers

-Define and give examples of generic algorithms

-Define the ADT Priority Queue

-Implement the ADT Priority Queue as a generic associative container subject to various constraints, including:

a. Push(t) <= O(size), Pop() = Θ(1)

b. Push(t) = Θ(1), Pop() <= O(size)

c. Push(t) <= O(log size), Pop() <= O(log size)

Use namespaces to develop and test multiple implementations of an ADT.

These last operations are useful in development and performance testing. We could, for example, drop in a "spy" version of order and use GetPredicate to obtain counts of the number of calls, obtaining runtime data on the implementation. Dump gives a snapshot of the underlying container, useful in development and testing.

Priority queues are used in several important applications, including:

  • Operating system job schedulers
  • Communications Satelite schedulers
  • Discrete Event simulations
  • Embedded/RealTime Systems
  • Control structures for certain algorithms, such as Best First Search

Procedural Requirements -

1. The official development/testing/assessment environment is specified in the Course Organizer.

2. Be sure start and maintain your log.txt.  

3. After creating your log.txt, begin by copying all of the files from LIB/proj8 into your project directory.

4. Create and work within a separate subdirectory. The usual COP 4530 rules apply (see Introduction/Work Rules). In particular: It is a violation of course ethics and the student honor code to use, or attempt to use, files other than those explicitly distributed in the course code library.

5. Place all work in one file named pq.h.

6. Turn in the files pq.h and log.txt using the submit script LIB/scripts/submit.sh and the configuration file LIB/proj8/deliverables.sh.

Technical Requirements and Specifications

1. Place all work in one file named pq.h. The code should use 6 distinct namespaces: std, fsu, pq1, pq2, pq3, pq4, pq5, and pq6.

2. The first two namespaces are those encountered in the standard and course libraries. The other six are defined in the submitted code.

3. Every method implementation must be one of three types:

i. Type 1 (no search is required): the body consists of a single call to an operation of the underlying container.  

ii. Type 2 (search is required): the body uses a member function or a generic search algorithm with a minimum of ancillary code.

iii. Type 3 (heap-based): the body uses a generic heap algorithm with a minimum of ancillary code.

4. Your submission is required to run correctly with the distributed client program tests/fpq.cpp. We will assess using fpq.cpp and another client program that uses a priority queue to sort data.

5. The log file should contain (1) statements of the runtime of the various priority queue methods, (2) explanations [informal proofs] that your statements are correct, and (3) testing procedures and results of testing.

6. The file level documentation should contain brief descriptions of the design for each implementation of priority queue. Please also include this in your log file.

Attachment:- Priority Queues Assignment.rar

Reference no: EM131306564

Questions Cloud

Calculate the present value of this cash flow stream : Suppose you are to receive $4,500 1 time(s) per year every year for 6 years (starting one year from now) plus $97,000 in 6 years. If the appropriate discount rate is 5.50%, calculate the present value of this cash flow stream.
Sales increase before any new fixed assets are needed : The discussion of EFN in the chapter implicitly assumed that the company was operating at full capacity. Often, this is not the case. For example, assume that Rosengarten was operating at 90 percent capacity. Thorpe Mfg., Inc., is currently operating..
What tools do you find most helpful for managing projects : What tools do you find most helpful for managing projects? How can you use spreadsheet software, such as Microsoft Excel, within the various project management processes?
Compare to current yield-to-maturity on a one-year strips : Use the following information to answer the next question: U.S. Treasury STRIPS, close of business Aug 15, 2016: According to the pure expectations theory of interest rates, how much would you expect to pay for a one-year STRIPS on Aug 15, 2017? What..
Implement the adt priority queue : Implement the ADT Priority Queue as a generic associative container subject to various constraints, including: Push(t)
Do you believe that your city delivers on its marketing : Who are their target customers? For example, are they: businesspeople or tourists; locals or travelers from afar? What benefits do they tout? Do you believe that your city/state delivers on its marketing promises? Why or why not?
Analyze a given enterprise environment : Analyze a given Enterprise environment and use models to design a network architecture that meets the business needs and processes indicated by the enterprise architecture.
Estate tax liability the client will ultimately pay : the 30-year projections in layman’s terms, assuming 3% annual appreciation in the value of the assets of a business. Consider the gift and estate tax liability the client will ultimately pay.
How would your decision affect the overall project : What do you need to consider before accepting or denying the vendor proposal? Explain. How would your decision affect the overall project?

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Write a program that uses a recursive algorithm to compute

Write a program that uses a recursive algorithm to compute the determinant of a maxtrix. It should read a matrix, print it out, and compute and print the determinant.

  Write algorithm using pseudocode to recognize substrings

Write the algorithm, using pseudocode, to do the following task, Given the string of numbers, recognize all the substrings which form numbers which are divisible by 3.

  Taxonomy tree as its input and returns a string

Designing an algorithm that takes a taxonomy tree as its input and returns a string that contains the type of "item" (animal, plant, etc) that was found after traversing the tree.

  Design and develop a database

The following assignment is based on the database environment chosen and created in the Week Three Individual Assignment.

  Create algorithm which will prompt for-accept four numbers

Create an algorithm which will prompt for and accept four numbers, sort them into ascending sequence and display them to the screen. Your algorithm is to include a module

  Finding page faults for lru replacement algorithms

How many page faults would happen for the given replacement algorithms, assuming one, two, three, and four frames?

  Design an algorithm to determine best route for passenger

Consider the following problem: Design an algorithm to determine the best route for a subway passenger to take from one designated station to another in a typical urban subway system similar to those in San Francisco and New York

  Create each table and specify appropriate column data types

Create each table and specify appropriate column data types, primary keys, foreign keys, and any special column characteristics in the Access database implementation.

  Write a method that finds the average age of the students

Write a method that finds the average age of the students stored in the data structure and some Java code that could be used in a test program to display the value returned by the method on the console or command prompt.

  Identify classes, functions, and algorithms

Detailed requirements. Using guidance provided in the text, (specifically chapters 12 and 13) develop your detailed requirements. Develop as many as possible but you must cover some detailed requirements for each of your high level requirements.

  Write efficient backtracking algorithm to inputs integers

Write efficient backtracking algorithm which inputs the integer N, and outputs all of the ways which a group of ascending positive numbers can be summed to N.

  Create a program that implements each mergesort an quicksort

Create a program that implements each mergesort and quicksort. For each the program should generate an array of 500 numbers in the range of 1-100.

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