How many comparisons are needed to locate or to add each of these words in the search tree for the words oenology, phrenology, campanology, ornithology, ichthyology, limnology, alchemy, and astrology using alphabetic order starting fresh each time?
a) palmistry
b) etymology
c) paleontology
d) glaciology

Respuesta :

Answer:

(a) 3

(b) 3

(c) 3

(d) 3

Explanation:

(a) Comparing palmistry to oenology, it comes alphabetically after oenology, hence we move on to compare it to phrenology. Now, palmistry come first alphabetically, meaning we move on to compare it to ornithology. As ornithology has no children, there isn't any comparison needed so we end up with 3 comparisons.  

(b) Comparing etymology to oenology, it comes alphabetically before oenology, hence we move on to compare it to campanology. Now, palmistry is latter alphabetically, meaning we move on to compare it to ichthyology. Etymology comes first alphabetically and as ichthyology has no rightward children, no more comparison is needed and we end up with 3 comparisons.

(c) Comparing paleontology to oenology, it comes alphabetically after oenology, hence we move on to compare it to phrenology. Now, palmistry is first alphabetically, so we move on to compare it to ornithology. As ornithology has no children, we won't make any more comparisons so we end up with 3 comparisons.

(d) Comparing glaciology to oenology, it comes alphabetically before oenology, so we move on to compare it to campanology. Now, palmistry comes latter alphabetically, so we move on to compare it to ichthyology. Glaciology is first alphabetically in this case and as ichthyology has no rightward children, no more comparisons are necessary and we end up with 3 comparisons

ACCESS MORE