On Mon, 2018-01-15 at 23:28 +0200, Jori Mäntysalo wrote: > On Mon, 15 Jan 2018, Victor Porton wrote: > > > I need to enumerate all labeled (that is NOT up-to-isomorphism) > posets of N > > elements. > > The algorithm is here: https://stackoverflow.com/a/48270680/856090 > > No, that paper gives "method to construct pairwise non-isomorphic > posets", > i.e. up-to-isomorphism. > > Btw, just extending poset by adding a new maximal element covering > all > possible subsets of maximal elements will give you all posets having > 1, 2, > ..., n as a linear extension. That is not enought?
Yes, you are right, that algorithm generated not all posets (not up- to-isomorphism). I have deleted the wrong answer at StackOverflow. So as for now, the best solution I have is to enumerate posets up to isomorphism and compose them with all permutations of the set of N elements. It may generate duplicates however and thus isn't very efficient. I confess that I am not ready to write this code into Sage core. I will write my own function which will use permutations to enumerate all posets of N elements, to use in my own endeavor. > -- > Jori Mäntysalo -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.