Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use sparse polynomials for generating functions #37499

Merged
merged 3 commits into from
Mar 31, 2024

Conversation

mantepse
Copy link
Collaborator

Currently, the findstat interfaces uses dense polynomials to store the generating functions for a statistic. However, some generating functions are extremely sparse, for example https://www.findstat.org/StatisticsDatabase/St000001/ has

q^292864 + q^68640 + 2*q^64064 + 2*q^48048 + 4*q^21450 + q^16016 + 4*q^15015 + 2*q^12870 + 2*q^11583 + q^8580 + 4*q^7700 + 8*q^5775 + 4*q^4455 + 4*q^4158 + 2*q^3520 + q^3080 + 4*q^2970 + q^2640 + 16*q^2310 + 2*q^2145 + 2*q^2112 + 4*q^1540 + 8*q^1320 + 4*q^1188 + 4*q^1155 + 4*q^1092 + 4*q^1017 + 4*q^990 + 2*q^825 + 16*q^768 + 2*q^660 + 8*q^567 + 2*q^552 + 8*q^525 + 4*q^471 + 2*q^462 + 8*q^450 + 3*q^448 + 4*q^432 + 8*q^384 + 2*q^309 + 4*q^300 + 6*q^288 + 2*q^282 + 4*q^252 + q^244 + 24*q^216 + 4*q^210 + 12*q^189 + 16*q^168 + 12*q^162 + 4*q^146 + 2*q^132 + 4*q^126 + 4*q^120 + 2*q^112 + 4*q^99 + 4*q^98 + 4*q^92 + 12*q^90 + 6*q^84 + q^80 + 4*q^77 + 25*q^70 + 14*q^64 + 14*q^56 + 8*q^55 + 8*q^49 + 8*q^42 + 4*q^40 + 2*q^36 + 32*q^35 + 4*q^30 + 6*q^29 + 4*q^28 + 8*q^26 + 16*q^21 + 8*q^20 + 12*q^19 + 19*q^16 + 14*q^15 + 18*q^14 + 10*q^11 + 14*q^10 + 16*q^9 + 10*q^8 + 14*q^6 + 30*q^5 + 20*q^4 + 32*q^3 + 19*q^2 + 26*q}

Storing this in a dense polynomial is not a good idea.

Copy link
Contributor

@nadialafreniere nadialafreniere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

Copy link

github-actions bot commented Mar 6, 2024

Documentation preview for this PR (built with commit e5d6f95; changes) is ready! 🎉

@vbraun vbraun merged commit 65e6d63 into sagemath:develop Mar 31, 2024
13 checks passed
@mkoeppe mkoeppe added this to the sage-10.4 milestone Mar 31, 2024
@mantepse mantepse deleted the databases/findstat branch April 13, 2024 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants