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

I've not yet convinced myself that this is soluble in the general case.

In the 2D case, if all the points in both groups have one coordinate in common, and there are an odd number of points in each group or in the more general case of all the points lying on a straight line at any arbitrary angle.:

+-----------+ +-----------+ +-----------+ | . | | | | . | | x | | | | . | | x | | | | . | | . | |.xx . x . | | x | | . | | | | x | | x | | | | x | +-----------+ +-----------+ +-----------+

Unless you consider the line passing through all the points satisfies the criteria of having an equal number of each type of point on either side; ie. none?


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.

Replies are listed 'Best First'.
Re^4: Puzzle: The Ham Cheese Sandwich cut.
by jeffguy (Sexton) on Nov 17, 2005 at 21:52 UTC
    Exactly. If all points lie on the same line, that line is the correct line.

    Btw, where I am so far, I may actually end up using some kind of (VERY nonstandard) tree to get from n^2 to n*lg(n). That would make you right :-)

      Yes. The tree would have to be a "multi-dimensional R-B tree"--not that I have the foggiest clue how you would construct one (yet).

      Okay, you've satified me on that case, but what about this one.

      Two groups of 3 points; one of the first group and two of the second lie on a straight line. The other two points of the first group lie either side of that line ('scuse the crude drawings, but if I can't visualise it, I can't program it:):

      +-------------+ | \ | | x x | | \ | | \ | | x . | | \ | | . | +-------------+

      No matter where you put the third point of the second group, other than on that line, the problem is insoluble. I think?

      The same logic applies to the higher dimensions also. (I think).


      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.
        No matter where you put the third point of the second group, other than on that line, the problem is insoluble. I think?
        No. The line you have drawn has one x on the left of the line, and one x on the right of the line - since 1 is not more than half of 3, it correctly divides the set of x points. And no matter where you place the third point, each half-plane (that is, right of the line, or left of the line) contains at most 1 point.

        Points that are on the line are neither to its left, nor to its right.

        Perl --((8:>*
        I think we have to have a practical definition of which group a point on the line is in.

        You could go with neither, or both (I'd suggest "both").

        Then if you put the 3rd point off the line, that half-plane has 3 points of that color, and the other half-plane has 2 points. "At most" -- well, you can't split a point, so it "at most" must be ceil(n/2).

        On the other hand, choosing "neither" means that one side has 1 point, and the other side has 0, each of which is "at most" n/2. <p. We just have to get the definitions right.

        -QM
        --
        Quantum Mechanics: The dreams stuff is made of