Micro Challenge #45 – Extending a challenge

17 July 2020 - 3 minute read

Welcome to the forty-fifth of Altitude Foundation’s #MicroChallenges2020

Today’s challenge will help you to expand a problem & programme a solution

What’s a Micro Challenge?

These challenges are short activities to help you develop, revise or refresh your coding skills, posted every Monday, Wednesday and Friday.

Micro Challenge #45

This week, we are exploring decomposition and algorithm design. You can read up on these topics in challenge 1, challenge 11, and challenge 39.

This week, we have been looking at the classic river crossing problem:

A farmer needs to transport a goat, a fox and a bunch of carrots across a river in a boat that can only hold the farmer and one other object or animal. 

If left unattended together, the fox would eat the goat, or the goat would eat the carrots.

Monday’s challenge asked you to decompose and abstract the problem; Wednesday’s challenge asked you to design an algorithm for solving it. 

The Challenge:

Today’s challenge is to create an expanded version of the river crossing challenge. What parameters can you add to make it more complicated? (For example: adding a time limit, adding more passengers, adding more locations…)

Once you’ve designed your new challenge, you can then decompose it, abstract the details, constants and variables and then design your new, more complex algorithm.

Remember, you will need to consider: 

  • What conditions do you need to take into account to solve the problem?
  • How can you describe the conditions? (i.e. what logic underpins the problem)?
  • What choices does the user need to be allowed to make?

The second point will be particularly important for designing your algorithm – what logic underpins the problem i.e. what processes will you need to run to ensure that the programme determines the right outcome?

Review it:


  • Can you solve your own problem? What is the minimum amount of crossings you have to make?

Share it

We would love to see what you have created! Please send any pictures, videos, or files of your activities to us – either via Facebook, Twitter or Instagram  using #MicroChallenges2020 or to challenges@altitudefoundation.org. If you are emailing them to us, please let us know if you are happy for us to share your stuff on our social media platforms (with credit, of course).

Leave a comment

Leave a Reply