# The Three Little Pigs are hiding something

As you work through one of your countless puzzle books, you find a sheet of paper inside with a poem on it. Remembering the last time you found something like that, you decide to take a crack at this one, hoping to solve it a bit more quickly...

A Fable

The three little pigs hid a little rhyme,
But it's only a matter of how much time
And blows their whole house down.

“Mark my words, pigs, count on these:
I'll find those hidden rhymes with ease,
I'll find those letters and those ABC's
And split them into threes!”

The big bad wolf said this little rhyme,
And he committed the big bad crime,
And he cooked all three of the pigs with thyme,
Wolfing his bacon down.

Nonsense indeed! But what is the fable hiding?

Hint:

Upon closer inspection of the poem, you notice that some words have a faint underline, perhaps hinting at a ciphering method: words, count, rhymes, letters, threes, bacon

Hint 2:

Treat each line as a unit, and ignore the stanza breaks. The number 3 is very important.

• Well, we need what we're trying to find! – bleh Jan 10 '16 at 1:55
• @bleh a two-word phrase is hidden in the fable using a variant of a cipher which (among other things) is hinted at in the fable itself. – Volatility Jan 10 '16 at 5:49
• btw, this phrase "And he cooked all three of the pigs with thyme, " made me sad :-) – Nai Jan 12 '16 at 4:29
• @Volatility I've been trying to crack this one for hours. Could you give us some hints? Is the metering significant? I feel like the rhyming scheme definitely is, judging from the references to "rhymes" in the poem. "ABC's" implies a polyalphabetic cipher to me. "And split them into threes!" may be a hint towards a transposition cipher. I am having trouble identifying the ciphertext though. – SpiritFryer Jan 15 '16 at 16:48
• @GentlePurpleRain I suspect a variant using ABCs rather than just As and Bs, especially since a group of three such symbols ("split them into threes") has 27 possible states - just enough for the alphabet. Still no idea how to get those symbols, though. – Zandar Jan 25 '16 at 16:45

The clue about bacon hints at a Baconian cipher. Zandar suggested that it might be a variant of the Baconian cipher that uses a ternary instead of a binary system. So I started by assigning a pattern to each letter, using the values A, B, C:

AAA  A            BAA  J            CAA  S
AAB  B            BAB  K            CAB  T
AAC  C            BAC  L            CAC  U
ABA  D            BBA  M            CBA  V
ABB  E            BBB  N            CBB  W
ABC  F            BBC  O            CBC  X
ACA  G            BCA  P            CCA  Y
ACB  H            BCB  Q            CCB  Z
ACC  I            BCC  R            CCC  (unassigned)


Then I tried to figure out a way to get a pattern out of the poem. Based on the clue words word, count, and threes, and with the help of the second hint, I counted the words in each line, and assigned each line a letter as follows:

• number of words is divisible by 3: A
• number of words $\div$ 3 leaves a remainder of 1: B
• number of words $\div$ 3 leaves a remainder of 2: C

(as a more mathematical way of looking at it, use 0, 1, 2 instead of A, B, C, and just use (word count $\text{mod}$ 3) to assign a value)

This left me with the following:

          Word                Letter
Line #   count   Remainder   assigned
1        8       2           C
2        9       0           A
3       10       1           B
4        6       0           A
5        7       1           B
6        7       1           B
7        7       1           B
8        5       2           C
9        8       2           C
10        7       1           B
11       10       1           B
12        4       1           B


This leaves us with four triplets: CAB, ABB, BCC, BBB

If we refer back to our alphabet table, these correspond to the letters

T, E, R, N.

Now if we look at the rhyme scheme of the poem, we get another pattern, based on which words rhyme with each other: AAAB CCCC AAAB.

Splitting that into triplets, we get AAA, BCC, CCA, AAB, which correspond to the letters

A, R, Y, B.

If we do the same thing a third time, this time using the letter count instead of the word count, we end up with the sequence AAAAACBBCBBB.

Splitting that into triplets, we get AAA, AAC, BBC, BBB, which correspond to the letters

A, C, O, N.

Putting these three results together, we get

TERNARYBACON or Ternary bacon, which describes the cipher used in encrypting this.

A huge thanks to Zandar who actually solved most of this, and SpiritFryer as well.

• Its a two word phrase, according to the OP. – Daedric Jan 25 '16 at 17:50
• Good start, but you still need to consider the rhymes and the letters to get the complete solution. – Volatility Jan 25 '16 at 20:55
• The rhyming scheme is AAAB, CCCC, AAAB, which split into threes gives us AAA (= A), BCC ( = R), CCA (= Y), AAB (= B). Those don't seem to make any sensible word though. – SpiritFryer Jan 26 '16 at 15:21
• Counting the letters in the same way as the words gives AAA AAC BBC BBB, which translates to ACON. I kind of expected that would be the solution once I saw the first part. – Zandar Jan 26 '16 at 17:14
• @Zandar Now if only the first stanza had a rhyme scheme of ABA or ABC or CAB, we could combine the two to get DRY BACON or FRY BACON or TRY BACON. – GentlePurpleRain Jan 26 '16 at 17:23