2014 Bebras Solution Guide
2014 Bebras Solution Guide
2014 Bebras Solution Guide
au
i n k i n g
a ti o n al Th
m p u t
l i a C o
u s tr a l e n g e
b r a s A C h a l s 2 0 14
Be olution
s a n dS
Ta sk
ol
ra n Scho
d i to rs: l z , N ICTA ws L uthe
E Sch u d Ne
en oo
Karst Hobson, G
Sarah
Acknowledgements
2
Introduction
About Bebras Australia
The Bebras Australia Computational Thinking
Challenge was established in 2014 to enable
Australian primary and secondary school students
to have a go at Digital Technologies without
programming. The format is designed to engage
students in a light and problem-oriented way.
Everyone can do it
The challenges consist of a set of short questions
called Bebras tasks that are delivered via the
internet. The tasks can be answered without prior
knowledge about computational thinking, but are
clearly related to computational thinking concepts.
There are 15 problems to be solved. These are presented under three levels
of difficulty – Easy, Medium, Hard – each consisting of five questions. The
questions get progressively more difficult as students progress through the
levels of schooling.
Bebras is aligned with and supports the new Australian Curriculum: Digital
Technologies.
3
Bebras: International Contest on
Informatics and Computer Fluency
Bebras is an international initiative whose goal is to
promote computational thinking for teachers and students
(ages 8-17; years 3-12).
4
Table of Contents
Bank Notes! 7
Beaver Cloud! 8
Bebrocarina! 11
Bicycle Culture! 13
Building dams ! 15
Business Cards! 18
Commands! 20
Country codes! 21
Falling Robot! 23
Folding Paper! 25
Freight Train! 27
Group Assignment! 29
Half Sliding! 30
Hangar! 32
Log Jam! 38
Mirrored or not?! 40
Missing piece! 41
Neighbourhoods! 43
No Anonymity Anymore ! 44
Packing Logs! 46
Planting Flowers! 47
5
Playing Cards ! 49
Programmed Robot! 50
RGB Grid! 52
Sailing Home! 54
Short story! 56
Stage Coaches ! 59
Stamp Machine! 61
Text Machine! 63
Turning Arrows! 65
Turning numbers! 67
Turning Glasses! 69
Vigenère encryption! 71
Watering a tree! 72
Wood streams! 73
6
Bank Notes
A BEBRA is the currency unit of a country. The country uses six kinds of bills worth 1
BEBRA, 2 BEBRAs, 4 BEBRAs, 8 BEBRAs, 16 BEBRAs and 32 BEBRAs.
What is the fewest number of bills needed to pay exactly 50 BEBRAs without receiving
change?
Answer:
(number input)
Solution: 3 (notes)
The banknotes correspond to each digit of the binary number.
(50)10=(110010)2
Therefore, 50 BEBRAs consist of one 32 BEBRAs, one 16 BEBRAs and one 2 BEBRAs
note.
It's Informatics:
A computer is representing data internally with binary numbers. The bits array expresses
a certain number by using each digit meant 1, 2, 4, 8, 16, 32, ... In this question, children
can explore the mystery of the internal expression of computers through the use of of the
banknote corresponding to a binary digit.
7
Beaver Cloud
The beavers store their data in a cloud containing four servers. The image shows all
connections between the servers.
To lower the risk of losing data, all data are stored on both STORE-1 and STORE-2.
To increase the accessibility, all data are available through both PORT-1 and PORT-2.
Answers:
A
B
C
D
Solution: D)
If PORT-1 and PORT-2 crash, then all data in the cloud become inaccessible, but are not
destroyed.
8
It's Informatics:
For any data there are risks that data might become inaccessible for some time, or get lost
completely. If you manage the storage of your data yourself, you decide yourself what risks
you take.
If you transfer the responsibility for your data to a 3rd party IT service company, you
should know, what risks they take. Besides loss and inaccessibility there are many more
risks, e.g. your data might be copied and misused by someone, so your privacy is
compromised; your data might be changed maliciously, so you cannot trust it anymore.
Is the careless "cloud" metaphor just a commercial trick to obscure from you the many
risks you take when giving away the responsibility for your data?
Keywords:
data safety, data risks, cloud
9
Beavers secret code
Beaver would like to send secret messages to his friend, the hare.
They've come up with a secret code for encrypting the messages, so nobody else can
read them.
In their secret code, the vowels (A, E, I, O, U) and the punctuation remain unchanged.
The consonants are replaced by the next consonant in the alphabet, where Z becomes B.
Answers:
A
B
C
D
Solution: D)
The first consonant G of the message is encrypted as H. The vowel I remains. V becomes
W, E unchanged and so forth.
It's Informatics:
To transfer or protect data, computer scientists encrypt data. Rules determine how the
data is encrypted and how it can be decrypted. By repeatedly applying the rules through
an algorithm, the message gets encoded. In this task, each letter is treated individually and
the encoded message is as long as the unencoded message. By applying the algorithm in
reverse order, the original message can be retrieved.
Keywords:
encryption, algorithm
10
Bebrocarina
The Bebrocarina is a special musical instrument: It has
only six different tones.
With these three symbols, one can write down melodies, based on a single starting
tone. It is however possible to write melodies with these symbols that cannot be
played on the bebrocarina.
Answers:
A
B
C
D
Solution: D)
If the bebrocarina can play only 6 different tones, the minimum number of steps the player
can use to move from the highest to the lowest tone is 5 steps. It corresponds to “-” marks
in the notation of the melody. Thus, the difference between the number of “-” signs and “+”
signs should not be bigger than 5 in every part of the notation.
The same rule applies in reverse. The number of “o” signs is not limited.
Answer A is right because the sequence of the tones we pass through is 5.
Answer B has 6 “+” signs but not in a sequence, there is one “-” sign in between, so that
the total number of tones is 5.
Answer C has a sequence of 5 “-” signs. The first leads from the highest to the lowest tone
and the following sequence of 5 “+” signs returns melody to the highest tone. The last
sequence of 5 “-” signs leads to the lowest tone once more. We do not need more than 6
tones.
Answer D contains 9 “-” signs and only 3 “+” signs, the difference is 6.
11
Look at the graph. The A, B, C, D melodies are visualised on it. It is visible that melody D
needs 7 different tones.
It's Informatics:
“In communications and information processing, code is system of rules to convert
information—such as a letter, word, sound, image, or gesture—into another, sometimes
shortened or secret, form or representation for communication through a channel or
storage in a medium. An early example is the invention language, which enabled a person,
through speech, to communicate what he or she saw, heard, felt, or thought to others. But
speech limits the range of communication to the distance a voice can carry, and limits the
audience to those present when the speech is uttered. The invention of writing, which
converted spoken language into visual symbols, extended the range of communication
across space and time.
The process of encoding converts information from a source into symbols for
communication or storage. Decoding is the reverse process, converting code symbols
back into a form that the recipient understands.
One reason for coding is to enable communication in places where ordinary plain
language, spoken or written, is difficult or impossible. For example, semaphore, where the
configuration of flags held by a signaller or the arms of a semaphore tower encodes parts
of the message, typically individual letters and numbers. Another person standing a great
distance away can interpret the flags and reproduce the words sent.” Source: http://
en.wikipedia.org/wiki/Code
Keywords:
code
Further Information:
http://en.wikipedia.org/wiki/Code
12
Bicycle Culture
13
Answers:
A) B)
C) D)
Solution:
B) does not conform to the specification, as after selecting the light orange bicycle frame
and the grey coloured handle bar only the colours pink and dark grey (and not orange) are
allowed to be used for the saddle.
All other bikes are in line with the specification.
It’s Informatics:
A decision tree is a commonly used structure in informatics. Such structures are often
present in computer programs. Depending on the history of an issue all possible options
may not be allowed any more, only selected options.
Keywords:
Decision tree
14
Building dams
Three beavers with ‘a’, ‘b’ and ‘c’ on their bellies are building a dam under the
management of their leader.
The beavers can carry out four tasks: "carry", "build", "eat" and "pause".
Each beaver can only do one task at a time, and any task can only be assigned to one
beaver at a time.
In the beginning, the tasks are assigned to the different beavers as follows:
Then the leader gives the command "carry → pause", which means that the beaver that is
carrying, must switch to pausing.
The leader gives several more commands, which are properly executed by the
beavers. After these commands, the tasks are assigned as follows:
15
Answers:
A
B
C
D
Solution: B
After all the instructions have been completed, beavers’ states will be changed as follows:
Answer A). It is impossible because two beavers would be at state “carry” at same time.
Answer B). This sequence of instructions is correct.
Answer C). Beaver ‘a’ should be at state ‘build’. Beaver ‘b’ should be at state “eat”.
Beaver ‘c’ should be at state “carry”.
Answer D) Beaver ‘a’ should be at state “build”. Beaver ‘c’ should be at state “carry”.
It's Informatics:
In computer science, a state transition system is often used to maintain a defined set of
states of a program. The system consists of a set of states and valid transitions between
states, which may be labeled with labels chosen from a set. This concept is further applied
in workflow management and business information systems.
Keywords:
State transition, workflow, process
16
Further information:
http://en.wikipedia.org/wiki/Finite_state_machine
http://en.wikipedia.org/wiki/Workflow
17
Business Cards
Standard paper sizes can be deduced
from the size of a piece of paper with size
A0 (1189 mm × 841 mm), by splitting it in
half one or more times, as shown in the
diagram on the left.
18
Answers:
A) A4, A7 and A8
B) A5, A6 and A8
C) A3 and A7
D) A4 and A6
Solution: A)
Sheets of A8, A7, A6, A5, A4, A3, A2, A1, A0 sizes contain correspondingly 1, 2, 4, 8, 16,
32, 64, 128, 256 pieces of A8. We have 19 = 16 + 2 + 1 = 24 + 21 + 20, and the values 24 =
16, 21 = 2, 20 = 1, are exactly the number of business cards that can be obtained using
A4, A7 and A8.
In other answers, the number of business card are not equal to 19. B) gives 32+2=34, C)
gives 8+4+1=13, and D) gives 16+4=20.
It's Informatics:
Doubling and halving of numbers is an elementary part of informatics. It plays a big role in
the binary system, with which computers work internally. If we want to double a number in
the binary system, we only need to add a 0 to the end of the number.
A binary number, e.g. “01100” can be read as follows (from right to left): (0 x 1) plus (0 x 2)
plus (1 x 4) plus (1 x 8) plus (0 x 16) is 12. We often speak in this context about powers of
two. Here are a few more: 32, 64, 128. and 256.
Keywords:
Power of two, binary system.
19
Commands
Very easy applications have only a few commands. A command tells something (or
someone) what has to be done.
Answers:
A
B
C
D
Solution: B)
Command-1 is "come in", Command-2 is "close the door". It works properly, if you start
being outside, and the door is open, and you execute the commands sequentially. What
happens to you executing the program with the door being closed?
It's Informatics:
Commands and data are fundamental principles of informatics. Commands tell the
computer what it should do with data, or computers can instruct actuators (things that do
something in the real world) to perform an action in the real world.
Many commands can be expressed as a program for humans, for robots, for computerised
gadgets, etc. To express something, a language is needed.
It is not yet decided whether the natural human languages, spoken or written, in the long
term will be easily useable for programming. People working in Informatics research this
problem.
So far, logical and very strictly structured calculuses serve as programming "languages". If
you learn to program, you have to learn how to properly transform natural language based
ideas about the what to do into syntactically correct and semantically almost error-free
command sequences.
Because of that, some people believe that programming is not only a craft, but an art!
Keywords:
Command, language
20
Country codes
Beaver Bruce has a system for making country
codes. He takes the English name of the country
(for instance LITHUANIA) and counts the
frequency of each letter. He then uses the three
most frequently occurring letters. The most used
letters are used first; letters with the same
frequency are used in the order they appear first in
the country name.
The country code for LITHUANIA is IAL (I and A
occur two times, the first I appears first. Of all
characters that occur only once the L appears
first).
A few other examples:
Country name# # Country code
FINLAND# # # NFI
GERMANY # # # GER
LATVIA# # # ALT
Beaver Bruce realizes there will be a problem, since there are many countries which will
get the same country code.
Answers:
A. BEAVERIA
B. BEAVERLAND
C. BEAVERONIA
D. BEAVERANIA
Solution: D)
It has country code AEB instead.
It’s Informatics:
In computer science, data often needs to be compressed wither to save storage space, or
to improve data transmission throughput. There are lossy or lossless compression
techniques and their use depends on the application. The MP3 music compression
algorithm is a lossy compression method. It has been designed to reduce the amount of
data required to represent an audio recording and still sound like a faithful reproduction of
the original uncompressed audio for most listeners. [Wikipedia].
21
Keywords:
data compression, data representation
Further Information:
http://en.wikipedia.org/wiki/Data_compression
http://en.wikipedia.org/wiki/MP3
22
Falling Robot
A robot moves through a vertical maze. The maze consists of various platforms. The robot
begins in the upper left corner and then moves to the right.
When it reaches the end of a platform, it falls down onto the platform below.
As soon as the robot lands it changes direction. Eventually the robot reaches one of the
buckets at the bottom of the maze.
The following image gives an example of how the robot will move down.
23
Answers:
A
B
C
D
Solution: C)
It's Informatics:
The robot follows a very basic rule, or algorithm. The student needs to understand that
algorithm, either through its description, or by looking at how it performs on the left maze,
then simulate that algorithm on the right maze.
Keywords:
maze, algorithm, robot
24
Folding Paper
The beavers have come up with a language for describing how a piece of paper should be
folded. The commands in this language are called FOLD.
z = FOLD(x,y) for example means:
Fold the piece of paper in such a way that side x and side y overlap. This way, a new side
is created. We call this side z.
Answers:
A B C D
Solution: A)
The following images explain the execution of the fold-operation step by step.
25
It's Informatics:
Functions are an important concept in programming. A function call is considered to be the
start of some activity. Programmers say: The function accepts some parameters (here: two
sides), processes some data and returns an object (here: the fold). This is different from
the concept of functions in mathematics.
Keywords:
function, parameter, object
26
Freight Train
The wagons of the freight train from Beaver Railroad are placed in the order D-E-B-C-A:
The locomotive can move forwards and backwards and is able to pull and push an infinite
number of wagons. Connecting or de-connecting a wagon is called a railroad operation.
How many railroad operations are necessary to put the wagons in the order A-B-C-
D-E again?
Answers:
(number input)
Solution: 8 (operations)
27
This shows there is a possibility to do it in 8 steps.
Is it possible to do it in less steps?
To answer this, consider a train with only 2 wagons. If you want to change the order, you
will need to detach and connect both wagons. So you will need at least 4 steps and both
tracks.
In this question we have three parts that are sorted in the wrong direction, because we will
never detach the wagons D and E, or B and C. To change the order of two parts takes 4
steps. We can look as these changed part as one new part. To exchange this with the
other part takes again 4 steps. So you need at least 8. The order of consecutive steps can
differ, but with less than 8 it is impossible.
The only way to do it with less steps will be to use more tracks.
It's Informatics:
This is actually the modified data structure stack. There are two operations with stacks:
pop and push. Push puts one item on the top of the stack and pop removes the top item
from the task. In this task one or more freight cars can be “popped” from the end of the
train on the main rail and “pushed” to side rail a or b. From the side rails one or more
freight cars can be “popped” and then “pushed” to the end of the train on the main rail.
This task has also some similarity to the famous task Towers of Hanoi.
Keywords:
data sorting, last in - first out
28
Group Assignment
For a group assignment a class is split up into four groups. Each group divides the
different tasks between the group members. Three groups manage to finish the complete
assignment, but one group fails to do so.
What happened?
Our beavers, Bruce and Beatrix, have analysed the four groups. They found out that most
group members have to wait for other group members before they can start with their own
tasks.
Bruce and Beatrix have made a diagram for each group to show the dependencies
between students in each group:
An arrow from student 1 to student 2 means that student 2 has to wait for student 1 to
finish their tasks.
Which diagram represents the group that did not finish the assignment?
Answers:
A B C D
Solution: D)
The pictures can each be interpreted as dependency graphs of sets of four processes. A
set of processes with dependencies between each other will be blocked if there is a cycle
in its dependency graph. Only graph D contains such a cycle.
It's Informatics:
In most computing systems, many so-called processes are running concurrently to make
the system work. On your PC, you may have an open word processor window with a
homework task while you search the web for information for that homework and listen to
the music that your music software is playing. On a smartphone you can play a game and
still receive a call. Such processes often depend on others and have to wait for other
process results. For system designers, it is important to make sure that a situation, where
processes get stuck because they are waiting for each other at the same time, never
occurs. Such a situation is called ‘deadlock’, and computer scientists have spent much
effort in providing both theoretical insight and practical solutions to the deadlock problem.
Keywords:
deadlock, semaphore, dependency
29
Half Sliding
A paper strip is divided into 16 equal pieces:
Such a strip can be used for "half sliding". This is done by splitting the strip in half and
sliding the right half up:
The two halves are also split in half and again, both right halves are slid up.
This would look like this:
We do this again with the four-piece strips and, after that, with the two-piece strips.
Answers:
A B
C D
30
Solution: D)
It's Informatics:
The problem describes an algorithm for cutting the paper strip. The execution can be
understood by first doing a global action on the strip, then running the whole algorithm on
both halves of it. This is a very common kind of algorithm, called divide and conquer
algorithms.
Keywords:
recursion, programming, subroutine
31
Hangar
The Bebras Airport has a 6 x 5 hangar, a 3 x 8 hangar and a 5 x 4 hangar. There are two
sizes of planes. Large planes require 4 x 3 space in a hangar. Small planes require 3 x 2
space in a hangar.
Aeroplanes can be arranged in any direction, and all hangars can be entered from any
side.
There are four big planes and some small planes. After placing all of the big planes in the
hangars, what is the maximum number of small planes that can be placed in the hangars?
Answers:
A
B
C
D
32
Solution: D)
It’s informatics:
It is necessary to allocate a consecutive memory space for a computer program. In this
question we see how small memory areas can be arranged after big memory areas are
allocated.
Keywords:
memory, fragmentation
33
Ice Cream Machine
This special ice cream machine creates cones with 4 scoops of ice cream.
It does so in an ordered way. Here you see, from left to right, the last 3 ice creams that the
machine has made.
Answers:
A B C D
Solution: A)
The order always is yellow – blue – purple – red – yellow – blue – purple – red ... In the
picture you can see that red is followed by green, green is followed by blue, ...
34
It's Informatics:
Detecting the operation of an algorithm is sometimes required in informatics. In many
fields of information technology, computer scientists observe traces of computer activity
and are checking the semantics (meaning) of programs.
Keywords:
Algorithm, machines, loop, reverse engineering
35
Islands and bridges
The settlements of the Beavers are divided over different islands. They want to build
bridges, so trading goods will become easier.
Beaver Beatrix has made a plan, which you can see below. The islands are represented
by dots, the bridges by lines.
The other beavers would prefer a different plan though, on which the islands are
represented by lines and the bridges by dots.
Answers:
A) B) C) D)
Solution: D)
36
It's Informatics:
Representation of real situations by using graphs or models is an important area in
informatics. As can be seen by this example, different assumptions in the data
representation can lead to simpler or more complex models.
Keywords:
Graphs, data representation
Further information:
http://en.wikipedia.org/wiki/Graph_theory
37
Log Jam
The beavers collected 50 logs on Beaver Island. They want to bring these logs to
their home through the river system. At various points in the river system, they lose a
certain number of logs.
The beavers begin on Beaver Island (at the left side of the diagram) and wish to get
home (which is on the right side of the diagram). On the river there are numbers,
which show how many logs the beavers would lose, if the beavers use this river on
their route home.
Answers:
A
B
C
D
Solution: D)
The path with the lowest total value from start to finish is 3+2+11+3=19. All other
paths have a higher value.
38
It's Informatics:
Determining a solution that conforms to set requirements, such as shortest path or
lowest cost is an often encountered problem in informatics. GPS systems are now
frequently-used helpers that many people use every day. In this task, we have
encountered a variation of the shortest path problem, in which the number of lost logs
should be minimised. An approach to achieve a solution is to look at nodes where
different possible paths meet and determine the segment with the lowest value. The
chain of all segments that have been obtained this way represents the solution to the
problem.
Keywords:
Shortest path, graph theory
Further Information:
http://en.wikipedia.org/wiki/Shortest_path_problem
39
Mirrored or not?
Sandy and her friend Horatio got new computers last week.
The computers have a built-in camera at the top of the screen.
When Sandy is chatting with her friend, the chatting software has two windows: a big one
which is showing Horatio chatting and a small one showing herself chatting.
The chatting software has two possible settings for showing the video streams:
"mirror mode" - right eye on the right side of the screen and
"picture mode" - right eye on the left side of the screen.
Look at this picture of Sandy and Horatio chatting:
Answer:
A
Solution: C)
Looking at Horatio we can see that the tilt of his head is matching his head on the
computer screen, so his image is in picture mode. This eliminates options B) and D).
The asymmetric cut of Sandy’s hair is the cue to the fact that her video is mirrored, i.e. her
image is looking back at her as if she was looking at a mirror.
It's Informatics:
In image processing, computer scientists often need to imagine what an image would look
like if it were mirrored or rotated. It is helpful to be be able to do these things in one’s
head. Cues help to eliminate options that don’t apply. Closely related to image processing
are computer graphics and computer vision.
Keywords:
Image processing. computer vision, computer graphics.
40
Missing piece
Beaver Bruce has received a secret message sent on a 6 x 6 grid. Unfortunately, part of
the message has been destroyed by a spill of red juice.
Answers: !
A) C)
B) D)
Solution: B)
41
The following diagrams illustrate how row 6 and column 6 would look like with patterns A),
C), and D).
A)# C )# D)
It's Informatics:
Detecting errors is an important part of informatics. Data that is stored or being transmitted
can be distorted. It is important to have a system in place that can help identify that an
error occurred and then aid in the restoration of the data.
Keywords:
Error detection, checksums
Further Information:
http://csunplugged.org/error-detection
42
Neighbourhoods
Neighbourhoods in areas on maps can be
presented as a diagram. In such a neighbourhood
diagram each neighbourhood is represented by a
node.
Answers:
A B C D
Solution: B
In diagram A, there is one neighbourhood (brown, top left) that is only connected to one
other neighbourhood. In diagram C, there are only six neighbourhoods in total, one short
of the seven in the network diagram. Diagram D does not contain a neighbourhood with
four connected neighbourhoods. However, the network diagram contains two nodes with
four neighbourhoods.
It’s Informatics:
The interpretation of graphical information is a useful capability. Graphs provide an
abstract representation of real-world relationships between objects of all sorts. They are
being applied for the development of models for different computer programs, such as
navigation systems. Graph theory is an important area of computer science and
mathematics.
Keywords:
network diagram, graph, data representation
Further Information:
http://en.wikipedia.org/wiki/Graph_theory
43
No Anonymity Anymore
The medical records of patients contain personal data, which should not be made public.
For the publication of a research project, the hospital has made some data public, without
mentioning the names of the patients. The table on the left shows a part of this list.
Because of the upcoming elections, the city with postcode M1 1AA publishes a list with all
constituents at the same time. This table on the right shows the constituents who are born
on January 1st.
Thanks to these two tables, you know for sure that one of the persons on the right has a
disease and you also know which disease it is.
Answers:
A
B
C
D
Solution: B)
Starting in the left table:
- line 1, 3, 4, 5, 6, 7, the patient is not in city M1 1AA
- line 2 : 1976, male, M1 1AA. Two possible inhabitants in the right table, lines 2 and 3.
- line 8 : 1988, male, M1 1AA. One solution in the right table : Roman Peterson
- line 9 : 1988, female, M1 1AA. Two possible inhabitants in the right table, lines 6 and 8
44
It's Informatics:
The computerisation of databases raises very serious concerns about anonymity. On the
one hand, one needs to erase enough information from the excerpt database to ensure
that individuals cannot be traced. On the other hand, the more precise the information
remains in the excerpt, the more useful it might be for researchers.
Computer science researchers have recently developed a formal notion to capture what it
means for the excerpt of a database to be properly anonymised. An excerpt of a database
is said to be “k- anonymous” (for k >= 1) if each row from this table matches no fewer than
“k” individuals. When k is 1, it means that the database allows to identify at least one
person. When k is, say, 3, it means that we can find a group of 3 individuals such that we
know that at least one of them is sick, but without knowing which one. More generally, a
high value of “k” indicates good anonymisation
The definition of k-anonymity gave rise to interesting studies. For example, one problem is
to find the minimal number of cells that need to be erased from a table in order to make it
k-anonymous. The definition of k-anonymity also highlighted the fact that significant care is
required when it comes to releasing anonymised data. For example, the release of two
excerpts, each of which being k-anonymous when considered individually, may very well
result in disclosing all personal information.
Keywords:
big data, database anonymisation, data table
45
Packing Logs
Beatrix has a backpack that holds a maximum of 7 kg of wood. Large 3 kg logs are worth 5
coins each. Medium 2 kg logs are worth 3 coins each. Small 1 kg logs are worth half a
coin.
How many logs of each size should Beatrix pack in her backpack to maximise the
total worth?
Answers:
A
B
C
D
Solution: A)
One large log and two medium logs is correct. They are worth 5+3+3=11 coins. B) Two
large logs and a small one will be worth 2x5+0.5 =10.5 coins. C) Is worth 3x3+0.5=9.5
coins. D) is worth 5+3+2x0.5=9 coins.
It's Informatics:
Packing in the most valuable logs first and then filling the spaces with the ones that fit will
not work in this example since the small logs are next to worthless. This strategy is better
known as the ‘greedy’ strategy and often used when it comes to sharing resources. Every
choice of packing the backpack limits the options of the next step, since the total weight
limit is 7 kg. Since each choice has a monetary value attached, the solution can be
expressed as a weighted graph.
Keywords:
optimisation, strategy, weighted graphs
Further Information:
http://en.wikipedia.org/wiki/Graph_(mathematics)#Weighted_graph
46
Planting Flowers
Answers:
A) B) #
C) D)
Solution: A)
The little beaver has smaller arms and smaller legs than the big beaver. Little beaver's
steps are short and it plants the flowers at positions closer to its body. Big beaver's steps
are large and it plants the flowers at positions further away from its body.
Answer B is wrong because they both start planting flowers on their left hand sides. In
answer C the little beaver begin incorrectly with the left hand side. In answer D the steps of
both beavers are of the same length.
47
It's informatics:
In robotics, algorithms are interpreted and executed by devices with certain physical
properties. The program developer has to take this into account. Different machines may
move in slightly different ways executing the same program. In many fields of information
technology, computer scientists observe traces of computer activity, checking the
semantics (meaning) of programs.
Keywords:
robotics, algorithm
48
Playing Cards
The beavers want to make playing cards out of five pieces of cardboard.
Answers:
A
B
C
D
Solution: C)
The A4 cardboard alone is 16 times the size of A8, so answer A cannot be true. Answer B):
A6 equals 4 x A8 and A7 equals 2 x A8, which is only 6xA8. Answer C): A5=8 x A8 and
A6=4 x A8, which is a total of 12 x A8, which is the solution to the question.
It's Informatics:
Doubling and halving of numbers is an elementary part of informatics. It plays a big role in
the binary system, with which computers work internally. If we want to double a number in
the binary system, we only need to add a 0 to the end of the number.
A binary number, e.g. “01100” can be read as follows (from right to left) : (0 x 1) plus (0 x 2)
plus (1 x 4) plus (1 x 8) plus (0 x 16) is 12. We often speak in this context about powers of
two. Here are a few more: 32, 64, 128. and 256.
Keywords:
Power of two, binary system.
49
Programmed Robot
A robot is programmed to find a target (the green field marked with X) on a map of square
fields. The robot has its movements programmed as follows:
• The robot moves straight forward until it reaches an obstacle (black field) or the
edge of the map.
• When reaching an obstacle or the edge of the map, the robot turns right by 90°.
• When the robot moves out of a field, the field becomes a black obstacle.
The arrows on the maps below show the starting position as well as the starting direction
of the robot.
On which map does the robot NOT eventually reach the target (green field marked
with X)?
Answers:
A) B)
C) D)
Solution: B)
The robot does not reach the green target field, as all the fields the robot is passing when
going up to the black field and then towards the right edge of the map become obstacles.
Therefore the robot cannot reach the target field any more, see also the robot path in the
figure below.
50
In all other maps the robot will find the target field as shown below.
A) B)
C) D)
It's Informatics:
Algorithms are fundamental in informatics. Algorithms are providing a scheme, how a
certain problem (here to find the target field) is to be solved. It is really important that
algorithms are designed in a way that they always solve a certain problem and not only in
special cases. Therefore the algorithm, which is presented in this task, should be replaced
by a better one, which will always find the target field.
Keywords:
algorithm, loop, robot
51
RGB Grid
The RGB colour model is often used in electronics and
computing. Squares (often called pixels) are coloured either
red, green or blue.
Answers:
Solution: D)
The solution to this question can be found by applying the
following algorithm: Ever second diagonal line is green, so the
bottom right corner field must be green. Blue only occurs on
odd numbered rows and red only on even numbered rows.
!
It's Informatics:
Informatics involves patterns and repetition of rules, both of which are important aspects of
sequential programming languages.
Keywords:
Patterns, rules
52
Rivers and Dams
In the Beaver valley, a river splits several times on its way from the source to a nearby
lake. Using smartly built dams, the beavers can regulate the amount of water in each arm
of the river for maximum efficiency.
At a fork, the amount of water is divided over the two arms of the river. In the image above,
the amount of water that can flow through the different arms (arrows) per second is shown.
How should the beavers regulate the arms X, Y and Z to get as much water in the
river per second as possible?
Answers:
Solution: B)
The answer B) is right because we have at most 1, 2 and 3 units of water per second on
the arms X, Y and Z.
The answer A) is impossible because on arm Z there can be at most 3 units of water per
second.
The answer C) is impossible because on arm X there cannot flow more than one unit of
water per second.
The answer D) is impossible because on arms X and Y can respectively only flow at most
1 and 2 units of water per second.
It's Informatics:
Problems like these arise in computer science in the field of optimising network flow. They
often are solved with so called backtracking algorithms, like the Ford-Fulkerson-Method.
Keywords:
optimisation, network flow
Further Information:
http://en.wikipedia.org/wiki/Ford–Fulkerson_algorithm
53
Sailing Home
Sailor Beaver is going home. The flag marks the spot where he must drop anchor.
It is getting dark so he wants to get there as quickly as possible by taking the shortest
course home but he does not want to crash into the islands.
He must follow the shipping lanes, shown as broken lines on the map and he may change
direction only on the black dots. He writes down the course he must follow.
For example “2N” means go two black dots North, "3SW;2S" means go three black dots
South West. Change direction, go 2 black dots South.
Which instructions will lead the ship to its goal as fast as possible without crashing
into an island?
Answers:
A
B
C
D
Solution: D)
The correct answer is D). This route leads the boat to the flag safely and has 6 steps.
Answers A) and C) lead the boat to collisions. Route B) has 7 steps.
54
It’s Informatics:
The students are requested to analyse sequences of instructions (programs) and interpret
the result of their application.
Keywords:
command, program
55
Short story
Here's a short story for you:
"On his way home, Hans finds a cat in front of his house. Because it's raining cats and
dogs, he decides to take it inside. The cat gets comfortable at the chimney and falls
asleep. When Hans' mother arrives home, she accidentally bumps into the cat. The cat
gets scared and scratches her leg."
Answers:
Solution: A)
The correct answer is A), which describes the situation in the correct order with the correct
parameters to the functions. All the other possible answers either are in the incorrect order
or the parameters are incorrect.
It's Informatics:
This question deals with abstracting information: the actions are now functions, and the
characters in the story are parameters. When we create functions, the order of the
parameter is important, and the order of calling functions is also important in order to make
our algorithms correct.
Keywords:
functional abstraction, sequences of operations, parameters
56
Sorting tree trunks
Robot Alan is sorting tree trunks.
Answers:
A
B
C
D
Solution: C)
According to rule C), the second longest tree trunk has to be at the bottom of the ramp.
Above it the second longest tree trunk of the rest and so forth. The tree trunks get shorter
as we move up the ramp. In the end, only one tree trunk is left, which is the longest one,
which will be put on the top.
A B D
57
It’s Informatics:
This task is about sorting, or more precisely, it is a variation of sorting called sorting by a
direct choice. Sorting algorithms are an important field of informatics. Many programs
contain some sort of sorting algorithm, which depend on the particular purpose of the
program.
Keywords:
algorithm, sorting
Further Information:
A very famous sorting algorithm is Quicksort: http://en.wikipedia.org/wiki/Quicksort
58
Stage Coaches
In the Wild West, where the cowboy beavers live, the Bebras Stage Coach Company built
a network of stage coach routes between eight settlements.
In the plan of transportation, you can see at which days of the week the stage coaches will
depart at the different settlements. A stage coach departs early in the morning and arrives
at the next settlement in the evening of the same day.
Answers:
Solution: C)
The table below summarises the results of the different answers.
Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed
A * * *
B * * *
C * * *
D * * *
59
It's Informatics:
Routing is a classical problem in Informatics. Often, as in this example, the data is being
represented as a graph. To solve a routing problem it is often not possible to try out all
possible paths. Medium to large graphs can be too large for even a fast computer to
produce a result before the end of the Universe. Computer scientists have developed
clever algorithms which can also manage large graphs within a reasonable amount of
time. Two examples are:
http://en.wikipedia.org/wiki/Dijkstra's_algorithm
http://en.wikipedia.org/wiki/A*_search_algorithm
Keywords:
Graph, traveling salesman problem
60
Stamp Machine
A simple stamp machine gets his instructions from programming cards. A red sheet of
paper should be coloured. The instructions on the cards should be followed in the right
order (1 - 2 - 3 - 4):
Unfortunately, the programming cards get mixed up and the order of the instructions
changes into (3 - 1 - 2 - 4).
What will the sheet of paper look like after the instructions are followed in this
order?
Answers:
A B C D
Solution: C)
61
It’s Informatics:
The change in the order of commands in a program often leads to a changed behaviour of
this program. Seldom, programs remain unchanged during their lifetime. Further functions
are added (upgrade) and existing functions are updated to reflect legislative or
environmental changes. Also, errors are corrected. After every change in a program a
thorough testing regime is required to determine if the program behaves as expected.
Sometimes, a well-intended upgrade of a program can make the program perform worse
than before. Keep calm and keep testing :-).
Keywords:
Command, order, execution
62
Text Machine
We have two types of text machines.
Our complex machine needs three texts to work on (grey ellipses), processes them, and
gives one text as the result of its work in the bottommost ellipse.
Which three text pieces do you need to put in this text machine in order to get the
text INFORMATION in the lowest ellipse?
63
Answers:
Solution: A)
The answer can be worked out by trying the inputs.
AMR+OFNI =AMROFNI
< AMROFNI = INFORMA
INFORMA+TION = INFORMATION
Note that the question does not explicitly state which input text should be put into which
input ellipse.
It's Informatics:
Data manipulation is a key strength of computers. By defining rules according to which the
data is to be processed, computers can manipulate large data sets at very high quality. In
programming, we often use string manipulations, such as appending strings, dividing
strings, changing case, extracting or replacing substrings, or converting strings into
numeric values.
Keywords:
String Manipulation
Further Information:
http://computing.scbc.wa.edu.au/ait2b/content/info/html/data_manip.html
https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/
Classes/NSString_Class/Reference/NSString.html
64
Turning Arrows
The instruction A <– B changes an image with squares and arrows in the following way:
The arrow starting in square A now points to the same square as the arrow starting in
square B.
Which set of instructions, executed consecutively, lets the image on the left
transform into the image on the right?
Answers:
Solution: D)
Start state (image left): W points to X, X points to Y, Y points to Z, Z points to X. After
instruction Z <- X: W points to X, X points to Y, Y points to Z, Z points to Y. After instruction
X <- Y: W points to X, X points to Z, Y points to Z, Z points to Y. After instruction Y <- H: W
points to X, X points to Z, Y points to X, Z points to Y. This is the end state (image right).
65
The other sets of instructions do not produce the image on the right hand side:
It’s Informatics:
Computer scientists have many names for information that tells us where other information
is located: Reference, pointer, link, path, index, etc. Such information can look very
different, such as: htttp://www.bebras.edu.au
Computer scientists have to work with entire networks of information objects and their
pointers can change on a continuous basis. To be clear about what happens it is useful to
use arrows and boxes, especially when the number of information objects is low.
Otherwise, as in the case of the world wide web, more powerful tools are required to
represent the data. Information about information is common place. We also call this
metadata. For example, metadata on an Australian Curriculum content description
connects to resources in Scootle.
Keywords:
metadata, pointer
Further Information:
http://en.wikipedia.org/wiki/Metadata
66
Turning numbers
In the game of "Turning Numbers" you can scramble the numbers 1 to 9.
At the start of every game, the numbers are orientated as shown in the picture on the left.
When you push button A, B, C or D, the numbers around make a quarter turn.
For example: when you push button A, the numbers will be placed as shown in the image
on the right side.
D, C, B, B.
Answers:
A B C D
67
Solution: C)
Here you see what happens when the buttons are being pushed:
It’s Informatics:
A program that is being executed on a computer changes the computer’s state. Different
functions, like the four buttons with their respective functions, can change the same data.
In the game, two buttons ‘share’ two fields on the game board. The field in the centre is
being influenced by all four buttons. In computer science we apply atomic (indivisible)
operators. Atomic operations must not be interrupted. Two atomic operations have to run
in sequence: One after the other. In the game, the push of a button and the resulting
rotation of the numbers is considered an atomic operation.
Keywords:
Atomic operation
Further Information:
http://wiki.osdev.org/Atomic_operation
68
Turning Glasses
There are five drinking glasses on the table. One of them is turned upside down.
In this game, you have to get all glasses upright again. But: you have to turn exactly three
glasses every turn.
How many turns do you need at least to get all the glasses standing upright?
Answers:
A) 2 turns
B) 5 turns
C) 3 turns
D) it is impossible!
Solution: C)
For example:
Notice that there must be an odd number of turns, since after the first turn, there will be
either 2 or 4 glasses which are upside-down. On the next turn, there will be an odd number
(1,3,5) of glasses which are upside-down. Thus, we require more than 2 moves and in
general we require an odd number of moves. We have shown a solution which uses 3
turns, which must be the minimum.
It's Informatics:
Following an algorithm, we can keep track of the state of the system or its variables.
Reasoning about parity and arguing correctness for an algorithm are important aspects of
informatics. One possible way to analyse the solution is to consider either deterministic
finite automata (self-operating machines) or to consider a breadth-first search.
69
Keywords:
binary set, least amount, parity and odd parity
Further Information:
http://en.wikipedia.org/wiki/Breadth-first_search
70
Vigenère encryption
Beavers Beatrix and Bruce encrypt their private messages, so others cannot read them.
They use the same key for encrypting and decrypting the messages.
The key they use is CAB.
Because the C is the third letter in the alphabet, the first letter in the message (W) is
replaced by the letter which comes three places after it in the alphabet (Z).
Because the A is the first letter in the alphabet, the second letter in the message (H) is
replaced by the letter which comes one place after it in the alphabet (I). And so on, until
the complete message has been encrypted.
Bruce DUGOFXHO
answers:
Answers:
(text input)
Solution:
ATELEVEN
When an encrypted message is being decrypted, the cypher is being applied in reverse
order. In our example, we move up the alphabet: the encrypted D becomes A
(dencrypted). T becomes U, G turns into E, etc.
It’s Informatics:
Encryption is widely used in informatics to assure that only authorised persons are able to
read data. There are many different encryption schemes available providing different
levels of security, e.g. for secure traffic exchange between the computer and the server
when surfing in the web, for secure transport of emails or to be able to safely store data on
a hard disk.
Keywords:
encryption, decryption
71
Watering a tree
The beaver has made a pipe system for
watering his apple tree.
Valves 1, 2, 3 and 4 can be opened or
closed independently.
Answers:
Solution: A)
A): The water flows from the left container through the open valve 2, fills the small
container above the closed valve 1 and into the next small container and from there
through the pipe to the apple tree.
B) and D): No water flows from the left container, because valve 2 is closed. No water
flows from the right container because valve 3 is closed.
C): The water flows from the left container through the open valve 2 and and further
through the open valve 1. No water flows out of the right container because valve 4 is
closed.
It’s Informatics:
Classic logic is the basis of all computer chips. We also call it binary logic. Only two values
are allowed TRUE and FALSE, ONE and ZERO.
Keywords:
binary logic
72
Wood streams
In forest (A) is an area where the beavers fell trees for their dams. They transport the tree
trunks to their new project - the biggest dam of all times (D) - through an infrastructure of
channels.
The arrows represent the channels, the dots are points where the water splits up or comes
together.
Every channel has a restricted capacity. The numbers next to the channels show how
many tree trunks can be transported through the channels in one minute.
How many tree trunks can be transported from A to D at most in one minute?
Answers:
(number input)
Solution: 7
We need to consider that though a channel has a capacity x , it does not automatically
mean that, in fact, x tree trunks can be transported per minute through the channel. There
could be a bottle neck in front of the channel, which prevents the channel from using its full
capacity. The image shows an ideal situation, according to which the tree trunks can float
through the channel system. In contrast, the red numbers in the next figure represent the
real numbers of tree trunks that can be transported. Every red number is at maximum as
large as the corresponding black number, but it can also be smaller. For example: Only 2
tree trunks per minute can float from C3 to D, although the capacity is 3, because C3 only
received 2 tree trunks per minute. The result can be seen when we add the channels that
lead to D: n = 3 + 2 + 2 = 7.
73
It’s Informatics:
The calculation of the maximum flow through a network with capacity is an example of a
common optimisation problem. In our example, we can determine the solution by applying
a simple analysis. However, one can imagine more complex problems, such as the
delivery of bread by a fleet of trucks to the supermarkets in a country. This is called smart
logistics.
Keywords:
Network optimisation
74
The Wrong Hat
Anna, Bert, David and Emily Beaver have two rules for choosing what clothes to wear:
One day, they change hats, just for fun. Now they all wear a hat of another colour than
their favourite one.
Answers:
A) Anna
B) Bert
C) David
D) Emily
Solution: D)
David and Emily both wear a blue hat, so the blue hats belong to Anna and Bert.
The red hat cannot belong to Emily because she already has a red shirt so the red hat
belongs to David. So, in conclusion the green hat belongs to Emily.
It’s informatics:
In data analytics, we combine different pieces of information to reach conclusions about
the world. Prior to writing a computer program, we need to understand the rules that
govern a problem. Computers can help us to hypothesise about potential solutions by
simulating the effects of different approaches and by comparing them to real-world
observations.
75
Keywords:
matching information, data analytics, simulation
Further Information:
http://en.wikipedia.org/wiki/Data_analysis
http://en.wikipedia.org/wiki/Simulation
76
Tasks per Year Level
The following tables show the tasks that were selected for each year
level and their respective level of difficulty, A (easy), B (medium) and (c)
difficult.
A Commands A Commands
77
Years 7+8 Years 9+10
78
Years 11+12
A Bebrocarina
A Folding paper
A Group assignment
A Vigenère encryption
B Beaver cloud
B Half sliding
B Missing Piece
B Text machine
C Freight train
C Neighbourhoods
C No anonymity
anymore
C Wood streams
79
Supporters
80