Training Site
Sideways banner

The Secret Word

Input: Standard Input (stdin)
Output: Standard Output (stdout)
Memory limit: 100 megabytes
Time limit: 1.0 seconds

A dying sailor (who happened to know Graph Theory) left his final clue to his treasure as a pile of connected bones - a single word encrypted via components of a graph

Each group of components represents a letter of the word The number of Vertices in each component represents a letter of the word Eg: 1 for A, 2 for B etc

The decoded letters will most probably be an anagram of the word so feed the letters into an anagram generating algorithm and filter out all non English words (eg: aspell list < words | diff words)

The list of bone details is at the end of this document

Find the secret word! Once you've got it, submit a program that simply prints this word.

The following algorithm can be used to generate anagrams

printAnagram (prefix,word)
if word is length 1 print the prefix and the word
Otherwise
    For each letter in the word
        newPrefix <- Prefx + letter
        Rest <- Word without letter
        printAnagram(newPrefix,rest)

There were 54 Bones labelled from 0 to 53 - the bones were attached as listed below

0 3
0 4
0 7
0 8
0 13
0 15
0 17
0 24
0 26
0 29
0 32
0 33
0 37
0 38
0 40
0 44
0 46
0 48
3 4
3 7
3 8
3 13
3 15
3 17
3 24
3 26
3 29
3 32
3 33
3 37
3 38
3 40
3 44
3 46
3 48
4 7
4 8
4 13
4 15
4 17
4 24
4 26
4 29
4 32
4 33
4 37
4 38
4 40
4 44
4 46
4 48
7 8
7 13
7 15
7 17
7 24
7 26
7 29
7 32
7 33
7 37
7 38
7 40
7 44
7 46
7 48
8 13
8 15
8 17
8 24
8 26
8 29
8 32
8 33
8 37
8 38
8 40
8 44
8 46
8 48
13 15
13 17
13 24
13 26
13 29
13 32
13 33
13 37
13 38
13 40
13 44
13 46
13 48
15 17
15 24
15 26
15 29
15 32
15 33
15 37
15 38
15 40
15 44
15 46
15 48
17 24
17 26
17 29
17 32
17 33
17 37
17 38
17 40
17 44
17 46
17 48
24 26
24 29
24 32
24 33
24 37
24 38
24 40
24 44
24 46
24 48
26 29
26 32
26 33
26 37
26 38
26 40
26 44
26 46
26 48
29 32
29 33
29 37
29 38
29 40
29 44
29 46
29 48
32 33
32 37
32 38
32 40
32 44
32 46
32 48
33 37
33 38
33 40
33 44
33 46
33 48
37 38
37 40
37 44
37 46
37 48
38 40
38 44
38 46
38 48
40 44
40 46
40 48
44 46
44 48
46 48
1 9
1 16
1 21
1 28
1 39
1 51
1 52
9 16
9 21
9 28
9 39
9 51
9 52
16 21
16 28
16 39
16 51
16 52
21 28
21 39
21 51
21 52
28 39
28 51
28 52
39 51
39 52
51 52
10 14
10 18
10 25
10 36
14 18
14 25
14 36
18 25
18 36
25 36
27 41
27 47
41 47
2 5
2 6
2 11
2 12
2 19
2 20
2 22
2 23
2 30
2 31
2 34
2 35
2 42
2 43
2 45
2 49
2 50
2 53
5 6
5 11
5 12
5 19
5 20
5 22
5 23
5 30
5 31
5 34
5 35
5 42
5 43
5 45
5 49
5 50
5 53
6 11
6 12
6 19
6 20
6 22
6 23
6 30
6 31
6 34
6 35
6 42
6 43
6 45
6 49
6 50
6 53
11 12
11 19
11 20
11 22
11 23
11 30
11 31
11 34
11 35
11 42
11 43
11 45
11 49
11 50
11 53
12 19
12 20
12 22
12 23
12 30
12 31
12 34
12 35
12 42
12 43
12 45
12 49
12 50
12 53
19 20
19 22
19 23
19 30
19 31
19 34
19 35
19 42
19 43
19 45
19 49
19 50
19 53
20 22
20 23
20 30
20 31
20 34
20 35
20 42
20 43
20 45
20 49
20 50
20 53
22 23
22 30
22 31
22 34
22 35
22 42
22 43
22 45
22 49
22 50
22 53
23 30
23 31
23 34
23 35
23 42
23 43
23 45
23 49
23 50
23 53
30 31
30 34
30 35
30 42
30 43
30 45
30 49
30 50
30 53
31 34
31 35
31 42
31 43
31 45
31 49
31 50
31 53
34 35
34 42
34 43
34 45
34 49
34 50
34 53
35 42
35 43
35 45
35 49
35 50
35 53
42 43
42 45
42 49
42 50
42 53
43 45
43 49
43 50
43 53
45 49
45 50
45 53
49 50
49 53
50 53