The Hex Box

The Hex Box

Postby stranac » Thu Apr 17, 2014 6:45 pm

So a few years back (I think about the time I was starting with python), I stumbled upon this website with programming challenges: http://www.osix.net/
The first 8 problems (in the Geek Challenge category), I solved pretty easily, but I got stuck on number 9, and eventually gave up.

I have some free time over the next week or so, so I thought I'd give it another go.
Honestly, I still don't know exactly how to approach it, but hopefully I'll come up with something.

So, if anyone wants to join me, here's the challenge:
Level 9 : The Hex Box wrote:
Code: Select all
      DEF

     |123|
     |234|
     |345|
  ---+---+---
A 123|456|789
B 234|567|891
C 345|678|912
  ---+---+---
     |789|
     |891|
     |912|

Here is something I call a Hex Box. It is a device where you can move any row
or column as long as there are nine numbers in that row or column. You can
therefore only move three rows and three columns (rows ABC and columns DEF).

You are only allowed to shift a row right and a column down. When a row or
column is shifted, the last number gets placed back in the first.

The reason why this is called a Hex Box is for the way each shift is denoted.
Any move is denoted by it's row or column, then the number of shifts.
For example, a move "A5" means row A gets shifted to the right 5 times.
A move of A5 would look like this (assuming you started with the above.)
Code: Select all
      DEF

     |123|
     |234|
     |345|
  ---+---+---
A 567|891|234
B 234|567|891
C 345|678|912
  ---+---+---
     |789|
     |891|
     |912|

Move F3 would then look like this:
Code: Select all
      DEF

     |129|
     |231|
     |342|
  ---+---+---
A 567|893|234
B 234|564|891
C 345|675|912
  ---+---+---
     |781|
     |897|
     |918|

So the move order at this point would be A5F3.

With that information try to figure out the move order for this Hex Box,
starting from the setup at the top of the page:
Code: Select all
      DEF

     |212|
     |423|
     |534|
  ---+---+---
A 649|125|277
B 917|546|888
C 123|863|999
  ---+---+---
     |983|
     |134|
     |751|

The solution will be the 24-hex digit move order and as there are multiple
answers use the solution that has an MD5 checksum of
113DAC12B9A54D39944668499F72083D.

Hint: Every row and column gets moved twice (not the number of shifts) and a
row or column isn't moved again until the other five have been moved first
(ie. F4B2A3C7D5E8E2A5C7F1D5B7).


P.S. I would recommend you try the other challenges as well, IIRC they were pretty good. But I might be wrong, it's been a while...
Friendship is magic!

R.I.P. Tracy M. You will be missed.
User avatar
stranac
 
Posts: 1246
Joined: Thu Feb 07, 2013 3:42 pm

Re: The Hex Box

Postby Pandora-Box » Tue Apr 22, 2014 1:02 pm

Stranac,

Also there is another site which I know of and has quiet some practice problems

https://projecteuler.net/problems
Pandora-Box
 
Posts: 5
Joined: Sat Apr 05, 2014 8:44 am

Re: The Hex Box

Postby Mekire » Tue Apr 22, 2014 1:17 pm

Pandora-Box wrote:Also there is another site which I know of and has quiet some practice problems

https://projecteuler.net/problems

You clearly didn't notice that our board has a subforum (albeit not particularly active) dedicated to Project Euler:
http://python-forum.org/viewforum.php?f=27

-Mek
User avatar
Mekire
 
Posts: 1126
Joined: Thu Feb 07, 2013 11:33 pm
Location: Asakusa, Japan

Re: The Hex Box

Postby Pandora-Box » Tue Apr 22, 2014 1:22 pm

I didn't very much
Pandora-Box
 
Posts: 5
Joined: Sat Apr 05, 2014 8:44 am

Re: The Hex Box

Postby RodionGork » Thu Nov 20, 2014 9:45 am

Curious puzzle! Is there no way to see it at original site (osix?) without registering there?

Does it have a kind of interactive demo to play with it a bit - or it is up to users?
Image
CodeAbbey - programming problems for novice coders (+ certificates)
User avatar
RodionGork
 
Posts: 36
Joined: Sun Nov 16, 2014 7:04 am
Location: Saint-Petersburg, Russia

Re: The Hex Box

Postby stranac » Thu Nov 20, 2014 10:39 am

I think you have to register and solve the previous challenges to see it.

No interactive demo, but there is a hint available, which is a state of the box after each row and column is moved at least once.
This sounded like seeing it made the task pretty much trivial, so I haven't taken a look.

Haven't gotten around to messing with this at all since I made that post, thanks for reminding me about it.
Friendship is magic!

R.I.P. Tracy M. You will be missed.
User avatar
stranac
 
Posts: 1246
Joined: Thu Feb 07, 2013 3:42 pm


Return to Challenges

Who is online

Users browsing this forum: No registered users and 0 guests