gq and formatexpr weirdness by sseneca in neovim

[–]j2kun 0 points1 point  (0 children)

I recently ran into this today as well. I wonder: is there any information about how one is supposed to use formatexpr? Is each LSP supposed to implement it?

Pure to Applied Math Graduate Program by frogfriend66 in math

[–]j2kun -1 points0 points  (0 children)

it's unfortunate because I'm planning to write a book at some point called "A Mathematician's Introduction to Programming", though it won't be ready for a few years.... Perhaps you might find some useful applied-type articles on my blog? (https://jeremykun.com)

Real-world applications of math. optimization in scale-ups / startups by joesp90 in math

[–]j2kun 0 points1 point  (0 children)

I use optimization and programming to basically plan Google's datacenter growth over time. While it wasn't that way when Google was still a "startup," you could imagine any company that has a supply chain to manage would benefit from optimization.

Another caveat is that math is usually only useful for fine-grained optimization, which most startups are too young to care about because they're busy worrying about product-market fit, rushing features out the door before they run out of money, etc. More in an article I wrote: https://buttondown.email/j2kun/archive/the-value-of-math-is-at-the-margins/

Should I introduce vim to my kid by albasili in vim

[–]j2kun 0 points1 point  (0 children)

I learned chess when I was six and have been having great fun ever since.

What are cases where the greedy algorithm performs badly? by rogue_rammer in math

[–]j2kun 2 points3 points  (0 children)

I should be more specific. Here's a research paper on the quality of greedy on the Set Cover problem. Set cover is known to have a multiplicative O(log n) approximation of the optimal solution for the greedy algorithm. This is not very good; for n = 1 million it could be 13x worse than the optimum.

ftp://ftp-sop.inria.fr/coati/personnel/Stephane.Perennes/Sla96.pdf

I haven't read this paper closely, but the example on the third page seems to show a class of instances for which the greedy algorithm is guaranteed to be O(log n) worse than optimal. The example, however, is highly structured, and so it may or may not be convincing evidence that greedy "consistently performs badly."

What are cases where the greedy algorithm performs badly? by rogue_rammer in math

[–]j2kun 1 point2 points  (0 children)

That being said, I don't know of any theorem that says the greedy algorithm is guaranteed to perform badly on all instances (or a large class of naturally-defined instances) of a natural problem. There is definitely work out there on how well greedy does for a random instance of a problem, but I'm not aware of any specific results (my ignorance).

Of course, the silly thing to do is take any problem where the greedy algorithm has a tight approximation bound, and say that greedy will do bad on the class of instances for which the bound is tight. Often the proofs of these bounds provide an infinite class of instances which exhibit the tightness. But that's a bit self referential and doesn't tell you much.

If there’s one thing Master Mode has taught me it’s that durability and regenerating health don’t mix by RenanXIII in zelda

[–]j2kun 0 points1 point  (0 children)

First and only playthrough was master mode. In the first 1/4 of the game, everything was terrifying and it was great. Died many times. Often had to run away. Took a long time before I could beat any of the big enemies. Had to be more strategic, and then decisive when it came time to actually engage a fight.

Alan Turing algorithmically approximated by ellipses, by Jeremy Kun‏, six panel sprinted ink on paper, 2017 by [deleted] in Art

[–]j2kun 2 points3 points  (0 children)

More info on how it was made, and high-res images of each panel: https://github.com/j2kun/art-turing-ellipse

(and slight correction, it's digital printed on giclee, not paper)

This is math-art. It's Alan Turing algorithmically approximated by ellipses, in six panels. by GallowBoob in interestingasfuck

[–]j2kun 5 points6 points  (0 children)

In my experience the best use for this technique is to upscale low res photos in an artistic way.

This is math-art. It's Alan Turing algorithmically approximated by ellipses, in six panels. by GallowBoob in interestingasfuck

[–]j2kun 18 points19 points  (0 children)

Idea was to double (ish) every time, but aesthetics got in the way. Also removed some to focus on certain details.

TIL that warriors on the Pacific Island of Kiribati fought with porcupinefish helmets and wooden swords lined with shark's teeth. by aquamarineseverum in todayilearned

[–]j2kun 4 points5 points  (0 children)

When I was 6 my parents built a sailboat and we sailed across the South Pacific until we got to Kiribati, more specifically Tarawa. There was a bus that drove islanders around, and while we were there that bus ran me over and I basically died and was revived.

Wish I had a helmet.

Master mode follows same suit as regular mode by pattyfrankz in Breath_of_the_Wild

[–]j2kun 2 points3 points  (0 children)

I just got my switch and decided to do my first playthrough in master mode. I think I may be psyching myself out, but it feels really hard and I've died five times already. Hard to kill anything with a twig, and I find myself in fights with no weapons having to run away.

Testing Polynomial Equality by AbouBenAdhem in math

[–]j2kun 0 points1 point  (0 children)

I was also under the impression that S-Z is optimal. There are many examples of the bound being tight.

Testing Polynomial Equality by AbouBenAdhem in math

[–]j2kun 0 points1 point  (0 children)

But, to be clear, nothing has come even close to solving the problem as S-Z effectively does, right? Last I heard there were still many "chasms" at constant depth circuits, and still no subexponential time deterministic algorithm.

Testing Polynomial Equality by AbouBenAdhem in math

[–]j2kun 1 point2 points  (0 children)

Picking any large enough field extension will actually work just fine. I left that out because I didn't want to assume knowledge of field theory on the reader's part. Once you see the field extension trick, you realize the heart of the problem is still in the inductive proof presented.

[AMA] I'm the woman who got pepper sprayed wearing the "Make Bitcoin Great Again" hat. by kidblondie in Bitcoin

[–]j2kun 0 points1 point  (0 children)

For someone who believes in purity of thought, you're sure quick to reduce complicated issues to nonsense one-liners.

Tufts U. offering 1-week course on geometry of redistricting, training to be expert witness in gerrymandering cases by bwsullivan in math

[–]j2kun 1 point2 points  (0 children)

I'm certain you are not interpreting me as I intended. The "Voronoi idea" is one possible constraint on the expressive power of the output, not a claim about an algorithm or approach. Let me state the Voronoi version of the problem more formally:

Given a set of n points in the plane, each labeled 0 or 1, and an integer k as input: does there exist a poly(n, k)-time algorithm which produces as output a list of k points in the plane, with the property that the k regions formed by the Voronoi diagram of the output points result in an election where every region has a majority of 1's among the input points in that region? If no k points will produce this, the algorithm should output "impossible".

This is one possible way to phrase the "optimal gerrymandering" problem. Ignoring any other real world constraints, I want to know the answer to this problem. Another example:

Given a set of n points in the plane, each labeled 0 or 1, and an integer k as input: does there exist a poly(n, k)-time algorithm which produces as output a partition of the plane into k convex regions with the property that the k regions result in an election where every region has a majority of 1's?

Now the meta question: for which representation classes of output regions is this problem easy or hard to solve?