§ TOOLS / CIPHER LAB / BACONIAN
Baconian cipher
The Baconian cipher hides each letter of a message as a group of five characters drawn from just two symbols, usually written A and B. It looks like noise, decodes by a simple table, and shows up on Science Olympiad Codebusters papers from the elementary level through Division B.
What the Baconian cipher is
A Baconian cipher is a substitution cipher in which every plaintext letter becomes a five-character pattern of two symbols. With A and B as the symbols, the letter A is AAAAA, B is AAAAB, C is AAABA, and the patterns count upward through the alphabet like binary numbers. Five positions with two choices each give thirty-two patterns, more than enough for twenty-six letters. The original version used twenty-four patterns, with I and J sharing one and U and V sharing another; a twenty-six-letter version also exists, and a tournament’s resource sheet usually says which one it uses.
The cipher is named for Francis Bacon, the English statesman and philosopher, who described it in the early seventeenth century. His point was not the A/B patterns themselves but the idea of hiding them: in his scheme the two symbols were two slightly different typefaces, so a secret message could be carried inside an ordinary-looking printed text. That idea, a message hidden in the way something is written rather than in what it says, is why Baconian is often introduced as an early example of steganography as well as of cipher.
Modern puzzle versions keep the five-character groups but change the symbols. A message may use 1 and 2, upper and lower case, two colours or two shapes, and the first job is to decide which of the two symbols plays the part of A. The mistakes kids make are nearly always about grouping: reading groups of four or six instead of five, or starting a group one character late, which scrambles every letter after it. Counting off the groups of five with a pencil mark before decoding anything prevents most of them.
How to solve a Baconian cipher
Each letter of the plaintext is encoded as a 5-CHARACTER A/B group. So A = AAAAA, B = AAAAB, C = AAABA, etc. I/J share a code; U/V share a code (writing the wrong one of the two = 1 mistake on the score sheet). Note: the cipher might use 1/2 or other symbols instead of A/B — you have to figure out which symbol is "A".
- ALWAYS sort the ciphertext into groups of 5 first. Without the grouping you can't decode.
- If the cipher uses A/B already, look up each group on the table.
- If the cipher uses 1/2 or other symbols, identify "A" by frequency: 5-in-a-row = A. (B never repeats 5 times, and even 4-in-a-row of B is rare — only happens at Q which maps to ABBBB.) No group of five the same, as in HELLO? Then the symbol that appears more often is usually A.
- Look up each 5-character group on the A/B Table.
A worked example
Decode AABBB AABAA ABABA ABABA ABBAB
AABBB → H AABAA → E ABABA → L ABABA → L ABBAB → O Plaintext: HELLO Variant with 1/2: 11111 12221 12221 12121 11211 "5 in a row" of 1 → 1 = A, 2 = B Decode the same way: AAAAA · ABBBA · ABBBA · ABABA · AABAA Look up each group: AAAAA = A · ABBBA = P · ABBBA = P · ABABA = L · AABAA = E. Plaintext: APPLE
Baconian in Codebusters
In Codebusters, the Baconian question usually comes with the A/B table on the resource sheet, so the task is grouping and lookup rather than memory. The puzzle setters commonly disguise the two symbols, which is where the thinking is: a run of five identical characters can only be the letter A (AAAAA), because no letter’s pattern is five Bs, so whichever symbol runs five in a row is A. Once the symbols are assigned, the rest is reading the table.
Scoring is typically by the letters of the decoded message, often with a small allowance for errors. The two letters most often lost are the shared ones: writing V where the plaintext has U, or J for I, usually counts as a mistake on the twenty-four-letter table, so a decoded word with an I/J or U/V in it is worth a second look to see which spelling makes the English word.
Baconian is slower than Atbash or Caesar because there are five characters to read for every letter of the answer, and a long ciphertext is long. The practical advice is to group first, decode steadily, and leave it for later if the paper has quicker points elsewhere. The lab here generates fresh messages, so the grouping habit can be drilled until it is automatic.
Practice the Baconian cipher
The lab below is set to the Baconian cipher alone. Pick a difficulty, generate a challenge, decode it, then check your answer or reveal the solution. It runs in your browser, needs no account, and is unlimited on every OlyPrep plan.
Scoped to Baconian · 1 cipher type. Generate a challenge, solve it, and we'll track what you've cracked.
Your first decode is the hardest.
Pick a cipher above and give it a shot — we'll keep track of what you've solved.
Where the Baconian cipher is tested
The Science Olympiad rule sets OlyPrep has read that name this cipher:
- Bay Area Elementary Science Olympiad — on the Codebusters list; the organizers have confirmed N is ABBAA and O is ABBAB (an earlier printing of their sheet showed other codes for those two letters)
- Science Olympiad Division B — on the Codebusters list
- Milpitas Elementary Science Olympiad (MESO) — on the Codebusters list; the A/B table is on the resource sheet
Bay Area ESO never asks teams to encode; five to ten of its twenty questions are multiple choice or fill-in on how the ciphers work.
Cipher lists change with each season’s rules; a tournament’s own rulebook is the authority on what it tests.
Questions about the Baconian cipher.
- Q·01How many characters make one Baconian letter?
- Five. Every letter of the plaintext becomes a group of exactly five characters drawn from two symbols, so a ciphertext of forty characters holds an eight-letter message. Grouping into fives before decoding is the whole first step.
- Q·02What if the Baconian message does not use A and B?
- Decide which symbol is A. A letter’s pattern never has five Bs in a row, so a run of five of the same symbol must be AAAAA, and that symbol is A. Failing that, the symbol that appears more often is usually A, because the patterns for the common letters early in the alphabet are mostly As.
- Q·03Which Baconian table does the OlyPrep lab use?
- The twenty-four-letter table, in which I and J share a pattern and U and V share a pattern, the version Codebusters resource sheets commonly print. The lab compares your decoded letters against the message it encoded, ignoring spaces; Check says whether they match and Reveal shows the solution.
- Q·04Is OlyPrep connected to Science Olympiad?
- No. OlyPrep is independent and is not affiliated with Science Olympiad, Inc. or any state or regional Science Olympiad organization. Tournament rules, including which Baconian table is provided, come from each tournament’s own rulebook.