All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Square pairs (Posted on 2005-01-09) Difficulty: 3 of 5
Back in An Arrangement of 15 you were asked to place the numbers 1 to 15 in a line so that any two adjacent numbers summed to a square number.

Now, try to arrange the numbers from 1 to 32 in a circle, so any two adjacent numbers again sum a square number.

See The Solution Submitted by e.g.    
Rating: 4.3333 (12 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Graph theory | Comment 8 of 12 |
If we imagine a 32 points graph, such that there is an arc joining A and B if and only if A+B is a square, the problem is equivalent to finding a cycle in such a graph.

1 --> 3, 8, 15, 24
2 --> 7, 14, 23
3 --> 1, 6, 13, 22
4 --> 5, 12, 21, 32
5 --> 4, 11, 20, 31
6 --> 3, 10, 19, 30
7 --> 2, 9, 18, 29
8 --> 1, 17, 28
9 --> 7, 16, 27
10 -> 6, 15, 26
11 -> 5, 14, 25
12 -> 4, 13, 24
13 -> 3, 12, 23
14 -> 2, 11, 22
15 -> 1, 10, 21
16 -> 9, 20
17 -> 8, 19, 32
18 -> 7, 31
19 -> 6, 17, 30
20 -> 5, 16, 29
21 -> 4, 15, 28
22 -> 3, 14, 27
23 -> 2, 13, 26
24 -> 1, 12, 25
25 -> 11, 24
26 -> 10, 23
27 -> 9, 22
28 -> 8, 21
29 -> 7, 20
30 -> 6, 19
31 -> 5, 18
32 -> 4, 17

There's no simple algorithm for finding such a cycle, but we can simplify the graph by noting, for example, that from 28 we can only get to 8 and 21 -- we erase point 28, and remember that the graph will have 8-28-21. Doing this systematically arrives to the solution.
  Posted by Old Original Oskar! on 2005-01-10 17:04:35
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information