*Solve simple colour-by-number and logical thinking puzzles and gain a deeper understanding of image representation and compression.** *

Pixel puzzles turn the ways images are represented as a series of numbers representing pixels into puzzles. They come in various forms from a simple variant of colour-by-numbers to more complex puzzles based on compression where images are represented by fewer numbers so take up less storage – but can you get them back! Each representation needs its own algorithm to follow to get the image back.

Colour the grids or make them from lego, or even use them as needlepoint/tapestry patterns!

**Learn about:**

- algorithms
- representation of images
- pixels and raster graphics
- compression algorithms
- run length encoding
- data representation
- logical thinking
- computational thinking

**Also for younger children practice and explore:**

- numeracy
- counting
- colours
- symmetry

**Teach as part of:**

- computing
- maths
- art
- history

**Simple Colour-by-number Puzzles**

**Instructions: Simple Colour-by-number Puzzles**

Each square holds a number that tells you the colour to colour in that square. Look up the colours in the key.

Explore different algorithms for colouring them in. For example:

- Work along the rows colouring each pixel in turn before moving to the next row.
- Pick a colour then work along the rows, colouring pixels of only that colour. When you get to the end of the grid, pick the next colour and start again. Repeat this until you run out of colours.
- Pick an uncoloured square and colour it, then colour all pixels around it that are the same number, moving outwards until their are no more adjacent pixels with that number. Then pick a new uncoloured square and repeat until the whole picture is done.

**Resources: Colour-by-number Puzzles**

Here are Colour by Number Pixel Puzzle Picture sheets and solutions that you can download.

**Mini beasts Pictures**

- Puzzle Sheet: Simple Colour By Number Pixel Puzzle 1a LO RES – mini beasts (colour key)[PDF] See also hi res version – puzzle 3 below
- Puzzle Sheet: Simple Colour By Number Pixel Puzzle 1b –LO RES mini beasts (black and white key) [PDF] See also hi res version – puzzle 3 below
- Solution Sheet: Simple Colour By Number Pixel Puzzle 1 LO RES Solution [PDF]
- Puzzle Sheet: Simple Colour By Number Pixel Puzzle 2a – mini beasts (colour key)[PDF]
- Puzzle Sheet: Simple Colour By Number Pixel Puzzle 2b – mini beasts (black and white key) [PDF]
- Solution Sheet: Simple Colour By Number 2 – mini beasts [PDF]
- Puzzle Sheet: Simple Colour By Number Pixel Puzzle 3 HI RES – mini beasts (colour key)[PDF] See also lo res version – puzzle 1 above
- Puzzle Sheet: Simple Colour By Number Pixel Puzzle 3b – mini beasts (black and white key) [PDF] forthcoming
- Solution Sheet: Simple Colour By Number 3 HI RES – minibeasts [PDF]

**Halloween Pictures**

- Puzzle Sheet: Simple Colour By Number Pixel Puzzle Picture – Halloween (colour key)[PDF]
- Solution Sheet: Simple Colour By Number Pixel Puzzle – Halloween [PDF]
- Raw Puzzle Sheet: Simple Colour By Number Pixel Puzzle Picture – Halloween(colour key)[PDF] – same puzzle as above but without instructions etc
- Raw Solution Sheet: Simple Colour By Number Pixel Puzzle – Halloween [PDF]

**Christmas Pictures**

- Puzzle Sheet: Simple Colour by Number Pixel Puzzle – Christmas (colour key)[PDF]
- Puzzle Sheet: Simple Colour by Number Pixel Puzzle – Christmas (black and white key)[PDF]
- Solution Sheet: Simple Colour by Number Pixel Puzzle – Christmas [PDF]
- Raw Puzzle Sheet: Simple Colour by Number Pixel Puzzle – Christmas (colour key)[PDF] – same puzzle as above but without instructions etc
- Raw Puzzle Sheet: Simple Colour by Number Pixel Puzzle – Christmas (black and white key)[PDF] – same puzzle as above but without instructions etc
- Raw Solution Sheet: Simple Colour by Number Pixel Puzzle – Christmas [PDF]

**The Romans and Pixel Puzzles**

Teach some computing when covering the Romans: mosaics are just pixel pictures. They even realised they could make really detailed (high resolution) images by using small tiles or tesserae. Try our Roman Mosaic Pixel Puzzle or why not make your own Roman mosaic version of a pixel puzzle. Find out more on our Roman Mosaic Computing page including a link to an online mosaic designing site.

**Programming Pixel Puzzles**

Pixel puzzles can be turned in to programming puzzles by programming a turtle to paint the picture given the numbers. There are different algorithms for programming it just as humans do them in different ways. The turtle could, for example:

- Run back and forth across the rows colouring each square in turn covering the grid just once OR
- Jump around the grid colouring in the first colour, then jump around the grid colouring in the second colour and so on, …
- The program could use a form of run length encoding (see below) to save having an instruction in the program for every square.

Can the students come up with different ways, or improve their first version to be a simpler program? Let each come up with a way and then have them share the different ways they did it.

**Symmetrical Colour-by-number Puzzles**

In these symmetrical colour by number pictures you are only given the numbers for half the pixels. Use symmetry to work out the rest of the numbers and so the rest of the picture.

This can also be used as an introduction to the idea of compression – if you know something about the properties of a picture you can reconstruct the image despite storing fewer numbers!

**Instructions: Symmetrical colour-by-number Puzzles**

Some squares have a number that tells you the colour to colour in that square. Look up the colours in the key. Other squares have no number. Work out what colour they are by symmetry.

So, for example with a colour lookup table 1 Blue, 2 Red a row with numbers (where _ means blank) 1 1 1 1 1 2 2 2 _ _ _ _ _ _ _ _ would mean colour five pixels blue and then by symmetry three pixels red, then three pixels red and five pixels blue.

Complete them in either of two ways (two algorithms). Either:

- Use symmetry to first fill out the rest of the grid of numbers to create a normal colour by number pixel, OR
- Colour in the numbers given, then copy the colours on to the other side.

**Resources: Symmetrical colour-by-number Puzzles**

Here are Colour by Number Pixel Puzzle Picture sheets and solutions that you can download.

**Mini-beast Pictures**

- Puzzle Sheet: Symmetrical Colour by Number Pixel Puzzle 1 – butterfly [PDF]
- Raw Puzzle: Raw version of Symmetrical Colour by Number Pixel puzzle 1 to include in your own handouts [PDF]
- Solution Sheet: Solution to Symmetrical Colour By Number Puzzle 1: butterfly [PDF]
- Puzzle Sheet: Symmetrical Colour by Number Pixel Puzzle 2 – beetle [PDF]
- Raw Puzzle: Raw version of Symmetrical Colour by Number Pixel puzzle 2 to include in your own handouts [PDF]
- Solution Sheet: Solution to Symmetrical Colour By Number Puzzle 2: beetle [PDF]

**Colour-by-number Puzzles (2)**

The simple colour by number pictures include the numbers on the grid, but what if you want to send a picture to someone else. You just need to record the list of numbers and know the grid size. These puzzles can be combined with activities sending images across the room by e.g. holding up cards one at a time, for the distant person to copy down, for example.

**Instructions: Colour-by-number Puzzles**

Each line of instructions tells you how to colour the next one or more lines of the picture by giving the number corresponding to the colour of the next pixel.

So, for example with a colour lookup table 1 Blue, 2 Red : 1 1 1 2 2 2 would mean colour three pixels blue and then three pixels red.

**Resources: Colour-by-number Puzzles**

Here are Colour by Number Pixel Puzzle Picture sheets and solutions that you can download.

**African Animal Picture**

- Puzzle Sheet: Colour by Number Pixel Puzzle 1 – african animal [PDF]
- Solution Sheet: Solution to Colour By Number Puzzle 1: african animal [PDF]:
- Puzzle Sheet: Colour By Number Pixel Puzzle 2 – in the desert [PDF]
- Solution Sheet: Solution to Colour By Number 2: in the desert [PDF]

**Run length Encoding Puzzles**

**Instructions: Run length Encoding Puzzles**

We give these puzzles in two forms, one slightly harder where everything is numbers and the other easier to follow where the colours are given explicitly. Each pair gives the number of pixels to colour and the colour to use. Colour the pixels following the instructions in order.

**Computational Thinking Hint**

The way data (here of images) is represented affects the amount of storage needed. Raster graphics involves treating an image as a grid. You then store a number to represent the colour at every point (or pixel) in the grid. Run-length encoding cuts how many numbers you need to store by counting the runs of numbers.

**Resources: Run length Encoding Puzzles**

Here are some Run length Encoding Pixel Puzzle Picture sheets and solutions that you can download. The version without a colour key is easier to follow so suitable for younger students.

**Egypt Picture**

- Puzzle Sheet: Run Length Encoding Pixel Puzzle 1a – Egypt (without colour key) [PDF]
- Puzzle Sheet: Run Length Encoding Pixel Puzzle 1b – Egypt (with colour key) [PDF]
- Solution Sheet: Solution to run Length Encoding Pixel Puzzle 1a and b: Egypt [PDF]:

**Logical Thinking Compressed Pixel Puzzles**

**Instructions: Logical Thinking Compressed Pixel Puzzles**

The numbers on each row of a Logical Thinking Compressed Pixel Puzzle tell you the number of cells in each group of black cells in the row. So if the numbers next to a row are 2,4,5 it means that row has a block of 2 black cells, a block of 4 black cells and a block of 5, in that order. Each block is separated by one or more white cells. White cells could also come before or after the blocks. Columns are encoded in the same way.

**Computational Thinking Hint**

To solve the compressed pixel puzzles you have to use logical thinking, alternating between different rows and columns, applying the new information you deduce about one to the other.

**Resources: Logical Thinking Compressed Pixel puzzles**

Here are some computer science linked Pixel puzzle sheets and solutions that you can download (more to come):

- Puzzle Sheet: Logical Thinking Compressed Pixel Puzzle 1 [PDF]
- Solution Sheet: Solution to Logical Thinking Compressed Pixel Puzzle 1 [PDF]

**More Puzzles**

Lots more computational thinking puzzles including the cs4fn Computational Thinking Puzzle Book Issue 1

**Odd-even Pixel Puzzles**

These colour by number puzzles explore the patterns in odd and even numbers. Find out more on our Odd-even Pixel Puzzle page.

**Multiplication Table Pixel Puzzles**

These colour by number puzzles explore how patterns can lead to new algorithms while learning your times tables. Find out more on our Multiplication Table Pixel Puzzle page including a link to an online mosaic designing site.