4 ms·
Indeed, [n, n-1] [n-3, 3, n-1] [n-3, 2, 1, n-1] [n-3, 2, n] [n-1, n] Works for all n greater than... 6?
by klyrs 3y ago
Indeed,
[n, n-1]
[n-3, 3, n-1]
[n-3, 2, 1, n-1]
[n-3, 2, n]
[n-1, n]
Works for all n greater than... 6?
- klyrs 3y agoOptimizing self-response! That fails for six because n-3 and 3 co-occur. With a slight modification we can make it work for all n>5 [n, n-1] [2, n-2, n-1] [2, n-3, 1, n-1] [2, n-3, n] [n-1, n] edit: and it's not hard to show that n<6 are impossible, so the solution above is optimal in that sense.
- deleted 3y ago[deleted]