Computer Science students learn about “binary” trees

Bryan Knowles
Bryan Knowles

Computer Science is, luckily, one of those subjects where we can inject ourselves into almost anything. That is to say, Computer Science is the art of solving problems – notably problems that are large and solved in ways that are fast.

As I am writing this post (Tuesday), your (remarkably brilliant) students are playing a question-asking game: one member of each group has a card with a word on it, hidden. Every other member of the group (frantically) screams out yes/no questions which the secret-keeper attempts to keep up answering. Once a team guesses the hidden word, that team gets a new card and continues play.

What the campers don’t know is that after this game I am going to show them how a computer might come up with a tree of questions and answers for playing a game just like this – for example, the popular handheld game, “20Q.” These sorts of trees are abundant in Computer Science because each “node” on the tree is either an answer (a “leaf”) or it splits exactly in two and is a “binary” tree.

Although binary trees won’t be covered by this VAMPY course, and aren’t even taught at the college level until Computer Science II, they are getting an introduction into how CSers think – procedurally, cutting a problem in half, over and over, until a solution is reached. I hope the kids leave this study hall meeting with a new curiosity for even higher level Computer Science concepts that I hope I’ll have the chance to show them, whether with a marker on a board or a game they can get excited about.

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on email
Email