A 00000 00001 00010 00011 00100 00101 00110 00111 01000 01001 01010 01011 01100 01101 01110 01111 10000 10001 10010 10011 1010 1011 1100 1101 1110 1111

On the Subject of Visualizing Blue Huffman Cipher

I mean, Hogwarts is a cipher compression ciphers are a thing now.

This module contains 3 screens, a keyboard, 2 arrows, and a submit button that displays the current page you’re on.

Refer to the original manual on instructions on how to disarm this module. This module will ONLY go over some of the advanced construction of building a Huffman Tree.

For all intents and purposes, ALL examples used in this manual will refer to these initial values for each of the 26 letters.

 A B C D 13 12 9 11 18 11 15 18 25 13 22 26 18 16 8 24 24 17 25 19 4 13 10 19 10 16

The binary table on the right is ONLY used for step 3.

Huffman Tree Advanced Construction: Maroon Method

When Sean made this cipher, he was alright with him making a table for the last one. Turns out that table can be manipulated for another cipher.

The Maroon method utilizes depreciated Step 3 of Maroon Cipher's construction of building a Huffman Tree, except with a major difference. Instead of starting at 0 to decrypt for the letter, you start on the last number created by those steps. Note that numbered entries are NOT allowed to be deleted as they will be used when reading out the table.

1. Starting at the initial list, find the 2 letters that are assigned with the lowest values (after tie breaks.)
2. Create an entry formatted as "#: X1, X2", with # starting at 0, where X1 is the letter corresponding to the lowest value (after tie breaks) and X2 is the second lowest, and place the combined score of the 2 letters/entries to the right. (E.G. If the 2 lowest scores were 4 and 8, the combined score for this entry would be 12.) This is treated as a numbered entry.
3. Remove the lettered entries used in creating the entry.
4. Find the next 2 entries that have the lowest scores, and are NOT used, while also accounting for tie breaks.
5. Create an entry formatted as "#: X1, X2", with # being the number of numbered entries created before this step, where X1 is the letter corresponding to the lowest value (after tie breaks) and X2 is the second lowest, and place the combined score of the 2 letters/entries to the right. (E.G. If the 2 lowest scores were 4 and 8, the combined score for this entry would be 12.) This is treated as a numbered entry. Note that X can be used to reference a previous entry.
6. Repeat step 3, HOWEVER if a numbered entry is used to create the entry created on step 5, mark it as used.
7. Repeat the previous 3 steps until only 1 unused numbered entry is left.
8. Assign the only numbered unused entry the start of the tree.

Huffman Tree Advanced Construction: Maroon Method, Example

The lowest score is marked in black (white in dark mode), and the second lowest in gray. The first 5 iterations are shown in this case.

START

 A N 13 16 12 8 9 24 11 24 18 17 11 25 15 19 18 4 25 13 13 10 22 19 26 10 18 16

N = 0

 A N 13 16 12 24 9 24 11 17 18 25 11 19 15 13 18 10 25 19 13 10 22 16 26 12 18

N = 1

 A P 13 24 12 24 11 17 18 25 11 19 15 13 18 19 25 10 13 12 22 19 26 18 16

N = 2

 A P 13 24 12 24 18 17 11 25 15 19 18 13 25 19 13 12 22 19 26 21 18 16

N = 3

 A R 13 17 18 25 15 19 18 13 25 19 13 12 22 19 26 21 18 23 16 24 24

N = 4

 E S 18 25 15 19 18 13 25 19 13 XX 22 19 26 21 18 23 16 25 24 24 17

To read from the created table:

1. Start from the only numbered unused entry, and with the current binary digit being the first digit in the obtained binary.
2. Within that entry, if the current binary digit is a 0, look at the value to the left of the pair. Otherwise look at the value to the right of the pair.
3. If the value is a number, go to the entry corresponding to that number. Otherwise, write down this letter as one letter in the decrypted word and move back to the beginning. Go to the next binary digit.
4. Repeat the previous 2 steps until all binary digits are used.

Reading the Binary: Maroon Method (Example)

0 13 U, O Q, I C, W S, 4 Y, D L, 5 F, B 6, 7 0, A 8, 9 J, V 10, 11 G, N 12, 13 Z, R 14, 15 E, H 16, 17 M, T 18, 19 X, 1 20, 21 2, K 22, 23 3, P

Example binary obtained: 0101 100100 1010 1000 11100

• 0101: 24 (L)-> 22 (R)-> 19 (L)->12 (R)-> P
• 100100: 24 (R)-> 23 (L)-> 20 (L)->14 (R)-> 4 (L)-> 0 (L)-> U
• 1010: 24 (R)-> 23 (L)-> 20 (R)->15 (L)-> L
• 1000: 24 (R)-> 23 (L)-> 20 (L)->14 (L)-> S
• 11100: 24 (R)-> 23 (R)-> 21 (R)->17 (L)-> 8 (L)-> E

Huffman Tree Advanced Construction: Bracket Method

The Bracket method utilizes brackets for grouping while building a Huffman Tree. Some text edit applications can detect an enclosed bracket when using this method.

1. Starting at the initial list, find the 2 letters that are assigned with the lowest values (after tie breaks.)
2. Create an entry formatted as "[X1]X2", where X1 is the entry corresponding to the lowest value (after tie breaks) and X2 is the second lowest, and place the combined score of the 2 letters/entries to the right. (E.G. If the 2 lowest scores were 4 and 8, the combined score for this entry would be 12.)
3. Remove the entries used in creating the new entry.
4. Find the next 2 entries that have the lowest scores, while also accounting for tie breaks.
5. Repeat the previous 3 steps until only 1 unused numbered entry is left.
6. If necessary, space out the exterior groups.

Huffman Tree Advanced Construction: Bracket Method, Example

The lowest score is marked in black (white in dark mode), and the second lowest in gray. The first 5 iterations are shown in this case.

START

 A N 13 16 12 8 9 24 11 24 18 17 11 25 15 19 18 4 25 13 13 10 22 19 26 10 18 16

N = 0

 A N 13 16 12 24 9 24 11 17 18 25 11 19 15 13 18 10 25 19 13 10 22 16 26 12 18

N = 1

 A P 13 24 12 24 11 17 18 25 11 19 15 13 18 19 25 10 13 12 22 19 26 18 16

N = 2

 A P 13 24 12 24 18 17 11 25 15 19 18 13 25 19 13 12 22 19 26 21 18 16

N = 3

 A R 13 17 18 25 15 19 18 13 25 19 13 12 22 19 26 21 18 23 16 24 24

N = 4

 E S 18 25 15 19 18 13 25 19 13 19 22 21 26 23 18 25 16 24 24 17

1. Start from the first outer-most bracket. This is mainly the first character in the condensed bracket tree.
2. Within that entry, if the current binary digit is a 0, enter within that group of bracket. Otherwise, skip that bracket. Go to the next digit and repeat this step until all binary digits are used.
• If at any point, you reach a letter while navigating the brackets, write that letter down as one letter in the decoded string, and go back to the first outer-most bracket.

Reading the Binary: Bracket Method (Example)

`Condensed:`

`[[[[X][C]W][[Y]D]K][[[F]B]P][Q]I][[[S][[U]O]A][L][J]V][[[G]N][Z]R][[E]H][M]T`

`Uncondensed:`

`[[[[X][C]W][[Y]D]K][[[F]B]P][Q]I]`

`[[[S][[U]O]A][L][J]V]`

`[[[G]N][Z]R]`

`[[E]H]`

`[M]`

`T`

Example binary obtained: 11111 11101 11011 100101 00011 11001

• `[[[[X][C]W][[Y]D]K][[[F]B]P][Q]I]` (1) -> `[[[S][[U]O]A][L][J]V]` (1) -> `[[[G]N][Z]R]` (1) -> `[[E]H]` (1) -> `[M]` (1) -> `T`
• `[[[[X][C]W][[Y]D]K][[[F]B]P][Q]I]` (1) -> `[[[S][[U]O]A][L][J]V]` (1) -> `[[[G]N][Z]R]` (1) -> `[[E]H]` (0) -> `[E]` (1) -> `H`
• `[[[[X][C]W][[Y]D]K][[[F]B]P][Q]I]` (1) -> `[[[S][[U]O]A][L][J]V]` (1) -> `[[[G]N][Z]R]` (0) -> `[[G]N]` (1) -> `[Z]` (1) -> `R`
• `[[[[X][C]W][[Y]D]K][[[F]B]P][Q]I]` (1) -> `[[[S][[U]O]A][L][J]V]` (0) -> `[[S][[U]O]A]` (0) -> `[S]` (1) -> `[[U]O]` (0) -> `[U] (1)` -> `O`
• `[[[[X][C]W][[Y]D]K][[[F]B]P][Q]I]` (0) -> `[[[X][C]W][[Y]D]K]` (0) -> `[[X][C]W]` (0) -> `[X]` (1) -> `[C]` (1) -> `W`
• `[[[[X][C]W][[Y]D]K][[[F]B]P][Q]I]` (1) -> `[[[S][[U]O]A][L][J]V]` (1) -> `[[[G]N][Z]R]` (0) -> `[[G]N]` (0) -> `[G]` (1) -> `N`