erated (range 100000 to 200000) Student Name : randomly generated (pick up from common English names : https://www.ssa.gov/oact/babynames/decades/century.html) Student Cumulative GPA : decimal x.xx, randomly gener

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

Write a Python program that satisfies the following requirements:

Use the following information for both Questions 1 and 2.  Let ?n be 500, 1000, 1500 and 2000.  There is a size-?n array containing student information including

  • Student ID : integer, randomly generated (range 100000 to 200000)
  • Student Name : randomly generated (pick up from common English names : https://www.ssa.gov/oact/babynames/decades/century.html)
  • Student Cumulative GPA : decimal x.xx, randomly generated with normal distribution (range 1.0 to 4.0)

Search students by student ID using the binary search algorithm in 3 different data distribution cases for student ID:

1)    Normal distribution: symmetrical

2)    Normal distribution: positive skew

3)    Normal distribution: negative skew

Additional information: Student ID is a discrete random variable. The question said the Student ID should be generated randomly. Even though random variables created by the normal distribution is continuous, you can just round it to integer values and make sure they are distinct. If one of the values happen to be duplicate, you can just regenerate again.  You can also use numpy.random.normal to generate normal random variable.

Hypothesis: the distribution of student ID has no effect to the performance (big-?O-notation) of the binary search algorithm.

Determine whether we can reject or fail to reject this hypothesis by showing through running experiments.  Try with different levels of skewness.

**Extra credits**: any extra information you can report about the relationship between skewness of normal distribution and search performance.

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Structured English
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
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