exam.docx

The exam is to give you a chance to demonstrate how you would apply the various things we have learned so far in this course.

What I am principally interested in seeing is the process by which you apply those techniques to the problems in this midterm. Make sure you show not just your answer to the problems presented here, but all the work and ideas you explored to arrive at that answer, even if those ideas did not ultimately lead to your goal.

You should spend at most 3 hours working on the Midterm. During this time you may use your notes and slides from class, but should not use the internet outside of accessing this class’s Canvas page.

GOOD LUCK! If you have any questions or comments, please don't hesitate to ask.

1

2

3

4

5

6

7

1. There are 6 coins on 7 spaces arranged as above. Coins can only be moved one at a time to an empty space. A coin can jump over at most one other coin at a time. Coins can only move in the direction of the arrow on their face. No rotating coins.

What sequence of moves will result in all of the left pointing coins ending up in positions 1, 2, and 3 while the right pointing coins end up in positions 5, 6, and 7?

Can you generalize a pattern of movement that would enable us to extend the number of coins and spaces to an arbitrary amount (say 20 coins with 21 spaces) without drastically increasing the number of written steps?

2. You have 20 coins in a row. Ten are heads up, ten are tails up. The order is random. You also have a robot that can perform 4 different actions:

· Move itself one coin's width to the left or right at a time.

· See the heads/tails status of the two coins directly in front of it.

(or detect if there are not two coins)

· Turn over both of the two coins that it sees.

· Remember one number at a time

The robot starts at a random point along the line of coins. Can you give the robot a set of instructions that will result in all 20 coins eventually being turned heads up using only the capabilities outlined above? If not, why? If so, what are the instructions?

3. You and a friend are making a tower out of blocks. You take turns each adding between one and three blocks to the tower. You both know that as soon as the tower is 30 blocks high, it will topple. Each person's goal is to avoid being the one who topples the tower.

The first person to place a block has a strategy that will guarantee they can avoid being the one who topples the tower. What is it and why does it work?

4. Ask me a good question related to this course.