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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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