• edited by
15,176 views
71 71 votes

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_j, \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?

  1. $2^73^75^7$

  2. $2^83^85^8$

  3. $2^93^95^9$

  4. $2^{10}3^{10}5^{10}$

9 Answers

Best answer
63 63 votes
It is clear from the choices that there are $3$ strings in the sequence as we have the first $3$ prime numbers in the product. Now, in $f(s)$ the first term is $2^x$for some $x$, so, A and C choices can be eliminated straight away as neither $7$ nor $9$ is a multiple of $2.$

The sequence of strings are "a", "a" and "a"

$f(a) = 2^3 = 8$. So, we get $2^8 3^8 5^8$ as per the definition of $h$.

Correct Answer: $B$
• edited by
36 36 votes

Option B is correct

n=3 (in options length is given as 3)

Let s1=a,s2=a,s3=a

now,

f(s1)=f(a)=23 

f(s2)=f(a)=23 

f(s3)=f(a)=23 

p1=2,p2=3,p3=5

h(s1,s2,s3)=p1f(s1)p2f(s2)p3f(s3)=283858

21 21 votes

From $2^j⋅3^j⋅5^j=\prod_{i=1}^{3} p^{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∉{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∈{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.5^1$ and since $1∉{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

 

SOURCE : https://math.stackexchange.com/questions/1499757/an-encoding-of-non-empty-sequence-of-strings

16 16 votes

Since no sequence is given we need the help of options to identify the correct encoding.


h(⟨si…sn⟩)=Πni=1 Pif(si) =P1f(s1) * P2f(s2) * .....*Pnf(sn) 
P1=2, P2=3, P3=5, P4=7 and so on...

g(ai)={3,5,7,9,11}.

Since in all the options there are first 3 prime nos. given, we can conclude that the sequence s goes up to n=3.

Now, f(s)=Πni=1Pig(ai)= P1g(s1) * P2g(s2) * .....*Png(sn). As it starts with P1 which is 2 and g(ai)≠0 for any case, so the value of f(s) can never be odd. Thus we can eliminate option A and C.

Next we see the powers of 2 in option B and D. Concentrating only on the power of 2 we find--->

B shows 8 which can be obtained if for i=1, g(a1)=3 and P1=2 we already know. 23=8.
D shows 10 which can be obtained if  for i=1, g(a1)=1 and P1=2 (we know) , for i=2,g(a2)=0 and P2=3 (we know), for i=3, g(a3)=1 and P3=5 (we know). Then (21)*(30)*(51)=10. But we know that g(ai)≠0 for any case. So D can't be the answer.

Hence B.

• edited by
11 11 votes

Understanding the question is the only tough part here , else is too easy.

Now, coming to f(s) , it says :$f(s)= \Pi^n_{i=1}P_i^{g(a_i)}$ .

Lets say we have a string as = “bac”

then $f(bac)$ = $P_1^{g(a_1)}*P_2^{g(a_2)}*P_3^{g(a_3)}$

here, $a_1 = b , a_2 = a , a_3 = c $

Putting these into $f(bac)$ definition :

$f(bac)$ = $P_1^{g(b)}*P_2^{g(a)}*P_3^{g(c)}$

And also given that $P_i = $ i th prime number. So $P_1 = 2 ,  P_2 = 3,  P_3 = 5$. Therefore :

$f(bac)$ = $2^{g(b)}*3^{g(a)}*5^{g(c)}$

Now putting the mapping that is given into the question :

$f(bac)$ = $2^{5}*3^{3}*5^{7}$

$f(bac) = 6,75,00,000$

Let this sequence of  $”bac"$ be our $s_1$

Similarly lets have one more sequence $s_2 : “cab”$  

$f(s_2) = 1,08,00,000$

Therefore , we have two string $s_1, s_2$

Now , there’s another function $h(<s_i..s_j>)$ which does the encoding of the sequence of string in the same way we did string encoding: 

$h(<s_1,s_2>) = \Pi^2_{i=1}P_i^{f(s_i)}$ , which is equivalent to : 

$h(<s_1,s_2>) = P_1^{f(s_1)}*P_2^{f(s_2)}$

$h(<s_1,s_2>) = 2^{f(s_1)}*3^{f(s_2)}$

$h(<s_1,s_2>) = 2^{6,75,00,000}*3^{1,08,00,000}$

$h(<bac,cab>) = 2^{6,75,00,000}*3^{1,08,00,000}$


 

As you can see , the encoding is so big , from this we can kinda conclude by seeing the options that string must be of single alphabet and there are 3 strings as every option has 3 prime numbers.So given sequence has three strings of single alphabet . 

Now we can also see that every string starts with prime number $2$ $=>$ $(2^{something} * 3^{something} * 5^{something}...)$  , so $2$ must be a multiple , therefore by seeing this only we can remove options ‘a’ and ‘c’

Now option ‘d’ , also can be removed as we cannot get 10 anyhow in: 

$2^{something} * 3^{something} * 5^{something}$

 

We’re left with option ‘b’ only which has $8$ in it. Now we can get $8$ by $2^3$ and also $g(a) = 3$

So our sequence must be : $“a” , “a” , “a”$

• edited by
Answer:
Position:
Show:

Related questions

92 92 votes
11 answers 11 answers
15.4k
15.4k views
Kathleen asked Sep 16, 2014
15,379 views
Let \(f : A \to B\) be an injective (one-to-one) function. Define \(g : 2^A \to 2^B\) as:\(g(C) = \left \{f(x) \mid x \in C\right\} \), for all subsets $C$ of $A$.Define ...
61 61 votes
5 answers 5 answers
14.7k
14.7k views
Kathleen asked Sep 17, 2014
14,682 views
A program consists of two modules executed sequentially. Let $f_1(t)$ and $f_2(t)$ respectively denote the probability density functions of time taken to execute the two ...
78 78 votes
8 answers 8 answers
25.3k
25.3k views
Kathleen asked Sep 16, 2014
25,312 views
Consider the following recurrence relation$T(1)=1$$T(n+1) = T(n)+\lfloor \sqrt{n+1} \rfloor$ for all $n \geq 1$The value of $T(m^2)$ for $m \geq 1$ is$\frac{m}{6}\left(21...
178 178 votes
7 answers 7 answers
28.4k
28.4k views
Kathleen asked Sep 16, 2014
28,375 views
Consider the following formula and its two interpretations \(I_1\) and \(I_2\).\(\alpha: (\forall x)\left[P_x \Leftrightarrow (\forall y)\left[Q_{xy} \Leftrightarrow \neg...