Challenge 444: Out of line
An algorithmic puzzle from KCLMS student Anango!
Part (a)
100 children sit in a line, so that everyone has a child to their left and right (except for the two children on the left end and right end of the line).
Each child is given a number of sweets (not necessarily the same for each child).
The teacher selects a child who (a) has at least one sweet, and (b) isn't at the left end of the line. That child gives one of their sweets to the child on their left.
The teacher repeats this process many times. Is it possible for the teacher to repeat the process forever, or will it eventually be impossible?
(The right answer might seem intuitively clear, but you should look to provide a convincing explanation of your answer.)
Part (b)
The process above is amended: the teacher selects a child who (a) has at least two sweets, and (b) isn't at either end of the line. That child gives one sweet to each of their neighbours. (In other words, one sweet goes to the left, and one goes to the right.)
Now can the process be repeated forever?
Submit your solution
Please do send in your solution to this problem to weeklymaths@kcl.ac.uk You can scan or photograph your written work, or type your solutions. If this is your first weekly maths challenge solution, please include your year group and the name of the school you attend. We'll be happy to provide feedback on your solution, assuming that you are in year 11 or below. If you are older than this, we hope you enjoy trying the problems and reviewing your solutions against those we publish on the website.
![King's Maths School [logo]](/image-library/logos/kcl-ms-logo.jpg)