[Archive!] Pure mathematics, physics, chemistry, etc.: brain-training problems not related to trade in any way - page 338

 
Mathemat >>:

Петин счет в банке содержит 500 долларов. Банк разрешает совершать операции только двух видов: снимать 300 долларов или добавлять 198 долларов.
Какую максимальную сумму Петя может снять со счета, если других денег у него нет?

498

 
Now that's more like it.
198*x - 300*y = 3*( 66*x - 100*y)
Thus any removals and additions are multiples of 3. But 500 is not divisible by 3.
It remains to prove that it can be as close as possible to 500 and less than that.

We need to solve the equation 198*x - 300*y = -498. Well that's easy. Can anyone find the solution on their own?
 

300-198=102

198-102=96

102-96=6

.....

12-6=6

minimum step 6


300+n*6 <= 500

n=33

300+33*6=498

 
Mathemat >>:
500 - 33*300 + 50*198 = 500 - 9900 + 9900 = 500. Не сходится.

Uh-huh. You can't take them all off. 498 is taken off after 49 additions and 33 withdrawals.

 
Mathemat >>:
Нам нужно решить уравнение 198*x - 300*y = -498.

Immediately you can see the solution x=-1, y=1. But we need positive ones.

So we have: 198*(-1) - 300*1 = -498

On the other hand, it's obvious,

198*300 - 300*198 = 0

We add the equations in pairs. We get:

198*(300-1) - 300*(198+1) = -498

Hence x=299, y=199.

498 comes off after 49 additions and 33 withdrawals.

Wrong again: 49*198 - 33*300 = 9702 - 9900 = -198. What did you do in rhythmics at school? :)

The answer is 49, 34.

 
MetaDriver >>:

Угу. Все снять не получится. 498 снимается после 49 добавлений и 33 снятий.

only 34 withdrawals

 
avatara >>:

Не знаю, помнят ли Гарднеровские задачки молодёжь.

По памяти - был сумасшедший аптекарь.

Can you find the right, exact wording?

 
That's an amazing line. It's to the works problem. Found, of course, programmatically. See if you can find a pattern.
Each line contains one of the solutions to the problem. Format: 5 numbers, product, same-five-minus-1, product again.
:
-24 97 98 99 100 -2258625600 -25 96 97 98 99 -2258625600
-23 93 94 95 96 -1833721920 -24 92 93 94 95 -1833721920
-22 89 90 91 92 -1475313840 -23 88 89 90 91 -1475313840
-21 85 86 87 88 -1175272560 -22 84 85 86 87 -1175272560
-20 81 82 83 84 -926160480 -21 80 81 82 83 -926160480
-19 77 78 79 80 -721200480 -20 76 77 78 79 -721200480
-18 73 74 75 76 -554245200 -19 72 73 74 75 -554245200
-17 69 70 71 72 -419746320 -18 68 69 70 71 -419746320
-16 65 66 67 68 -312723840 -17 64 65 66 67 -312723840
-15 61 62 63 64 -228735360 -16 60 61 62 63 -228735360
-14 57 58 59 60 -163845360 -15 56 57 58 59 -163845360
-13 53 54 55 56 -114594480 -14 52 53 54 55 -114594480
-12 49 50 51 52 -77968800 -13 48 49 50 51 -77968800
-11 45 46 47 48 -51369120 -12 44 45 46 47 -51369120
-10 41 42 43 44 -32580240 -11 40 41 42 43 -32580240
-9 37 38 39 40 -19740240 -10 36 37 38 39 -19740240
-8 33 34 35 36 -11309760 -9 32 33 34 35 -11309760
-7 29 30 31 32 -6041280 -8 28 29 30 31 -6041280
-6 25 26 27 28 -2948400 -7 24 25 26 27 -2948400
-5 21 22 23 24 -1275120 -6 20 21 22 23 -1275120
-4 17 18 19 20 -465120 -5 16 17 18 19 -465120
-3 13 14 15 16 -131040 -4 12 13 14 15 -131040
-2 9 10 11 12 -23760 -3 8 9 10 11 -23760
-1 5 6 7 8 -1680 -2 4 5 6 7 -1680

// The row goes on, of course, with the regularity intact. I gave an "extract".
 
Of course, the problem becomes much more complicated and interesting if there is a requirement that the solutions are integers. Although even here we see a pattern: the positive ones are 4k+1, 4k+2, 4k+3, 4k+4.
 
Mathemat >>:
Конечно, задача сильно усложняется и становится интереснее, если есть требование, чтобы решения были целыми. Хотя и здесь видна закономерность: положительные имеют вид 4к+1, 4к+2, 4к+3, 4к+4.

Er no, these are by no means all whole solutions. There are many more solutions (about fifty times as many). It's just that in the course of consideration, I found this coherent row in the total pile of solutions. (-k, 4k+1, 4k+2, 4k+3, 4k+4)

// Probably, there are some otherinteresting results. In the evening I will post the program, if anything. Now at work.