Ciphering 6

We have a source of information using 6 letters {$val17}, with a coding of variable length as follows.

Letter $val21 $val23 $val25 $val27 $val29 $val31
Code $val22 $val24 $val26 $val28 $val30 $val32

According to the table, please encode the following message.

$val18

Attention. Don't add space between code letters!


Given encoding - 2

We have the following encoding over a set of two elements {A,B}.

Element A B
Code $val20 $val21

Please find a distribution of probabilities {P(A),P(B)} such that the average length of this encoding equals $val26.

The two probabilities P(A), P(B) must be positive, and their sum must be equal to 1.


Given encoding - 3

We have the following encoding over a set of three elements {A,B,C}.

Element A B C
Code $val20 $val21 $val22

Please find a distribution of probabilities {P(A),P(B),P(C)} such that the average length of this encoding equals $val28.

The three probabilities P(A), P(B), P(C) must be positive, and their sum must be equal to 1.


Decipher 6

We have a source of information using 6 letters {$val17}, with a coding of variable length as follows.

Letter $val21 $val23 $val25 $val27 $val29 $val31
Code $val22 $val24 $val26 $val28 $val30 $val32

According to the table, please decode the following coded message.

$val33

Attention. Don't add space between the letters!


Computer file II

A computer file weighs $val6 bytes. The content of the file only contains bytes of 6 values, as shown by the following table.

Value of byte $val21 $val22 $val23 $val24 $val25 $val26
Number $val14 $val15 $val16 $val17 $val18 $val19

The binary entropy of the file is according to the numbers of bytes.

By recoding the bytes of the file by an optimal binary code of variable length, one can reduce the size of the file to bytes (without counting eventual headers).


Instantaneous 6

We have a source of information using 6 letters {$val19}, with a coding of variable length as follows.

Letter $val20 $val22 $val24 $val26 $val28 $val30
Code $val21 $val23 $val25 $val27 $val29 $val31

Is this an instaneous code?


Variable length

Does there exists an instantaneous binary code composed of $val17 words of respective lengths

$val12    ?