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.
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)$$