The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+16 votes
1.1k views

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}$

asked in Set Theory & Algebra by Veteran (59.4k points) | 1.1k views

3 Answers

+17 votes
Best answer
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$.
answered by Veteran (342k points)
selected by
0
Can someone please explain what f(s) and h(s) and its term mean?
0
not clear. Plz elaborate :(
0
If subsequence doesnt start with 1 then?
0
Arjun sir why not "c" "c" "c"???

Question is not clear!!!
0

@Abhisek Tiwari 4

for "c" "c" "c"

Encoding would be: 212831285128

+3 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)=2

f(s2)=f(a)=2

f(s3)=f(a)=2

p1=2,p2=3,p3=5

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

 

answered by Active (1.5k points)
+1 vote

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


h(⟨sisn⟩)=Πni=1 Pi^f(si) =P1^f(s1) * P2^f(s2) * .....*Pn^f(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=1Pi^g(ai)P1^g(s1) * P2^g(s2) * .....*Pn^g(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. 2^3=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 (2^1)*(3^0)*(5^1)=10. But we know that g(ai)≠0 for any case. So D can't be the answer.

Hence B.

 

answered by Loyal (5.8k points)
edited by
Answer:

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

35,481 questions
42,729 answers
121,424 comments
42,123 users