Coach Thrasher

Saturday Sep 08, 2007

Gridflip Solution

There's a fun puzzle called Grid Flip on Facebook that had me distracted for a while.

Here's my solution:

S = 1624

Which is produced by the grid:


[ 33 30 -10 -6 18 7 -11 -23 6 ] 44
[ -16 19 9 26 8 -19 8 -21 -14 ] 0
[ -17 -12 -14 -31 30 13 13 19 16 ] 17
[ 6 11 1 -17 12 -4 7 14 -21 ] 9
[ -18 31 34 22 -17 -19 -20 24 6 ] 43
[ -33 18 17 15 -31 -5 -3 27 -3 ] 2
[ 18 20 -18 -31 -6 4 2 -12 24 ] 1
[ -27 -14 4 29 3 5 29 8 -12 ] 25
[ -15 -7 23 23 -9 8 6 -8 12 ] 33
[ 33 -23 19 -4 -8 7 11 12 -31 ] 16
[ 20 -19 -15 30 -11 32 -7 14 -5 ] 39
[ 23 -18 -32 2 31 -7 -8 24 16 ] 31
[ -32 4 -10 14 6 -1 0 23 23 ] 27
[ 25 0 23 22 12 -28 -27 -15 -4 ] 8
[ -30 -13 16 -3 -3 32 -3 -27 31 ] 0
[ 22 1 -26 4 -2 13 26 -17 -14 ] 7
[ 9 18 3 20 27 -32 11 27 13 ] 96
[ 17 -33 -7 -19 32 13 31 -2 -24 ] 8
[ -31 27 31 -29 15 -2 29 15 -33 ] 22
[ 18 23 15 -28 0 30 4 12 -32 ] 42
[ 3 -34 27 25 18 26 -1 34 26 ] 124
[ 21 31 -10 13 30 -17 12 -26 31 ] 85
[ 23 -31 19 21 -17 10 2 23 -23 ] 27
[ 3 -6 0 3 32 0 10 -25 14 ] 31
[ 19 -9 14 27 -20 15 5 -27 18 ] 42
[ 11 -6 -24 7 -17 -26 20 31 25 ] 21
[ -25 4 16 30 33 -23 -4 4 -23 ] 12

60 12 105 165 166 32 142 108 22 1624


The shortest possible sequence of such calls which achieves this value S while
satisfying the non-negative property for all elements in SC and SR using
15 steps is:

flip_col(1)
flip_col(2)
flip_col(4)
flip_col(5)
flip_col(7)
flip_row(1)
flip_row(9)
flip_row(10)
flip_row(14)
flip_row(15)
flip_row(16)
flip_row(19)
flip_row(23)
flip_row(26)
flip_row(27)

Comments:

Post a Comment:
Comments are closed for this entry.

Calendar

Feeds

Search

Links

Navigation

Referrers