Find value of M
Sir / Madam,
My questions is,
A positive whole number M less than 100 is represented in base 2 notation, base 3 notation, and base 5 notation. It is found that in all three cases the last digit is 1, while in exactly two out of the three cases the leading digit is 1. Then M equals
Advance Thanks,
R.Rengaraj
{InfosysTrain-Q109 Pg27}
My questions is,
A positive whole number M less than 100 is represented in base 2 notation, base 3 notation, and base 5 notation. It is found that in all three cases the last digit is 1, while in exactly two out of the three cases the leading digit is 1. Then M equals
Advance Thanks,
R.Rengaraj
{InfosysTrain-Q109 Pg27}
Replies
-
sherya mathurQ.A positive whole number M less than 100 is represented in base 2 notation, base 3 notation, and base 5 notation. It is found that in all three cases the last digit is 1, while in exactly two out of the three cases the leading digit is 1. Then M equals?
ans:
I think the m equals to 91
am I right? -
rengaraji am not sure of answer but can you give me the working ?
R.Rengaraj -
Saandeep SreerambatlaGenerally if we talk about the base systems 2 ,3 and 5 here. The provided condition is the last digit is 1.
So it is sure that the last digit of the original number will be 1 and the number when divided by 2 ,3 and 5 will leave a reminder 1.
So the list of numbers satisfying this criteria are.
31 ,61 and 91 and 1 too. SInce given the number is less than 100.
One more condition is the leading digit is also 1 in that case 1 is ruled out , now lets look for other numbers.
31 in base 5 system = (111)[sub]5[/sub]
31 in base 3 = (1011)[sub]3[/sub]
In base 2 system all the numbers are represented as 0's or 1's so 31 is not the right choice.
Next we have 91, in base 2 it will be represented in 0's and 1's with 1 as a leading digit so we need to check for base 3 and base 5.
In base 3 system = 91 is represented as (10101)[sub]3[/sub]
In base 5 system = 91 is represented as (331)[sub]5[/sub]
So in this case only 2 out of 3 cases 1 is the leading digit , so 91 is the answer.
To get the base system value of any number Synthesize that number with the base number of your need.
I hope this answer is fine. -
sherya mathur
thanks for explaining the answer in such a great wayEnglish-ScaredGenerally if we talk about the base systems 2 ,3 and 5 here. The provided condition is the last digit is 1.
So it is sure that the last digit of the original number will be 1 and the number when divided by 2 ,3 and 5 will leave a reminder 1.
So the list of numbers satisfying this criteria are.
31 ,61 and 91 and 1 too. SInce given the number is less than 100.
One more condition is the leading digit is also 1 in that case 1 is ruled out , now lets look for other numbers.
31 in base 5 system = (111)[sub]5[/sub]
31 in base 3 = (1011)[sub]3[/sub]
In base 2 system all the numbers are represented as 0's or 1's so 31 is not the right choice.
Next we have 91, in base 2 it will be represented in 0's and 1's with 1 as a leading digit so we need to check for base 3 and base 5.
In base 3 system = 91 is represented as (10101)[sub]3[/sub]
In base 5 system = 91 is represented as (331)[sub]5[/sub]
So in this case only 2 out of 3 cases 1 is the leading digit , so 91 is the answer.
To get the base system value of any number Synthesize that number with the base number of your need.
I hope this answer is fine.
I hope now it will be undrstood for all
You are reading an archived discussion.
Related Posts
guys i am not able to correct this program .please check if you can find and correct some error in this
IDENTIFICATION DIVISION.
PROGRAM-ID. OPEN-CLOSE.
AUTHOR. MANISH.
ENVIRONMENT DIVISION.
INPUT-OUTPUT...
Bangalore: Revelations by Canadian investigators that a cyber spy ring based in China specifically targeted India's defence establishment are expected to set off a major cyber security overhaul by New...
Microsoft has finally unveiled its project 'pink'; that says 'Its time to share'. The company has launched its new social phone called Kin. The phone comes in two versions, Kin1...
I have short listed some topics for mini project in dsp,please tell me which among them would be a better topic
1.acoustic echo cancellation
2.speech coding with linear predictive coding...
i m a B tech in cse.
actually i was unable to clear just one paper of my 3sem bcoz of that i hav to wait for 1 year coz...