Better HN
topnewbestaskshowjobs
Log inSign up

lkozma

3,580 karma · joined Mar 27, 2007 (19y ago) · 780 submissions

http://www.Lkozma.net

lkozma@gmail.com

Submissions

comment 3y ago · link · parent

My favorite artistic illustration is probably Jorge Stolfi's drawing inspired by the self-adjusting splay tree data structure of Sleator and Tarjan: https://www.link.cs.cmu.edu/splay/tree5.jpg

comment 3y ago · link · parent

Yes, this efficiency-aspect is not captured in the illustration -- while splitting perfectly _by index_ comes for free, splitting perfectly _by value_ needs nontrivial work (median-finding).

comment 3y ago · link · parent

May I add one that I made?

Illustration of QuickSort and MergeSort as two sides of the same coin: http://lkozma.net/images/sort/duality.pdf

I find this somehow both obvious and counter-intuitive, and usually the two algorithms are not presented in this way, as duals of each other.

I wrote up this view in more detail, but the figure above should be self-explanatory: http://lkozma.net/blog/a-dual-view-of-sorting-algorithms/

comment 4y ago · link · parent

Socrates supposedly loved going to the market. When his students asked him about this, Socrates replied, "I love to go and see all the things I am happy without." :)

comment 4y ago · link · parent

This is a very nice and deep question. Are you aware of the published research on the problem?

The growth rate is indeed around 4 and now known to be strictly above 4: https://page.mi.fu-berlin.de/rote/Papers/pdf/Lambda-4.pdf

If I remember correctly, there was a non-rigorous argument for a concrete conjectured value not far above 4.

comment 4y ago · link · parent

"Seeing an astronomer using a telescope to observe a galaxy, no-one will confuse the telescope with the galaxy. Mathematics differs from science in that there is no clear distinction between the tools and the objects of study." -- D.Aldous

comment 4y ago · link · parent

You are right in general, but when the quote is from someone on whose research the result builds in an important way (as it is the case here), I would say it is fair.

comment 4y ago · link · parent

Your first point is correct, but just to clarify your second point, these two definitions are not quite equivalent, as there is a world of functions growing more quickly than log^k(n) no matter how large constant k, but still within n^o(1).

For an example, consider 2^sqrt(log(n)).

This is a bit similar to something being faster than polynomial, but slower than exponential.

comment 4y ago · link · parent

Who is pushing/lobbying for that type of legislation? Isn't it a case of regulation helping the incumbents?

comment 4y ago · link · parent

For those coming from a CS background a possible (crude) intuition sometimes given is that

frequentist :: Bayesian ~ worst-case analysis :: average-case analysis

There are a good reasons why we don't usually do average-case analysis of algorithms, chief among them that we have no idea how inputs are distributed (another reason is computational difficulty). Worst-case bounds are pessimistic, but they hold.

comment 4y ago · link · parent

Honest question: who does it harm? These aspects that you mention may not be to your (or to my) taste, but if they are relatively harmless and the other stuff is overwhelmingly good, why not let it go?

12.

Finnish man blows up his Tesla Model S with 30kg dynamite(youtube.com ↗)

10 points · by lkozma · 4y ago · discuss

comment 4y ago · link · parent

was posted here sometime ago:

The door refused to open. It said, "Five cents, please." He searched his pockets. No more coins; nothing. "I'll pay you tomorrow," he told the door. Again he tried the knob. Again it remained locked tight. "What I pay you," he informed it, "is in the nature of a gratuity; I don't have to pay you." "I think otherwise," the door said. "Look in the purchase contract you signed when you bought this conapt." In his desk drawer he found the contract; since signing it he had found it necessary to refer to the document many times. Sure enough; payment to his door for opening and shutting constituted a mandatory fee. Not a tip. "You discover I'm right," the door said. It sounded smug. From the drawer beside the sink Joe Chip got a stainless steel knife; with it he began systematically to unscrew the bolt assembly of his apt's money-gulping door. "I'll sue you," the door said as the first screw fell out. Joe Chip said, "I've never been sued by a door. But I guess I can live through it."

(Philip K. Dick: Ubik)

comment 4y ago · link · parent

> The Soviets royally sucked in the computation department

To add more nuance, there is an essay [1] telling the history of early maximum flow algorithms and includes this small anecdote:

[An] American asked: ".. how were you able to perform such an enormous amount of computing with your weak computers" to which the Russian responded: "we used better algorithms".

There is some truth to that, besides maximum flow, similar stories can be told about linear programming, data structures (e.g. AVL-trees), numerical computing, etc. The hardware may have been sloppy, but the algorithms-research was top notch.

[1] http://www.cs.bgu.ac.il/~dinitz/Papers/Dinitz_alg.pdf

comment 5y ago · link · parent

Tolstoy along similar lines: https://en.wikipedia.org/wiki/How_Much_Land_Does_a_Man_Need%...

comment 5y ago · link · parent

> However, you're being "too smart for your own good" if you go down this route. A perfectly unbiased input would still have 50% of its inputs rejected, and already you've dropped the speed of the RNG by 50%.

To improve this situation you can use an additional trick: keep track of the sequence of thrown-away pairs, and look at them again in consecutive pairs, and generate some more random bits:

* 00 00 -- throw away

* 11 11 -- throw away

* 00 11 -- output 1

* 11 00 -- output 0

and so on..

see the paper "Iterating Von Neumann's Procedure for Extracting Random Bits" for details.

12345
26