The Pied Piper of Hamelin has a sack of rats. He notices that he can divide his rats into 2 equal piles. He also notices that he can divide his rats into 3, 4, 5, 6, or 7 equal piles. Given that he has at least 1 rat, what is the minimum number of rats that he has?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
please give the reasons to find L.C.M. only !
Log in to reply
Since it is said that the rats can be divided into 2,3,4,5,6 or 7 equal piles, the minimum no. of rats should be the value which is divisible by all the given values, i.e, the answer should be the L.C.M of it. So, the answer is 420. Hope this helps..
very easy logic but i failed :(
nice
I thought that because he can be divided into 4 and 6 equal piles, and 4 and 6 2 2 and 3 2, I thought I could ignore them.
Log in to reply
No, if you ignore 4 and 6, the no. so obtained would be divisible by all the other nos. except 4 and 6, so you have to include them and find LCM of all the given nos.
nice logic keep it up bro
_ We need to find a number such that all the elements of the set { 2 , 3 , 4 , 5 , 6 , 7 } divides it. So named and defined that number as n = 7 ! = 1 × 2 × 3 × 4 × 5 × 6 × 7 . Clearly this number works, but is not the smallest, all we have to do is to erase the numbers 2 and 6, So n = 3 × 4 × 5 × 7 . Why? -Becuase 2 and 4 divides 4 but we don't need 2 × 4 is enough with 4 and 2 and 3 divides 6 so we don't need 6. Hence n = 3 × 4 × 5 × 7 = 4 2 0 . _
clearly figure out
As the minimum number of rats cannot be zero,
and the number of rats is divisible by 2, 3,4,5,6,7 because we can divide the number of rats into equal parts of 2,3,4,5,6,7
so minimum number will be LCM of 2,3,4,5,6,7, which is equal to 420.
so the minimum number of rats are 420 rats.
THE QUESTION IS ASKING ABOUT THE L.C.M. OF THE NUMBERS GIVEN THUS 420 IS THE CORRECT ANSWER.
LCM ( 2 , 3 , 4 , 5 , 6 , 7 ) = 4 2 0
5040 is also divisble
It is given that the result should be perfectly divisible by 2, 3, 4, 5, 6 and 7.
Hence, the result is the L.C.M. of {2, 3, 4, 5, 6, 7}.
Now, To obtain L.C.M. -
Divide the set by 2 , the set becomes
{1, 3, 2, 5, 3, 7}
Divide the set by 3 , the set becomes
{1, 1, 2, 5, 1, 7}
Divide the set by 2 , the set becomes
{1, 1, 1, 5, 1, 7}
Divide the set by 5 , the set becomes
{1, 1, 1, 1, 1, 7}
Divide the set by 7 , the set becomes
{1, 1, 1, 1, 1, 1}
Since all the elements in set is 1, L.C.M of the numbers is 2 x 3 x 2 x 5 x 7 = 4 2 0
That's the result.
what abt 210
confuse
i cant understand,how you divide the sets?
Log in to reply
It's one of the methods to find the L.C.M.
For e.g. L.C.M. of 5 and 25 can be found as follows: {5, 25}
Divide the set by 5 , {1, 5}
Divide the set by 5 again, {1, 1}
So, the L.C.M. of 5 and 25 is 5 x 5 = 2 5
Those numbers which are not divisible should be kept as it is! And the division should always be performed by a prime number.
Hope you understood. In case of any further query, do let me know!
If you have any other method to find the L.C.M. of 2, 3, 4, 5, 6, 7, you are welcome to use that. The final result would be same in any method.
greatly solved sir! I appreciate your solution !!
The problem is asking for the least number that is divisible by 2, 3, 4, 5, 6 and 7.
This number is obtained by 2 × 3 × 4 × 5 × 6 × 7 .
However, all numbers divisible by 6 is automatically divisible by 2 and 3. 4 and 6 have a common factor of 2.
Therefore, to get the Least Common Multiple of the above mentioned numbers, 2 × 5 × 6 × 7 which is 4 2 0
SInce they can be divided into 2, 3, 4, 5, 6 and 7 equal piles, we have to get the least common multiple which is LCM = 2 3 2 5 7=420
(4 has factors 2 and 2, so that we will not include it, and the same for 6, since 6=2*3)
write the following python code to get the o/p:
for i in range(1,1000): if i%2==0 and i%3==0 and i%5==0 and i%7==0 and i%4==0 and i%6==0: print(i)
in the end you will get 2 answers, select the one which is minimum.
you have to find the answer using pencil & paper , I used C tho :P
Log in to reply
I agree, you should use a pencil and paper, if you want to improve your programming skills I suggest this site: http://projecteuler.net/
If N = the number of rats he has, then 2 , 3 , 4 , 5 , 6 and 7 must all be factors of N . Therefore, prime factors of N must include 2 , 3 , 5 and 7 . If N was 2 × 3 × 5 × 7 , then he could divide his rats into 2, 3, 5, 6 or 7 piles. However, he could not divide them into 4 equal piles. For him to be able to do so, N must have 2 2 as a prime factor; therefore, N = 2 2 × 3 × 5 × 7 = 4 2 0 .
For this, we need the LCM of 2,3,4,5,6 & 7. As their LCM is 420, the minimum number of rats the Pied Piper of Hamelin has is 420.
the minimum number of rats = least common multiple (LCM) of 2,3,4,5,6,7 The LCM of 2,3,4,5,6,7 is 420.
Therefore the answer is \boxed{420}
we have to find least common number of rats that can be divided by 2, 3, 4, 5, 6, 7.
for this we will find out the LCM of 2, 3, 4, 5, 6, 7 = 2 * 2 * 3 * 5 * 7 = 420
all you've got to do is get the least common multiple of 2, 3, 4, 5, 6 & 7. to make it easier, divide all possible common factors:
Take L.C.M of all. That gives the least number of rats So, answer is 420
If any no. is divisible by any set of numbers than the no. itself is a multiple of LCM of that set of numbers. For minimum no., the number should be exactly equal to the LCM of the set of the numbers.
So, LCM (2,3,4,5,6,7) = 420
6*7=42 and it can be divided by 3,4,6,7 now if u multiple 5 it would not be divided by 3,4,6,7 so if u multiple 10 it would be divided by all the numbers mentioned above
LCM of 2,3,4,5,6,7 then think a prime #s that can be divide in that values 2[2,3,4,5,6,7 2[1,3,2,5,3,7 3[1,3,1,5,3,7 5[1,1,1,5,1,7 7[1,1,1,1,1,7 [1,1,1,1,1,1
then multiply all the prime numbers 2x2x3x5x7
ANSWER: 420
check for a number which is a multiple for for 2,3,4,5,6&7i.e., 420 satisfies the division of 2,3,4,5,6&7 with remainder zero
Problem Loading...
Note Loading...
Set Loading...
Just find the LCM of 2,3,4,5,6,7 and you will get the answer, i.e., 420