Write a program to calculate the probabilities of collisions

Assignment Help JAVA Programming
Reference no: EM131329821

Assignment

You have to doONE of the following:

1. Modify your Registration project(s) to use a Hash Table to maintain the student information instead of the sorted array or BST. Your hash function should be based on the last three (3) digits of the student ID.
In your comments, include the average runtime for your Search, Insert and Delete methods, and how your program will handle collisions.

2. Adapt your Registration projects to include a menu (like in the warm-up project) that will determine, based on the "stability" of the registration data, the implementation of the student data (sorted array or bst). The project should include a way to change from the BST to the sorted array.

3. Write a program to calculate the probabilities of collisions for the following:

You are asked to write a program to store information for customers for a small local business. The owner wants to use "date of birth" (not the year!) as a way to look up customer information because he/she believes that the probability of collisions is very small.

Your program should calculate the probability of two customers having the same birthday, and finding

a. How many customers give a 50% chance of collision
b. How many customers give a 95% chance of collision

The program is not difficult, but be careful about the actual calculations (n! overflows for relatively small n)

Describe how you would handle collisions for the data, and also explain how you would write the "hash function" to assign a customer to the hash table by birthday.

4. Write a program that could be used to schedule jobs based on the "shortest job" algorithm, and compare the running of the programs to using a queue.

Use the data from the given table to calculate the "turnaround" time for each job (time a job is completed - time a job enters the system), and the average waiting time for the jobs ((total turnaround time - total "running" time)/number of jobs)

a) using a queue
b) using a heap based on "expected run time" (CPU burst)

Which method gives the lower average waiting time?

Reference no: EM131329821

Questions Cloud

What rate is velocity growing : Calculate the level of velocity for each year.  At what rate is velocity growing? Why does Bank Capital Exist? Why did brokered deposits during the S&L crisis cause interest rates to rise?
Game theory of money and banking : These questions concentrate on the game theory of money and banking. Consider the Principle-Agent problem in relation to banking.
Write a java progrmato calculate total annual compensation : Write a Java application using NetBeans Integrated Development Environment (IDE) that calculates the total annual compensation of a salesperson. Consider the following factors:A salesperson will earn a fixed salary of .
Accordance with moral hazard concerns : Economists have long argued that, due to moral hazard problems, that "bailing out" firms such as banks (the S&L crisis), brokerage firms (Bear Stearns, Drexal Burnham...) and nations (Perhaps Greece in the future and the earlier Mexican Currency C..
Write a program to calculate the probabilities of collisions : Write a program to calculate the probabilities of collisions for the following: You are asked to write a program to store information for customers for a small local business.
What is the probability that the sample mean will be within : A population has a mean of 400 and a standard deviation of 80. Suppose a sample of size 125 is selected and x ¯ is used to estimate μ. What is the probability that the sample mean will be within +/- 5 of the population mean (to 4 decimals)? What is t..
Effect on the size of the money supply : When the reserve requirement is increased, what is the effect on the size of the money supply? What is the practical justification of the reserve requirement, besides as a monetary policy tool?
How many moles of oxygen per minute are absorbed : An athlete at high performance inhales of air at 1.0 atm and 298 K at a respiration rate of 32 breaths per minute. If the exhaled and inhaled air contain 15.3 and 20.9% by volume of oxygen respectively,
Mundell-fleming model : Mundell-Fleming Model. Explain the use of the Mundell-Fleming Rule to solve a combination of Unemployment and BOP deficit. Be sure to explain how your policies would fix the imbalances.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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