1. (POGIL) Define a pseudocode algorithm that will efficiently play the guessing game.
To efficiently play the guessing game, you would always guess the halfway point between the maximum and minimum number. For example, to guess a number from 1 to 100 you would first guess 50, and depending on whether that was too high or too low you would guess 25 or 75, and so on until there was only one number left.
2. (POGIL) To guess a number between 1 and 100, what's the maximum number of guesses your algorithm would take?
The maximum number of guesses our algorithm would take is 7.
3. (POGIL) To guess a number between 1 and 500, what's the maximum number of guesses your algorithm would take?
The maximum number of guesses the algorithm would take from 1 to 500 would be 9.
4. Suppose you have a deck of cards and you want to find the Ace of Spades. If the deck is shuffled, which is the best search algorithm to use and why?
There is not an efficient algorithm to find the ace of spades since all of the cards are shuffled randomly. You would have to go through each card individually to find the ace of spades.
5. Give an example of a search problem you encounter in everyday life. Do it use sequential, binary, or some other search?
I search for things when I am taking supplies out of my backpack when I need them for school. I don't have any sort of organizational system so I have to take each piece out of my backpack individually to find what I am looking for.