Remix.run Logo
▲ patcon 20 hours ago

He converted bubble sort to agent-based, as in, inverted the algorithm to be from the POV of the digits instead of the god-view of the algorithm that sees the digit set as a whole. Like drawing a circle with a protractor (view of whole), vs drawing circle with instruction "step fwd, then turn 1 degree left" (local view)

After rewriting the algo in a functional form, they then made it fail in certain conditions, e.g., "a 1 to the left of a 4 gets the equality relationship backward" or things like that.

it's quite a clever approach as I recall. Worth reading his papers and not dismissing him out of hand

▲twright0 19 hours ago | parent [-]

The obvious implementation of bubble sort does not have a "god-view", it looks at pairs of adjacent elements and swaps them if they're out of order. The only global state is whether any swap happened on a single pass, which is equivalent to, in the inverted approach, some system for letting all the cells decide if they're done swapping (necessary to actually returning a sorted list). You can write a bubble-sort-ish kind of thing that tolerates immovable elements or errors in comparison but - I cannot emphasize this enough - bubble sort itself cannot. Anything you say about a re-implementation of bubble sort to tolerate such a thing is not a statement about bubble sort but rather about the thing you implemented that kind of looks like bubble sort.

I think I found the paper in question (https://arxiv.org/abs/2401.05375) and it is not supporting these claims about bubble sort at all (not going to try to dig in on the others right now). I cannot find a coherent interpretation of this paper that describes a sorting algorithm that is correct against arbitrary inputs and is also reasonably called "bubble sort".