An exercise problem $:$
Let $\Sigma = \left\{a, b, c, d, e\right\}$ be an alphabet. We define an encoding scheme as follows:
$g(a) = 3, g(b) = 5, g(c) = 7, g(d) = 9, g(e) = 11$.
Let $p_i$ denote the i-th prime number $\left(p_1 = 2\right)$.
For a non-empty string $s=a_1 \dots a_n$, where each $a_i \in \Sigma$, define $f(s)= \Pi^n_{i=1}P_i^{g(a_i)}$.
For a non-empty sequence$\left \langle s_i, \dots,s_n\right \rangle$ of stings from $\Sigma^+$, define $h\left(\left \langle s_i \dots s_n\right \rangle\right)=\Pi^n_{i=1}P_i^{f\left(s_i\right)}$
Which of the following numbers is the encoding, $h$, of a non-empty sequence of strings?
$2^73^75^7$
$2^83^85^8$
$2^93^95^9$
$2^{10}3^{10}5^{10}$
My attempt :
Given , For a non-empty string $s=a_1 \dots a_n$, and length of $s$ is $3$(in all option)
So , $s=aaa$ , $f(aaa)= \Pi^3_{i=1}2^{3}$
and
$h\left(\left \langle s_i \dots s_n\right\rangle\right)= h\left(\left \langle aaa\right\rangle\right)=\Pi^n_{i=1}P_i^{f\left(s_i\right)}= \Pi^3_{i=1}P_i^{2^3} = 2^83^85^8$
Can you please explain better than me .
From $2^j\cdot3^j\cdot5^j = \prod_{i=1}^3p_i^{f(s_i)}$ we deduce by the uniqueness of the prime decomposition that $f(s_i) = j$ for $i=1,2,3$.
If $j=7$ we have for example $f(s_1)=7^1$ and since $1 \notin \{3,5,7,9,11\}$ we conclude that it is not a sequence of words with the above encoding scheme.
If $j=8$ we have for example $f(s_1)=2^3$ and since $3 \in \{3,5,7,11\}$ we conclude that is a sequence of words with the above encoding scheme.
If $j=10$ we have for example $f(s_1)=2^1\cdot5^1$ and since $1 \notin \{3,5,7,9,11\}$ we conclude that it is not a sequence of words with the above encoding scheme.
Similarly with $j=9$ you can conclude that it is not an encoding.