An Algorithmic and Social Introduction to Computer Science (CSC-105 2000S)


Explain unambiguously how to look up a phone number in a phone book given the person's name. Also describe how to look up a person's name in the phone book given their phone number.

Adan

Answered a different question (the one posted on the outline as opposed to the one given in class).

Cathy

To look up a phone number:

1. Go to the section of the phone book that lists names starting with the same letter as the name you are using.

2. Find the part of this section that lists names with the same second letter as the name you are using.

3. Continue matching up each subsequent letter until there are no more letters left and you have found a match.

4. If you have found a name which matches the one you were looking for exactly, the number attached to it may be the one you are looking for.

To look up a name:

1. Find a reverse directory.

2. Go to the section of the phone book that lists numbers starting with the same number as the one you are using.

3. Find the part of this section that lists numbers with the same second number as the one you are using.

4. Continue matching up each subsequent number until there are no more numbers left and you have found a match.

5. If you have found a number which matches the one you were looking for exactly, the name attached to it is the one you are looking for.

(Note: there are easier ways to do these -- i.e. call information, type the name/number into certain web sites, or "*69" -- but I assumed that this was what you were looking for.)

Ivy

Ho to look up a phone # by name in the phone book. (assuming the person can distinguish between first and last names and knows the alphabet)

How to look up a name by a phone #. (as far as i know, there is no efficient way to do this using a physical phone book)

Jae

Algorithm for finding a number for a name in a phone book:

Algorithm for finding a name from a number in a phone book:

Jeana

Assuming you know what alphabetical order means, given a phone book and a person's name:

Given a phone book, a phone number and no name: I don't know that there's any way to realistically locate the person to whom the number belongs. Essentially, to find it's owner, you'd have to just start scanning down the phone numbers until you found a match. Hugely inefficient and time-consuming, and that's assuming the number is even listed.

Jeff

Given a name describe how to determine a telephone number

Given a phone number describe how to determine a name

Joel

Describe the how to put names and corresponding phone numbers in a phone book alphebetically.

Kevin

1. People's names are generally arranged in phone books in alphabetical order by the last name of the person. The first name of the person is listed after the last name so that people of the same last name can be differentiated. Arrange the name in question in that manner, with the last name first and the first name last.

2. Phone books have index names at the top of each page to make the identifying of one name easier. Go to the first page with indices which have the same first letter of the last name as that of the name in question.

3. Within the range of this first letter, go to the first page with the second letter of the subject's last name. Continue doing this with each successive letter of the person's name, until you have arrived at a name identical to that of the one for which you are searching.

4. Write down the number associated with the name you have found.

5. In the event of multiple people with the same name, it may be necessary to call each of the multiple numbers to discover which is the person for whom you are searching.

With the number.

1. Phone books are NOT put in numerical order by phone number.

2. Write down your number so that it is easy to compare (and hard to forget) when comparing.

3. Beginning with the first page of phone listings, compare every number in the phone book with that you have written until a number is found which is an identical match.

4. Write down the name of the person with whom the number is associated.

5. Multiple people should not have the same number.

Liz

To find number g given name x:

To find name x given number g:

Sam

How to look up a phone number if you have a name:

Since this is the purpose for which a phone book is designed, this task is not extremely difficult.

How to look up a name if you have a number: A decidedly harder process, considering that this is not the intended way of using a phonebook.

...or maybe try starting with the last digit and working backwards. The first one or two digits are more likely to be shared, so they are more easily eliminated later.


Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.

This page may be found at http://www.math.grin.edu/~rebelsky/Courses/CS105/2000S/Questions/question.10.html

Source text last modified Sun Feb 13 09:55:45 2000.

This page generated on Wed Feb 16 08:36:39 2000 by Siteweaver. Validate this page's HTML.

Contact our webmaster at rebelsky@grinnell.edu