in reply to Re^3: Puzzle: The Ham Cheese Sandwich cut.
in thread Puzzle: The Ham Cheese Sandwich cut.

What you are looking for in the 2-d case is a line, what you are looking for in the 3-d case is a plane. More general, what you are looking for in the n-d case, is an (n-1) simplex.

So, in the three-point example you describe, any line that goes to any of the points, and intersects the line segment joining the other two points (a line going through two points is will do as well). Any other line will have at least two points either to the left, or to the right, and will not do. (Although I don't think the problem becomes significantly different if you relax the requirements and require that on either side of the line are at most ceil(n/2) points - it that case, any line intersecting the triangle of the three points will do).

Perl --((8:>*
  • Comment on Re^4: Puzzle: The Ham Cheese Sandwich cut.

Replies are listed 'Best First'.
Re^5: Puzzle: The Ham Cheese Sandwich cut.
by BrowserUk (Patriarch) on Nov 23, 2005 at 10:17 UTC
    What you are looking for in the 2-d case is a line, ...

    Yes, but isn't the premise of the series of challenges, that to find that line, you find the median points of the two datasets and then connect them?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.