question on morse code

5.1k Views Asked by At

The morse code is made up of marks called dots and dashes."Q", for example is (--,--).Is it possible to make up such a code so that every letter of the alphabet is represented by at most three marks?

i have tried this question as follows with 3 marks we can form 2+4+8=14 letters my answer is coming correct but can you explain in a easy method.And i have also checked this question if its already answered but it is not explained well.

3

There are 3 best solutions below

0
On BEST ANSWER

There are exactly $2^n$ combinations of marks with length $n$. This means that there are two combinations of marks with length $1$, four of them for length $2$ and $8$ of them for length $3$.

In general, if you want the number of letters you can make with length at least $n$, it is equal to

$$2 + 4 + \cdots + 2^n = 2\cdot(1 + 2 + \cdots + 2^{n-1}) = 2\cdot(2^{n} - 1)$$

0
On

If we have two marks plus an "end of symbol" then the total number of messages we can make from a maximum of three of them is $2^3+2^2+2=14$ for three-symbol, two-symbol, and one-symbol codes, so it is not possible to represent all 26 letters of the alphabet with at most three marks.

It is worth noticing that this system actually requires three symbols, one of which is only used to signify the end of a letter.

0
On

Your input alphabet is $\Sigma = \{ A, \ldots, Z \}$ having $\lvert \Sigma \rvert = 26$ different symbols.

The alphabet used for transmission is $\Sigma_T = \{s_. , s_- \}$ having $\lvert \Sigma_T\rvert = 2$ different symbols and you want to form words of length $1$, $2$ and $3$. $$ L \subset \Sigma_T^1 \cup \Sigma_T^2 \cup \Sigma_T^3 $$ The decision process is:

  • 1 position and one can decide to use one of two symbols each, that gives $2^1 = 2$ words
  • 2 positions and one can decide to use one of two symbols each, that gives $2^2 = 4$ words
  • 3 positions and one can decide to use one of two symbols each, that gives $2^3 = 8$ words

So in total we have $14$ different words of length $1$ to $3$.

There are not enough code words to assign to the 26 symbols of the input alphabet. So you need to use words of length $4$ as well, that would give $2^4 = 16$ new codes to assign, in total $30$.

Note: The Morse code actually consists of a third symbol, a pause $s_\sqcup$, which is used to separate words. This is needed to recognize words, because words of different length are used. The $s_.$ is transmitted as a shorter tone, the $s_-$ a longer one. The pause is about the length of the $s_-$.

Note: The real Morse alphabet makes use of the idea to let the encoding function $$ \sigma : \Sigma \to L $$ assign shorter code words to more frequently used letters of the input alphabet $\Sigma$, e.g.

$$ \sigma(E) = s_. \quad \sigma(Q) = s_− \, s_− \, s_· \, s_− $$