Live data from Hacker News

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

mathstodon.xyz

1–10 of 188 posts

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

#2
Start with a list of positive integers, (e.g. [7, 5, 3]) and your goal is to make the same list, in reverse ([3, 5, 7]).

Operations:

1) Split an integer into two smaller integers. (e.g. [7, 5, 3] → [6, 1, 5, 3]) 2) Combine (add) two integers into a larger one. (e.g. reverse the last e.g.)

Restrictions:

1) You can never make an integer greater than the largest integer in the original list. 2) You can never make a move that results in the same integer appearing in the list more than once.

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

#5
post #2

Start with a list of positive integers, (e.g. [7, 5, 3]) and your goal is to make the same list, in reverse ([3, 5, 7]). Operations: 1) Split an integer into two smaller integers. (e.g. [7, 5, 3] → [6, 1, 5, 3]) 2) Combine (add) two integers into a larger one. (e.g. reverse the last e.g.) Restrictions: 1) You can never make an integer greater than the largest integer in the original list. 2) You can never make a move…

Oh no, 2 dimensional dynamic programming? I have seen similar questions in competitive programming.

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

#10
post #4

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

[3, 2, 1] has no valid modifications by the rules given.

I wonder how little wiggle-room there needs to be for a solution to be possible? Does [4, 2, 1] have a solution? You can get to with [4, -1, 3, 1] with one step, but I'm not sure where you can go from there.

Post reply on HN