Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93091362

Have any Question?


Related Questions in Computer Engineering

Question when we studied clusters we discovered that

Question : When we studied clusters we discovered that semaphores, the mechanism we rely on for mutual exclusion, don't work, and so we studied message-passing as an alternative that does work on clusters. Why do semapho ...

Question suppose a binary tree t has 10 nodes which are

Question : Suppose a binary tree T has 10 nodes which are labeled 0,1,2,...,9. We ran the inorder and postorder traversals on the tree and the nodes were processed in the following order: inorder traversal: 0,3,1,2,9,4,6 ...

Explain and discuss the following quotepoliticians can be

Explain and discuss the following quote: "Politicians can be strange. They have been calling for the breakup of firms as diverse as energy companies and tech giants like Microsoft and Google because they believe these co ...

What are the minimum numbers of keys and pointers in btree

What are the minimum numbers of keys and pointers in Btree (i) interior nodes and (ii) leaves, when: a) n = 10; i.e., a block holds 10 keys and 11 pointeis. b) n = 11; i.e., a block holds 11 keys and 12 pointers.

Answer the following question how do you represent a node

Answer the following Question : How do you represent a node in a deployment diagram? What kinds of information can appear on a node? The response must be typed, single spaced, must be in times new roman font (size 12) an ...

In the state of texas a person is legally intoxicated at 08

In the state of Texas a person is legally intoxicated at .08% BAC when operation a motor vehicle. In your opinion should the legally intoxicated percentage be lowered or raised to determine a persons intoxicated conditio ...

Explain a business process you are familiar with describe

Explain a business process you are familiar with. Describe how a computer-based information system is related (or used) in this business process. Explain how a computer-based information systems can improve the efficienc ...

Assignmentsuppose you are an isp that owns a 19 address

Assignment Suppose you are an ISP that owns a /19 address CIDR block starting at 118.235.160.0/19. Answer the following questions to allocate address blocks to 10 customers who want to pay for the smallest CIDR blocks to ...

Question suppose we iterate the application of a blurring

Question : Suppose we iterate the application of a blurring filter with kernel size 5 on an image of 800 times 600 pixels. How many times should we apply the filter for the color of the pixel at position (20, 20) to be i ...

Can someone please help me with this examthis is consists

can someone please help me with this exam This is consists of four questions. The questions are designed to test your understanding of certain concepts that were studied over the course of the semester. Please answer all ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As