University of Waterloo Logo and CEMC Banner

2015 Beaver Computing Challenge
(Grade 9 & 10)

Questions


Part A

Popularity

Story

Five beavers join an online social network resulting in the following activity:

Then, we track how popular various beavers are. We give \(n\) popularity points to beaver \(Y\) if beaver \(X\) follows beaver \(Y\) and there are \(n\) beavers that follow beaver \(X\). We compute beaver \(Y\)’s total popularity points by adding up all such points from all the beavers that follow beaver \(Y\). For example, Bob has 3 popularity points.

Question

Which beaver has the most popularity points?

  1. Ari
  2. Bob
  3. Chio
  4. Dmitri

Chestnut Animals

Story

Tommy Beaver was inspired by the picture of an animal made from nuts, and created 4 animals by himself using chestnuts, strings and glue (shown below):

Starfish Dog Sea lion Giraffe
5 outer chestnuts all connected to one central chestnut. 3 rows of chestnuts. The first row contains one chestnut, the second two, and the third four. The chestnut in the first row connects to the rightmost chestnut in the second row, and pairs of chestnuts in the fourth row each connect to one of the chestnuts in the middle row. A string of four chestnuts all connected in a line. The second chestnut to the right branches off and connects to two more chestnuts. A string of three chestnuts, the bottom of which connects to four individual chestnuts.

His sister plays with these animals by moving the chestnuts around without breaking any connections. This makes it hard to recognize which shapes correspond to which animals.

Question

Which animal was the following shape before Tommy Beaver’s sister played with it?

A string of three chestnuts placed horizontally. The leftmost chestnut connects to two chestnuts placed above and below it. The middle chestnut connects to two more chestnuts placed above and below it.

  1. Starfish
  2. Dog
  3. Sea lion
  4. Giraffe

Catch Up

Story

Allison Beaver has a pile of 10 trees. Beatrice Beaver has only 1 tree.

Allison Beaver and Beatrice Beaver start chewing trees in a forest at exactly the same time. They add every tree they chew down to their own pile of trees.

Alison Beaver chews down one tree per hour.

Beatrice Beaver chews down trees at a different rate. In the first hour, she will chew down one tree. In the second hour, she will chew down two trees. In the third hour, she will chew down three trees, and so on.

Question

After how many hours will Beatrice first have at least as many trees as Allison?

  1. 4
  2. 5
  3. 6
  4. 7

QB-Code

Story

Beavers want to encode numbers for keeping track of how many trees they have chewed down. Therefore they developed the Quick-Beaver-Code (QB-Code). This is a graphical code consisting of nine \(1\times 1\) squares arranged into a \(3\times 3\) square. Every square has a certain value. The squares are filled line by line from the bottom to the top, from right to left. The next square has double the value of the square before. In the example, you see the values of the first five squares.

From right to left, the bottom row reads 1,2,4. The rightmost square in the middle row reads 8, and the middle square in the middle row reads 16. The remaining squares are empty.

To encode a number, the beavers darken some squares. The number encoded is the sum of the values of the dark squares.

For example, the number encoded in this QB-Code is 17:

The square containing 1, and the square containing 16 have been darkened.

Question

Which of the following encodes the largest number?

The middle square in the top row is darkened. The leftmost square in the middle row is darkened. The rightmost square in the bottom row is darkened.

  1. The rightmost square in the top row is darkened. The leftmost square in the middle row is darkened. The middle square in the bottom row is darkened.
  2. The leftmost square in the top row is darkened. The rightmost square in the middle row is darkened. The middle square in the bottom row is darkened.
  3. The middle square in the top row is darkened. The rightmost square in the middle row is darkened. The leftmost square in the bottom row is darkened.
  4. The middle square in the top row is darkened. The leftmost square in the middle row is darkened. The rightmost square in the bottom row is darkened.

Irrigation System

Story

Beavers have created a nifty irrigation system for their fields. The water flows from a lake at the top of the hill all the way down to the fields numbered 1 to 6 at the bottom.

Along the water canals, the beavers have installed four water gates A to D, where the water can only flow either to the left () or to the right(). An example showing how these may be set to have the water flow to fields 1, 2, 5 and 6 is shown below.

A representation of the complete irrigation system indicating which directions should be chosen for gates A, B, C, and D so that water flows down to fields 1, 2, 5, and 6 but not to fields 3 and 4.

Question

What is the correct configuration for the water gates to irrigate only fields 2, 4, 5 and 6?

  1. A: left. B: left. C: right. D: left
  2. A: right. B: left. C: left. D: right.
  3. A: right. B: left. C: right. D: left.
  4. A: left. B: right. C: right. D: right.

Part B

Collecting Pollen

Story

Beever the bee flies to a field of flowers to collect pollen. On each flight, he visits only one flower and can collect up to 10 mg of pollen. He may return to the same flower more than once.

The initial amount of pollen in each flower (in mg) is shown below.

From left to right, the flowers have: 6mg, 52mg, 35mg, 82mg, 23mg, and 11mg.

Question

What is the maximum total amount of pollen that Beever can collect in 20 flights?

  1. 179 mg
  2. 195 mg
  3. 196 mg
  4. 200 mg

Connecting Beaver Dens

Story

There are seven dens in a pond just off a shore as shown below. Dotted lines show where bridges can be built. The numbers show how many trees are needed to build each possible bridge. A beaver needs to decide which bridges to build so that any den can be reached from the shore without swimming.

A description of the diagram follows.

Question

What is the fewest number of trees needed to build the bridges?

  1. 12
  2. 13
  3. 17
  4. 18

Robotic Car

Story

Beavers have developed a robotic car. It has sensors that detect intersections. It produces the sounds shown below, when it is possible to turn left, right or both directions. The robotic car can go straight through an intersection (when possible), turn right (when possible) or turn left (when possible). The robotic car cannot make U-turns and cannot reverse.

The car makes a Ding sound when possible to turn left only, a Dong sound when possible to turn right only, and a Huiii sound when possible to turn left or right.

It automatically stops when it senses an obstacle in front of it.

Question

The car drives around the map shown below, starting at the indicated position. As it drives around the map, it produces the sounds Huiii Ding Huiii Dong, in that order.

The car is placed in the centre of a map with many intersecting roads. Four locations are marked A, B, C, and D.

At which location does the car stop?

  1. Location A
  2. Location B
  3. Location C
  4. Location D

Jumping

Story

A beaver moves in strange ways. He starts at the middle position, as shown below. He will make five moves, alternating between right (R) and left (L): he first moves right, then left, then right, then left, and finally, right.

There are 19 tiles. The beaver stands on the tenth tile from the left. Position A is marked as the thirteenth tile from the left. Position B is marked as the ninth tile from the left. Position C is marked as the eighth tile from the left. Position D is marked as the seventeenth tile from the left.

On each move, he can jump 1, 2, 3, 4 or 5 positions from his current position. He picks each distance exactly once. For example, he can move R by 2, L by 1, R by 5, L by 4 and R by 3, ending at \(2 - 1 + 5 - 4 + 3 = 5\) positions to the right from where he started.

For your convenience, every second position is shaded.

Question

Out of the four positions marked by a letter, there is one that he cannot end up on. Which one?

  1. Position marked A.
  2. Position marked B.
  3. Position marked C.
  4. Position marked D.

Mistakes

Story

Three kinds of buttons control a robot:

Button Description
Turn Left robot turns left
Turn Right robot turns right
Move X robot moves \(X\) units in the direction it is facing

The robot starts at the blue star facing east. John presses the seven buttons shown (from left to right) to try and move the robot to the red diamond. Unfortunately, he presses two extra buttons by mistake.

A 10 by 10 grid. The blue star is in the second column from the left, and fourth row from the bottom. The red diamond is in the eighth column from the left and seventh row from the bottom. The robot is at the seventh column from the left, and second row from the bottom.

The buttons are pressed in the following order: Move 2, Turn Left, Move 2, Turn right, Move 3, Turn right, Move 4.

Question

Which two button presses should be removed so that the robot ends at the correct location?

  1. the 1st and the 2nd
  2. the 1st and the 4th
  3. the 3rd and the 4th
  4. the 2nd and the 6th

Part C

You Must Turn

Story

A king loves long travels in his coach, so he orders his coachman to never go straight when reaching a new road. That is, the coachman must turn either right or left if he comes to any intersection. This applies even for intersections with three roads.

The image below shows a road map of the country. Roads are shown as red vertical or horizontal lines. All roads connecting two adjacent intersections are 1 km long.

The king needs to go from the bottom left corner, marked Start, to the top right corner, marked Finish. The coachman however, wants to get to the destination as quickly as possible.

The map.

Question

Find a shortest path for the coachmen from start to the finish that does not break the rule that the coach can never go straight. What length does it have?

  1. 11 km
  2. 13 km
  3. 15 km
  4. It is not possible to get to the destination without breaking the rule.

Weather

Story

Beaver John plans to go to the beach tomorrow, but he will go only if there will be at least three sunny hours between 13:00 and 19:00 (which is 24-hour time for 1:00pm and 7:00pm).

He has a file containing the hourly weather forecasts, made up of 24 lines corresponding to each hour of the day, from 00:00-01:00 to 23:00-24:00; each line contains one of the words sunny, cloudy, rainy, or snowy. He can use the following commands

Using \(|\) as a separator, John can combine these commands in sequence as he likes: the output of any command in the sequence will be the input of the following command. For example, the sequence

A | B | C

where A, B and C are commands from the list, indicates that the output of A is used as the input for B; the output of B is then used as the input for C. The input to the first command is always the content of the file of forecasts.

Question

How can John arrange the previous commands in order to decide whether or not he will go to the beach?

  1. FIRST 19 \(|\) LAST 6 \(|\) ONLY sunny \(|\) COUNT
  2. ONLY sunny \(|\) FIRST 19 \(|\) LAST 6 \(|\) COUNT
  3. FIRST 20 \(|\) LAST 7 \(|\) ONLY sunny \(|\) COUNT
  4. LAST 20 \(|\) FIRST 6 \(|\) ONLY sunny \(|\) COUNT

Fireworks

Story

Two beavers live in lodges separated by a large forest. They decide to send messages to each other by shooting fireworks into the sky above the trees. Each message is a sequence of words, but the beavers only know five words. They shoot two types of fireworks one after the other according to the following code:

Word Code
log Blue Red
tree Red Blue Red
rock Blue Red Blue
den Blue Blue
food Red

For example, to send the (strange) message “food, log, food”, a beaver would shoot:

Red Blue Red Red

Question

How many different meanings does the following sequence of fireworks have?

Blue Red Blue Red Blue Red Blue Blue

  1. 1
  2. 2
  3. 3
  4. 4

Spies

Story

Every Friday, six spies share all the information they have gathered that week. A spy can never be seen with more than one other spy at the same time. They have to conduct several rounds of meetings where they meet up in pairs and share all information they have at that point.

The group of 6 spies needs only three rounds to distribute all information. Before the meetings, each spy holds a single piece of information. (spy 1 knows “a”, spy 2 knows “b”, etc.). In the first round, spies 1 and 2 meet and share information so now both know “ab”. The diagram shows the initial information as well as the three rounds of meetings, with lines indicating which spies meet in each round. It also shows which pieces of information they all have. After three rounds all information has been distributed.

  1. Initial State:

    6 vertices labelled A1, B2, C3, D4, E5, and F6.

  2. After Round 1:

    A line connects A1 and B2, and the vertices are renamed to AB1 and AB2. A line connects C3 and D4, and the vertices are renamed to CD3 and CD4. A line connects E5 and F6, and the vertices are renamed to EF5 and EF6.

  3. After Round 2:

    A line connects AB2 and CD3, and the vertices are renamed to ABCD2 and ABCD3. A line connects AB1 and EF6, and the vertices are renamed to ABEF1 and ABEF6. A line connects vertices CD4 and EF5, and the vertices are renamed CDEF4 and CDEF5.

  4. After Round 3:

    A line connects ABEF1 and ABCD2, and the vertices are renamed to ABCDEF1 and ABCDEF2. A line connects ABCD3 and CDEF5, and the vertices are renamed to ABCDEF3 and ABCDEF5. A line connects CDEF4 and ABEF6, and the vertices are renamed ABCDEF4 and ABCEDF6.

Question

After an international incident one spy has stopped attending the meetings. What is the minimum number of rounds needed for the five remaining spies to share all information?

5 vertices labelled a1, b2, c3, d4, and e5.

  1. 2
  2. 3
  3. 4
  4. 5

Beaver the Alchemist

Story

Beaver the Alchemist can convert objects into other objects. He can convert:

After objects have been converted to another object, they disappear.

Initially Beaver the Alchemist has lots of clovers, but no coins, rubies, crowns or kittens.

Question

How many clovers does Beaver the Alchemist need to create one kitten?

  1. 5

  2. 10

  3. 11

  4. 12