sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.39k stars 473 forks source link

wrong results with cycle index series of graphs #30691

Closed mantepse closed 1 year ago

mantepse commented 4 years ago

I sometimes get wrong results when computing large coefficients in the cycle index series for graphs, and then also for the isotype generating series:

sage: F = species.SimpleGraphSpecies().cycle_index_series()
sage: F.isotype_generating_series().coefficients(9)
[1, 1, 2, 4, 11, 34, 156, 1044, 1044]

Unfortunately, I cannot quite reproduce this yet.

It always happens if I interrupt the computation and then ask for the coefficients again, but sometimes it happens otherwise, too.

Component: combinatorics

Keywords: species, LazyPowerSeries

Issue created by migration from https://trac.sagemath.org/ticket/30691

fchapoton commented 3 years ago
comment:2

Another bug, maybe related

sage: e0 = species.EmptySetSpecies() 
....: e1 = species.SingletonSpecies() 
....: e2 = species.SetSpecies(2, 3)
....: nt = CombinatorialSpecies() 
....: nt.define(e1 * (e0 + nt + nt * nt + e2(nt))) 
....: ntl = nt.isotype_generating_series() 
....: ntl.compute_coefficients(10) 
....: ntl                                                                       
x + x^2 + 2*x^3 + 3*x^4 + 7*x^5 + 16*x^6 + 45*x^7 + 124*x^8 + 368*x^9 + 1095*x^10 + O(x^11)
sage: ntc = nt.cycle_index_series() 
....: ntc.compute_coefficients(10) 
....: s = SymmetricFunctions(QQ).schur() 
....: [ntc.coefficient(i).scalar(s[i]) for i in range(7)]                
[0, 1, 1, 3, 6, 17, 44]
mkoeppe commented 3 years ago
comment:3

Moving to 9.4, as 9.3 has been released.

mantepse commented 2 years ago

Changed keywords from species to species, LazyPowerSeries

mantepse commented 2 years ago
comment:8

I cannot reproduce this with the new code, so very likely, this can be closed after #34552.

fchapoton commented 1 year ago

so, shall we close this one now ?