Better HN
topnewbestaskshowjobs
Log inSign up

rokicki

9 karma · joined Apr 14, 2024 (2y ago) · 13 submissions

Submissions

comment 3mo ago · link · parent

I've bounded God's number for this puzzle as between 87 (for which I have two explicit positions) and 108. I'm expecting to tighten those bounds. If I had to guess I'd put the number at 87 or 88.

comment 6mo ago · link · parent

It's so odd that the only nontrivial example code in the paper is completely buggy. The find longest common prefix function of a list of strings fails (try ["a", "bc", "ade"]).

comment 1y ago · link · parent

For Cochlear brand your kit should include backup coils, and replacement is overnight. If you turn on lights (child mode) the processor lights indicate streaming with blue. I love my cochlear implants even though the integration UI and reliability is not perfect yet.

comment 1y ago · link · parent

It should take 105 repetitions:

https://alpha.twizzle.net/explore/?alg=%28U+R%29105

Unless by "same direction" you mean "opposite direction", in which case 63 works:

https://alpha.twizzle.net/explore/?alg=%28U+R%27%2963

5.

Finally: Performant parallel in-place sorting in C++(github.com ↗)

3 points · by rokicki · 1y ago · discuss

comment 2y ago · link · parent

Nice blog post, but I really wish the author knew how to use apostrophes. (Or the difference between its and it's, if it's not the typographical character he doesn't like.) It's just so jarring to be reading along and be tripped up all the time with grammatical mistakes.

comment 2y ago · link · parent

This expression is nonzero iff reverse(a) > reverse(b) (where reverse is the bitreversal of an unsigned number).

It (using the address of the nodes as arguments) can serve as a tiebreaker in a Cartesian tree (such as one implementing a first-fit memory allocator) or even to replace the random priority value in a treap (meaning you need neither storage nor computation for the priority node of the treap).

comment 2y ago · link · parent

There's a nice elegant description of what it does, mathematically, and a significant use in Computer Science.

comment 2y ago · link · parent

To take this to the next level: what does [(a^b) & (-(a^b)) & a] compute? (Assume unsigned arithmetic.)

And then after that: what use can this be put to?

comment 2y ago · link · parent

To solve a particular position, I just use level-by-level breadth-first search until a level contains two values that are reverses of each other.

To explore the entire state space of possible initial positions, I use a number of tricks; I'll be writing that up pretty soon. I've explored through n=12 already, and expect to finish n=13 and n=14 pretty soon. I'm not sure if I'll be able to do n=15.

And by the way, I've found a position for n=14 that requires 206 moves to solve.

comment 2y ago · link · parent

Finished with a full-state search of 12; worst case is indeed 130. Found a game for n=14 that takes 172 moves: 6 11 8 2 7 10 9 12 4 1 14 3.

comment 2y ago · link · parent

Finished with a full state-space search of 11; worst case is indeed 106 (vs 126 for 10).

comment 2y ago · link · parent

Here are the maximum number of steps required through 10, and likely maximum number of steps required through 12:

6: 14 7: 26 8: 74 9: 86 10: 126 11: 106 (?) (full state space not explored) 12: 130 (?) (full state space not explored)