# Codes and Hidden Meaning - March 2004, Stage 4&5

## Problems

### Anti-magic Square

##### Stage: 3 and 4 Short Challenge Level:

Weekly Problem 44 - 2011
You have already used Magic Squares, now meet an Anti-Magic Square. Its properties are slightly different, but can you still solve it...

### Partial Magic

##### Stage: 3 and 4 Short Challenge Level:

Weekly Problem 41 - 2011
This magic square has only been partially completed. Can you still solve it...

### The Queen of Hearts

##### Stage: 3 and 4 Short Challenge Level:

Weekly Problem 33 - 2011
The Queen of Hearts has lost her tarts! She asks each knave if he has eaten them, but how many of them are honest...

### Smith and Jones

##### Stage: 4 Challenge Level:

Mr Smith and Mr Jones are two maths teachers. By asking questions, the answers to which may be right or wrong, Mr Jones is able to find the number of the house Mr Smith lives in... Or not!

### Knapsack

##### Stage: 4 Challenge Level:

You have worked out a secret code with a friend. Every letter in the alphabet can be represented by a binary value.

### Guesswork

##### Stage: 4 Challenge Level:

Ask a friend to choose a number between 1 and 63. By identifying which of the six cards contains the number they are thinking of it is easy to tell them what the number is.

##### Stage: 5 Challenge Level:

Decipher a simple code based on the rule C=7P+17 (mod 26) where C is the code for the letter P from the alphabet. Rearrange the formula and use the inverse to decipher automatically.

### Double Time

##### Stage: 5 Challenge Level:

Crack this code which depends on taking pairs of letters and using two simultaneous relations and modulus arithmetic to encode the message.

### The Public Key

##### Stage: 5 Challenge Level:

Find 180 to the power 59 (mod 391) to crack the code. To find the secret number with a calculator we work with small numbers like 59 and 391 but very big numbers are used in the real world for this.