Skip to content

[bug] MATH grader: \binom{n}{k} / \choose extract k and never equal binomial value #489

Description

@marktech0813

Problem

Binomial coefficient answers are common on MATH/AIME. The extractor reads the lower index digit, and normalize leaves \binom intact so sympy never equates the value:

extract_last_number(r"\binom{5}{2}")  # "2"
score_text("math500", r"$\binom{5}{2}$", "2")   # 1.0  FALSE POSITIVE
score_text("math500", r"$\binom{5}{2}$", "10")  # 0.0  FALSE NEGATIVE
score_text("math500", r"\boxed{\binom{5}{2}}", "10")  # 0.0
# same class: {5 \choose 2}

Sibling of #419 (frac/sqrt operand-digit bleed).

Expected

Extract the whole \binom{n}{k} / {n \choose k} term; normalize to a sympy-friendly binomial(n,k) so gold 10 matches and bare 2 does not.

Environment

  • origin/main

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:infraCI, workflows, and repository automationbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions