logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

Algorithm 1 Binary Search We chose to search data sets of size 500, 1000, and 2000, looking for the last item each time. Algorithm

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

No coding is needed, but I need a complete, concise report of justification/reasoning why each of 6 algorithm buttons in the attached Sort Detective Application to match with one of 6 sorts (bubble sort, insertion, merge, quick heap, and selection sorts). After opening App, load test file to check/run; you can add more data if you want

 

. Please follow instructions in the sort detective PDF file for details. Note that "ms" column is not useful compared to "moves" (how many moves) and "comparison" (comparison) since computers' hardware are varied. Please consider "moves" and "comps" in choosing the best sort algorithm. Note: when opening App, If you get warning message, you may need to right click the executable and "Run as Administrator". I'm having problem attaching App here, i'll send you in separate email.

 

Sort Detective Lab

Credit: Assignment from Sort Detective developed by David B. Levine

1 INTRODUCTION

The primary objective of this lab is for you to apply your theoretical knowledge of sorting algorithms to

solve a problem of poor user interface design. More specifically, you will be given a program which is

designed to measure comparisons, data movements, and execution time for the seven sorting

algorithms discussed in class. Unfortunately, the designer of the program did not label the buttons

properly. You must apply your understanding of the general properties of the algorithms (and in some

cases of the code used to implement them) to determine the proper labeling of the buttons.

The secondary objective of this lab is for you to gain experience writing a concise, but complete analysis

of a system.

2 BACKGROUND

As you know from class, if you double the size of the data set that you give to a quadratic algorithm, it

will do four times the work; by contrast, an O(n log n) algorithm will do a bit more than twice as much;

and, a linear algorithm will do only twice as much work. As you also know, the characteristics of the

input data set can affect the expected performance of many of our sorting algorithms. Before you begin

the lab, you should review the expected performance of the algorithms on various data sets.

The sorting algorithms under study include (in no particular order): bubble sort, insertion sort, merge

sort, quick sort, heap sort, and selection sort.

3 INSTRUCTIONS - WARNING: READ ALL OF THE INSTRUCTIONS BEFORE

BEGINNING!

1. Begin by copying the Sort Detective application from blackboard. Execute it and play with it a

bit. Notice that the button names do not give any indication which sort they will

execute. Notice also, that if you create a small list, then that list is shown to you in the window.

2. Devise a plan which will enable you to match the particular algorithms to the button

names. Hint: It may make sense to try to divide the sorts into initial groups and then to work on

each group separately. Divide and conquer: it works for algorithms and it can work here, too!

3. Execute your plan, taking careful notes as you go.

4. Describe the results of your experiment in a summary document. Begin with a summary of the

matching and then show the rationalization process that justifies it.

4 A NOTE ON WRITING

There is no coding in this lab. Thus, you should expect that a significant portion of the lab grade for this

lab will be determined by the quality of the writing of the report. This includes the completeness of the

report, the clarity (and grammar) of the writing, and general presentation. It is possible to receive a

poor grade even if you match all sorts correctly due to sloppy writing.

Some of the sorts are very difficult to distinguish. A carefully outlined experiment may compensate for

an error in these cases if the writing makes it clear that your conclusions/guesses are substantiated by

the data.

Finally, remember that your report needn't detail every experiment you ran. Rather, it should give

sufficient information to justify your conclusions. It is possible to write a very short report that is

completely correct if your experiments are well-chosen. After you learn the matching, you might

consider whether there was a shorter way to arrive at your conclusion!

5 DELIVERABLES

The Final report from Step 4.

Example

You will need much more analysis for the assignment but the following gives an idea of what kind of

analysis will be required.

5.1.1 General Results

Button Name Searching Algorithm

Algorithm 1 Binary Search

Algorithm 2 Sequential Search

5.1.2 Rationale

We chose to search data sets of size 500, 1000, and 2000, looking for the last item each time. Algorithm

1 took 500, 1000, and 2000 comparisons each time, doubling the number of comparisons each time the

size of the searchable list doubled. Algorithm 2 took many fewer comparisons and this number

increased by only one each time we doubled the size of the searchable list.

Since sequential search is linear, we conclude that Algorithm 2 is SEQUENTIAL SEARCH.

Then, by process of elimination, we conclude that Algorithms 1 is BINARY SEARCH.

(5/5)
Attachments:

Expert's Answer

679 Times Downloaded

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

679 Times Downloaded

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

966 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

664 Answers

Hire Me
expert
Husnain SaeedComputer science

678 Answers

Hire Me
expert
Atharva PatilComputer science

919 Answers

Hire Me
June
January
February
March
April
May
June
July
August
September
October
November
December
2025
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
00:00
00:30
01:00
01:30
02:00
02:30
03:00
03:30
04:00
04:30
05:00
05:30
06:00
06:30
07:00
07:30
08:00
08:30
09:00
09:30
10:00
10:30
11:00
11:30
12:00
12:30
13:00
13:30
14:00
14:30
15:00
15:30
16:00
16:30
17:00
17:30
18:00
18:30
19:00
19:30
20:00
20:30
21:00
21:30
22:00
22:30
23:00
23:30