Orientation and teaching the basics
It always gets me thinking about better ways to teach things, and I thought up a good metaphor for explaining Boolean searching. This would come after the "technical" explanation of combining sets.
Three Boolean operators go into a restaurant (no, really, this isn't a joke), AND, OR, and NOT. They want to order dessert. Here is the desert menu:What do you think? Does it help explain AND, OR and NOT? Or does it just make you hungry?
AND is very precise and orders "Chocolate AND Strawberries". OR is a greedy-guts and wants everything with "Chocolate OR Strawberries". NOT is allergic to strawberries and so orders "Chocolate NOT Strawberries".
- Strawberry shortcake (strawberries, cake, & whipped cream)
- Chocolate eclairs
- Chocolate covered strawberries
- Fruit tart with blueberries, strawberries, and blackberries
- Banana split with chocolate sauce and whipped cream
- Fresh sliced mango
What does each one get? (Remember, this is a restaurant and two people can get the same thing, and each person can get more than one dish.)
Extra credit question: Can AND and NOT share a dessert?
- AND gets Chocolate covered strawberries
- OR gets Strawberry shortcake, Chocolate eclairs, Chocolate covered strawberries, Fruit tart, and a Banana split
- NOT gets Chocolate eclairs, and a Banana split