SOLUTION: Hi, So my question is: A bag of lollies is shared. When shared equally among 4 people, there are 2 lollies left. When shared equally among 9 people, there are 5 lollies left. Whe

Algebra ->  Complex Numbers Imaginary Numbers Solvers and Lesson -> SOLUTION: Hi, So my question is: A bag of lollies is shared. When shared equally among 4 people, there are 2 lollies left. When shared equally among 9 people, there are 5 lollies left. Whe      Log On


   



Question 1205868: Hi, So my question is:
A bag of lollies is shared. When shared equally among 4 people, there are 2 lollies left. When shared equally among 9 people, there are 5 lollies left. When shared equally among 7 people, there are 2 lollies left.
Determine the smallest possible number of lollies that could have been in the bag as well as the general solution.
I have tried a few different ways and get different answers.I either get 86 or 94. Can you help? Thank you

Found 4 solutions by ikleyn, Edwin McCravy, mccravyedwin, greenestamps:
Answer by ikleyn(52781) About Me  (Show Source):
You can put this solution on YOUR website!
.
A bag of lollies is shared. When shared equally among 4 people, there are 2 lollies left.
When shared equally among 9 people, there are 5 lollies left. When shared equally among 7 people,
there are 2 lollies left.
Determine the smallest possible number of lollies that could have been in the bag as well as the general solution.
~~~~~~~~~~~~~~~~~~~~~~~~


86 is the correct answer, as you can easily check it  ON  YOUR  OWN.

94 is incorrect answer, as you can easily check it  ON  YOUR  OWN.

I do not understand, why do you panic, having a correct answer in your hands.

You always can easily check it  ON  YOUR  OWN  if the answer is correct or not,
if you do understand correctly the meaning of the problem.


/////////////////////////


        Edwin presented huge long solution, which may scare you.
        Therefore,  I decided to post here my solution,  which is a standard method
        for such problems and is much shorter.


Let N be our number.

Subtract 2 from N and consider the number N-2.


Since N gives the remainder 2 when is divided by 4 and by 7, we conclude that 
the number (N-2) is divided by 4 and by 7 with no remainder.


Hence, N-2 is divided by 4*7 = 28  (since 4 and 7 are relatively prime numbers).

So, we can write  N-2 = 28k,  where "k" is some integer number.
Hence,  N = 28k + 2.


Therefore, we will consider the numbers of the form 28k+2 to find value of "k" such 
that 28k+2 gives the remainder 5 when is divided by 9.


Try some values k= 1, 2, 3, 4, 5 . . . .


It will not take long time, since k=3 just provides you the number N= 28*3+2 = 86,
which gives the remainder 5 when is divided by 9.


So, the number 86 is the ANSWER.

Solved.

......................

If you want to see many other similar  (and different)  solved problems,  look into the lessons
    - The number that leaves a remainder 1 when divided by 2, by 3, by 4, by 5 and so on until 9
    - The number which gives remainder 4 when divided by 7, remainder 5 when divided by 8 and remainder 6 when divided by 9
in this site.

These problems are typical for this subject, and reading these lessons,
you will get familiar with the basic methods.


Problems of this type are introductory into the subject on divisibility and remainders.

In advanced Math circles/classes, students start learning this material at 4th grade.
May be, it is too early, but learning it, let say, at 5th - 6th grade is just good time.


It is absolutely clear that 4th, 5th and even 6th grade student is not able to perceive long reasoning.

But such a student should be able to easy perceive what is written in my post - it is why I wrote it here.


\\\\\\\\\\\\\\\\


Since Edwin continue this discussion, I'd like to answer on his very first point.

Edwin writes that "Ikleyn believes trial and error is legitimate, but it isn't!".

                - No.   It is not so.

What I state is another statement:

        "If trial and error produces the answer, which after checking
        is proven to be correct, then the answer is correct
        and the solution is legitimate."


Edwin, it is not a good style to make a discussion
by attributing me statements that I did not make,
and then disproving these statements.

Such method of making discussion was known back in ancient Greece,
and it has the name - which I do not want to pronounce here.



Answer by Edwin McCravy(20055) About Me  (Show Source):
You can put this solution on YOUR website!

Let n be the smallest possible answer.
Then there are positive integers p,q,r such that

system%284p%2B2=n%2C9q%2B5=n%2C7r%2B2=n%29

4p%2B2=7r%2B2

4p=7r

p%2Fr=7%2F4

system%28p=7k%2Cr=4k%29 with k positive, and small as possible

system%284%287k%29%2B2=n%2C9q%2B5=n%2C7%284k%29%2B2=n%29

system%2828k%2B2=n%2C9q%2B5=n%2C28k%2B2=n%29

system%2828k%2B2=n%2C9q%2B5=n%29

28k%2B2=9q%2B5

28k=9q%2B3 

%2827%2B1%29k=9q%2B3  Writing all integers in terms of their nearest multiple of
              the smallest coefficient of a variable in absolute value. A
              trick used in solving Diophantine equations.  

27k%2Bk=9q%2B3 

3k%2Bk%2F9=q%2B3%2F9  dividing through by that coefficient 9.

3k-q=3%2F9-k%2F9=A Getting fractions together and setting equal to some
                     integer A

27k-9q=3-k=9A

3-k=9A

k=3-9A

A=0 the only value that makes k positive and small as possible

k=3

system%28p=7k%2Cr=4k%29

system%28p=7%283%29%2Cr=4%283%29%29

system%28p=21%2Cr=12%29

28%283%29=9q%2B3

84=9q%2B3

81=9q

9=q

system%284%2821%29%2B2=n%2C9%289%29%2B5=n%2C7%2812%29%2B2=n%29

system%2884%2B2=n%2C81%2B5=n%2C84%2B2=n%29

system%2886=n%2C86=n%2C86=n%29

The answer is 86.

Edwin

Answer by mccravyedwin(407) About Me  (Show Source):
You can put this solution on YOUR website!
Question 1205868
Ikleyn believes trial and error is legitimate, but it isn't! There is no
guarantee that only a small number of trials is all you'll need.  You may have
to try hundreds of values.  A problem is not solved mathematically unless it
requires no trial and error.  The way I solved it above, "long and scary" as she
thinks it is, (longer than necessary because I don't skip steps), but the way I
solved it requires no trial and error.

Many mathematicians have balked at the computer proof of the four-color problem.
For the only way it has been "proved" is not with mathematics, but to check out
all the possible types of maps to show that all types can be colored with only 4
colors and no two adjacent territories are colored the same. There are so many
types of maps to try, that only a computer could try them all.  Mathematicians
are still looking for a mathematical proof of the problem. 

Above I started this way.

Let n be the smallest possible answer.
Then there are positive integers p,q,r such that

system%284p%2B2=n%2C9q%2B5=n%2C7r%2B2=n%29

4p%2B2=7r%2B2

4p=7r

p%2Fr=7%2F4

system%28p=7k%2Cr=4k%29 with k positive, and small as possible

Sure, when I got here, I could have stopped and started trying values for k,
but there is no guarantee that, as Ikleyn stated, 

"it will not take long time". 

before I found one that worked. I could have done as she did:

"Try some values k= 1, 2, 3, 4, 5 . . . .It will not take long time..."

So I could have tried k=3, then instantly p=21, r=12,
4p+2=n 
4(21)+2 = 86

And that would be the end. But it's sheer luck that that's all it took.

What is interesting is the fact that this:

"When shared equally among 9 people, there are 5 lollies left."

was redundant information. 

The problem would have much harder if it had been stated this way:

A bag of lollies is shared. When shared equally among 4 people, there are 2 
lollies left. When shared equally among 9 people, there are 5 lollies left. 

Edwin

Answer by greenestamps(13200) About Me  (Show Source):
You can put this solution on YOUR website!


Tutor @ikleyn did not solve the problem using trial and error. She correctly showed that, since the number leaves remainder 2 when divided by either 4 or 7, it also leaves a remainder 2 when divided by 4*7 = 28. Therefore the number is of the form 28k+2 for some integer k.

From there, since we are looking for the smallest number of that form which also leaves a remainder of 5 when divided by 9, the solution is easily found simply by starting with the smallest integer values of k and trying them until a number is found which satisfies all of the conditions. That is not trial and error; it is a logical solution method.

If a more formal mathematical finish to the problem is needed for some reason, then some easy arithmetic mod 9 can be used.

For k=1, the number is 28+2 = 30; mod(30,9) = 3.

Each time we increase k by 1, the number increases by 28; mod(28,9) = 1. So each time we increase k by 1, mod(N,9) increases by 1.

For the number we are looking for, we want mod(N,9) = 5.

For k=1, we had mod(N,9) = 3; and for each increase of 1 in k, mod(N,9) increases by 1. To get mod(N,9) = 5, we need to increase 3 by 1 two times, so the answer is when k = 1+2 = 3.

And that gives us (formally) the answer N = 28(3)+2 = 86