Background:  When searching for an item in a list, each item that we examine (compare) is considered to be interrogated.  If we search for John, the following names are interrogated:  Harry, Larry, John (in that order).  If two names tie for the middle position, choose the first of the two names for the middle. If we search this same list for John using the Sequential search we would interrogate all the names from Alice through John.  We would start with Alice, move to Bob, move to Carol and so forth until we reached John.   Directions: Use the original list of names (Alice - Oliver) to answers questions 1-8. Using a sequential search, what names are interrogated to find Carol?   Using a sequential search, what names are interrogated to determine that Sam is not in the list? Using a binary search, what names are interrogated to find Carol?  Using a binary search, what names are interrogated to determine that Sam is not in the list? Will a binary search or sequential search find Alice more quickly? Will a binary search or sequential search find a name in the middle of the list more quickly? Will binary search or sequential search find the absence of a name more quickly? In general, will the binary search or sequential search find an item more quickly? Show what the following list would look after it is sorted using Selection sort.     10.  Show what the following list would look after sorted using Insertion sort.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Background:  When searching for an item in a list, each item that we examine (compare) is considered to be interrogated

If we search for John, the following names are interrogated:  Harry, Larry, John (in that order).  If two names tie for the middle position, choose the first of the two names for the middle.

If we search this same list for John using the Sequential search we would interrogate all the names from Alice through John.  We would start with Alice, move to Bob, move to Carol and so forth until we reached John.  

Directions: Use the original list of names (Alice - Oliver) to answers questions 1-8.

  1. Using a sequential search, what names are interrogated to find Carol? 
  2.  Using a sequential search, what names are interrogated to determine that Sam is not in the list?
  3. Using a binary search, what names are interrogated to find Carol?
  4.  Using a binary search, what names are interrogated to determine that Sam is not in the list?
  5. Will a binary search or sequential search find Alice more quickly?
  6. Will a binary search or sequential search find a name in the middle of the list more quickly?
  7. Will binary search or sequential search find the absence of a name more quickly?
  8. In general, will the binary search or sequential search find an item more quickly?

  9. Show what the following list would look after it is sorted using Selection sort. 

   10.  Show what the following list would look after sorted using Insertion sort.  

 

 

Original list
Alice
Bob
Carol
David
Elaine
Fred
George
Harry
Irene
John
Kelly
Larry
Mary
Nancy
Oliver
First sublist Second sublist
Irene
John
Kelly
Larry
Mary
Nancy
Oliver
Irene
John
Kelly
Transcribed Image Text:Original list Alice Bob Carol David Elaine Fred George Harry Irene John Kelly Larry Mary Nancy Oliver First sublist Second sublist Irene John Kelly Larry Mary Nancy Oliver Irene John Kelly
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Graphical User Interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education