Warning: Cannot modify header information - headers already sent by (output started at /home/public/wp-content/themes/simplelin/functions.php:1) in /home/public/wp-includes/rest-api/class-wp-rest-server.php on line 1713

Warning: Cannot modify header information - headers already sent by (output started at /home/public/wp-content/themes/simplelin/functions.php:1) in /home/public/wp-includes/rest-api/class-wp-rest-server.php on line 1713

Warning: Cannot modify header information - headers already sent by (output started at /home/public/wp-content/themes/simplelin/functions.php:1) in /home/public/wp-includes/rest-api/class-wp-rest-server.php on line 1713

Warning: Cannot modify header information - headers already sent by (output started at /home/public/wp-content/themes/simplelin/functions.php:1) in /home/public/wp-includes/rest-api/class-wp-rest-server.php on line 1713

Warning: Cannot modify header information - headers already sent by (output started at /home/public/wp-content/themes/simplelin/functions.php:1) in /home/public/wp-includes/rest-api/class-wp-rest-server.php on line 1713

Warning: Cannot modify header information - headers already sent by (output started at /home/public/wp-content/themes/simplelin/functions.php:1) in /home/public/wp-includes/rest-api/class-wp-rest-server.php on line 1713

Warning: Cannot modify header information - headers already sent by (output started at /home/public/wp-content/themes/simplelin/functions.php:1) in /home/public/wp-includes/rest-api/class-wp-rest-server.php on line 1713

Warning: Cannot modify header information - headers already sent by (output started at /home/public/wp-content/themes/simplelin/functions.php:1) in /home/public/wp-includes/rest-api/class-wp-rest-server.php on line 1713
{"id":546,"date":"2020-05-09T16:25:29","date_gmt":"2020-05-09T15:25:29","guid":{"rendered":"https:\/\/babarber.uk\/?p=546"},"modified":"2020-05-09T16:25:29","modified_gmt":"2020-05-09T15:25:29","slug":"diffy-naive","status":"publish","type":"post","link":"https:\/\/babarber.uk\/546\/diffy-naive\/","title":{"rendered":"Diffy naive"},"content":{"rendered":"\n

A week or so ago Rob Eastaway posted about the game Diffy on Twitter<\/a>. Diffy begins with four numbers arranged around a cycle. Taking the (absolute values of) differences between adjacent pairs produces four more numbers around a cycle. If you start with positive integers then iterating this process eventually reaches \"0, 0, 0, 0\". How many iterations does it take?<\/p>\n\n\n\n

A quick search (and the existence of Rob Eastaway’s talk on the subject) reveals that a fair amount is known about Diffy. I have deliberately not read any of it in detail. I don’t even know why you always reach zero, which is not as obvious as I had assumed: consider \"0,0,0,1\", say, which reaches zero in four steps, but increases the sum of the four numbers along the way. The question I looked at was “What is the maximum number of steps this process can take, beginning with numbers from \"[n] = \{1,\ldots,n\}\"?” Call this \"f(n)\".<\/p>\n\n\n\n

Rob begins by asking us to show that \"f(12)+1 = 10\". (\"+1\" by counting the cycles we see along the way rather than the number of steps we take.) There are only \"12^4\" starting points so this takes no time at all if we break the spirit of the puzzle and use a computer. But there’s no need to be pointlessly inefficient. The length of a Diffy “game” is unchanged if we<\/p>\n\n\n\n