Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Puzzle: The Ham Cheese Sandwich cut.

by jeffguy (Sexton)
on Nov 17, 2005 at 20:42 UTC ( [id://509562]=note: print w/replies, xml ) Need Help??


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

I really doubt it because any point can have a median drawn through it. Remember, the median can go in any direction. For any point, you can find some angle to draw a line through that point that will separate all other points of that color into two equally-sized groups. So if it's a tree structure, it's not a standard one where divisions are made parallel to the axis of the graph.
  • Comment on Re^2: Puzzle: The Ham Cheese Sandwich cut.

Replies are listed 'Best First'.
Re^3: Puzzle: The Ham Cheese Sandwich cut.
by BrowserUk (Patriarch) on Nov 17, 2005 at 21:37 UTC

    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.
      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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://509562]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-25 06:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found