Problem 1:
Dr. X, Systems Analyst for the Speedy-Look-Up Consulting Firm has the following advice:
20% of the names in your alphabetically ordered, sequentially allocated, core-resident table
of 10,000 names account for 80% of the table look-ups. Instead of carrying out a binary
search over a single table with 10,000 entries, you should have a high-frequency table,
where 2000 most frequently looked-up names are arranged alphabetically, and a low-
frequently table, where the remaining 8000 names are arranged alphabetically. When you
want to look up a name, you search first in the small high-frequency table. 80% of the
searches will stop right there. In only 20% of the cases will you also have to search the
larger low-frequency table.
HAPPY ENDING: Dr. X gets a salary raise for having increased significantly the
throughput of Speedy-Look-Up's computer center.
SAD ENDING: Dr. X gets fired for professional incompetence.
You are the President of the Speedy-Look-Up, Chairman of the Board, and the main
stockholder. Choose between the HAPPY and SAD ending and justify your choice. Can
you think of a better way of searching the table? Please explain.