Create an unsorted array list with 100 random items

Assignment Help Computer Engineering
Reference no: EM132103893

Problem : The text book, as well as the instructor, has told you about the order of the two searching algorithms (Linear and Binary). The question is do you actually agree with the theoretical representation of the results presented to you? How would you go about proving or disproving what you have been told about the order of algorithms in relation to reality?

a. Create an unsorted array list with 100 random items in it and then perform a linear search on the array list looking for an item that is present in the list. Count the number of comparisons required to find the item in the list.

b. Do the same problem as part a again, but this time look for an item that is not in the list.

c.Create an ordered array list with 100 random items in it and then perform a binary search on the array list looking for an item that is present in the list. Count the number of comparisons required to find the item in the list.

d. Do the same problem as part d again, but this time look for an item that is not in the list.

e. Note to get a true sample, a statistically valid, representation of the results for each of a,b,c,and d must be run at least 10 times, so do this and plot the results on a graph showing how many comparisons are required for each of the options listed above (a through e) and finally you can answer the original question do the practical results match the theoretical results? Note be specific in your answer, and support your conclusion with the data results you have obtained.

Problem 2: The text book, as well as the instructor, has told you about the order of the sorting algorithms (Selection, Insertion, Bubble, Quick, and Merge). The question is do you actually agree with the theoretical representation of the results presented to you? How would you go about proving or disproving what you have been told about the order of algorithms in relation to reality?

a. Create an unsorted array list with 100 random items in it and then sort it. Count the number of comparisons required to sort it. Do this for bubble sort and quick sort and do each algorithm 10 times, and plot the results on a graph showing how many comparisons are required for each of the sorting algorithms and finally you can answer the original question do the practical results match the theoretical results? Note be specific in your answer, and support your conclusion with the data results you have obtained.

Reference no: EM132103893

Questions Cloud

Compare two different nations with respect to gnp : Compare two different nations with respect to GNP, fertility rate, and life expectancy.
Calculates a customers bank balance with pseudocode : Write Pseudocode for a program that calculates and displays a customer's bank balance at the end of a month.
Based on the five immunoglobulin classes : Based on the five immunoglobulin classes, what is the difference between Anti-B antibodies of a mother rarely
Treated for malignancy in the left breast : Why when following surgery, a patient experiences edema of her left arm after being treated for malignancy in the left breast
Create an unsorted array list with 100 random items : Create an unsorted array list with 100 random items in it and then perform a linear search on the array list looking for an item.
What are the dominant and recessive factors : What are the dominant and recessive factors according to Gregor Mendel explanation to genetics?
How does adaptation enable organisms : How does adaptation enable organisms to reduce competition for food and other resources?
Provide the mean and standard deviation using r : Create a relative frequency histogram of the "Time in Minutes" variable. What is the difference between these two graphs?
Sex influenced-sex limited and sex linked inheritance : What is the difference between sex influenced/sex limited and sex linked inheritance?

Reviews

Write a Review

Computer Engineering Questions & Answers

  You will implement an end-to-end document classication

you will implement an end-to-end document classi?cation system that predicts which category pages belong to using the

  Many security experts argue that their primary concern

Many security experts argue that their primary concern isn't hardware or software. It's peopleware. Successful attacks often rely on some form of social enginee

  Prepare a presentation on expert systems and ai

Prepare a Power point presentation and a case study on "Expert Systems (ESs) / AI".

  Examining how net neutrality will affect data networks

Base on your article review and the assigned reading, discuss how net neutrality will affect data networks and the availability of information to businesses.

  What do you recommend that the application include to ensure

Recently, there has been a push to admit more international students into the university. What do you recommend that the application include to ensure that it supports this global requirement?

  Kind of constraint that stipulates

Kind of constraint that stipulates that a user can be assigned to a role only if that user was already given another role.

  Show how this instruction would be written using rtn

Basically, we are incrementing the operand, and if this new value is equal to 0, we skip the next instruction. Show how this instruction would be written using RTN.

  Write a program that initializes the list scores

Write a program that initializes the list scores with the values in the text file scores.txt and calls the gameNim() function, once the game has finished the list scores are updated with the results.

  Developing the lan network for a company

You have been asked to develop a LAN with operation over the distance of around 100m. Compare and contrast the twisted pair cable, fiber-optics, and wireless for this application.

  Write a program that mimics a flop-turn-river of poker game

Write down a program that mimics a flop-turn-river of a poker game. I must have three buttons titled Deal, Shuffle and Start Over.

  Write a program to print out all points from a binary tree

Write a program to print out all points from a binary tree that do not fall in a specified interval.

  How you would solve the general line-intersection problem

Describe how you would solve the general line-intersection problem given the additional fact that the minimum separation between two lines is greater.

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