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

Basic combinatorics in OSCAR #3147

Open
joschmitt opened this issue Jan 2, 2024 · 17 comments
Open

Basic combinatorics in OSCAR #3147

joschmitt opened this issue Jan 2, 2024 · 17 comments
Labels
enhancement New feature or request

Comments

@joschmitt
Copy link
Member

joschmitt commented Jan 2, 2024

I put some ideas together how we could improve the functionality of basic combinatorics in OSCAR, see https://hackmd.io/Ef1t9wjbQwWlkrL4DQgYxQ . Please edit and comment on anything you can think of there (assuming I set the permissions correctly).

For me, the motivation is the discussion in #3021 (comment) and the subsequent discovery that we have at least three implementations of 'weak compositions of d in n parts' floating around.

See also #1732.

@joschmitt joschmitt added the enhancement New feature or request label Jan 2, 2024
@lgoettgens
Copy link
Member

Maybe @ulthiel is interested in this as well.

@lgoettgens
Copy link
Member

Personally, I would like to see most of this upstream, maybe in AbstractAlgebra, so that we don't need additional implementations of some things in AA and Hecke.

@thofma
Copy link
Collaborator

thofma commented Jan 2, 2024

I would suggest we first get something consistent here in OSCAR and afterwards start thinking about moving things around. The focus before 1.0 should be on a final API (which is independent of where the things reside).

@mjrodgers
Copy link
Collaborator

I'd be interested in helping work on this, both the basic combinatorial functions and various q-analogs.

I see there is some q-analog stuff in JuLie that hasn't been migrated to experimental, I would vote that if we bring this over, these functions are renamed to not use the term quantum. I think it is most common to just call these q-factorial, q-binomial, etc.

@joschmitt
Copy link
Member Author

I'd be interested in helping work on this, both the basic combinatorial functions and various q-analogs.

I see there is some q-analog stuff in JuLie that hasn't been migrated to experimental, I would vote that if we bring this over, these functions are renamed to not use the term quantum. I think it is most common to just call these q-factorial, q-binomial, etc.

Great! I don't know much about combinatorics, so any help by somebody who knows this stuff is very welcome.

@thofma
Copy link
Collaborator

thofma commented Jan 3, 2024

Let me also ping @lkastner: is there anyone in Berlin that has some input on the API question for combinatorics?

@jankoboehm
Copy link
Contributor

I would be interested in this. I would like to use it in particular in my class on combinatorics for computer science (which would require to have an easy to use and stable user interface and docu). Next iteration of the class is in the coming summer. Some thoughts:

First of all, combinatorics is about numbers, so we should also have functions which give you the number of the objects under consideration. Some are given by closed expressions, others through recursions, etc.

Most identities of numbers come from bijections. Those give you algorithms to enumerate the objects. I agree that we should return iterators, but for ease of use there might also be an argument to have in addition a function which just gives them all.

It would also be interesting (in particular for didactical purposes) to have functions which yield the underlying bijections (say e.g. the map between sets of Young diagramms yielding a recursion for partitions, as well as numbers of partitions).

@StevellM
Copy link
Member

StevellM commented Jan 3, 2024

Related to the original problem for hyper-complexes and related to the comment of Lars K., there something I have implemented some time ago: https://github.com/oscar-system/Oscar.jl/blob/master/experimental/SymmetricIntersections/src/elevators.jl. The name is a bit random. Eventually, it would be great if the combinatorics features could replace this experimental code. The idea is the following:

Given an (ordered) list L of positive integers, and an integer d, return an iterator on the tuples of indices for which the corresponding elements in L sum up to d. Each index can be repeated, and one could ask to have an upper (and lower?) bound on the number of time each index should be used. I implemented that to enumerate all characters of a finite group of a given degree, or all constituents of a given character.

I wrote it with the help of Lars K. who helped me for the Polymake side. At the end I guess it is related to the monomials_of_degree stuff. I am not sure how relevant it is to put it on the HackMD, I would at least let you know about this other piece of combinatorics hidden in Oscar.

@joschmitt
Copy link
Member Author

Related to the original problem for hyper-complexes and related to the comment of Lars K., there something I have implemented some time ago: https://github.com/oscar-system/Oscar.jl/blob/master/experimental/SymmetricIntersections/src/elevators.jl. The name is a bit random. Eventually, it would be great if the combinatorics features could replace this experimental code. The idea is the following:

Given an (ordered) list L of positive integers, and an integer d, return an iterator on the tuples of indices for which the corresponding elements in L sum up to d. Each index can be repeated, and one could ask to have an upper (and lower?) bound on the number of time each index should be used. I implemented that to enumerate all characters of a finite group of a given degree, or all constituents of a given character.

I wrote it with the help of Lars K. who helped me for the Polymake side. At the end I guess it is related to the monomials_of_degree stuff. I am not sure how relevant it is to put it on the HackMD, I would at least let you know about this other piece of combinatorics hidden in Oscar.

👍 I put it in the Hackmd so we don't forget about it.

@joschmitt
Copy link
Member Author

I see there is some q-analog stuff in JuLie that hasn't been migrated to experimental, I would vote that if we bring this over, these functions are renamed to not use the term quantum. I think it is most common to just call these q-factorial, q-binomial, etc.

@mjrodgers This sounds like it is related to #2183 .

@lgoettgens
Copy link
Member

This general approach should resolve #2301 as well.

@joschmitt
Copy link
Member Author

joschmitt commented Jan 8, 2024

Regarding moving the partition functionality from experimental/JuLie to src (so #2301): Does anybody know why this has only be moved to experimental in the first place? Or what needs to be done, to make it "good enough" for src? I skimmed the discussion in the original pull requests adding the functionality and I did not see anything. Just going by test coverage, documentation, etc. it looks good to me.

@fieker
Copy link
Contributor

fieker commented Jan 8, 2024 via email

@joschmitt joschmitt mentioned this issue Jan 8, 2024
12 tasks
@ulthiel
Copy link
Contributor

ulthiel commented Jan 10, 2024

For me, the motivation is the discussion in #3021 (comment) and the subsequent discovery that we have at least three implementations of 'weak compositions of d in n parts' floating around.

Just a remark concerning #3021 (comment): this is basically about compositions of an integer. I have implemented fast algorithms for this in JuLie (and an iterator as well if I remember correctly). This has not been ported to experimental/JuLie, however (no criticism, I could/should have done it myself, but...).

@fieker
Copy link
Contributor

fieker commented Nov 6, 2024

@ulthiel will be contacted, he would be the best candidate to contact

@fieker
Copy link
Contributor

fieker commented Nov 6, 2024

e.g. subsets and MSets in Hecke need to be added into the combinatorics docu..

@fieker
Copy link
Contributor

fieker commented Nov 6, 2024

@lkastner and @mjrodgers are going to deal wth this, possibly before Xmas - or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants