Benjamin IBIC Sample
Benjamin IBIC Sample
International Contest on
Computational Thinking Time Allowed: 150 Minutes
A) B)
C) D)
It's informatics!
Computers are composed of various chips and chips are made of smaller parts, electronic circuits which are in
turn composed of logic gates. Logic gates act like valves, except that instead of water they conduct electricity
and instead of pipes they have wires. This means that our modern electronic devices (including complex ones
like computers and smartphones) are built up from simple logical operations.
Keywords
Logic gates
T2: Nuts
A squirrel picks two hazelnuts from the top of the hazel bush. She wants to
collect as many hazelnuts as she can. To do this, she has to jump from one
branch into another and pick them up, but she can only jump in the direction
of the arrows.
It's informatics!
The problem is reduced to a complete exhaustive search of all possible variants. It is important not to skip the
correct answer. This develops skills in organizing a complete exhaustive search. With a large number of variants,
one should be able to cut off obviously suboptimal branches. This problem can also be viewed as a dynamic
programming problem.
Keywords
Exhaustive search
Dynamic programming
T3: Toothbrushes
“Not so fast!” says beaver Mom. “Eve and Chad, swap your brushes! Ann and Chad, swap your brushes,
too!” And then she lost track.
Which pair still needs to swap their brushes so that each beaver will have its own brush?
A) Ben and Chad B) Ben and Danny C) Ann and Eve D) Nobody
It's informatics!
Computer programmers are often like moms, except that instead of ordering beaver kids to swap brushes, they
move numbers through different cells in the computer memory. This is one base operation in programming.
For instance, often we get some numbers we need to sort (like here with the size of the brushes). These
numbers are stored in a group of memory cells. Sorting them consist of putting the smallest number in the first
cell, the second smallest in the second cell, and so on, until the biggest number in the last cell. To do that we
need to exchange several times the values contained is these cells.
Keywords
Programming
Which of the following bracelets did the princess wear to the grand ball?
A) B)
C) D)
It's informatics!
The bracelet is an example of a sequence of objects. The pearls are arranged in a certain pattern. When
identifying the correct bracelet you have to look for properties of this pattern. In informatics, pattern matching
means finding similar objects in different sources. In image processing, the pattern matching is used for locating
a small image in a bigger one. Another example is searching for a word in text using a text processor.
Keywords
Sequences
Pattern matching
It's informatics!
In this task Susan is given a set of instructions in order to reach a given goal. This is the basic idea of algorithms,
which make up an essential part of informatics. An algorithm is a step-by-step solution to a problem. The steps
involved should be as precise as possible and there needs to be a way to reach the solution. Algorithms can
then be translated into computer programs by implementing them in a given programming language. As the
task shows, we also deal with algorithms in our everyday life as well. Cooking recipes are a typical example. For
instance, a recipe for baking a cake includes a list of steps that you need to follow in order to end up with a
tasty dessert. When we read an instruction such as “pour the flour and the sugar into a bowl and stir”, we
understand that we need to get a bowl from the cupboard, something to stir with and also make sure we use
the correct amount of each ingredient. When we, on the other hand, create an algorithm that should be
understandable by a computer, all steps need to be very precise and detailed. Everything needs to be explicitly
mentioned so that there is no source for confusion or interpretation – you cannot assume that the computer
has some “background” knowledge as we humans have. For instance, the instruction “pour the flour and the
sugar into a bowl and stir”, would need to be divided into a list of instructions, e.g. 1) go to the cupboard to
the left, 2) open the door, 3) grab the yellow bowl on the third shelf from below, 4) open the top-most drawer,
5) pull out a large spoon, … And still, this would not be detailed enough. What if we are not in the kitchen?
What if there are two yellow bowls? What is a large spoon?
Keywords
Find the path
Algorithms
How long is the shortest valid path to Ann, counted in the number of steps (up, right) he will make?
A) 8 B) 9 C) 10 D) 12
It's informatics!
To determine the distance between two points we most of the time measure the length of the straight line
between them. In some cases, however, we must define the distance in a different way.
Imagine a city with perfect perpendicular streets. Unless you are a bird, the minimal distance you need to cover
to get from one point to another equals the number of horizontal plus the number of vertical blocks you need
to pass, in whatever order. Such distance is called “Manhattan distance”.
Keywords
Manhattan distance
He decided that he will not rotate or cut the tiles in any way.
What is the maximum number of different colors he can use to pave the room in the picture?
A) It is impossible B) 1 C) 2 D) 3
It's informatics!
The partition on the subsets of given sizes is one of the classical problems in the Algorithms theory. It is packing
problem, where we have an area and we decide how to cover the area with certain shapes.
Keywords
Partition
Graphical algorithm
A) B)
C) D)
It's informatics!
Sorting objects according to their properties is using in databases. For example, school inventory could be
sorted by age, place in different rooms, its function or price. Computers can work with database very quickly.
Databases are core of normal shops and e-shops, lists of patients in hospitals and lists of bus stations and
connections in timetables. Even search services as Google must use huge databases. Using best searching
algorithms brings big advantage. Arrangement of things in database could help to effectivity of searching. e. g.
It is easier to find the name in a list of pupils when they are sorted by alphabet.
Keywords
Database
Sorting
They used the seven parts shown in the picture on the left to assemble the fish in the picture to the right.
In the next lesson, pupils will be introduced to flipping parts of a picture horizontally and vertically.
From which set of parts will the students be able to assemble the same fish as above during the next
lesson by using the skills learnt in both lessons?
It's informatics!
The basic operations of a graphics editor is part of school informatics (in many countries). The operations
involved when cutting, copying and assembling pictures from parts can also be considered as a type of logical
puzzles that enhance algorithmic thinking (finding the sequence of operations that results in solving a task).
Keywords
Graphics Editor
Sequence of operations
Which of the following choice of products to buy will induce the greatest discount for
Beaver Dylan?
It's Informatics!
The knapsack problem is a well-know problem in combinatorial optimisation. Such problems are difficult to
solve, but for small instances it is possible to explore that whole state space to find the best solution.
Keywords
Optimisation
Combinatorics
States' exploration
It is your turn to put “X”. At which position would you put it, in order to be sure to win the game?
A) The 1st position B) The 2nd position C) The 3rd position D) The 4th position
It's informatics!
In the artificial intelligence domain, it is often necessary to explore a states space, a numerous ways to perform
actions. From a current state, the strategy is to find the succession of states which will lead to the goal. The
program has then to consider several states in advance, in order to make the right choice in the current state.
Keywords
Optimisation
Logic
State space exploration
A) in the river B) on the bank of the river C) in his house D) will not play
It's informatics!
This is a problem for questioning the thinking logical. As the condition 3 and 4 are exclusive for each other, so
that playing place is clearly determined. However, condition 1 and 2 are not exclusive. For example, if it was
fine yesterday, both condition 1 and 2 are satisfied. This is a Finite-State Automata problem. In this problem,
even if today is rainy, playing place depends on the weather “state” of the previous day. This means that two
certain rainy days may be in the different states. By this problem, the idea of “state transition” will be noticed.
The approaches of the state transition is an important concept that is used in the design of programs, such as
a vending machine.
Keywords
Probability
Exclusive event
Finite-State Automata
What kinds of sushi does Maiko get on her first three plates?
It's informatics!
This is an example of an assignment with given rules. Such situations often occur, e.g. “data striping” in
computer data storage. Data striping is the technique of segmenting data, such as a file, so that consecutive
segments are stored on different storage devices and improve performance of the data processing. Interleaving
of data access requires fewer data accesses for each storage device and reduces access conflicts by different
processes. In this question, each customer is used to describe a file and each kind of plate is used to describe a
storage device.
Keywords
Rules
Assignment
He breaks his clock and realizes that one of segments does not light up.
A) B)
C) D)
It's informatics!
This task expects logical thinking ability. Digital clocks use seven-segment displays which are concerned with
internal representation of numerals. This task is also concerned with error correcting methods.
Keywords
Numeric representation
Error correcting
The below figure is a map of Beaver village where ▲ represents a location of a house.
What is the fewest number of speakers such that announcement reach to all houses?
A) 2 B) 3 C) 4 D) 5
It's informatics!
Similar to dividing space into a number of regions, covering space with figures is applied to various uses. For
example, mobile communication base stations cover efficiently wide area.
Keywords
Covering
Bob can change the shape of the robot snake by bending it at its hinges. For example, Bob can transform
the robot snake into some stairs. The stairs with 3 steps composed of a robot snake made from 9 square
panels, is shown below:
A) 21 B) 14 C) 7 D) 27
It's informatics!
You need to find an algorithm to count the steps. Also transformation and visualisation is needed. There is a
repeated pattern, and many algorithms in computer science involve repeating a process many times, usually
by way of “looping” constructs in programming languages.
Keywords
Simple algorithmic
Simple computing
T17: Trees
Beaver's family is building a dam from lots of trees. Every tree should be prepared by following a special
sequence of three steps. At first, father gnaws a tree (which takes 30 minutes), then mother hauls that
tree toward the bank (which takes 30 minutes), and little beavers gnaw all branches from the tree (which
takes 30 minutes).
It's informatics!
CPUs are working in a similar way as the tree preparation. If every device is used as soon it is free, computation
becomes faster. Pipelining is an important idea for constructing CPUs. It’s a cheap way to speed up
computation. This task also deals with parallel processing, where tasks which do not conflict can be run
simulatenously. Most of today's CPUs are multi-core machines, which can accomplish some of this parallelism.
Parallel processing is an important algorithmic technique, which can be applied Something about factories
producing cars.
Keywords
Preparation/prepare
A) Ann and Charles. B) Eve and Thomas. C) Margaret and Thomas. D) Only Margaret
It's informatics!
Information coding for computer can be on different level in different forms. The languages of artificial
intelligence have back step logic what ensures to find right answer if it is exists.
Keywords
AI
Prolog
Backstep
logic
Moreover, all the pixels at the end are considered as white. For example, if the image has a total of 20
pixels, the code “4G” means that the 4 first pixels are grey, and the 16 remaining ones are white.
It's Informatics!
Representation of information and encoding is important in informatics. This question can also be related to
the compression of information.
Keywords
Image
Coding
Modular arithmetic
T20: Truchet
A beaver has 16 tiles of the same type. By rotating them he can form different looks.
He wants to decorate his bathroom wall by filling a square area with these 16 tiles. Now he is planning
the design.
Which of the following patterns can NOT be made with these tiles?
It's informatics!
Information can not only be represented by bits or letters. You can use pictures too. The tile is the basic form
of Truchet tiles. These are square tiles decorated with patterns that are not rotationally symmetric. When
placed within a square tiling of the plane, they can form varied patterns, and the orientation of each tile can
be used to visualize information associated with the tile's position within the tiling. There are more kind of
Truchet tiles.
Keywords
Pattern
Visualisation
• The machine checks that there is at least one bean in all the bubble that
are linked to the button (that is, there is an arrow from the bubble to
the button)
• If the check is successful, one bean disappear from all the source bubbles, and one bean is added to all
the destination bubbles (that is, there is an arrow from the button to the bubble).
For example, pressing B will remove one bean from the top bubble and create one bean in the bottom
bubble.
Which of the following sequence of button presses leads the machine in a situation where
it is not possible to change anything to the machine, no matter what button is pressed?
A) B – B – C – A – B – A B) B – C – B – C – B – A
C) B – B – C – B – C – C D) B – C – B – B – A – A
It's Informatics!
This problem is an illustration of Petri nets, a formalism that is used to describe concurrent reactive systems
and that can be used to simulate their behaviour or to perform analyses on them. Being able to simulate a Petri
net helps to understand how the behaviour of complex concurrent reactive systems can be modelled.
Keywords
Petri net
Graph
Algorithm
You and John Beaver are good friends, and he just sent you a secret message. You are very eager to find
out what he wants, but you have forgotten what number he uses. The only thing you remember is that
the word USE became BZL in his earlier messages.
It's informatics!
Being able to keep messages secret has always been important, for instance to send sensitive information
between different cities and countries. Today, being able to protect digital information is very important, as
more and more data is transmitted using the Internet and other networks. Cryptography is a field of
informatics, which deals with techniques for encrypting messages so that only the sender and the intended
receiver can read the content. Clearly, we do not want for instance our e-mail messages, credit card information
or other private data to be readable to anyone. The encryption technique used in this task is called a shift
cipher, since it shifts every letter in the alphabet a given number of positions. The method is also called Caesar
cipher, as Julius Caesar used this particular approach for protecting his communication. The activity of making
a message unreadable is called "encrypting" it. As a result, the original message (“plaintext”) is transformed
into an unreadable version (“ciphertext”). If you want to make the message readable again, you have to
“decrypt” it, i.e. transform the ciphertext back to the orginal plaintext. The number used for encryption and
decryption is called the “key”.
Keywords
Caesar cipher
Cryptography
Decryption
Encryption
T23: Bridges
A city park has a big lake with many islands. The islands are connected by two types of bridges as shown
below. The bridges are either public (solid line) or toll (dashed line). Sandy wants to travel from home (the
island with a house) to the island with forest. Sandy has enough money to pay for at most two toll bridges.
What is the fewest possible total number of bridges that she crosses?
A) 4 B) 5 C) 6 D) 7
It's informatics!
The picture in this problem is a graph. We are asked to find a path from one vertex (Sandy's home) to another
(the forest). In particular, we restrict the number of bridges of a certain type and we look for the cheapest
possible path. There are many well known ways to solve such problems; one of the most interesting and
challenging aspects of computer science is that we often face variations on well-known problems.
Keywords
Graph
Shortest paths
On the right, you see the system of creeks and the locations of the obstacles. The
locations A, B, C, D, and E are used to describe routes through the creeks.
It's informatics!
The system of creeks is like a network, with the locations A to E plus Start and Home as nodes that are
connected. The energy consumption of the obstacles on the connections can be regarded as a distance
between connected nodes. Then, the beaver is looking for a shortest path from node „Start“ to node „Home“.
In informatics, the mathematical construct „graph“ is often used to represent such networks with distances.
Many algorithms have been developed for graphs. For the „shortest path problem“, several efficient algorithms
have been invented, e.g. by Dijkstra and (together) by Floyd and Warshall. You may have seen the application
of such algorithms already, for instance in route planning services like car navigation systems. So the next time
you reach your goal thanks to computer software, you may think of Dijkstra and all the other computer
scientists that have improved the finding of shortest paths.
Keywords
Graph
Shortest path problem
Dijkstra
If they have only two hours, how should they organize to assemble as many abaci as possible?
A) Each of them makes abaci alone.
B) Ann puts rods into the left part of the frame, Philip adds beads, Kate adds the rest of the frame.
C) Philip puts rods into the left part of the frame, Kate adds beads, Ann adds the rest of the frame.
D) Ann and Kate put rods into the left parts of the frames, Philip adds beads and the rest of the frame.
It's informatics!
These kinds of pipelines, where the output from one worker or machine or factory is input for another one and
work is done parallel, are common in many areas of everyday life: factories, offices, transport systems, etc. It
is important to optimize these processes to get best results. Often the processes are too complicated to be
optimized by hand and computers must be used. Also note that (just like in this task), a process may have a
start-up delay where the time from beginning to the first output is much longer than the time between
subsequent outputs. Computer chips are also often composed of multiple units that can work in parallel, but
need input from each other, much like Ann, Kate and Philip. Nowadays, when the actual speed of processors
mostly stopped increasing, we make them faster by introducing more parallelism and better constructed
“pipelines”.
Keywords
Pipeline
T26: Bagels
Two friends have opened a bakery. Sue bakes three bagels (one of each shape A, B and O) and hangs them
together on a stick, placing A on first, then B on second, and O third. She then repeats this process. Peter
is selling the bagels and takes always the right-most bagel from the stick. Sue is baking faster than Peter
can sell the bagels.
What is the fewest number of bagels sold by Peter if the bakery looks like the above picture?
It's informatics!
The management of a data structure, namely a stack, is shown. When using a stack, elements can be stored
only at the uppermost position and can be taken only from the uppermost position. That is, a stack is a LIFO
data structure: last-in, first-out, meaning the most recently placed item into the stack will be the first item
removed from the stack.
Keywords
Stack
Data structure
What is the shortest time they need to fully recharge the three mobiles?
It's informatics!
This is a scheduling problem. Scheduling is used in computer science when tasks may be performed faster by
dividing them among many CPUs: we choose which CPU will work on which task, when, and for how long. There
are many different algorithms for scheduling. The most simple one is “first come, first served”: you perform
the tasks in the order they arrived. Here it would be to fully charge mobiles 1 and 2, and then charge mobile 3.
But here this is not optimal as to the date of end for the whole work. When we need to divide tasks, it is
important to choose carefully the way we assign them, so as to optimize one particular objective (date of end
for instance). Scheduling is also used in disk drives (I/O scheduling), printers, net routers etc. Usually scheduling
problems are very hard problems. We do not know how to solve them efficiently, or even if it is possible to do
so.
Keywords
Scheduling
T28: Truth
Beaver Bob only tells the truth on Monday, Wednesday and Friday and always lies on all other days.
Today he says: “Tomorrow I’ll tell the truth.” What day is it?
It's informatics!
Logic is fundamental in computer science. When designing computer programs, careful thought has to go into
logic structures. So complex computations can be made much more efficient, like instead of trying every
possible way, one can exclude beforehand much useless computations (like trying all weekdays).
Keywords
Algorithm
Logic programing
Prolog
T29: Ladybug
The Ladybug is a robot and it can be controlled by these commands:
• Forward N - the ladybug moves N steps (N is a number) forward in the direction where it is heading.
• Left - The Ladybug turns to the left without moving forward.
• Right - The Ladybug turns to the right without moving forward.
• Repeat R (some commands) - The Ladybug repeats the commands in parentheses R times (R is a number).
Each forward movement of the Ladybug paints a track (a straight line) on the floor on which it moves.
Bart gave this sequence of commands to the Ladybug:
Repeat 2 (Forward 1, Right, Forward 1, Left) Repeat 2 (Forward 1, Right) , Forward 2, Right, Forward 1, Left,
Forward 1, Right, Forward 2, Right
The Ladybug executed the commands.
Which of the following tracks was obtained as a result of Bart's sequence of commands?
It's informatics!
The order of actions and what happens if a computer or a robot executes the actions in a specific order are
among the basic things which informatics deals with.
Keywords
Order of actions
Programming a robot
The START command is executed at any place, wherever the robot happens to be. Each of the other
commands is executed exactly when the robot walks over one of the dark magnetic control devices on the
road.
The clinging robot executes this program: START SWITCH STAY STAY STAY STOP
It's informatics!
Automatically moving vehicles are found at many places including tunnel systems, airports and factories.
These machines are controlled by computer programs. Basically a computer program is a sequence of
commands. The commands are related to physical sensors and means of maneuvering available to the
vehicle.
Keywords
Robot
Program
CORRECT ANSWERS
Task # Answer Task # Answer Task # Answer
1. B 11. B 21. C
2. C 12. D 22. C
3. B 13. C 23. B
4. B 14. A 24. C
5. C 15. B 25. B
6. A 16. A 26. A
7. D 17. C 27. C
8. D 18. C 28. C
9. D 19. C 29. C
10. C 20. B 30. A