Computational Thinking - Assignment 1 (Artificial Intelligence Year 1)
1. Two snails
A) Every day, snail number one climbs 5 meters upwards and at night he slides down 4
meters. The well is 20 meters deep. In 24 hours, the snail climbs up 5 – 4 = 1 meter. Once
the snail has reached the well, he will not slide down anymore. Day 1 until day 15 (if you
count day + night), the snail will cover a distance of 15 meters. On day 16, he will climb up 5
meters and reaches the edge of the well. There will not be a night of sliding down.
It takes snail number one 16 days to reach the edge of the well.
Type of strategy/algorithm: “divide the problem into several sub problems and steps”.
I solved the problem by simplifying the problem and dividing it into a few steps.
B) It takes snail two 0 days to reach the edge of the well because he is happy. He has no
reason to climb upwards the well. He’ll stay at the bottom of the dry well.
Snail one is unhappy and wants to move out the well. He will reach the edge of the well in 16
days (as explained in A).
That’s what you’ll get when you take both snails separately. But the snails won’t climb up
together. This question can’t be answered, because it says “how many days does it take both
snails to reach the edge of the well when they climb up together?”.
2. Turkeys and chickens
There are 88 chickens and turkeys in total. There are 36 more chickens than turkeys. This
means that there are 88 – 36 = 52 chickens and that there are 88 – 52 = 36 turkeys.
The price you pay for 1 chicken and 1 turkey is 12 Euro. A turkey costs 3 times the price of a
chicken, so that’s 9 Euro for a turkey and 3 Euro for a chicken.
If the farm sells half its chickens, they will make 52 : 2 x 3 = 78 Euro
If the farm sells half its turkeys, they will make 36 : 2 x 9 = 162 Euro
The farm would make 78 + 162 = 240 Euro in total, if they sell half of the chickens and half of
the turkeys.
Type of strategy/algorithm: “divide the problem into several sub problems and steps”.
I solved the problem by simplifying the problem and dividing it into a few steps.
SEE NEXT PAGE FOR PROBLEM 3
1
1. Two snails
A) Every day, snail number one climbs 5 meters upwards and at night he slides down 4
meters. The well is 20 meters deep. In 24 hours, the snail climbs up 5 – 4 = 1 meter. Once
the snail has reached the well, he will not slide down anymore. Day 1 until day 15 (if you
count day + night), the snail will cover a distance of 15 meters. On day 16, he will climb up 5
meters and reaches the edge of the well. There will not be a night of sliding down.
It takes snail number one 16 days to reach the edge of the well.
Type of strategy/algorithm: “divide the problem into several sub problems and steps”.
I solved the problem by simplifying the problem and dividing it into a few steps.
B) It takes snail two 0 days to reach the edge of the well because he is happy. He has no
reason to climb upwards the well. He’ll stay at the bottom of the dry well.
Snail one is unhappy and wants to move out the well. He will reach the edge of the well in 16
days (as explained in A).
That’s what you’ll get when you take both snails separately. But the snails won’t climb up
together. This question can’t be answered, because it says “how many days does it take both
snails to reach the edge of the well when they climb up together?”.
2. Turkeys and chickens
There are 88 chickens and turkeys in total. There are 36 more chickens than turkeys. This
means that there are 88 – 36 = 52 chickens and that there are 88 – 52 = 36 turkeys.
The price you pay for 1 chicken and 1 turkey is 12 Euro. A turkey costs 3 times the price of a
chicken, so that’s 9 Euro for a turkey and 3 Euro for a chicken.
If the farm sells half its chickens, they will make 52 : 2 x 3 = 78 Euro
If the farm sells half its turkeys, they will make 36 : 2 x 9 = 162 Euro
The farm would make 78 + 162 = 240 Euro in total, if they sell half of the chickens and half of
the turkeys.
Type of strategy/algorithm: “divide the problem into several sub problems and steps”.
I solved the problem by simplifying the problem and dividing it into a few steps.
SEE NEXT PAGE FOR PROBLEM 3
1