Computer Science:

a.k.a. solving cool, huge and real-world problems

Computer Science(CS) is more than programming and wires, it's also problem solving! I've collected references, tutorials and demos for some of the classic CS problems that I have enjoyed learning about along my educational journey. Feel free to let me know if you have suggestions for other problems or cool resources.

Traveling Salesperson Problem (TSP)


A salesperson has to travel to a bunch of cities in as short of a trip as possible. Also, she can't travel through the same city twice. Can you help her plan the best trip?

TSP on Google Maps

Dining Philosophers' Problem


Five philosophers sit down to eat at a round table, but there are only 5 chopsticks! The philosophers think, then pick up chopsticks 1 at a time, then eat, then put down chopsticks one at a time. Can you write a set of rules so that no philosopher goes hungry?

Wikipedia on Dining Philosophers

Interactive example

Explanation and some Example Code

Instant Insanity


This is a game where there are 4 blocks who's sides are each 1 of 4 colors. The goal is to line up the blocks in such a way that each side of the combined blocks has a face of each color.

Make your own cubes!

Some tips to help you solve it!

Prisoner's Dilemma


Two people are accused of a crime and put in different rooms to be questioned. If they both betray the other they will both go to jail for 3 years. If one betrays and one stays silent then the silent one goes to jail for 6 years and the betrayer doe not go to jail. If they both stay silent then they both go to jail for 1 year. What is the best strategy?

Wikipedia on Prisoner's Dilemma

Play some variations on the Prisoner's Delimma

Knapsack Problem


Suppose you have a bunch of valuable items that you want to carry to the market, but your backpack only holds 20 lbs. You can't take all the items because their weights sum to 50 lbs. What items do you take to the market if you want to maximize the value of items you can sell?

Wolfram's 0-1 Knapsack Example

Wikipedia on Knapsack

Cannibals and Missionaries


There are 3 cannibals and 3 missionaries on one side of a river. They need to get to the other side but they only have a boat that carries at most 2 people and needs one person to row. If there are more cannibals than missionaries on one side of the river then the cannibals will eat the missionaries. How do the missionaries get everyone across without getting eaten?

A Game Version

Introduction to the Problem

Wikipedia

IBM's Watson


Watson is a computer, really a bunch of computers, that tries to understand and use search to answer questions in human language. In 2010 Watson won a game of Jeopardy! against Brad Rutter and Ken Jennings.

Intro to how Watson works

Watson Uses

Wikipedia on Watson

Other General Sites


CS Activity Ideas from CS Unplugged

Math Problems

Wolfram Demonstrations