Answer
The fixed-length 4 -bit representation of ALOHA requires $5 \times 4=20$ bits.
Using the variable-length code requires the following:
$\begin{array}{cccc}{A} & {L} & {0} & {H} & {A} \\ {00} & {1111111} & {0111} & {010} & {00}\end{array}$
which is a total of 18 bits. The compression ratio is $20 / 18=1.11 .$
Work Step by Step
The fixed-length 4 -bit representation of ALOHA requires $5 \times 4=20$ bits.
Using the variable-length code requires the following:
$\begin{array}{cccc}{A} & {L} & {0} & {H} & {A} \\ {00} & {1111111} & {0111} & {010} & {00}\end{array}$
which is a total of 18 bits. The compression ratio is $20 / 18=1.11 .$