Live data from Hacker News

Here's a puzzle game. I call it Reverse the List of Integers

mathstodon.xyz

51–60 of 188 posts

Re: Here's a puzzle game. I call it Reverse the List of Integers

#51
post #20

Could a constraint solver just rip through this problem?

The number of variables is not constant in each step so modeling this would be trickier than usual. I feel like there is probably an more efficient DP approach for this though.

Re: Here's a puzzle game. I call it Reverse the List of Integers

#57
post #37
post #35

Earlier quoted context omitted.

Yeah, the problem is slightly underspecified, though it’s pretty obvious that you’re not allowed to do swaps as that obviously makes the problem trivial.

Not trivial - I do not see how to solve [3, 2, 1] without this kind of swapping. Perhaps we need to clarify the rules for a starting point first.

[deleted]

Re: Here's a puzzle game. I call it Reverse the List of Integers

#58
post #4

It's not possible in general, e.g. [3, 2, 1] can't be reversed.

It seems that if the numbers are put in ascending order as min-max, then there would have to be at least two gaps in the sequence to make meaningful progress?

Re: Here's a puzzle game. I call it Reverse the List of Integers

#59
post #25

This can be transformed into a problem with pegs and moving blocks. Like tower of hanoi[1], but you can add or remove empty pegs, blocks are the same size and can be stacked in any order, you can move as many blocks as you want and you cannot have towers with the same amount of blocks. Unless you want to deal with negative integers, then it would get more tricky. [1]: https://en.m.wikipedia.org/wiki/Tower_of_Hanoi

Was just thinking this. There’s some differences, like the integers don’t have to be ordered biggest to smallest at any time, but it very much feels like Towers of Hanoi would be a good starting place to solve this.

No, not at all. In a Towers of Hanoi model, this is a completely trivial game.

You'd reverse [7, 5, 3] by picking four discs off the first peg and putting them back down on the third peg.

The rules here only allow you to move stuff a single peg away from its origin.

Post reply on HN