reinout-g

avatar
Usernamereinout-g
Score2354
Membership
Stats
Questions 70
Answers 574

 #7
avatar+2354 
+5

All right, so here's my solution to the problem.

We apply the euclidean algorithm (I'll show you later why)

First we see how many times 19 fits into 49 and we add the remainder

Then we check how many times the remainder fits into 19 and write down a new remainder

Now we check how many times the new remainder fits into the old remainder and we keep on doing this until we have no remainder left.

49 = 19*2+11

19 = 11*1+8

11 = 8*1 + 3

8 = 3*2 + 2

3 = 2*1 + 1

2 = 1*2 + 0

Now we write the one-but-last equation into 1 = 3-2*1

Given the equation above this we can also write 1 = 3-1*(8-3*2).

This gives 1 = 3*3-8

Then again since we know 3 = 11-8*1 from the above equation

This can be rewritten as 1 = 3*(11-8*1)-8 = 3*11-4*8

Basically we keep writing the smallest number as the difference between two larger numbers following the upper equation until we have a difference of a*49-b*19 = 1

Let me put  all the steps underneath each other to make it easier to see

1 = 3-1*2

1 = 3-1*(8-3*2)

1 = 3*3-8

1 = 3*(11-8)-8

1 = 3*11-8*4

1 = 3*11-(19-11*1)*4

1 = 3*11+4*11-19*4

1 = 7*11-19*4

1 = 7*(49-19*2)-19*4

1 = 7*49-19*14-19*4

1 = 7*49-18*19

if

1 = 7*49-18*19

then

900 = 900*7*49-900*18*19

so

900 = 6300*49-16200*19

Now if we substact 19 from 6300 and 49 from 16200 the equation stays the same.

For example

900 = (6300-19)*49-(16200-49)*19

900 = 6281*49-16151*19

 

We want to substract 49 just 'enough' times to make it negative (so that the equation becomes an addition)

16200/49 = 330.6

So we are going to do it 331 times

then we have

900 = (6300-19*331)-(16200-49*331)*19

900 = 11*49--19*19

900 = 11*49+19*19

Now if we get back to the equation

11+19+L = 100

L = 70

Let's check that in the first equation

50*11+20*19+70 = 1000

So, she sold 11 caviar sandwiches, 19 bologna sandwiches and 70 liverwurst sandwiches

((C,B,L) = (11,19,70))

Reinout 

 

p.s. it is the only answer

the closest integer answers are

C = 11-19 = -8, B = 19+49 = 68 and L = 100-68+8 = 40

50*-8+20*68+40 = 1000 but C<0

and

C = 11+19 = 30, B = 19-49 = -30 and L = 100-30+30 = 100

50*30+20*-30+100 = 1000 but B<0

May 28, 2014
 #2
avatar+2354 
0
May 27, 2014
 #2
avatar+2354 
+5
May 27, 2014