Skip to content

Main content

Random Fraction Ordering Card Set Generator

Generate rational cards with reduced forms and stable exact BigInt cross-product ordering, retaining ties without floating-point truth labels.

Loading tool…

Description

Generate rational cards with reduced forms and stable exact BigInt cross-product ordering, retaining ties without floating-point truth labels.

A generated practice exercise contains a prompt and an answer key under a specific rule set. A planted answer establishes one possible solution; only an explicit enumeration or uniqueness check establishes whether alternatives exist.

Generate rational cards with reduced forms and stable exact BigInt cross-product ordering, retaining ties without floating-point truth labels.

When to use this tool

Use this generator to create reproducible fraction ordering card set cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.

How to use the tool and how it works

  1. Supply count, maximumDenominator, minimumNumerator, maximumNumerator in the field shapes below. Set seed when you need an explicit replay.
  2. Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
  3. Read cards, order, equalAdjacent. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.

Draw signed integer numerators and positive denominators, reduce each fraction using the greatest common factor, and sort original card indexes by exact BigInt cross-products with stable input-index ties. Report equality of neighboring sorted cards.1

Delegated operations used for this result: greatest common factor. Their calculation or parsing conventions apply to the corresponding result fields.2

Input fieldMeaning and unitsAccepted input
countCountRequired. Safe integer; minimum 2; maximum 16.
maximumDenominatorMaximum DenominatorRequired. Safe integer; minimum 1; maximum 1000000.
minimumNumeratorMinimum NumeratorRequired. Safe integer.
maximumNumeratorMaximum NumeratorRequired. Safe integer.
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
cardsCardsRequired. Array of Object; no unknown keys.; minimum items 2; maximum items 16.
cards[].numeratorNumeratorRequired. Safe integer.
cards[].denominatorDenominatorRequired. Safe integer.
cards[].reducedNumeratorReduced NumeratorRequired. Safe integer.
cards[].reducedDenominatorReduced DenominatorRequired. Safe integer.
orderOrderRequired. Array of Safe integer.; minimum items 2; maximum items 16.
equalAdjacentEqual AdjacentRequired. Array of Boolean.; minimum items 1; maximum items 15.
randomnessReplay source and normalized 32-bit seed, or null seed for an advancing context source.Required. Object; no unknown keys.
randomness.seedOptional safe-integer replay seed; normalization and precedence are explained below.Required. Safe integer. or Null.
randomness.sourceSourceRequired. Text; one of "context", "seed".

An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.

json
{
  "input": {
    "count": 2,
    "maximumDenominator": 5,
    "minimumNumerator": -2,
    "maximumNumerator": 4,
    "seed": 42
  },
  "output": {
    "cards": [
      {
        "numerator": 1,
        "denominator": 4,
        "reducedNumerator": 1,
        "reducedDenominator": 4
      },
      {
        "numerator": 2,
        "denominator": 5,
        "reducedNumerator": 2,
        "reducedDenominator": 5
      }
    ],
    "order": [
      0,
      1
    ],
    "equalAdjacent": [
      false
    ],
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • Equivalent fractions and repeated cards are allowed. Exact rational comparison avoids floating-point quotient ordering, but generated numerators and denominators must satisfy the tool's safe-integer bounds.
  • A replay requires the same complete input and implementation. The stated sampling convention applies within its eligible space. A finite draw does not exhaust all possible outputs; repeats remain possible unless a distinct-selection rule is explicit.
  • The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.

Alternative or Complementary methods

For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.

References

  1. Tool behavior and example: Random Fraction Ordering Card Set Generator — tool.io

  2. Calculation or validation: number/greatest-common-factor — tool.io

Similar or alternative tools

  • Random Configurable Bingo Card Generator

    Generate a bounded integer bingo grid with explicit column ranges, column/card-wide uniqueness and an optional free cell using randomized augmenting-path matching; overlapping ranges are supported, search is bounded and cards are not uniform over all feasible layouts.

  • Random Continued Fraction Convergent Quiz Generator

    Construct finite simple continued fractions with signed integral first coefficients and positive tails, retaining exact rational convergents and one hidden prompt.