Code, Chapter 2: Codes and Combinations~~~Book Club

 Code, Chapter 2: Codes and Combinations~~~Book Club


    Okay, before we head into Chapter 2 of the book code, let me tell you a short summary of Chapter 1, which is also known as best friends. Chapter 1 was basically an intro to Morse code, it tells us how morse code very useful in certain circumstances. The chapter also gives us a basic understanding of code itself, code, if written on a computer, is just a way humans interact with machines. Now, let's dive right in!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Now, say for example you are a coder, if you are, then you will find that writing code is actually easier than translating it. This is so because translations show commands, then the computer code. The same logic applies to Morse Code.

    The problem is we have a table that provides the translation following:

    Alphabetical letter ---> Morse code dots and dashes

    But, we don't have a table that lets us go backward:
    
    Morse code dots and dashes ---> Alphabetical letter

    We could make a table that goes backward in the same alphabetical format. But there may be a better format to group them. We could group them based on how many dots and dashes they have. A combination of exactly two dots or dashes gives us four more letters, which are, I, A, N, and M. A pattern of three dots or dashes gives us eight more letters, and similarly, sequences of four dots and dashes give us 16 more characters.

    Now if you put them in a table, the 4 tables will contain 2 plus 4 plus 8 plus 16 codes for a total of 30 letters. Now notice that each table has twice as many codes as the table before it. This makes sense: Each table has all the codes in the previous table followed by a dot and all the codes in the previous table followed by a dash. So, a formula for this is:

Number of codes = 2^number of dots and dashes

    Now to make the process of decoding morse code even easier, we might want to draw a big treelike table.

    If you have drawn the table, the table will show the result from each particular consecutive sequence of dots and dashes.

    Morse code is said to be a binary (literally meaning two by two) code because the components of the code consist of only two things -- a dot and a dash.

    What we're doing by analyzing binary codes is a simple exercise in math known as combinatorics or combinatorial analysis. Originally, combinatorial analysis is used most often in the fields of probability and statistics because it involves determining the number of ways that things, like coins and dice, can be combined. But it also helps us understand how codes can be put together and taken apart.

I hope you liked this Book Club post, see you soon, in my next post

Sincerely,
BM

Comments

Popular Posts