I am very new to sage and I don't know any python. I wrote the
following code but I get errors. Can some one help me please?
def urn(number):
p = list(SetPartitions(number).list())
l = len(v)
trivial = p[0]
counter = 0
rounds = 10
for i in range(0,rounds):
sp1 = p[randint(0,l)]:
sp2 = p[randint(0,l)]:
if sage.combinat.set_partition.sup(sp1, sp2) == trivial:
counter = counter + 1
probability = counter/rounds
return probability
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org