Re: [racket-users] Generating preorders

2015-09-24 Thread erich
  Von: "Jerzy Karczmarczuk" An:"Racket Users" Cc: Gesendet:Thu, 24 Sep 2015 01:07:12 +0200 Betreff:Re: [racket-users] Generating preorders A general remark... Josh constructs the list of ALL combinations and all total preorders. Erich apparently tried the same, so it is OK, but the solution

Re: [racket-users] Generating preorders

2015-09-23 Thread Jerzy Karczmarczuk
A general remark... Josh Grams solves the problem of -> Erich Rast wrote: >Someone on stackoverflow gave me a working implementation in Python 3 > >https://stackoverflow.com/questions/3269/ > >but it uses advanced features and I have no clue how to translate this >to Racket. Josh constructs

Re: [racket-users] Generating preorders

2015-09-23 Thread Erich Rast
You've just saved my day! Thanks a lot! Best, Erich On Wed, 23 Sep 2015 10:38:07 -0400 Josh Grams wrote: > On 2015-09-23 09:46AM, Erich Rast wrote: > >Someone on stackoverflow gave me a working implementation in Python 3 > > > >https://stackoverflow.com/questions/3269/ > > > >but it uses

Re: [racket-users] Generating preorders

2015-09-23 Thread Josh Grams
On 2015-09-23 09:46AM, Erich Rast wrote: >Someone on stackoverflow gave me a working implementation in Python 3 > >https://stackoverflow.com/questions/3269/ > >but it uses advanced features and I have no clue how to translate this >to Racket. Like this? #lang racket (define combinations ;

Re: [racket-users] Generating preorders

2015-09-23 Thread Erich Rast
Thanks Robby and Vincent for the advice. Yes, I should have been more precise, I need to generate all *total preorders* of a given size. The task is equivalent to generating all weak orders. I think my idea to do this on the basis of permutations is flawed and I'll start from scratch but it would

Re: [racket-users] Generating preorders

2015-09-22 Thread Robby Findler
Also: for building enumerations, check out the data/enumerate library. On Tuesday, September 22, 2015, Vincent St-Amour < stamo...@eecs.northwestern.edu> wrote: > Hi Erich, > > I haven't looked at your code in detail, but found a few potentially > relevant bits of info on Wikipedia. > > First, it

Re: [racket-users] Generating preorders

2015-09-22 Thread Vincent St-Amour
Hi Erich, I haven't looked at your code in detail, but found a few potentially relevant bits of info on Wikipedia. First, it looks like Fubini numbers actually give you the number of *total* preorders for a set of size n. Is this what you're looking for? The number of preorders is instead: https: