A solution to The Onion problem of J. Kenji Lopez-Alt (2021)

(medium.com)

133 points | by fanf2 6 hours ago ago

49 comments

  • dessimus 37 minutes ago

    >To get the most even cuts of an onion by making radial cuts, one should aim towards a point 55.73066% the radius of the onion below the center. This is close, but different from, the 61.803% claimed in the Youtube video at the top.

    Wife walks into kitchen with 3447 cut onions in piles: "What are you doing?!" This guy: "I just cannot get these onions cut to a point 55.73066% below the origin! The best I have achieved is only 2 significant digits of accuracy." Wife, mumbling: "Maybe that's why Kenji said: 60%..."

  • drspoulsen 24 minutes 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!

  • yunwal 2 hours 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 44 minutes 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 an hour 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 2 hours 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 2 hours 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.

        • StrangeDoctor an hour ago

          Haven’t had enough coffee to think about this rigorously.

          My intuition says that as long as you could get to the desired 3D shape from revolving the 2D shape around an axis, essentially integrating the area into a volume, the results will be valid or equivalent.

          I don’t think that’s the entire story, there are probably other ways to simplify 3D shapes. And yes, onions will have non constant variations (or ones that don’t cancel out to 0) along the sweep which is what actually invalidates the real world application.

        • dylan604 44 minutes ago

          Isn't that where calculus and intergrals come into to play? As the radius approaches infinity type of stuff?

    • dhosek 2 hours 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 an hour 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.

    • Cerium 2 hours 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 an hour 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

    • jfactorial an hour ago

      Well the logic presented in that video certainly cannot be argued against.

  • OJFord 2 hours 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.)

    • dfxm12 3 minutes ago

      The problem is "I have an onion. How do I cut it into pieces with equal volume with the fewest cuts?"

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

    • ipsento606 44 minutes 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 42 minutes ago

        meh, the food processor usually handles that for me pretty damn well

        • marssaxman 18 minutes ago

          You are clearly not the target audience.

    • ruds 2 hours 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.

    • sampo 2 hours 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 2 hours 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 2 hours 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...)

    • ImPostingOnHN 2 hours 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.

      • bloopernova 37 minutes 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.

      • CarVac 2 hours 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.

        • Kototama an hour ago

          You need to cut in the direction of your body in some cases (for example when carving wood).

          Two things to prevent injuries: a) never put any force if the material resists b) do it slowly.

          • dylan604 38 minutes ago

            > for example when carving wood

            I've watched a lot of shows about the tools used for building log cabins in the pioneer days. I don't even know the names of them, but the tool for taking the bark off the tree by pulling the knife to you as you sit on the log is crazy. Also, the one where you straddle the log and swing the blade towards you between your legs is right up there too. Yet, I can't think of any way of making them better without using power tools.

            • ahipple 5 minutes ago

              > the tool for taking the bark off the tree by pulling the knife to you as you sit on the log

              Just guessing, I'm imagining a [drawknife][1] (which is a tool used for removing bark from logs, shaping wood in traditional chairmaking and other similar crafts, etc.)

              If that's the case, they're a lot safer than they look due to the body mechanics in play -- the blade will never reach your body as you pull it toward you because either your elbows will hit your abdomen or (if you choose to spread your elbows apart) your shoulders will reach the limit of their range of motion. You'd have to perform something other than the natural body movement (and be pretty flexible) to pull the blade far enough to contact your body, and even then you'd struggle to exert much force.

              [1]: https://duckduckgo.com/?q=drawknife&iax=images&ia=images

            • jcoby 17 minutes ago

              Drawshave or drawknife and adz.

              The drawknife is the safer of the two by far. It’s fairly hard to cut yourself when your whole body is moving the same direction. Similar to using a paring knife in your palm facing your thumb.

              The adz however you just have to have good aim or pay the consequences!

            • JamesSwift 16 minutes ago

              Draw knife. As long as you are leaning instead of pulling its relatively safe. Same as its safe to pare by contracting your hand muscles instead of pushing a knife toward yourself.

          • bloopernova 39 minutes ago

            And either learn to sharpen your knives yourself, or take them to a sharpening service. Dull knives require more force, and slip/catch more, so are more dangerous.

      • resource_waste 2 hours 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)

        • ImPostingOnHN 40 minutes ago

          Just always keep them on and never wash them. Bonus: immunity to papercuts forever.

  • ackbar03 2 hours ago

    You want even cuts you throw it into a blender

    • karaterobot 2 hours ago

      Besides a dice that's as even as possible, the other requirement this solution attempts to satisfy is using the minimum number of cuts. A blender doesn't satisfy that, as it's making hundreds of cuts.

      Then, when you present your solution to the client, you find out there was a third, unspoken requirement: that it should involve as little cleanup as possible, which the blender also doesn't satisfy. The user researcher was on vacation, and you didn't find out about this before beginning design. Damn!

      The blender solution turns out to be overoptimized on a single requirement at the expense of the others.

    • greenpresident 2 hours ago

      That’s the engineering solution.

      You could also hire two interns to do it layer by layer, call it the consultant‘s solution.

      • Maken an hour ago

        The consultant solution would be to buy precut onions, so cutting perfect slices becomes someone else's problem.

      • octocop 2 hours ago

        Then it seems you need consultants to get a guide Michelin star

        • selimthegrim 2 hours ago

          That sounds like a cost plus defense contract if there ever was one

      • 1propionyl 2 hours ago

        If you want an extremely fine and even brunoise that's exactly what you do.

    • ska 2 hours ago

      That’s really not true, unless you are really mincing it or making a paste .

    • ImPostingOnHN 2 hours ago

      A blender will make the bottom layer into paste before the top is touched. If you want to toss the paste into a skillet and caramelize it, that'll make a good sauce.

      Food processor might be better, but still won't be even.

      Source: I cook onions a lot, and am lazy. This article is great!

    • laweijfmvo 2 hours ago

      two words: Slap Chop.

  • jfengel 3 hours ago

    Not "The Onion". The original capitalization is "the Onion Problem", i.e. the problem of dicing onions into even pieces.

    • kunwon1 3 hours ago

      I was confused, especially considering this [1] is still very recent

      [1] https://theonion.com/kenji-lopez-alt-returns-from-beef-dimen...

      • dole 2 hours ago

        I also thought I had my finger on the pulse of some The Onion/Lopez-Alt beef, like TMZ on the Food Network.

        ontopic edit: I am interested in an optimal onion cutting technique, while I'm happy with mine, the upside-down banana teaches that there's always a few ways to approach and learn something.

      • jghn 2 hours ago

        This is exactly what I thought of when I saw the headline!