wu :: forums
« wu :: forums - "Slider Puzzle With A Twist" »

Welcome, Guest. Please Login or Register.
Apr 24th, 2024, 8:12am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   hard
(Moderators: Eigenray, towr, Icarus, ThudnBlunder, william wu, SMQ, Grimbal)
   "Slider Puzzle With A Twist"
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: "Slider Puzzle With A Twist"  (Read 715 times)
william wu
wu::riddles Administrator
*****





   
WWW

Gender: male
Posts: 1291
"Slider Puzzle With A Twist"  
« on: Jun 23rd, 2003, 2:44am »
Quote Quote Modify Modify

You are given an n x n array of integers. The goal is to end up with an array in which all entries are equal.  
 
Four kinds of moves are allowed:  
1. rotate a row  
2. rotate a column  
3. add 1 to all entries in a row  
4. add 1 to all entries in a column  
 
Show that the goal is achievable if and only if the sum of the numbers in the initial configuration is congruent to 0 mod n.  
 


Credits: Amir Michael and Ashraf Michail, via e-mail
« Last Edit: Jun 23rd, 2003, 2:45am by william wu » IP Logged


[ wu ] : http://wuriddles.com / http://forums.wuriddles.com
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: "Slider Puzzle With A Twist"  
« Reply #1 on: Jun 23rd, 2003, 3:11am »
Quote Quote Modify Modify

one side of it is easy,  
If all entries have to be equal you can make them all zero as well.  
Since you can only add or subtract n to/from the total sum, the sum you start with has to be 0 modula n.

IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
James Fingas
Uberpuzzler
*****





   
Email

Gender: male
Posts: 949
Re: "Slider Puzzle With A Twist"  
« Reply #2 on: Jun 23rd, 2003, 9:32am »
Quote Quote Modify Modify

Here's an approach that should convince everybody it's possible, even if it's not a rigorous proof:

I will show that it is possible to effect a series of transformations which decrease one number by 1 and increase one of its neighbours by 1, with no other effects. Using this one move, it should be easy to come up with a thousand ways of solving the problem.
 
Since the board is symmetric with respect to position, we show that we can add one to the top left position while subtracting one from either a) the top next-to-left position or the b) left next-to-top position, with no other effects.
 
For a):
1) Add one to the first column
2) Rotate the first row left by one position
3) Subtract one from the first column
4) Rotate the first row right by one position
 
For b), replace "column" with "row" and vice versa.
 
This may take a lot of operations, though. Any ideas on using a near-optimal number of operations?
IP Logged

Doc, I'm addicted to advice! What should I do?
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board