Skip to content

issue with randomAbstractSimplicialComplex(n,m,d) #3818

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

Open
mahrud opened this issue May 14, 2025 · 7 comments
Open

issue with randomAbstractSimplicialComplex(n,m,d) #3818

mahrud opened this issue May 14, 2025 · 7 comments
Assignees

Comments

@mahrud
Copy link
Member

mahrud commented May 14, 2025

The documentation says randomAbstractSimplicialComplex(n,m,d) will:

Create the random complex $Y_d(n,m)$ which has vertex set $[n]$ and complete $(d − 1)$-skeleton, and has exactly m d-dimensional faces,

But it seems like some complexes produced this way have fewer than $m$ faces of dimension $d$:

i28 : tally apply(1000, i -> length facets randomAbstractSimplicialComplex(5,3,2))

o28 = Tally{1 => 7  }
            2 => 272
            3 => 721

(This is from Example 4.1 of the paper, which seems to have the same issue.)

Further, even among the ones that satisfy the previous criterion, unless I'm misunderstanding something, the $d-1$-skeletons don't appear to be complete:

i30 : L = apply(1000, i -> randomAbstractSimplicialComplex(5,3,2));

i31 : L = select(L, C -> 3 == length facets C);

i32 : #L

o32 = 746

i33 : tally apply(L, C -> length C#1)

o33 = Tally{6 => 109}
            7 => 437
            8 => 200

Are these bugs? Perhaps the documentation should be corrected to say the result isn't guaranteed.

(ps: this wasn't discovered by me but the person didn't want to be involved)

@n-m-g
Copy link
Contributor

n-m-g commented May 14, 2025 via email

@n-m-g
Copy link
Contributor

n-m-g commented May 14, 2025 via email

@n-m-g
Copy link
Contributor

n-m-g commented May 15, 2025

As a final comment about this for now, perhaps the best approach would be to create an option that allows for both the complete and not complete skeleton cases. I will think about adding that capability at a future time. In either case, it is good to have the more general case for now. Do let me know if there is anything else.

@n-m-g
Copy link
Contributor

n-m-g commented May 15, 2025

Oh, one other thing. I guess I could add a small sentence or two to the documentation defining what is meant by complete skeleton for the purpose of the package as well. That might have clarified the original question too. Many thanks for asking about this.

@n-m-g
Copy link
Contributor

n-m-g commented May 15, 2025

I've actually just added options to the method now to treat the two different cases (and hopefully to clarify everything). Let's see if it compiles OK.

@n-m-g
Copy link
Contributor

n-m-g commented May 19, 2025

Hi,

This new functionality has been implemented in the pull request @ #3821

Please close this "issue". Many thanks.

Best,
Nathan

@n-m-g
Copy link
Contributor

n-m-g commented May 20, 2025

As I've mentioned this "issue" as been resolved and new functionality has been added to the method. (There is no "issue" with the code.). Please close this issue thread.

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

No branches or pull requests

2 participants