[Haskell-cafe] Re: Health effects
Simon Brenner wrote: > 2kg of chocolate 'thunks' to 'force' really might 'blow your stack' later > on. Oh my god, this one made me laugh so hard I almost choked on the piece of chocolate I was just eating. It should definitely make it into HWN Quotes of the Week... Cheers Ben ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Health effects
It seems like if your primitive operation is "break bar in two" you need exactly n-1 breaks to get n squares, no matter what choice you make for where to break along the chocolate grid. This is a simple consequence of the fact that each break increases the number of pieces by one. If you're allowed to hold multiple pieces in your hand when you do the break it's different. Then you need a model of how the hands hold the chocolate. I think there is a problem when the breaks get complicated, as if you have to hold the pieces for too long while setting up the break, some of the chocolate will melt onto your fingers. -- ryan On Tue, Sep 30, 2008 at 12:56 AM, apfelmus <[EMAIL PROTECTED]> wrote: > Andrew Coppin wrote: >> The other day, I sat down to eat a 2 Kg block of chocolate - one of >> those ones that's divided into lots of little squares. I proceeded to >> recursively subdivide it into smaller and smaller blocks, and then eat >> the individual squares in depth-first order. It was only after getting >> through 16 of the things that I stopped to notice that the whole bar >> just happens to have an exact power of two squares on it. >> >> And it was some time after *that* when I thought to myself "...woah, >> maybe do too much Haskell?" o_O >> >> Seriously, who recursively subdivides their food? I think I have >> something wrong with me... > > A much more important question is: how many "break bar in two" > operations did you perform? Can you do it with less? > > > Regards, > apfelmus > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Health effects
Adrian Neumann <[EMAIL PROTECTED]> writes: > Does this work with more than two colours? i.e. can I recursively > subdivide the halves into quarters with another cut? I don't think so. In order to divide a group, a line needs to pass through somewhere "in the middle", or more precisely, it must intersect the convex hull of the group. Now group each category together so that their convex hulls don't overlap. A solution with two lines and four categories would require the two lines would need to have four disjoint points of intersection. Which is too many. :-) -k -- If I haven't seen further, it is by standing in the footprints of giants ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Health effects
Achim Schneider <[EMAIL PROTECTED]> writes: > Jon Fairbairn <[EMAIL PROTECTED]> wrote: > >> Adrian Neumann <[EMAIL PROTECTED]> writes: >> >> > I often wonder how many cuts you need to divide a steak in n >> > pieces. You can obviously get n pieces with (sqrt n) cuts >> > by cutting a grid. But I'm sure some smart mathematician >> > thought of a (log n) way. >> >> Are you allowed to move the pieces between cuts? >> > Later you're also going to demand to bend it in N dimensions, aren't > you? I don't know about you, but I demand that my steaks have at least four dimensions (in particular they should be much larger in the fourth than an éclair), but as to bending, no, to get to log n you wouldn't need that. If you allow it to be arbitrarily bendable, you can do it in one cut, except that I imagine there's an unstated requirement that all (map ((http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Health effects
The Wikipedia says: "For a finite set of points in the plane, each colored "red" or "blue", there is a line that simultaneously bisects the red points and bisects the blue points, that is, the number of red points on either side of the line is equal and the number of blue points on either side of the line is equal." Does this work with more than two colours? i.e. can I recursively subdivide the halves into quarters with another cut? Am 01.10.2008 um 15:33 schrieb Dominic Steinitz: Adrian Neumann inf.fu-berlin.de> writes: I often wonder how many cuts you need to divide a steak in n pieces. You can obviously get n pieces with (sqrt n) cuts by cutting a grid. But I'm sure some smart mathematician thought of a (log n) way. You might try the ham sandwich theorem http://en.wikipedia.org/wiki/Ham_sandwich_theorem as an hors d'oeuvre. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe PGP.sig Description: Signierter Teil der Nachricht ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Health effects
On Wed, 2008-10-01 at 20:56 +0100, Andrew Coppin wrote: . . . > You know, it's interesting... I posted this in another forum, and people > just said "dude, why would you try to eat a whole 2 Kg of chocolate? > That's really unhealthy." I post the same thing here and now people are > arguing about Dedekind cuts... da HELL?! o_O > > An interesting dichotomy of perspectives, don't you think? Maybe the dichotomy is in the distribution of free-wheeling imagination. I'm reminded of the (apocryphal?) story about Hilbert's assessment of poetry and mathematics. -- Bill Wood ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Health effects
On 2008 Oct 1, at 15:56, Andrew Coppin wrote: Benjamin L.Russell wrote: On Tue, 30 Sep 2008 19:54:17 +0200, Adrian Neumann <[EMAIL PROTECTED]> wrote: I often wonder how many cuts you need to divide a steak in n pieces. You can obviously get n pieces with (sqrt n) cuts by cutting a grid. But I'm sure some smart mathematician thought of a (log n) way. Good thing that the chocolate slab was only 2 kg and of finite length. Had it been of infinite length, we would need Dedekind cuts to partition it ;) You know, it's interesting... I posted this in another forum, and people just said "dude, why would you try to eat a whole 2 Kg of chocolate? That's really unhealthy." I post the same thing here and now people are arguing about Dedekind cuts... da HELL?! o_O An interesting dichotomy of perspectives, don't you think? And if you'd posted on the LOPSA (http://lopsa.org) list it would probably be a discussion of which OS is which kind of chocolate. So? :) -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED] electrical and computer engineering, carnegie mellon universityKF8NH ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Health effects
Benjamin L.Russell wrote: On Tue, 30 Sep 2008 19:54:17 +0200, Adrian Neumann <[EMAIL PROTECTED]> wrote: I often wonder how many cuts you need to divide a steak in n pieces. You can obviously get n pieces with (sqrt n) cuts by cutting a grid. But I'm sure some smart mathematician thought of a (log n) way. Good thing that the chocolate slab was only 2 kg and of finite length. Had it been of infinite length, we would need Dedekind cuts to partition it ;) You know, it's interesting... I posted this in another forum, and people just said "dude, why would you try to eat a whole 2 Kg of chocolate? That's really unhealthy." I post the same thing here and now people are arguing about Dedekind cuts... da HELL?! o_O An interesting dichotomy of perspectives, don't you think? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Health effects
Achim Schneider wrote: Jon Fairbairn <[EMAIL PROTECTED]> wrote: Adrian Neumann <[EMAIL PROTECTED]> writes: I often wonder how many cuts you need to divide a steak in n pieces. You can obviously get n pieces with (sqrt n) cuts by cutting a grid. But I'm sure some smart mathematician thought of a (log n) way. Are you allowed to move the pieces between cuts? Later you're also going to demand to bend it in N dimensions, aren't you? If extra dimensions are needed, perhaps the LHC could be pressed into service. Any Haskell programmers working there? I'm sure we could settle many of these questions by injecting some chocolate particles into the accelerator. Who among us hasn't wondered what chocolate looks like when traveling at relativistic speeds? Best case, we produce an infinitely dense micro-black hole made of chocolate, which pretty much takes care of the whole recursive subdividing problem. Plus, when popped into your mouth, it would evaporate via the tastiest Hawking radiation imaginable. Anton ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Health effects
Throw the "no free lunch"-theorem on top of that. http://en.wikipedia.org/wiki/No_free_lunch_theorem On Wed, Oct 1, 2008 at 3:33 PM, Dominic Steinitz <[EMAIL PROTECTED]> wrote: > Adrian Neumann inf.fu-berlin.de> writes: > >> >> I often wonder how many cuts you need to divide a steak in n pieces. >> You can obviously get n pieces with (sqrt n) cuts by cutting a grid. >> But I'm sure some smart mathematician thought of a (log n) way. >> > > You might try the ham sandwich theorem > http://en.wikipedia.org/wiki/Ham_sandwich_theorem as an hors d'oeuvre. > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > -- Patience is the last resort for those unable to take action ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Health effects
Adrian Neumann inf.fu-berlin.de> writes: > > I often wonder how many cuts you need to divide a steak in n pieces. > You can obviously get n pieces with (sqrt n) cuts by cutting a grid. > But I'm sure some smart mathematician thought of a (log n) way. > You might try the ham sandwich theorem http://en.wikipedia.org/wiki/Ham_sandwich_theorem as an hors d'oeuvre. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Health effects
Are we assuming the bars to have an even distribution of mass along the whole body? On Wed, Oct 1, 2008 at 2:10 PM, Achim Schneider <[EMAIL PROTECTED]> wrote: > Jon Fairbairn <[EMAIL PROTECTED]> wrote: > >> Adrian Neumann <[EMAIL PROTECTED]> writes: >> >> > I often wonder how many cuts you need to divide a steak in n >> > pieces. You can obviously get n pieces with (sqrt n) cuts >> > by cutting a grid. But I'm sure some smart mathematician >> > thought of a (log n) way. >> >> Are you allowed to move the pieces between cuts? >> > Later you're also going to demand to bend it in N dimensions, aren't > you? > > -- > (c) this sig last receiving data processing entity. Inspect headers > for copyright history. All rights reserved. Copying, hiring, renting, > performance and/or quoting of this signature prohibited. > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > -- Patience is the last resort for those unable to take action ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Health effects
Jon Fairbairn <[EMAIL PROTECTED]> wrote: > Adrian Neumann <[EMAIL PROTECTED]> writes: > > > I often wonder how many cuts you need to divide a steak in n > > pieces. You can obviously get n pieces with (sqrt n) cuts > > by cutting a grid. But I'm sure some smart mathematician > > thought of a (log n) way. > > Are you allowed to move the pieces between cuts? > Later you're also going to demand to bend it in N dimensions, aren't you? -- (c) this sig last receiving data processing entity. Inspect headers for copyright history. All rights reserved. Copying, hiring, renting, performance and/or quoting of this signature prohibited. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Health effects
Adrian Neumann <[EMAIL PROTECTED]> writes: > I often wonder how many cuts you need to divide a steak in n > pieces. You can obviously get n pieces with (sqrt n) cuts > by cutting a grid. But I'm sure some smart mathematician > thought of a (log n) way. Are you allowed to move the pieces between cuts? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Health effects
Benjamin L.Russell <[EMAIL PROTECTED]> wrote: > Russell > Any relationship? -- (c) this sig last receiving data processing entity. Inspect headers for copyright history. All rights reserved. Copying, hiring, renting, performance and/or quoting of this signature prohibited. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Health effects
On Tue, 30 Sep 2008 19:54:17 +0200, Adrian Neumann <[EMAIL PROTECTED]> wrote: >I often wonder how many cuts you need to divide a steak in n pieces. >You can obviously get n pieces with (sqrt n) cuts by cutting a grid. >But I'm sure some smart mathematician thought of a (log n) way. Good thing that the chocolate slab was only 2 kg and of finite length. Had it been of infinite length, we would need Dedekind cuts to partition it ;) -- Benjamin L. Russell ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Health effects
Andrew Coppin wrote: > The other day, I sat down to eat a 2 Kg block of chocolate - one of > those ones that's divided into lots of little squares. I proceeded to > recursively subdivide it into smaller and smaller blocks, and then eat > the individual squares in depth-first order. It was only after getting > through 16 of the things that I stopped to notice that the whole bar > just happens to have an exact power of two squares on it. > > And it was some time after *that* when I thought to myself "...woah, > maybe do too much Haskell?" o_O > > Seriously, who recursively subdivides their food? I think I have > something wrong with me... A much more important question is: how many "break bar in two" operations did you perform? Can you do it with less? Regards, apfelmus ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe