pishleback / pishleback/Algebraeon

Random elements of large finite sets

Open
#185 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
82
Forks
10
PR merge metrics
No merged PRs in 30d

Description

For very big n generating random integers modulo n via Integer::structure().generate_random_elements().next().unwrap() is slow, because the current implementation creates a list of all elements and picks numbers out at random. It's done that way so it works with any FiniteSetSignature, but it is going to be slow for large sets where a small number of random elements are wanted. There should be more efficient implementations for those cases where possible.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Integer::structure().generate_random_elements() entry point and inspect how it currently creates a list of all elements before selecting values. Compare possible approaches for large finite sets while preserving support for any FiniteSetSignature; done means large sets can produce a small number of random elements more efficiently.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.