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.
Here's a puzzle game. I call it Reverse the List of Integers
11–20 of 188 posts
Re: Here's a puzzle game. I call it Reverse the List of Integers
#12the best I can find for [7, 5, 3] is: 7 5 3 7 1 4 3 2 5 1 4 3 2 5 1 7 2 6 7 2 1 5 7 3 5 7
Re: Here's a puzzle game. I call it Reverse the List of Integers
#13Earlier quoted context omitted.
[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.
The article specified a list of positive integers, and you can’t go smaller than the smallest initial value.
Re: Here's a puzzle game. I call it Reverse the List of Integers
#14the best I can find for [7, 5, 3] is: 7 5 3 7 1 4 3 2 5 1 4 3 2 5 1 7 2 6 7 2 1 5 7 3 5 7
753 7512 762 7152 34152 3417 357
That's the same as your solution but in reverse.
It's not possible in 4 steps or less, because if you ignore the no-duplicates-rule, there is only 1 possibility and that one has duplicates. It's not possible in 5 steps, because you would not end up with an odd length list again. Solutions will always have an even number of steps. So six must be shortest.
Re: Here's a puzzle game. I call it Reverse the List of Integers
#15the best I can find for [7, 5, 3] is: 7 5 3 7 1 4 3 2 5 1 4 3 2 5 1 7 2 6 7 2 1 5 7 3 5 7
My feel for this type of puzzle is that there is a 'gravity' from the higher to lower value integers. So you want to help integers flow from the 7 to the 3. The state of the list then represents a sieve that dynamically restricts the flow paths from one step to the next. So at any time step your possible paths to flow the integers from 7 to 3 are quite restricted.
The first step of 753 -> 7143 may seem arbitrary at first, but you quickly realise that most other options result in long awkward paths where you move integers back and forth, or deadends.
For example, if you decide to split the 7 first your valid moves are 753 -> 6153 or 753 -> 1653. The first move still leaves you overloaded at the left most position, and you still need another split because you cant combine 1+5 or 5+3 due to duplicates or exceeding 7. So you don't really feel closer. Same with 1653, putting you in a position where all combinations exceed 7, and you need to further breakdown numbers, but you've already used up all your valid odd numbers, so you have to break 6 into 2 and 4 -> 12453. This is a dead end.
Fun morning coffee puzzle.
Re: Here's a puzzle game. I call it Reverse the List of Integers
#16Earlier quoted context omitted.
[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.
The article specified a list of positive integers, and you can’t go smaller than the smallest initial value.
Re: Here's a puzzle game. I call it Reverse the List of Integers
#17Earlier quoted context omitted.
[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.
The article specified a list of positive integers, and you can’t go smaller than the smallest initial value.
* You can never make an integer greater than the largest integer in the original list.
* You can never make a move that results in the same integer appearing in the list more than once.
You can make a negative number and you can go lower than the smallest but not greater than the largest, so you're wrong on both counts.Re: Here's a puzzle game. I call it Reverse the List of Integers
#18It's not possible in general, e.g. [3, 2, 1] can't be reversed.
Re: Here's a puzzle game. I call it Reverse the List of Integers
#19Earlier quoted context omitted.
[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.
The article specified a list of positive integers, and you can’t go smaller than the smallest initial value.
It also clearly shows right in the first example of the first rule that you can go smaller than the smallest initial value: [7, 5, 3] -> [6, 1, 5, 3] is the first legal move it shows, and you'll notice that 1 is smaller than 7, 5, or 3.