Re: [sage-support] Bug in polynomial ring over quotient ring of multivariate polynomial ring?

2017-11-30 Thread Vincent Delecroix
Not really a bug but it is indeed annoying. I provided a fix for this very specific problem https://trac.sagemath.org/ticket/24308 And opened an issue for the more general problem of the fact that quotient rings do not know their characteristic https://trac.sagemath.org/ticket/24309 Vin

Re: [sage-support] Powers of polynomials in positive characteristic extremely slow

2017-11-30 Thread Vincent Delecroix
Dear Peter, The power in GF(2)[a,b][x] uses a very generic datastructure and a very generic power method, see the code at [1]. As you can see, when the characteristic is > 0 and the power > 20 a special method that explains the difference seen between f^16 and f^1024. Did you check how it go

[sage-support] Bug in polynomial ring over quotient ring of multivariate polynomial ring?

2017-11-30 Thread 'Peter Mueller' via sage-support
Is it a bug, or is there a reasonable explanation of the following? kk. = GF(2)[] k. = kk.quo(a^2+a+1) K. = k[] for n in [10..32]: print n, (T*y)^n 0 y*T^10 11 (y + 1)*T^11 12 T^12 13 y*T^13 14 (y + 1)*T^14 15 T^15 16 y*T^16 17 (y + 1)*T^17 18 T^18 19 y*T^19 20 (y + 1)*T^20 21

Re: [sage-support] Random connected poset on n elements

2017-11-30 Thread Christian Stump
> There is a code for generating posets, see attachment at > https://trac.sagemath.org/ticket/14110 , but unfortunately it has not > been > integrated to Sage. I just tested and it takes about 2,2 seconds to > generate 11-element posets (there are 46749427 of those) and 38 seconds > for 12-e

Re: [sage-support] Random connected poset on n elements

2017-11-30 Thread Jori Mäntysalo
On Thu, 30 Nov 2017, Christian Stump wrote: How big is your n? not very big, I aim for the biggest n for which I can loop through all permutations of n and compute some numbers. I expect this to be between 10 and 14.   "Almost all" finite posets are connected, so uniform distributi

Re: [sage-support] Random connected poset on n elements

2017-11-30 Thread Christian Stump
> How big is your n? > not very big, I aim for the biggest n for which I can loop through all permutations of n and compute some numbers. I expect this to be between 10 and 14. > "Almost all" finite posets are connected, so uniform distribution of all > posets would work too for bigger n.

Re: [sage-support] Random connected poset on n elements

2017-11-30 Thread Jori Mäntysalo
On Thu, 30 Nov 2017, Christian Stump wrote: Is there a way to obtain a random connected poset on n unlabelled elements in sage? How big is your n? "Almost all" finite posets are connected, so uniform distribution of all posets would work too for bigger n. -- Jori Mäntysalo

[sage-support] Re: Random connected poset on n elements

2017-11-30 Thread Christian Stump
> > 0) take a connected random graph (call graphs.RandomGNP in a loop, until > you get something connected) > 1) take a random ordering of vertices, say v1,v2,...,vn. > 2) orient each edge (vi,vj) in the direction j>i. > This last step is actually a good idea, I didn't think of this way of gett

[sage-support] Re: Random connected poset on n elements

2017-11-30 Thread Dima Pasechnik
I would have done the following: 0) take a connected random graph (call graphs.RandomGNP in a loop, until you get something connected) 1) take a random ordering of vertices, say v1,v2,...,vn. 2) orient each edge (vi,vj) in the direction j>i. While this might not be uniform on the probability spa

[sage-support] Random connected poset on n elements

2017-11-30 Thread Christian Stump
Is there a way to obtain a random connected poset on n unlabelled elements in sage? Random preferably means uniformly at random, but other randomness might be okay if it is not too far away from uniform. Generating all posets, checking for connectedness and picking is way too slow. Equivalentl