A magazine where the digital world meets the real world.
On the web
- Home
- Browse by date
- Browse by topic
- Enter the maze
- Follow our blog
- Follow us on Twitter
- Resources for teachers
- Subscribe
In print
What is cs4fn?
- About us
- Contact us
- Partners
- Privacy and cookies
- Copyright and contributions
- Links to other fun sites
- Complete our questionnaire, give us feedback
Search:
What is an algorithm? Try the Swap Puzzle
One of the core topics of Computer Science is the study of 'Algorithms'. What do we mean by an algorithm though? Just a series of actions to perform to get a job done. The study of algorithms is about coming up with such sequences that guarantee particular jobs are done. It is also about devising efficient ways of doing things. Two different ways of doing something could both guarantee to get the job done but one may be quicker than the other and so better.
To get an idea of what I mean by that try the following puzzle. It is fairly easy to solve if you persist, but not so easy to do it efficiently - in the fewest number of moves. Each time you solve the puzzle you will create an algorithm for doing it that the applet records for you.