Readit News logoReadit News
drspoulsen · a year ago
Hi everyone, the author of the blog here. I'm glad to see the interest here on this piece!

I have slides that detail the problem setup and the mathematics, as well as a consideration of three-dimensional onions, here: https://drspoulsen.github.io/Onion_Marp/index.html

I have submitted a formal write-up of the details of the problem and the solution to a recreational mathematics journal.

I'm also happy to answer any questions about this!

therealfiona · a year ago
The thing I love about Hacker News is that someone can post an article like this, then the author of the paper shows up to answer any questions. Keep being awesome.
Eddy_Viscosity2 · a year ago
You should send a "continue and persist" letter. From a HN post a few days ago: https://continueandpersist.org/
dgacmu · a year ago
This is tremendously fun, thank you!

Your solution seems to assume that all cuts need to be directed towards a single point, but doesn't it seem likely that an even more optimal solution increases h (depth of cut target) as the cuts move outward? Or did I miss a reason that's not the case?

actionfromafar · a year ago
Hey now, even the practical application of cutting a typical 10 layer onion was left as en excercise for the reader. Quoth:

"So, the best depth for an onion with ten layers would be somewhere between 0 and 0.5573066. I have not investigated this in depth, but this seems like a fun next step."

You are suggesting something even more advanced. :)

drspoulsen · a year ago
The two cases this solution generalizes are the vertical and radial cut method, which both aim towards a single point (you can think of the vertical method as aiming to a point infinitely far beneath the center of the onion). There may be other more optimal ways (cutting each layer individually for example), but they are not conducive to an ultimately simple strategy.
jonahx · a year ago
I think that was just an "arbitrary" constraint of the problem, inspired by the practical constraint of using it to cut an onion?
thaumasiotes · a year ago
> I'm also happy to answer any questions about this!

If you're still checking, I have a semi-related question:

You're solving the problem for a circle in a plane (actually, a semicircle in a plane), and the reduction in dimensions is related to something that has bothered me.

I can easily segment a circle into a bunch of identical arcs (say, by making each arc 3 degrees long and getting 120 identical copies). Polar coordinates are great for this.

But spherical coordinates are terrible for accomplishing the same thing on a sphere, and my understanding is that the analogous effect - tiling the surface of a sphere with a single shape - can't be achieved?

What motivated me to thinking about this was the idea of a coordinate system that would allow every "square" on a map to be the same as the other squares, regardless of how much distortion there might be between the shape of the region on the spherical surface and the shape of the same region as a square on this fancy map. But it also seems relevant to the question of how well your two-dimensional analogue to the onion problem answers the original three-dimensional question. (I'm writing this comment in the middle of reading your article, so I don't know if the 3D solution is ultimately addressed.)

I'd be happy for any comments you might have related to this.

drspoulsen · a year ago
I agree that spherical coordinates are not good for the 3D onion. In the slides I linked, I use cylindrical coordinates with appropriate bounds to encompass the problem within a sphere.
timClicks · a year ago
I love how deeply nerd-sniped you have been by this topic. It's wonderful to be able to observe your delight in solving this. Thank you for sharing.
dawnofdusk · a year ago
Would be really interesting if you could reverse engineer the model which yields 1/phi as the correct answer. Evidently for some non-uniform measure on the onion you could do it. What about for considering the onion as a half-ball? (Although if you're cooking it really is primarily the thickness that matters.)
drspoulsen · a year ago
I've thought about this. Unfortunately, everything I have tried (changing dimensions and layers, for example) has not yielded anything. This is still something one could explore, though!
andrewmcwatters · a year ago
I feel like mathematics and many other rigorous field-friends have tons of great questions like this that are ripe for fun research. Thanks for publishing this and contributing to that world of curiosity!
domenici2000 · a year ago
Thanks, this has been my go to technique after watching Kenji's video about it.
yunwal · a year ago
> First, we model the onion as half of a disc of radius one, with its center at the origin and existing entirely in the first two quadrants in a rectangular (Cartesian) coordinate system.

Can someone explain to me why a half sphere (the shape of half an onion) can be modeled as a half-disk in this problem? Why would we expect the solutions to be the same? If you think about the outermost cross-sections at the ends of the onion (closest to the heel and tip of the knife), as you get closer and closer to the ends, you approach cutting these cross-sections more vertically. I'd expect that you'd have to make the center cross-section a bit shallower to "make up" for the fact that the outsides are being cut vertically. Idk, either way I think declaring this the true "Onion constant" is probably wrong.

gus_massa · a year ago
The solution is later in the article.

> The insight that leads to a solution comes from the Jacobian.

It's not a unform half disk. It has more weight away from the Y axis.

You can imagine it's painted with watercolors and you want to collect the same ammount of ink.

In an uniform disk you have

    xx
   xxxx
   xxxx
  xxxxxx
  xxxxxx
  xxxxxx
But in the weighted disk of the article the top and bottom are darker and the center lighter

    ..
   x..x
   x..x
   x..x
  Xx..xX
  Xx..xX
  Xx..xX
but there are no strips like in my ASCII art, the shade changes slowly.

Maken · a year ago
He's also ignoring that the layers of the onion become significantly thinner the farther away from the center they are. So this analysis is way off even for a perfectly symmetrical onion.
dole · a year ago
Even though onions aren't perfectly symmetrical, they still optimally grow or radiate out from one axis/line through the middle. Stick a toothpick through a sphere as this line, and slice the sphere through perpendicular to the axis, you'll get circles from a sphere, or half-disks from a half onion if you keep slicing perpendicular.

I'm lazy and cut my onions perpendicularly through halves, and don't try a radial cut for uniformity.

yunwal · a year ago
> Even though onions aren't perfectly symmetrical

The question I have is not about modeling an imperfect object as a perfect abstraction, it's about modeling a 3D object as a 2d object, and assuming that the optimization still holds. I think it's pretty plainly clear that it doesn't. Think about some cross-section of the onion that's closer to you and smaller than the center cross-section. Let's say it's of radius 0.25 instead of 1. The slices you take of it will be much more vertical than the center slice. This changes things. My intuition tells me it means the optimal solution is shallower than the solution found here, since you'd want the "average" cross-section to follow this constant.

PittleyDunkin · a year ago
Only some types, of course. Shallots are not spherical, though they are radial, but the centerline is often curved.
dhosek · a year ago
For a moment, I thought that “the onion problem” related to some challenging issue of topology or group theory, before my brain finally sorted through its connections to identify Kenji Lopez-Alt as a chef and not a mathematician.
glompers · a year ago
J. Kenji Lopez-Alt _was_ actually mentioned (featured?) in alt-weekly The Onion this month. The problem, though, was that it was in an un-funny piece about the beef dimension, and it is not worth footnoting here. I guess they should have researched this 2021 article and spun off of it instead. But maybe a Quanta Magazine and infowars joint venture could enter the beef dimension. An onion with too many alt-layers.

Deleted Comment

giraffe_lady · a year ago
He's not a chef either he's a food writer and recipe tester. I don't mean this as disrespect at all just they are very different professions, using different skills and producing different outputs.
Cerium · a year ago
I share simular concern, but also think of an onion more as a bulging cylinder due to center weighted thickness variation in layers. Each layer extends from root to stalk.
ortusdux · a year ago
On the other hand, fellow food youtuber Adam Ragusea swears by the importance of heterogeneity. Optimizing for uniformity might not be the best strategy!

https://www.youtube.com/watch?v=5cWRCldqrxM

stickfigure · a year ago
I literally came in here just to make this comment. Like Ragusea, I prefer every bite to be slightly novel and different.

One of my favorite hacks for Ceasar Salad: Take a bag of packaged croutons, put it flat on the table, and crush it with the bottom of a pan. Repeatedly. Until you get a mix of various sized crouton chunks, gravel, and dust. Apply to salad.

I ate a Ceasar this way in some fancy restaurant and I've been making it that way ever since.

ndileas · a year ago
You brought your own croutons and pan to a fancy restaurant?? Bold.
catapart · a year ago
Adam was solving a different problem statement. Kenji's point was to have one simple rule that anyone could remember and follow to make the best cuts without having to worry about precision. This rule gets you close enough to the homogeneity that is expected in most recipes (for things like onions) without having to fuss over particular cuts. Having watched Ragusea for a while, I'm betting he would be perfectly on board with that solution to that problem.
andrewmcwatters · a year ago
I remember reading about the consistency of cuts from classically trained chefs. I think Adam Ragusea has a lot of niche, quirky practices that don't align with actual profession. He's more of a culinary advocate in the same way that Bill Nye is a science advocate. They're not professional chefs or scientists.
Eavolution · a year ago
Adam's never claimed to be a chef or want to do things like a chef would, he tends to focus on how someone at home could do it, where things like preparing 50 onions as quickly as possible don't matter as much, hence the difference in style. I think both practices have their place, adam just home as he's never been trained in food and so all his cooking is for the home

Deleted Comment

jfactorial · a year ago
Well the logic presented in that video certainly cannot be argued against.
momoschili · a year ago
really isn't a right and wrong way to do it. Erring too far toward either extreme makes your food probably a bit boring versus poorly executed.

That being said, most of Ragusea's takes haven't aged all that well, some by his own admission.

alliao · a year ago
it's definitely one of the more subtle tool to use when cooking, mixing heterogeneity and homogeneous!
me_again · a year ago
Marco Pierre-White recommends grating onions, which ingeniously avoids the entire issue.

Grating the Gordian knot, if you will.

https://youtu.be/glIUUrh6qtQ?t=40

tptacek · a year ago
He grates for a tomato sauce, which makes sense, but you wouldn't want that as your default onion cut.
account42 · a year ago
Is there really a default onion cut? Desired sizes vary vildly depending on what you are making.
akira2501 · a year ago
This is the MPW way:

https://www.youtube.com/watch?v=UBj9H6z6Uxw

"Perfection is lots of little things done well."

account42 · a year ago
It avoids the issue except for the remaining bit which you can't grate without risking your fingers.

For garlic, I prefer crushing them for many recipes. This creates much rougher outlines that blend better into the food and crisp nicely when fried.

tdeck · a year ago
At that point why not just grind them in a food processor?
account42 · a year ago
That's going to end up with a slush of onion fibre + onion juices. Very much different from even small bits of cut onion. Some recipes call for blended onions though.
marcopw · a year ago
“You can grate the onion, or not, its your choice really”
OJFord · a year ago
Is the problem explained in text anywhere? (TFA delegates to a video and afaict only discusses another video-suggested solution and a novel solution in text, I don't understand what we're solving.)
ipsento606 · a year ago
> Is the problem explained in text anywhere

the problem is that you want to cut up an onion in such a way as to minimize variation in the size and shape of the cut-up pieces

usually, so that the pieces will cook evenly

dylan604 · a year ago
meh, the food processor usually handles that for me pretty damn well
ruds · a year ago
You would like to slice (half) an onion in a way that minimizes the variance in volume of the pieces. The problem is then simplified to slicing half an onion in a way that minimizes the variance in cross-sectional area of the pieces at the widest part of the onion.
dfxm12 · a year ago
The problem is "I have an onion that is spherical with even layers. How do I cut it into pieces with equal volume?"

It's more of a geometry thought experiment than a practical epicurean "problem".

sampo · a year ago
> Is the problem explained in text anywhere?

Not very well. There are some snippets:

"to keep the pieces as similar as possible"

"The Jacobian r dr dθ gives a measure of how big the infinitely small pieces are relative to each other"

"The variance is a good measure of the uniformity of the pieces."

ska · a year ago
The problem is how to get roughly equal sized pieces from cutting an onion. If you cut towards the center the inner pieces are much smaller than the outer.
CarVac · a year ago
I'm surprised Kenji still does the horizontal cut at all. With the angled vertical cuts I find the horizontal cut entirely unnecessary. (Also a few years back I gave myself a nice flap avulsion doing the horizontal cut in an onion...)
tptacek · a year ago
The weirder thing for me is that he makes the horizontal cut after the vertical cuts --- in fact, most cooks I've seen dicing onions do that --- and it seems completely backwards. It's safe and easy to make the horizontal cut on an intact onion half, but much harder after it's been cut up vertically.
momoschili · a year ago
making the single horizontal cut first makes every vertical cut after more difficult to perform without harming the structure of the onion.

technique and a sharp knife enable the horizontal cut second to be vastly superior to doing it first.

momoschili · a year ago
angling the horizontal cut down is a good way to handle this. The horizontal cut is mostly only necessary for the lower sides of the onion anyways.
aidenn0 · a year ago
While narrating, Kenji says that he doesn't do the angled cuts at all, but it was an interesting math problem.
ImPostingOnHN · a year ago
Invest in cut-resistant gloves. The few dollars will pay for themselves in non-lost time, plus you can use them on a mandolin.

NB: maybe stick a hotdog in one of the fingers to test it first.

CarVac · a year ago
I have them now, but's simpler to just avoid that one dangerous and unnecessary cut that proceeds towards my body instead. They taught that in Scouting, never cut towards yourself.
bloopernova · a year ago
My standard housewarming gift is cut gloves and a pack of nitrile gloves to put over them. The nitrile gloves are so you don't have to wash the cut gloves so often.
resource_waste · a year ago
Another thing to get out, another thing to clean, another thing to put away.

All because we want to chew less. (I suppose nice texture too)

klysm · a year ago
Amazing, and I was soooo glad to see the integral has a closed form. I’m very curious what this looks like in the discrete case. I’d imagine it’s somewhat straightforward to code a simulation?
Anon4Now · a year ago
I prefer the Chef Jean-Pierre method [1] because he keeps it simple. He also shows why the horizontal cut really doesn't make much sense.

[1] https://www.youtube.com/watch?v=QjZ1LFqNWRM&list=PLnujfCpADf...

ghc · a year ago
Yes! I've been using his method for 15 years with no regrets. I'm amazed to see he's still making videos after all this time.
Anon4Now · a year ago
He had to close down his cooking school during Covid, so he started making YT videos. I watch a number of chefs on YT, and he's easily my favorite. He's a wonderful teacher, and I've learned more from him than any other because he always reinforces concepts without being repetitive and dull. It also helps that his meals are practical for home cooks, and, overall, he's just a charming guy.