2024 Beaver Computing Challenge
(Grade 5 & 6)
Questions, Answers, Explanations, and Connections
Jun is ordering a large pizza for four of his friends. Each of his friends has three favourite pizza toppings as shown below.
Friend | Favourite toppings |
---|---|
Eslam | |
Meral | |
Salma | |
Wout | |
Jun wants to choose the three most popular toppings for the pizza he is ordering. (A topping is more popular than another topping if it is the favourite of more friends than the other topping.)
Which of the following pizzas should Jun choose?
(C)
Looking at the favourite pizza toppings of each friend, we see that
four people have mushrooms as a favourite topping,
three people have cheese as a favourite topping, and
two people have onions as a favourite topping.
The other three toppings (hot pepper, pineapple and spinach) are each the favourite of only one friend. This means that mushrooms, cheese, and onions are the three most popular toppings among Jun’s friends. These are the three toppings in Option C.
This problem highlights how to organize data in a way that makes retrieval easier. Specifically, if there was a way to ask a question such as "How many people like this topping?", we could quickly determine what the most popular toppings were.
When there is a large amount of data to be stored and retrieved, often it is stored in a database system. A database stores some key value along with data associated with that key. In this particular problem, the name of the friend is the key, and the data associated with the key is their favourite toppings. Each entry can be thought of as a row in a table in a database.
To analyze the data, most database systems have the ability to SELECT various rows of data WHERE certain conditions are met, and even COUNT the number of such rows. For example, we could count the number of rows in our pizza table where cheese is one of the favourite toppings, and determine that there are three such rows.
Being able to organize data in a database, and perform queries to analyze the data contained in the database, are important skills for database administrators.
Germany
Beaver Alia hiked along a path from her home to the middle of the forest, enjoying nature along the way.
She first passed rocks . Then she passed an apple tree
, followed by a bird’s nest
.
Which of the four paths leads back to Alia’s home?
(B) Path B
On the way into the forest, Alia first saw rocks, then an apple tree, and finally a bird’s nest. If she takes the same path to get home, she will see the same objects, but in the reverse order. So, on the way home, she will first see a bird’s nest, then an apple tree, and finally the rocks. Hence, Option B is the correct answer.
Option A is incorrect, because there is no bird’s nest.
Option C is incorrect because the rocks should be seen last on the way home, not first.
Option D is incorrect because there are no rocks.
This problem simulates a stack data structure that uses the LIFO (Last In First Out) rule: the item that is placed in last is the first to be removed. The objects seen by Alia can be thought of as objects put into a stack. The first object seen (rocks) is put into a stack, followed by the second object (apple tree) and the third object (bird’s nest) so that the stack can be described as follows:
When Alia walks in the opposite direction, each object in the stack needs to be removed. The first thing Alia sees on her way home is a bird’s nest. Then the bird’s nest is removed from the stack so that in the top position is the apple tree. Then the apple tree is removed from the stack as well. The last item remaining in the stack is the rocks.
Stacks are used frequently in computer science. One such usage is keeping track of operations that can be "undone", such as edits to a document, browsing history in a browser, or searching through a maze by way of backtracking if a dead end is reached.
Indonesia
Gabija offers to share the nine candies shown below with her friends.
They take some candy as follows:
First, Benas takes one candy of each type.
Then, Marija takes two green dotted candies .
Finally, Andrius takes one round striped candy .
After this, how many candies of each type remain?
(A) two , one
, zero
After Benas takes one candy of each type, the number of candies is as follows:
three , one
, two
.
Then, after Marija takes two green dotted candies, the number of candies is as follows:
three , one
, zero
.
Finally, after Andrius takes one round striped candy, the number of candies is as listed in Option A.
This task is focused on keeping track of a set of variables.
We can think of the number of each type of candy as being stored in a
variable that describes the candy being stored. For example, the
variable rs
could store the number of round striped
candies, the variable gd
could store the number of green
dotted candies, and the variable sb
could store the number
of square blue candies.
Initially, we know that rs=4
, gd=3
and
sb=2
. After each person takes their selection of candies,
the values of some of the variables change. For example, if Benas takes
one candy of each type, the variables would have values
rs=3
, gd=2
and sb=1
.
Variables are used extensively in many programming languages to store information that computers can read, process, and display.
Lithuania
When folded, a gift box is a pyramid with a square base as shown.
The sides and bottom of the box are different colours and patterns, but only some of these are shown.
Which of the following could be the outside of the gift box when it is unfolded?
(B)
All four options have a square in the centre with a triangle on each of its four sides, which would fold up to make a pyramid with a square base. Since they are all the correct shape, we need to use the colours and patterns to determine which option is correct.
The square base of the folded gift box is striped, so when it is unfolded, the square in the centre will be striped. Two of the triangular sides of the folded gift box are shown. One of the triangular sides appears to be white and the other appears to be dark blue. Looking from the base, the dark blue side is beside the white side in the clockwise direction. The other two sides are not shown on the folded box so they can be any colour and/or pattern.
Option A is incorrect because its square is not striped.
Option C is incorrect because the dark blue triangle and white triangle are in the wrong order. The dark blue triangle should be the next triangle clockwise from the white triangle, but in Option C the dark blue triangle is the next triangle counter-clockwise from the white triangle.
Option D is incorrect because when it is folded, the dark blue triangle and white triangle would be opposite each other instead of beside each other.
Option B is correct because the square in the centre is striped like the base on the folded gift box. Also the dark blue triangle is the next triangle clockwise from the white triangle.
To solve this task, we must identify the properties of the parts of the gift package that remain the same when the gift package is unfolded and possibly rotated. Because of these various arrangements, it is crucial to consider the positions of the parts of the gift package relative to each other. For example, the blue part’s left-hand neighbour is the light part when looking from below the gift package.
This use of visual pattern matching is also used in computer vision, to detect the location and position of objects based on characteristics of those objects. One example of visual pattern matching is in the design of robots to locate and move physical objects in a factory. Another application is assisting medical doctors in the detection of tumours from CT scans of patients. Both of these applications use partial information to make inferences about the most likely location/orientation/size of objects in visual images.
Estonia
Four animals travelled across a plain. The following map shows their routes with a path from where each animal started to where they finished. However, the middle section of the map is missing.