broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(weights, cap):
    if cap<=0 or any(w<0 for w in weights): return None
    ws=[min(w,cap) for w in weights]
    s=sum(ws)
    q=sum(w*w for w in ws)
    return str(Fraction(s*s//q)) if q else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([1, 2, 4], 3)), '18/7')
check('regression 2', solve(*([0, 0], 3)), None)
check('regression 3', solve(*([], 4)), None)
check('regression 4', solve(*([2, 2, 2], 9)), '3')
check('regression 5', solve(*([10, 1], 2)), '9/5')
check('regression 6', solve(*([-1, 2], 3)), None)
check('regression 7', solve(*([1, 3], 0)), None)
check('regression 8', solve(*([0, 2, 5, 1], 4)), '7/3')
check("variable effective-size imbalance",solve([N,1],N+1),str(Fraction((N+1)**2,N*N+1)))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(weights, cap):
    if cap<=0 or any(w<0 for w in weights): return None
    ws=[min(w,cap) for w in weights]
    s=sum(ws)
    q=sum(w*w for w in ws)
    return str(Fraction(round(Fraction(s*s,q)))) if q else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([1, 2, 4], 3)), '18/7')
check('regression 2', solve(*([0, 0], 3)), None)
check('regression 3', solve(*([], 4)), None)
check('regression 4', solve(*([2, 2, 2], 9)), '3')
check('regression 5', solve(*([10, 1], 2)), '9/5')
check('regression 6', solve(*([-1, 2], 3)), None)
check('regression 7', solve(*([1, 3], 0)), None)
check('regression 8', solve(*([0, 2, 5, 1], 4)), '7/3')
check("variable effective-size imbalance",solve([N,1],N+1),str(Fraction((N+1)**2,N*N+1)))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The reduction disagrees with its explicit aggregation oracle.

For nonnegative integer importance weights and positive integer cap, clip each weight to cap, then return Kish effective size (sum clipped weights)**2/sum squared clipped weights as exact Fraction string. Negative weight, invalid cap, or zero total yields None.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(weights, cap):
    if cap<=0 or any(w<0 for w in weights): return None
    ws=[min(w,cap) for w in weights]
    s=sum(ws)
    q=sum(w*w for w in ws)
    return str(Fraction(s*s,q)) if q else "0"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([1, 2, 4], 3)), '18/7')
check('regression 2', solve(*([0, 0], 3)), None)
check('regression 3', solve(*([], 4)), None)
check('regression 4', solve(*([2, 2, 2], 9)), '3')
check('regression 5', solve(*([10, 1], 2)), '9/5')
check('regression 6', solve(*([-1, 2], 3)), None)
check('regression 7', solve(*([1, 3], 0)), None)
check('regression 8', solve(*([0, 2, 5, 1], 4)), '7/3')
check("variable effective-size imbalance",solve([N,1],N+1),str(Fraction((N+1)**2,N*N+1)))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(weights, cap):
    if cap<=0 or any(w<0 for w in weights): return None
    ws=[min(w,cap) for w in weights]
    s=sum(ws)
    q=sum(w*w for w in ws)
    return str(Fraction(s*s,q)) if q else "1"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([1, 2, 4], 3)), '18/7')
check('regression 2', solve(*([0, 0], 3)), None)
check('regression 3', solve(*([], 4)), None)
check('regression 4', solve(*([2, 2, 2], 9)), '3')
check('regression 5', solve(*([10, 1], 2)), '9/5')
check('regression 6', solve(*([-1, 2], 3)), None)
check('regression 7', solve(*([1, 3], 0)), None)
check('regression 8', solve(*([0, 2, 5, 1], 4)), '7/3')
check("variable effective-size imbalance",solve([N,1],N+1),str(Fraction((N+1)**2,N*N+1)))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The reduction disagrees with its explicit aggregation oracle.

For nonnegative integer importance weights and positive integer cap, clip each weight to cap, then return Kish effective size (sum clipped weights)**2/sum squared clipped weights as exact Fraction string. Negative weight, invalid cap, or zero total yields None.

split: open-access


prompt:
The exact generalized crt result violates the stated contract at compatibility divisibility.

Input [a,m,b,n], positive moduli; return least nonnegative common residue and lcm modulus or None.

split: open-access


prompt:
The exact generalized crt result violates the stated contract at reduced congruence multiplier.

Input [a,m,b,n], positive moduli; return least nonnegative common residue and lcm modulus or None.

split: open-access


prompt:
The exact generalized crt result violates the stated contract at combined period.

Input [a,m,b,n], positive moduli; return least nonnegative common residue and lcm modulus or None.

split: open-access


prompt:
The exact generalized crt result violates the stated contract at solution reconstruction.

Input [a,m,b,n], positive moduli; return least nonnegative common residue and lcm modulus or None.

split: open-access


prompt:
The exact generalized crt result violates the stated contract at canonical residue.

Input [a,m,b,n], positive moduli; return least nonnegative common residue and lcm modulus or None.

split: open-access


prompt:
The exact linear congruence solutions result violates the stated contract at solvability.

Input [a,b,m], m>0; sorted all x in [0,m) with a*x congruent b modulo m.

split: open-access


prompt:
The exact linear congruence solutions result violates the stated contract at quotient modulus.

Input [a,b,m], m>0; sorted all x in [0,m) with a*x congruent b modulo m.

split: open-access


prompt:
The exact linear congruence solutions result violates the stated contract at reduced residue.

Input [a,b,m], m>0; sorted all x in [0,m) with a*x congruent b modulo m.

split: open-access


prompt:
The exact linear congruence solutions result violates the stated contract at coset spacing.

Input [a,b,m], m>0; sorted all x in [0,m) with a*x congruent b modulo m.

split: open-access


prompt:
The exact linear congruence solutions result violates the stated contract at coset cardinality.

Input [a,b,m], m>0; sorted all x in [0,m) with a*x congruent b modulo m.

split: open-access


prompt:
The exact bounded diophantine result violates the stated contract at first coordinate endpoint.

Input [a,b,c,L], positive a,b and nonnegative L; lexicographically ordered nonnegative solutions a*u+b*v=c with u,v<=L.

split: open-access


prompt:
The exact bounded diophantine result violates the stated contract at remaining right hand side.

Input [a,b,c,L], positive a,b and nonnegative L; lexicographically ordered nonnegative solutions a*u+b*v=c with u,v<=L.

split: open-access


prompt:
The exact bounded diophantine result violates the stated contract at divisibility filter.

Input [a,b,c,L], positive a,b and nonnegative L; lexicographically ordered nonnegative solutions a*u+b*v=c with u,v<=L.

split: open-access


prompt:
The exact bounded diophantine result violates the stated contract at second coordinate quotient.

Input [a,b,c,L], positive a,b and nonnegative L; lexicographically ordered nonnegative solutions a*u+b*v=c with u,v<=L.

split: open-access


prompt:
The exact bounded diophantine result violates the stated contract at box membership.

Input [a,b,c,L], positive a,b and nonnegative L; lexicographically ordered nonnegative solutions a*u+b*v=c with u,v<=L.

split: open-access


prompt:
The exact rational continued fraction result violates the stated contract at floor partial quotient.

Input [p,q], q>0; canonical simple continued fraction of p/q with last term>1 unless singleton. Bounds: -25<=p<=25 and 1<=q<=17.

split: open-access


prompt:
The exact rational continued fraction result violates the stated contract at euclidean remainder.

Input [p,q], q>0; canonical simple continued fraction of p/q with last term>1 unless singleton. Bounds: -25<=p<=25 and 1<=q<=17.

split: open-access


prompt:
The exact rational continued fraction result violates the stated contract at reciprocal state.

Input [p,q], q>0; canonical simple continued fraction of p/q with last term>1 unless singleton. Bounds: -25<=p<=25 and 1<=q<=17.

split: open-access


prompt:
The exact rational continued fraction result violates the stated contract at terminal unit folding.

Input [p,q], q>0; canonical simple continued fraction of p/q with last term>1 unless singleton. Bounds: -25<=p<=25 and 1<=q<=17.

split: open-access


prompt:
The exact rational continued fraction result violates the stated contract at coefficient order.

Input [p,q], q>0; canonical simple continued fraction of p/q with last term>1 unless singleton. Bounds: -25<=p<=25 and 1<=q<=17.

split: open-access


prompt:
The exact continued fraction convergents result violates the stated contract at numerator seeds.

Input nonempty coefficients with positive terms after first; return every convergent as [numerator,positive denominator].

split: open-access


prompt:
The exact continued fraction convergents result violates the stated contract at denominator seeds.

Input nonempty coefficients with positive terms after first; return every convergent as [numerator,positive denominator].

split: open-access


prompt:
The exact continued fraction convergents result violates the stated contract at numerator recurrence.

Input nonempty coefficients with positive terms after first; return every convergent as [numerator,positive denominator].

split: open-access


prompt:
The exact continued fraction convergents result violates the stated contract at denominator recurrence.

Input nonempty coefficients with positive terms after first; return every convergent as [numerator,positive denominator].

split: open-access


prompt:
The exact continued fraction convergents result violates the stated contract at lagged state transfer.

Input nonempty coefficients with positive terms after first; return every convergent as [numerator,positive denominator].

split: open-access


prompt:
The exact repeating radix fraction result violates the stated contract at cycle split.

Input [p,q,base], 0<=p<q, q>0, base2..10; return nonrepeating digit list and repeating digit list. Bounds: 2<=q<=19 and 2<=base<=8.

split: open-access


prompt:
The exact repeating radix fraction result violates the stated contract at remainder position.

Input [p,q,base], 0<=p<q, q>0, base2..10; return nonrepeating digit list and repeating digit list. Bounds: 2<=q<=19 and 2<=base<=8.

split: open-access


prompt:
The exact repeating radix fraction result violates the stated contract at radix long division scale.

Input [p,q,base], 0<=p<q, q>0, base2..10; return nonrepeating digit list and repeating digit list. Bounds: 2<=q<=19 and 2<=base<=8.

split: open-access


prompt:
The exact repeating radix fraction result violates the stated contract at quotient digit.

Input [p,q,base], 0<=p<q, q>0, base2..10; return nonrepeating digit list and repeating digit list. Bounds: 2<=q<=19 and 2<=base<=8.

split: open-access


prompt:
The exact repeating radix fraction result violates the stated contract at remainder transition.

Input [p,q,base], 0<=p<q, q>0, base2..10; return nonrepeating digit list and repeating digit list. Bounds: 2<=q<=19 and 2<=base<=8.

split: open-access


prompt:
The exact farey successor sequence result violates the stated contract at zero endpoint.

Input order n>=1; return all reduced fractions in [0,1] with denominator<=n, increasing. Bounds: 1<=n<=24.

split: open-access


prompt:
The exact farey successor sequence result violates the stated contract at neighbor quotient.

Input order n>=1; return all reduced fractions in [0,1] with denominator<=n, increasing. Bounds: 1<=n<=24.

split: open-access


prompt:
The exact farey successor sequence result violates the stated contract at neighbor recurrence.

Input order n>=1; return all reduced fractions in [0,1] with denominator<=n, increasing. Bounds: 1<=n<=24.

split: open-access


prompt:
The exact farey successor sequence result violates the stated contract at terminal equality.

Input order n>=1; return all reduced fractions in [0,1] with denominator<=n, increasing. Bounds: 1<=n<=24.

split: open-access


prompt:
The exact farey successor sequence result violates the stated contract at sequence direction.

Input order n>=1; return all reduced fractions in [0,1] with denominator<=n, increasing. Bounds: 1<=n<=24.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
    p,q=x
    out=[]
    for _ in range(100):
     if p==1 or q==1: break
     if p<q:
      out.append('L')
      q=q-p
     else:
      out.append('R')
      p=p-q
    return ''.join(out)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([1, 2], 'L'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 3], 'LL'), ([1, 4], 'LLL'), ([1, 5], 'LLLL'), ([1, 6], 'LLLLL'), ([1, 7], 'LLLLLL')], [([1, 3], 'LL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 18], 'LLLLLLLLLLLLLLLLL'), ([1, 19], 'LLLLLLLLLLLLLLLLLL'), ([1, 20], 'LLLLLLLLLLLLLLLLLLL'), ([1, 21], 'LLLLLLLLLLLLLLLLLLLL'), ([1, 22], 'LLLLLLLLLLLLLLLLLLLLL')], [([1, 4], 'LLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([2, 21], 'LLLLLLLLLLR'), ([2, 23], 'LLLLLLLLLLLR'), ([3, 1], 'RR'), ([3, 2], 'RL'), ([3, 4], 'LRR')], [([1, 5], 'LLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([3, 23], 'LLLLLLLRL'), ([4, 1], 'RRR'), ([4, 3], 'RLL'), ([4, 5], 'LRRR'), ([4, 7], 'LRLL')], [([1, 6], 'LLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([5, 6], 'LRRRR'), ([5, 7], 'LRRL'), ([5, 8], 'LRLR'), ([5, 9], 'LRLLL'), ([5, 11], 'LLRRRR')]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("explicit oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
    p,q=x
    out=[]
    for _ in range(100):
     if p==1 and q==1 and len(out)>0: break
     if p<q:
      out.append('L')
      q=q-p
     else:
      out.append('R')
      p=p-q
    return ''.join(out)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([1, 2], 'L'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 3], 'LL'), ([1, 4], 'LLL'), ([1, 5], 'LLLL'), ([1, 6], 'LLLLL'), ([1, 7], 'LLLLLL')], [([1, 3], 'LL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 18], 'LLLLLLLLLLLLLLLLL'), ([1, 19], 'LLLLLLLLLLLLLLLLLL'), ([1, 20], 'LLLLLLLLLLLLLLLLLLL'), ([1, 21], 'LLLLLLLLLLLLLLLLLLLL'), ([1, 22], 'LLLLLLLLLLLLLLLLLLLLL')], [([1, 4], 'LLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([2, 21], 'LLLLLLLLLLR'), ([2, 23], 'LLLLLLLLLLLR'), ([3, 1], 'RR'), ([3, 2], 'RL'), ([3, 4], 'LRR')], [([1, 5], 'LLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([3, 23], 'LLLLLLLRL'), ([4, 1], 'RRR'), ([4, 3], 'RLL'), ([4, 5], 'LRRR'), ([4, 7], 'LRLL')], [([1, 6], 'LLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([5, 6], 'LRRRR'), ([5, 7], 'LRRL'), ([5, 8], 'LRLR'), ([5, 9], 'LRLLL'), ([5, 11], 'LLRRRR')]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("explicit oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The exact stern brocot path result violates the stated contract at root termination.

Input reduced positive [p,q]; return run-expanded L/R path from 1/1. Bounds: 1<=p,q<=24.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
    p,q=x
    out=[]
    for _ in range(100):
     if p==q: break
     if p<q:
      out.append('R')
      q=q-p
     else:
      out.append('R')
      p=p-q
    return ''.join(out)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([1, 2], 'L'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 3], 'LL'), ([1, 4], 'LLL'), ([1, 5], 'LLLL'), ([1, 6], 'LLLLL'), ([1, 7], 'LLLLLL')], [([1, 3], 'LL'), ([1, 5], 'LLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 18], 'LLLLLLLLLLLLLLLLL'), ([1, 19], 'LLLLLLLLLLLLLLLLLL'), ([1, 20], 'LLLLLLLLLLLLLLLLLLL'), ([1, 21], 'LLLLLLLLLLLLLLLLLLLL')], [([1, 4], 'LLL'), ([1, 8], 'LLLLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([2, 21], 'LLLLLLLLLLR'), ([2, 23], 'LLLLLLLLLLLR'), ([3, 1], 'RR'), ([3, 2], 'RL')], [([1, 5], 'LLLL'), ([1, 11], 'LLLLLLLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([3, 23], 'LLLLLLLRL'), ([4, 1], 'RRR'), ([4, 3], 'RLL'), ([4, 5], 'LRRR')], [([1, 6], 'LLLLL'), ([1, 14], 'LLLLLLLLLLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([5, 6], 'LRRRR'), ([5, 7], 'LRRL'), ([5, 8], 'LRLR'), ([5, 9], 'LRLLL')]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("explicit oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
    p,q=x
    out=[]
    for _ in range(100):
     if p==q: break
     if p<q:
      out.append('')
      q=q-p
     else:
      out.append('R')
      p=p-q
    return ''.join(out)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([1, 2], 'L'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 3], 'LL'), ([1, 4], 'LLL'), ([1, 5], 'LLLL'), ([1, 6], 'LLLLL'), ([1, 7], 'LLLLLL')], [([1, 3], 'LL'), ([1, 5], 'LLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 18], 'LLLLLLLLLLLLLLLLL'), ([1, 19], 'LLLLLLLLLLLLLLLLLL'), ([1, 20], 'LLLLLLLLLLLLLLLLLLL'), ([1, 21], 'LLLLLLLLLLLLLLLLLLLL')], [([1, 4], 'LLL'), ([1, 8], 'LLLLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([2, 21], 'LLLLLLLLLLR'), ([2, 23], 'LLLLLLLLLLLR'), ([3, 1], 'RR'), ([3, 2], 'RL')], [([1, 5], 'LLLL'), ([1, 11], 'LLLLLLLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([3, 23], 'LLLLLLLRL'), ([4, 1], 'RRR'), ([4, 3], 'RLL'), ([4, 5], 'LRRR')], [([1, 6], 'LLLLL'), ([1, 14], 'LLLLLLLLLLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([5, 6], 'LRRRR'), ([5, 7], 'LRRL'), ([5, 8], 'LRLR'), ([5, 9], 'LRLLL')]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("explicit oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The exact stern brocot path result violates the stated contract at left edge label.

Input reduced positive [p,q]; return run-expanded L/R path from 1/1. Bounds: 1<=p,q<=24.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
    p,q=x
    out=[]
    for _ in range(100):
     if p==q: break
     if p<q:
      out.append('L')
      q=q%p
     else:
      out.append('R')
      p=p-q
    return ''.join(out)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([1, 2], 'L'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 3], 'LL'), ([1, 4], 'LLL'), ([1, 5], 'LLLL'), ([1, 6], 'LLLLL'), ([1, 7], 'LLLLLL')], [([1, 3], 'LL'), ([1, 5], 'LLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 18], 'LLLLLLLLLLLLLLLLL'), ([1, 19], 'LLLLLLLLLLLLLLLLLL'), ([1, 20], 'LLLLLLLLLLLLLLLLLLL'), ([1, 21], 'LLLLLLLLLLLLLLLLLLLL')], [([1, 4], 'LLL'), ([1, 8], 'LLLLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([2, 21], 'LLLLLLLLLLR'), ([2, 23], 'LLLLLLLLLLLR'), ([3, 1], 'RR'), ([3, 2], 'RL')], [([1, 5], 'LLLL'), ([1, 11], 'LLLLLLLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([3, 23], 'LLLLLLLRL'), ([4, 1], 'RRR'), ([4, 3], 'RLL'), ([4, 5], 'LRRR')], [([1, 6], 'LLLLL'), ([1, 14], 'LLLLLLLLLLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([5, 6], 'LRRRR'), ([5, 7], 'LRRL'), ([5, 8], 'LRLR'), ([5, 9], 'LRLLL')]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("explicit oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
    p,q=x
    out=[]
    for _ in range(100):
     if p==q: break
     if p<q:
      out.append('L')
      q=q-p-1
     else:
      out.append('R')
      p=p-q
    return ''.join(out)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([1, 2], 'L'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 3], 'LL'), ([1, 4], 'LLL'), ([1, 5], 'LLLL'), ([1, 6], 'LLLLL'), ([1, 7], 'LLLLLL')], [([1, 3], 'LL'), ([1, 5], 'LLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 18], 'LLLLLLLLLLLLLLLLL'), ([1, 19], 'LLLLLLLLLLLLLLLLLL'), ([1, 20], 'LLLLLLLLLLLLLLLLLLL'), ([1, 21], 'LLLLLLLLLLLLLLLLLLLL')], [([1, 4], 'LLL'), ([1, 8], 'LLLLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([2, 21], 'LLLLLLLLLLR'), ([2, 23], 'LLLLLLLLLLLR'), ([3, 1], 'RR'), ([3, 2], 'RL')], [([1, 5], 'LLLL'), ([1, 11], 'LLLLLLLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([3, 23], 'LLLLLLLRL'), ([4, 1], 'RRR'), ([4, 3], 'RLL'), ([4, 5], 'LRRR')], [([1, 6], 'LLLLL'), ([1, 14], 'LLLLLLLLLLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([5, 6], 'LRRRR'), ([5, 7], 'LRRL'), ([5, 8], 'LRLR'), ([5, 9], 'LRLLL')]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("explicit oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The exact stern brocot path result violates the stated contract at left residual.

Input reduced positive [p,q]; return run-expanded L/R path from 1/1. Bounds: 1<=p,q<=24.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
    p,q=x
    out=[]
    for _ in range(100):
     if p==q: break
     if p<q:
      out.append('L')
      q=q-p
     else:
      out.append('L')
      p=p-q
    return ''.join(out)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([2, 1], 'R'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 2], 'L'), ([1, 3], 'LL'), ([1, 4], 'LLL'), ([1, 5], 'LLLL'), ([1, 6], 'LLLLL')], [([2, 3], 'LR'), ([2, 7], 'LLLR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 18], 'LLLLLLLLLLLLLLLLL'), ([1, 19], 'LLLLLLLLLLLLLLLLLL'), ([1, 20], 'LLLLLLLLLLLLLLLLLLL'), ([1, 21], 'LLLLLLLLLLLLLLLLLLLL')], [([2, 5], 'LLR'), ([2, 13], 'LLLLLLR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([2, 21], 'LLLLLLLLLLR'), ([2, 23], 'LLLLLLLLLLLR'), ([3, 1], 'RR'), ([3, 2], 'RL')], [([2, 7], 'LLLR'), ([2, 19], 'LLLLLLLLLR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([3, 23], 'LLLLLLLRL'), ([4, 1], 'RRR'), ([4, 3], 'RLL'), ([4, 5], 'LRRR')], [([2, 9], 'LLLLR'), ([3, 1], 'RR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([5, 6], 'LRRRR'), ([5, 7], 'LRRL'), ([5, 8], 'LRLR'), ([5, 9], 'LRLLL')]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("explicit oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
    p,q=x
    out=[]
    for _ in range(100):
     if p==q: break
     if p<q:
      out.append('L')
      q=q-p
     else:
      out.append('')
      p=p-q
    return ''.join(out)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([2, 1], 'R'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 2], 'L'), ([1, 3], 'LL'), ([1, 4], 'LLL'), ([1, 5], 'LLLL'), ([1, 6], 'LLLLL')], [([2, 3], 'LR'), ([2, 7], 'LLLR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 18], 'LLLLLLLLLLLLLLLLL'), ([1, 19], 'LLLLLLLLLLLLLLLLLL'), ([1, 20], 'LLLLLLLLLLLLLLLLLLL'), ([1, 21], 'LLLLLLLLLLLLLLLLLLLL')], [([2, 5], 'LLR'), ([2, 13], 'LLLLLLR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([2, 21], 'LLLLLLLLLLR'), ([2, 23], 'LLLLLLLLLLLR'), ([3, 1], 'RR'), ([3, 2], 'RL')], [([2, 7], 'LLLR'), ([2, 19], 'LLLLLLLLLR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([3, 23], 'LLLLLLLRL'), ([4, 1], 'RRR'), ([4, 3], 'RLL'), ([4, 5], 'LRRR')], [([2, 9], 'LLLLR'), ([3, 1], 'RR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([5, 6], 'LRRRR'), ([5, 7], 'LRRL'), ([5, 8], 'LRLR'), ([5, 9], 'LRLLL')]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("explicit oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The exact stern brocot path result violates the stated contract at right edge label.

Input reduced positive [p,q]; return run-expanded L/R path from 1/1. Bounds: 1<=p,q<=24.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
    p,q=x
    out=[]
    for _ in range(100):
     if p==q: break
     if p<q:
      out.append('L')
      q=q-p
     else:
      out.append('R')
      p=p%q
    return ''.join(out)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([2, 1], 'R'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 2], 'L'), ([1, 3], 'LL'), ([1, 4], 'LLL'), ([1, 5], 'LLLL'), ([1, 6], 'LLLLL')], [([2, 3], 'LR'), ([2, 7], 'LLLR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 18], 'LLLLLLLLLLLLLLLLL'), ([1, 19], 'LLLLLLLLLLLLLLLLLL'), ([1, 20], 'LLLLLLLLLLLLLLLLLLL'), ([1, 21], 'LLLLLLLLLLLLLLLLLLLL')], [([2, 5], 'LLR'), ([2, 13], 'LLLLLLR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([2, 21], 'LLLLLLLLLLR'), ([2, 23], 'LLLLLLLLLLLR'), ([3, 1], 'RR'), ([3, 2], 'RL')], [([2, 7], 'LLLR'), ([2, 19], 'LLLLLLLLLR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([3, 23], 'LLLLLLLRL'), ([4, 1], 'RRR'), ([4, 3], 'RLL'), ([4, 5], 'LRRR')], [([2, 9], 'LLLLR'), ([3, 1], 'RR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([5, 6], 'LRRRR'), ([5, 7], 'LRRL'), ([5, 8], 'LRLR'), ([5, 9], 'LRLLL')]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("explicit oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
    p,q=x
    out=[]
    for _ in range(100):
     if p==q: break
     if p<q:
      out.append('L')
      q=q-p
     else:
      out.append('R')
      p=p-q-1
    return ''.join(out)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([2, 1], 'R'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 2], 'L'), ([1, 3], 'LL'), ([1, 4], 'LLL'), ([1, 5], 'LLLL'), ([1, 6], 'LLLLL')], [([2, 3], 'LR'), ([2, 7], 'LLLR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 18], 'LLLLLLLLLLLLLLLLL'), ([1, 19], 'LLLLLLLLLLLLLLLLLL'), ([1, 20], 'LLLLLLLLLLLLLLLLLLL'), ([1, 21], 'LLLLLLLLLLLLLLLLLLLL')], [([2, 5], 'LLR'), ([2, 13], 'LLLLLLR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([2, 21], 'LLLLLLLLLLR'), ([2, 23], 'LLLLLLLLLLLR'), ([3, 1], 'RR'), ([3, 2], 'RL')], [([2, 7], 'LLLR'), ([2, 19], 'LLLLLLLLLR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([3, 23], 'LLLLLLLRL'), ([4, 1], 'RRR'), ([4, 3], 'RLL'), ([4, 5], 'LRRR')], [([2, 9], 'LLLLR'), ([3, 1], 'RR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([5, 6], 'LRRRR'), ([5, 7], 'LRRL'), ([5, 8], 'LRLR'), ([5, 9], 'LRLLL')]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("explicit oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The exact stern brocot path result violates the stated contract at right residual.

Input reduced positive [p,q]; return run-expanded L/R path from 1/1. Bounds: 1<=p,q<=24.

split: open-access


prompt:
The exact calkin wilf successors result violates the stated contract at successor sequence seed.

Input positive count k<=50; return first k reduced positive rationals in Calkin-Wilf breadth-first order.

split: open-access


prompt:
The exact calkin wilf successors result violates the stated contract at successor output count.

Input positive count k<=50; return first k reduced positive rationals in Calkin-Wilf breadth-first order.

split: open-access


prompt:
The exact calkin wilf successors result violates the stated contract at integer part at breadth boundary.

Input positive count k<=50; return first k reduced positive rationals in Calkin-Wilf breadth-first order.

split: open-access


prompt:
The exact calkin wilf successors result violates the stated contract at next rational denominator.

Input positive count k<=50; return first k reduced positive rationals in Calkin-Wilf breadth-first order.

split: open-access


prompt:
The exact calkin wilf successors result violates the stated contract at successor coordinate transfer.

Input positive count k<=50; return first k reduced positive rationals in Calkin-Wilf breadth-first order.

split: open-access


prompt:
The exact rational mediant walk result violates the stated contract at lower infinite interval seed.

Input path over L/R; return Stern-Brocot interval bounds and its mediant.

split: open-access


prompt:
The exact rational mediant walk result violates the stated contract at upper infinite interval seed.

Input path over L/R; return Stern-Brocot interval bounds and its mediant.

split: open-access


prompt:
The exact rational mediant walk result violates the stated contract at mediant construction.

Input path over L/R; return Stern-Brocot interval bounds and its mediant.

split: open-access


prompt:
The exact rational mediant walk result violates the stated contract at left bound replacement.

Input path over L/R; return Stern-Brocot interval bounds and its mediant.

split: open-access


prompt:
The exact rational mediant walk result violates the stated contract at right bound replacement.

Input path over L/R; return Stern-Brocot interval bounds and its mediant.

split: open-access


prompt:
The exact polynomial long division result violates the stated contract at quotient degree displacement.

Input [A,B] integer ascending coefficients, B nonzero canonical; return rational quotient/remainder coefficient pairs; zero polynomial is []. Bounds: len(A)<=4 and 1<=len(B)<=4.

split: open-access


prompt:
The exact polynomial long division result violates the stated contract at leading coefficient cancellation.

Input [A,B] integer ascending coefficients, B nonzero canonical; return rational quotient/remainder coefficient pairs; zero polynomial is []. Bounds: len(A)<=4 and 1<=len(B)<=4.

split: open-access


prompt:
The exact polynomial long division result violates the stated contract at quotient coefficient placement.

Input [A,B] integer ascending coefficients, B nonzero canonical; return rational quotient/remainder coefficient pairs; zero polynomial is []. Bounds: len(A)<=4 and 1<=len(B)<=4.

split: open-access


prompt:
The exact polynomial long division result violates the stated contract at divisor subtraction.

Input [A,B] integer ascending coefficients, B nonzero canonical; return rational quotient/remainder coefficient pairs; zero polynomial is []. Bounds: len(A)<=4 and 1<=len(B)<=4.

split: open-access


prompt:
The exact polynomial long division result violates the stated contract at remainder degree trimming.

Input [A,B] integer ascending coefficients, B nonzero canonical; return rational quotient/remainder coefficient pairs; zero polynomial is []. Bounds: len(A)<=4 and 1<=len(B)<=4.

split: open-access


prompt:
The exact polynomial composition result violates the stated contract at horner seed.

Input [A,B] nonempty ascending integer polynomials; return canonical ascending coefficients A(B(t)), zero represented [0].

split: open-access


prompt:
The exact polynomial composition result violates the stated contract at horner traversal.

Input [A,B] nonempty ascending integer polynomials; return canonical ascending coefficients A(B(t)), zero represented [0].

split: open-access


prompt:
The exact polynomial composition result violates the stated contract at product allocation.

Input [A,B] nonempty ascending integer polynomials; return canonical ascending coefficients A(B(t)), zero represented [0].

split: open-access


prompt:
The exact polynomial composition result violates the stated contract at constant injection.

Input [A,B] nonempty ascending integer polynomials; return canonical ascending coefficients A(B(t)), zero represented [0].

split: open-access


prompt:
The exact polynomial composition result violates the stated contract at canonical degree.

Input [A,B] nonempty ascending integer polynomials; return canonical ascending coefficients A(B(t)), zero represented [0].

split: open-access


prompt:
The exact polynomial taylor shift result violates the stated contract at source degree iteration.

Input [A,h] ascending integer polynomial, integer h; return coefficients of A(t+h), preserving array length.

split: open-access


prompt:
The exact polynomial taylor shift result violates the stated contract at target degree triangle.

Input [A,h] ascending integer polynomial, integer h; return coefficients of A(t+h), preserving array length.

split: open-access


prompt:
The exact polynomial taylor shift result violates the stated contract at coefficient source.

Input [A,h] ascending integer polynomial, integer h; return coefficients of A(t+h), preserving array length.

split: open-access


prompt:
The exact polynomial taylor shift result violates the stated contract at binomial translation weight.

Input [A,h] ascending integer polynomial, integer h; return coefficients of A(t+h), preserving array length.

split: open-access


prompt:
The exact polynomial taylor shift result violates the stated contract at translation exponent.

Input [A,h] ascending integer polynomial, integer h; return coefficients of A(t+h), preserving array length.

split: open-access


prompt:
The exact lagrange interpolation value result violates the stated contract at basis ordinate scale.

Input [points,t] distinct integer abscissae and integer ordinates; exact rational interpolation value [p,q].

split: open-access


prompt:
The exact lagrange interpolation value result violates the stated contract at self node exclusion.

Input [points,t] distinct integer abscissae and integer ordinates; exact rational interpolation value [p,q].

split: open-access


prompt:
The exact lagrange interpolation value result violates the stated contract at basis denominator orientation.

Input [points,t] distinct integer abscissae and integer ordinates; exact rational interpolation value [p,q].

split: open-access


prompt:
The exact lagrange interpolation value result violates the stated contract at evaluation numerator.

Input [points,t] distinct integer abscissae and integer ordinates; exact rational interpolation value [p,q].

split: open-access


prompt:
The exact lagrange interpolation value result violates the stated contract at basis accumulation.

Input [points,t] distinct integer abscissae and integer ordinates; exact rational interpolation value [p,q].

split: open-access


prompt:
The exact newton divided difference table result violates the stated contract at difference order bounds.

Input distinct integer nodes and integer values [nodes,values]; return Newton coefficients [p,q] in original node order.

split: open-access


prompt:
The exact newton divided difference table result violates the stated contract at in place update direction.

Input distinct integer nodes and integer values [nodes,values]; return Newton coefficients [p,q] in original node order.

split: open-access


prompt:
The exact newton divided difference table result violates the stated contract at node span denominator.

Input distinct integer nodes and integer values [nodes,values]; return Newton coefficients [p,q] in original node order.

split: open-access


prompt:
The exact newton divided difference table result violates the stated contract at difference numerator.

Input distinct integer nodes and integer values [nodes,values]; return Newton coefficients [p,q] in original node order.

split: open-access


prompt:
The exact newton divided difference table result violates the stated contract at newton coefficient extraction.

Input distinct integer nodes and integer values [nodes,values]; return Newton coefficients [p,q] in original node order.

split: open-access


prompt:
The exact forward difference newton basis result violates the stated contract at table depth.

Input nonempty integer sequence f(0)..f(n); return binomial-basis coefficients Delta^k f(0).

split: open-access


prompt:
The exact forward difference newton basis result violates the stated contract at left edge extraction.

Input nonempty integer sequence f(0)..f(n); return binomial-basis coefficients Delta^k f(0).

split: open-access


prompt:
The exact forward difference newton basis result violates the stated contract at difference orientation.

Input nonempty integer sequence f(0)..f(n); return binomial-basis coefficients Delta^k f(0).

split: open-access


prompt:
The exact forward difference newton basis result violates the stated contract at adjacent pair span.

Input nonempty integer sequence f(0)..f(n); return binomial-basis coefficients Delta^k f(0).

split: open-access


prompt:
The exact forward difference newton basis result violates the stated contract at basis coefficient order.

Input nonempty integer sequence f(0)..f(n); return binomial-basis coefficients Delta^k f(0).

split: open-access


prompt:
The exact bernstein to power basis result violates the stated contract at control point coverage.

Input Bernstein coefficients b0..bn as integers; return exact ascending power coefficients of sum bi*choose(n,i)*t^i*(1-t)^(n-i).

split: open-access


prompt:
The exact bernstein to power basis result violates the stated contract at complement expansion degree.

Input Bernstein coefficients b0..bn as integers; return exact ascending power coefficients of sum bi*choose(n,i)*t^i*(1-t)^(n-i).

split: open-access


prompt:
The exact bernstein to power basis result violates the stated contract at result degree mapping.

Input Bernstein coefficients b0..bn as integers; return exact ascending power coefficients of sum bi*choose(n,i)*t^i*(1-t)^(n-i).

split: open-access


prompt:
The exact bernstein to power basis result violates the stated contract at bernstein normalization.

Input Bernstein coefficients b0..bn as integers; return exact ascending power coefficients of sum bi*choose(n,i)*t^i*(1-t)^(n-i).

split: open-access


prompt:
The exact bernstein to power basis result violates the stated contract at complement signed coefficient.

Input Bernstein coefficients b0..bn as integers; return exact ascending power coefficients of sum bi*choose(n,i)*t^i*(1-t)^(n-i).

split: open-access


prompt:
The exact rational generating recurrence result violates the stated contract at requested coefficient length.

Input [P,Q,k] integer ascending arrays with Q[0]=1 and k>=0; return first k coefficients of formal series P/Q.

split: open-access


prompt:
The exact rational generating recurrence result violates the stated contract at numerator coefficient alignment.

Input [P,Q,k] integer ascending arrays with Q[0]=1 and k>=0; return first k coefficients of formal series P/Q.

split: open-access


prompt:
The exact rational generating recurrence result violates the stated contract at denominator recurrence reach.

Input [P,Q,k] integer ascending arrays with Q[0]=1 and k>=0; return first k coefficients of formal series P/Q.

split: open-access


prompt:
The exact rational generating recurrence result violates the stated contract at recurrence subtraction.

Input [P,Q,k] integer ascending arrays with Q[0]=1 and k>=0; return first k coefficients of formal series P/Q.

split: open-access


prompt:
The exact rational generating recurrence result violates the stated contract at coefficient retention.

Input [P,Q,k] integer ascending arrays with Q[0]=1 and k>=0; return first k coefficients of formal series P/Q.

split: open-access


prompt:
The exact integer polynomial pseudodivision result violates the stated contract at pseudo quotient displacement.

Input [A,B] integer ascending canonical nonzero polynomials degA>=degB; returns [scale, quotient, remainder] with scale*A=B*quotient+remainder, scale=lc(B)^(degA-degB+1).

split: open-access


prompt:
The exact integer polynomial pseudodivision result violates the stated contract at leading cancellation coefficient.

Input [A,B] integer ascending canonical nonzero polynomials degA>=degB; returns [scale, quotient, remainder] with scale*A=B*quotient+remainder, scale=lc(B)^(degA-degB+1).

split: open-access


prompt:
The exact integer polynomial pseudodivision result violates the stated contract at pseudo quotient insertion.

Input [A,B] integer ascending canonical nonzero polynomials degA>=degB; returns [scale, quotient, remainder] with scale*A=B*quotient+remainder, scale=lc(B)^(degA-degB+1).

split: open-access


prompt:
The exact integer polynomial pseudodivision result violates the stated contract at scaled remainder cancellation.

Input [A,B] integer ascending canonical nonzero polynomials degA>=degB; returns [scale, quotient, remainder] with scale*A=B*quotient+remainder, scale=lc(B)^(degA-degB+1).

split: open-access


prompt:
The exact integer polynomial pseudodivision result violates the stated contract at denominator clearing factor.

Input [A,B] integer ascending canonical nonzero polynomials degA>=degB; returns [scale, quotient, remainder] with scale*A=B*quotient+remainder, scale=lc(B)^(degA-degB+1).

split: open-access


prompt:
The exact polynomial squarefree characteristic p result violates the stated contract at formal derivative in finite characteristic.

Input [coefficients,p] prime p; return whether nonconstant polynomial over Fp has gcd(f,fprime)=1; constants false. Bounds: degree at most three and prime p<=7.

split: open-access


prompt:
The exact polynomial squarefree characteristic p result violates the stated contract at field leading cancellation.

Input [coefficients,p] prime p; return whether nonconstant polynomial over Fp has gcd(f,fprime)=1; constants false. Bounds: degree at most three and prime p<=7.

split: open-access


prompt:
The exact polynomial squarefree characteristic p result violates the stated contract at field subtraction reduction.

Input [coefficients,p] prime p; return whether nonconstant polynomial over Fp has gcd(f,fprime)=1; constants false. Bounds: degree at most three and prime p<=7.

split: open-access


prompt:
The exact polynomial squarefree characteristic p result violates the stated contract at euclidean divisor transfer.

Input [coefficients,p] prime p; return whether nonconstant polynomial over Fp has gcd(f,fprime)=1; constants false. Bounds: degree at most three and prime p<=7.

split: open-access


prompt:
The exact polynomial squarefree characteristic p result violates the stated contract at unit gcd criterion.

Input [coefficients,p] prime p; return whether nonconstant polynomial over Fp has gcd(f,fprime)=1; constants false. Bounds: degree at most three and prime p<=7.

split: open-access


prompt:
The exact jacobi symbol result violates the stated contract at initial residue.

Input [a,n], positive odd n; return Jacobi symbol in {-1,0,1}. Bounds: |a|<=100 and odd n<=99.

split: open-access


prompt:
The exact jacobi symbol result violates the stated contract at supplementary two law.

Input [a,n], positive odd n; return Jacobi symbol in {-1,0,1}. Bounds: |a|<=100 and odd n<=99.

split: open-access


prompt:
The exact jacobi symbol result violates the stated contract at quadratic reciprocity.

Input [a,n], positive odd n; return Jacobi symbol in {-1,0,1}. Bounds: |a|<=100 and odd n<=99.

split: open-access


prompt:
The exact jacobi symbol result violates the stated contract at reciprocity remainder transfer.

Input [a,n], positive odd n; return Jacobi symbol in {-1,0,1}. Bounds: |a|<=100 and odd n<=99.

split: open-access


prompt:
The exact jacobi symbol result violates the stated contract at common factor terminal.

Input [a,n], positive odd n; return Jacobi symbol in {-1,0,1}. Bounds: |a|<=100 and odd n<=99.

split: open-access


prompt:
The exact extended euclidean certificate result violates the stated contract at first Bezout seed.

Input [a,b], integers not both zero; return [g,u,v] with g>=0 and a*u+b*v=g using standard Euclidean quotient recurrence. Bounds: |a|,|b|<=1000000.

split: open-access


prompt:
The exact extended euclidean certificate result violates the stated contract at second Bezout seed.

Input [a,b], integers not both zero; return [g,u,v] with g>=0 and a*u+b*v=g using standard Euclidean quotient recurrence. Bounds: |a|,|b|<=1000000.

split: open-access


prompt:
The exact extended euclidean certificate result violates the stated contract at first coefficient recurrence.

Input [a,b], integers not both zero; return [g,u,v] with g>=0 and a*u+b*v=g using standard Euclidean quotient recurrence. Bounds: |a|,|b|<=1000000.

split: open-access


prompt:
The exact extended euclidean certificate result violates the stated contract at second coefficient recurrence.

Input [a,b], integers not both zero; return [g,u,v] with g>=0 and a*u+b*v=g using standard Euclidean quotient recurrence. Bounds: |a|,|b|<=1000000.

split: open-access


prompt:
The exact extended euclidean certificate result violates the stated contract at gcd sign normalization.

Input [a,b], integers not both zero; return [g,u,v] with g>=0 and a*u+b*v=g using standard Euclidean quotient recurrence. Bounds: |a|,|b|<=1000000.

split: open-access


prompt:
The exact quadratic surd period result violates the stated contract at surd numerator recurrence.

Input positive nonsquare D; return [floor(sqrt(D)), repeating continued fraction coefficients]. Bounds: 2<=D<=99.

split: open-access


prompt:
The exact quadratic surd period result violates the stated contract at surd denominator numerator.

Input positive nonsquare D; return [floor(sqrt(D)), repeating continued fraction coefficients]. Bounds: 2<=D<=99.

split: open-access


prompt:
The exact quadratic surd period result violates the stated contract at partial quotient computation.

Input positive nonsquare D; return [floor(sqrt(D)), repeating continued fraction coefficients]. Bounds: 2<=D<=99.

split: open-access


prompt:
The exact quadratic surd period result violates the stated contract at period closing criterion.

Input positive nonsquare D; return [floor(sqrt(D)), repeating continued fraction coefficients]. Bounds: 2<=D<=99.

split: open-access


prompt:
The exact quadratic surd period result violates the stated contract at period endpoint retention.

Input positive nonsquare D; return [floor(sqrt(D)), repeating continued fraction coefficients]. Bounds: 2<=D<=99.

split: open-access


prompt:
The exact pell positive solutions result violates the stated contract at unit solution seed.

Input [D,u,v,k], known positive fundamental solution u^2-D*v^2=1, k>=0; return first k positive solutions.

split: open-access


prompt:
The exact pell positive solutions result violates the stated contract at requested solution count.

Input [D,u,v,k], known positive fundamental solution u^2-D*v^2=1, k>=0; return first k positive solutions.

split: open-access


prompt:
The exact pell positive solutions result violates the stated contract at quadratic unit real product.

Input [D,u,v,k], known positive fundamental solution u^2-D*v^2=1, k>=0; return first k positive solutions.

split: open-access


prompt:
The exact pell positive solutions result violates the stated contract at quadratic unit irrational product.

Input [D,u,v,k], known positive fundamental solution u^2-D*v^2=1, k>=0; return first k positive solutions.

split: open-access


prompt:
The exact pell positive solutions result violates the stated contract at coordinate pair representation.

Input [D,u,v,k], known positive fundamental solution u^2-D*v^2=1, k>=0; return first k positive solutions.

split: open-access


prompt:
The exact primitive pythagorean triples result violates the stated contract at coprimality of parameters.

Input bound L>=1; return lexicographically sorted [a,b,c] with 0<a<b<c<=L, coprime a,b,c and a^2+b^2=c^2.

split: open-access


prompt:
The exact primitive pythagorean triples result violates the stated contract at opposite parameter parity.

Input bound L>=1; return lexicographically sorted [a,b,c] with 0<a<b<c<=L, coprime a,b,c and a^2+b^2=c^2.

split: open-access


prompt:
The exact primitive pythagorean triples result violates the stated contract at Euclid hypotenuse construction.

Input bound L>=1; return lexicographically sorted [a,b,c] with 0<a<b<c<=L, coprime a,b,c and a^2+b^2=c^2.

split: open-access


prompt:
The exact primitive pythagorean triples result violates the stated contract at hypotenuse bound.

Input bound L>=1; return lexicographically sorted [a,b,c] with 0<a<b<c<=L, coprime a,b,c and a^2+b^2=c^2.

split: open-access


prompt:
The exact primitive pythagorean triples result violates the stated contract at triple canonical ordering.

Input bound L>=1; return lexicographically sorted [a,b,c] with 0<a<b<c<=L, coprime a,b,c and a^2+b^2=c^2.

split: open-access


prompt:
The exact egyptian greedy fraction result violates the stated contract at unit denominator ceiling.

Input [p,q], 0<p<q<=100; return greedy unit fraction denominators whose sum is p/q. Bounds: q<=31.

split: open-access


prompt:
The exact egyptian greedy fraction result violates the stated contract at residual numerator.

Input [p,q], 0<p<q<=100; return greedy unit fraction denominators whose sum is p/q. Bounds: q<=31.

split: open-access


prompt:
The exact egyptian greedy fraction result violates the stated contract at residual denominator.

Input [p,q], 0<p<q<=100; return greedy unit fraction denominators whose sum is p/q. Bounds: q<=31.

split: open-access


prompt:
The exact egyptian greedy fraction result violates the stated contract at residual gcd cancellation.

Input [p,q], 0<p<q<=100; return greedy unit fraction denominators whose sum is p/q. Bounds: q<=31.

split: open-access


prompt:
The exact egyptian greedy fraction result violates the stated contract at unit fraction ordering.

Input [p,q], 0<p<q<=100; return greedy unit fraction denominators whose sum is p/q. Bounds: q<=31.

split: open-access


prompt:
The exact best bounded rational result violates the stated contract at denominator bound inclusion.

Input [p,q,B], q>0 B>0; nearest rational to p/q with denominator<=B, ties choose smaller rational then denominator.

split: open-access


prompt:
The exact best bounded rational result violates the stated contract at scaled numerator floor.

Input [p,q,B], q>0 B>0; nearest rational to p/q with denominator<=B, ties choose smaller rational then denominator.

split: open-access


prompt:
The exact best bounded rational result violates the stated contract at two nearest numerator candidates.

Input [p,q,B], q>0 B>0; nearest rational to p/q with denominator<=B, ties choose smaller rational then denominator.

split: open-access


prompt:
The exact best bounded rational result violates the stated contract at rational distance.

Input [p,q,B], q>0 B>0; nearest rational to p/q with denominator<=B, ties choose smaller rational then denominator.

split: open-access


prompt:
The exact best bounded rational result violates the stated contract at tie selection.

Input [p,q,B], q>0 B>0; nearest rational to p/q with denominator<=B, ties choose smaller rational then denominator.

split: open-access


prompt:
The exact balanced odd radix encoding result violates the stated contract at zero digit representation.

Input [integer, odd radix>=3]; return least-significant-first balanced digits between -(base//2) and base//2, zero=[0]. Bounds: |integer|<=100 and radix<=9.

split: open-access


prompt:
The exact balanced odd radix encoding result violates the stated contract at unsigned residue extraction.

Input [integer, odd radix>=3]; return least-significant-first balanced digits between -(base//2) and base//2, zero=[0]. Bounds: |integer|<=100 and radix<=9.

split: open-access


prompt:
The exact balanced odd radix encoding result violates the stated contract at balanced carry threshold.

Input [integer, odd radix>=3]; return least-significant-first balanced digits between -(base//2) and base//2, zero=[0]. Bounds: |integer|<=100 and radix<=9.

split: open-access


prompt:
The exact balanced odd radix encoding result violates the stated contract at carry quotient.

Input [integer, odd radix>=3]; return least-significant-first balanced digits between -(base//2) and base//2, zero=[0]. Bounds: |integer|<=100 and radix<=9.

split: open-access


prompt:
The exact balanced odd radix encoding result violates the stated contract at digit significance order.

Input [integer, odd radix>=3]; return least-significant-first balanced digits between -(base//2) and base//2, zero=[0]. Bounds: |integer|<=100 and radix<=9.

split: open-access


prompt:
The exact negative radix encoding result violates the stated contract at negative base zero representation.

Input [integer, magnitude base>=2]; return most-significant-first digits 0..base-1 representing integer in radix -base. Bounds: |integer|<=100 and base<=8.

split: open-access


prompt:
The exact negative radix encoding result violates the stated contract at nonnegative negative radix remainder.

Input [integer, magnitude base>=2]; return most-significant-first digits 0..base-1 representing integer in radix -base. Bounds: |integer|<=100 and base<=8.

split: open-access


prompt:
The exact negative radix encoding result violates the stated contract at negative base carry.

Input [integer, magnitude base>=2]; return most-significant-first digits 0..base-1 representing integer in radix -base. Bounds: |integer|<=100 and base<=8.

split: open-access


prompt:
The exact negative radix encoding result violates the stated contract at negative base digit order.

Input [integer, magnitude base>=2]; return most-significant-first digits 0..base-1 representing integer in radix -base. Bounds: |integer|<=100 and base<=8.

split: open-access


prompt:
The exact negative radix encoding result violates the stated contract at nonzero digit preservation.

Input [integer, magnitude base>=2]; return most-significant-first digits 0..base-1 representing integer in radix -base. Bounds: |integer|<=100 and base<=8.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
    g,h,p=x;m=math.isqrt(p-1)+1
    baby={};v=1
    for j in range(1,m):
     if v not in baby:baby[v]=j
     v=v*g%p
    factor=pow(pow(g,m,p),-1,p)
    v=h
    answers=[]
    for i in range(m+1):
     if v in baby:
      e=i*m+baby[v]
      if pow(g,e,p)==h:answers.append(e)
     v=v*factor%p
    return min(answers) if answers else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([1, 1, 3], 0), ([2, 2, 3], 1), ([22, 22, 23], 1), ([1, 2, 3], None), ([2, 1, 3], 0), ([1, 1, 5], 0), ([1, 2, 5], None), ([1, 3, 5], None)], [([2, 1, 3], 0), ([2, 4, 7], 2), ([1, 1, 3], 0), ([22, 22, 23], 1), ([4, 2, 5], None), ([4, 3, 5], None), ([4, 4, 5], 1), ([1, 1, 7], 0)], [([2, 2, 3], 1), ([4, 2, 7], 2), ([1, 1, 3], 0), ([22, 22, 23], 1), ([3, 3, 7], 1), ([3, 4, 7], 4), ([3, 5, 7], 5), ([3, 6, 7], 3)], [([1, 1, 5], 0), ([2, 7, 11], 7), ([1, 1, 3], 0), ([22, 22, 23], 1), ([6, 2, 7], None), ([6, 3, 7], None), ([6, 4, 7], None), ([6, 5, 7], None)], [([2, 1, 5], 0), ([4, 9, 11], 3), ([1, 1, 3], 0), ([22, 22, 23], 1), ([2, 3, 11], 8), ([2, 4, 11], 2), ([2, 5, 11], 4), ([2, 6, 11], 9)]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("explicit oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
    g,h,p=x;m=math.isqrt(p-1)+1
    baby={};v=1
    for j in range(m-1):
     if v not in baby:baby[v]=j
     v=v*g%p
    factor=pow(pow(g,m,p),-1,p)
    v=h
    answers=[]
    for i in range(m+1):
     if v in baby:
      e=i*m+baby[v]
      if pow(g,e,p)==h:answers.append(e)
     v=v*factor%p
    return min(answers) if answers else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([1, 1, 3], 0), ([2, 2, 3], 1), ([22, 22, 23], 1), ([1, 2, 3], None), ([2, 1, 3], 0), ([1, 1, 5], 0), ([1, 2, 5], None), ([1, 3, 5], None)], [([2, 1, 3], 0), ([2, 4, 7], 2), ([1, 1, 3], 0), ([22, 22, 23], 1), ([4, 2, 5], None), ([4, 3, 5], None), ([4, 4, 5], 1), ([1, 1, 7], 0)], [([2, 2, 3], 1), ([4, 2, 7], 2), ([1, 1, 3], 0), ([22, 22, 23], 1), ([3, 3, 7], 1), ([3, 4, 7], 4), ([3, 5, 7], 5), ([3, 6, 7], 3)], [([1, 1, 5], 0), ([2, 7, 11], 7), ([1, 1, 3], 0), ([22, 22, 23], 1), ([6, 2, 7], None), ([6, 3, 7], None), ([6, 4, 7], None), ([6, 5, 7], None)], [([2, 1, 5], 0), ([4, 9, 11], 3), ([1, 1, 3], 0), ([22, 22, 23], 1), ([2, 3, 11], 8), ([2, 4, 11], 2), ([2, 5, 11], 4), ([2, 6, 11], 9)]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("explicit oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The exact baby step giant step logarithm result violates the stated contract at baby exponent coverage.

Input [g,h,p], p prime and nonzero g,h; return least e>=0 with g^e=h mod p or None.

split: open-access


prompt:
The exact baby step giant step logarithm result violates the stated contract at baby group progression.

Input [g,h,p], p prime and nonzero g,h; return least e>=0 with g^e=h mod p or None.

split: open-access


prompt:
The exact baby step giant step logarithm result violates the stated contract at inverse giant factor.

Input [g,h,p], p prime and nonzero g,h; return least e>=0 with g^e=h mod p or None.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
    g,h,p=x;m=math.isqrt(p-1)+1
    baby={};v=1
    for j in range(m):
     if v not in baby:baby[v]=j
     v=v*g%p
    factor=pow(pow(g,m,p),-1,p)
    v=h
    answers=[]
    for i in range(m+1):
     if v in baby:
      e=i+baby[v]
      if pow(g,e,p)==h:answers.append(e)
     v=v*factor%p
    return min(answers) if answers else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([2, 3, 11], 8), ([2, 2, 3], 1), ([1, 1, 3], 0), ([22, 22, 23], 1), ([1, 2, 3], None), ([2, 1, 3], 0), ([1, 1, 5], 0), ([1, 2, 5], None)], [([2, 5, 11], 4), ([4, 4, 5], 1), ([1, 1, 3], 0), ([22, 22, 23], 1), ([4, 2, 5], None), ([4, 3, 5], None), ([1, 1, 7], 0), ([1, 2, 7], None)], [([2, 6, 11], 9), ([3, 2, 7], 2), ([1, 1, 3], 0), ([22, 22, 23], 1), ([3, 3, 7], 1), ([3, 4, 7], 4), ([3, 5, 7], 5), ([3, 6, 7], 3)], [([2, 7, 11], 7), ([3, 5, 7], 5), ([1, 1, 3], 0), ([22, 22, 23], 1), ([6, 2, 7], None), ([6, 3, 7], None), ([6, 4, 7], None), ([6, 5, 7], None)], [([2, 9, 11], 6), ([5, 2, 7], 4), ([1, 1, 3], 0), ([22, 22, 23], 1), ([2, 3, 11], 8), ([2, 4, 11], 2), ([2, 5, 11], 4), ([2, 6, 11], 9)]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("explicit oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
    g,h,p=x;m=math.isqrt(p-1)+1
    baby={};v=1
    for j in range(m):
     if v not in baby:baby[v]=j
     v=v*g%p
    factor=pow(pow(g,m,p),-1,p)
    v=h
    answers=[]
    for i in range(m+1):
     if v in baby:
      e=i*m-baby[v]
      if pow(g,e,p)==h:answers.append(e)
     v=v*factor%p
    return min(answers) if answers else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([2, 3, 11], 8), ([2, 2, 3], 1), ([1, 1, 3], 0), ([22, 22, 23], 1), ([1, 2, 3], None), ([2, 1, 3], 0), ([1, 1, 5], 0), ([1, 2, 5], None)], [([2, 5, 11], 4), ([4, 4, 5], 1), ([1, 1, 3], 0), ([22, 22, 23], 1), ([4, 2, 5], None), ([4, 3, 5], None), ([1, 1, 7], 0), ([1, 2, 7], None)], [([2, 6, 11], 9), ([3, 2, 7], 2), ([1, 1, 3], 0), ([22, 22, 23], 1), ([3, 3, 7], 1), ([3, 4, 7], 4), ([3, 5, 7], 5), ([3, 6, 7], 3)], [([2, 7, 11], 7), ([3, 5, 7], 5), ([1, 1, 3], 0), ([22, 22, 23], 1), ([6, 2, 7], None), ([6, 3, 7], None), ([6, 4, 7], None), ([6, 5, 7], None)], [([2, 9, 11], 6), ([5, 2, 7], 4), ([1, 1, 3], 0), ([22, 22, 23], 1), ([2, 3, 11], 8), ([2, 4, 11], 2), ([2, 5, 11], 4), ([2, 6, 11], 9)]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("explicit oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The exact baby step giant step logarithm result violates the stated contract at giant exponent reconstruction.

Input [g,h,p], p prime and nonzero g,h; return least e>=0 with g^e=h mod p or None.

split: open-access


prompt:
The exact baby step giant step logarithm result violates the stated contract at giant group progression.

Input [g,h,p], p prime and nonzero g,h; return least e>=0 with g^e=h mod p or None.

split: open-access


prompt:
The exact lehmer permutation rank result violates the stated contract at unused alphabet initialization.

Input permutation of 0..n-1 with n<=7; return zero-based lexicographic rank.

split: open-access


prompt:
The exact lehmer permutation rank result violates the stated contract at inversion digit lookup.

Input permutation of 0..n-1 with n<=7; return zero-based lexicographic rank.

split: open-access


prompt:
The exact lehmer permutation rank result violates the stated contract at factoradic place weighting.

Input permutation of 0..n-1 with n<=7; return zero-based lexicographic rank.

split: open-access


prompt:
The exact lehmer permutation rank result violates the stated contract at used symbol removal.

Input permutation of 0..n-1 with n<=7; return zero-based lexicographic rank.

split: open-access


prompt:
The exact lehmer permutation rank result violates the stated contract at rank origin.

Input permutation of 0..n-1 with n<=7; return zero-based lexicographic rank.

split: open-access


prompt:
The exact factoradic permutation unrank result violates the stated contract at factoradic digit count.

Input [n,r], n<=7 and 0<=r<n!; return lexicographic permutation of 0..n-1 at rank r.

split: open-access


prompt:
The exact factoradic permutation unrank result violates the stated contract at permutation block size.

Input [n,r], n<=7 and 0<=r<n!; return lexicographic permutation of 0..n-1 at rank r.

split: open-access


prompt:
The exact factoradic permutation unrank result violates the stated contract at factoradic quotient digit.

Input [n,r], n<=7 and 0<=r<n!; return lexicographic permutation of 0..n-1 at rank r.

split: open-access


prompt:
The exact factoradic permutation unrank result violates the stated contract at alphabet selection removal.

Input [n,r], n<=7 and 0<=r<n!; return lexicographic permutation of 0..n-1 at rank r.

split: open-access


prompt:
The exact factoradic permutation unrank result violates the stated contract at within block rank.

Input [n,r], n<=7 and 0<=r<n!; return lexicographic permutation of 0..n-1 at rank r.

split: open-access


prompt:
The exact colex combination rank result violates the stated contract at selected element traversal.

Input strictly increasing selected nonnegative integers; zero-based colex rank=sum choose(a_i,i+1).

split: open-access


prompt:
The exact colex combination rank result violates the stated contract at binomial top index.

Input strictly increasing selected nonnegative integers; zero-based colex rank=sum choose(a_i,i+1).

split: open-access


prompt:
The exact colex combination rank result violates the stated contract at binomial lower index.

Input strictly increasing selected nonnegative integers; zero-based colex rank=sum choose(a_i,i+1).

split: open-access


prompt:
The exact colex combination rank result violates the stated contract at combinatorial place accumulation.

Input strictly increasing selected nonnegative integers; zero-based colex rank=sum choose(a_i,i+1).

split: open-access


prompt:
The exact colex combination rank result violates the stated contract at colex origin offset.

Input strictly increasing selected nonnegative integers; zero-based colex rank=sum choose(a_i,i+1).

split: open-access


prompt:
The exact combinadic unrank result violates the stated contract at descending binomial positions.

Input [k,r], k>=1 and r>=0; unique increasing combination of k nonnegative integers with colex rank r. Bounds: 1<=k<=5 and 0<=r<=49.

split: open-access


prompt:
The exact combinadic unrank result violates the stated contract at greedy upper bound.

Input [k,r], k>=1 and r>=0; unique increasing combination of k nonnegative integers with colex rank r. Bounds: 1<=k<=5 and 0<=r<=49.

split: open-access


prompt:
The exact combinadic unrank result violates the stated contract at residual colex rank.

Input [k,r], k>=1 and r>=0; unique increasing combination of k nonnegative integers with colex rank r. Bounds: 1<=k<=5 and 0<=r<=49.

split: open-access


prompt:
The exact combinadic unrank result violates the stated contract at strict preceding element ceiling.

Input [k,r], k>=1 and r>=0; unique increasing combination of k nonnegative integers with colex rank r. Bounds: 1<=k<=5 and 0<=r<=49.

split: open-access


prompt:
The exact combinadic unrank result violates the stated contract at increasing combination output.

Input [k,r], k>=1 and r>=0; unique increasing combination of k nonnegative integers with colex rank r. Bounds: 1<=k<=5 and 0<=r<=49.

split: open-access


prompt:
The exact dyck word ranking result violates the stated contract at prefix balance rejection.

Input balanced parentheses word with every prefix nonnegative; return zero-based lexicographic rank where opening precedes closing. Bounds: at most five opening parentheses.

split: open-access


prompt:
The exact dyck word ranking result violates the stated contract at skipped opening subtree.

Input balanced parentheses word with every prefix nonnegative; return zero-based lexicographic rank where opening precedes closing. Bounds: at most five opening parentheses.

split: open-access


prompt:
The exact dyck word ranking result violates the stated contract at closing depth update.

Input balanced parentheses word with every prefix nonnegative; return zero-based lexicographic rank where opening precedes closing. Bounds: at most five opening parentheses.

split: open-access


prompt:
The exact dyck word ranking result violates the stated contract at opening depth update.

Input balanced parentheses word with every prefix nonnegative; return zero-based lexicographic rank where opening precedes closing. Bounds: at most five opening parentheses.

split: open-access


prompt:
The exact dyck word ranking result violates the stated contract at balanced word rank origin.

Input balanced parentheses word with every prefix nonnegative; return zero-based lexicographic rank where opening precedes closing. Bounds: at most five opening parentheses.

split: open-access


prompt:
The exact multiset permutation unrank result violates the stated contract at multiset alphabet order.

Input [sorted multiset of small integer symbols, rank], valid zero-based lexicographic rank among distinct permutations.

split: open-access


prompt:
The exact multiset permutation unrank result violates the stated contract at duplicate block normalization.

Input [sorted multiset of small integer symbols, rank], valid zero-based lexicographic rank among distinct permutations.

split: open-access


prompt:
The exact multiset permutation unrank result violates the stated contract at rank block membership.

Input [sorted multiset of small integer symbols, rank], valid zero-based lexicographic rank among distinct permutations.

split: open-access


prompt:
The exact multiset permutation unrank result violates the stated contract at skipped block subtraction.

Input [sorted multiset of small integer symbols, rank], valid zero-based lexicographic rank among distinct permutations.

split: open-access


prompt:
The exact multiset permutation unrank result violates the stated contract at trial symbol restoration.

Input [sorted multiset of small integer symbols, rank], valid zero-based lexicographic rank among distinct permutations.

split: open-access


prompt:
The exact restricted growth strings result violates the stated contract at exact block count terminal.

Input length n (1..6), maximum blocks B>=1; return lexicographic restricted-growth strings a0=0, a_i<=1+max(prefix), using exactly B blocks.

split: open-access


prompt:
The exact restricted growth strings result violates the stated contract at new block choice inclusion.

Input length n (1..6), maximum blocks B>=1; return lexicographic restricted-growth strings a0=0, a_i<=1+max(prefix), using exactly B blocks.

split: open-access


prompt:
The exact restricted growth strings result violates the stated contract at block budget pruning.

Input length n (1..6), maximum blocks B>=1; return lexicographic restricted-growth strings a0=0, a_i<=1+max(prefix), using exactly B blocks.

split: open-access


prompt:
The exact restricted growth strings result violates the stated contract at prefix extension position.

Input length n (1..6), maximum blocks B>=1; return lexicographic restricted-growth strings a0=0, a_i<=1+max(prefix), using exactly B blocks.

split: open-access


prompt:
The exact restricted growth strings result violates the stated contract at highest used block tracking.

Input length n (1..6), maximum blocks B>=1; return lexicographic restricted-growth strings a0=0, a_i<=1+max(prefix), using exactly B blocks.

split: open-access


prompt:
The exact integer partition enumeration result violates the stated contract at partition candidate order.

Input [n,L], n>=0 and L>=1; return partitions of n in descending part order, reverse lexicographic, each part<=L.

split: open-access


prompt:
The exact integer partition enumeration result violates the stated contract at positive part admission.

Input [n,L], n>=0 and L>=1; return partitions of n in descending part order, reverse lexicographic, each part<=L.

split: open-access


prompt:
The exact integer partition enumeration result violates the stated contract at partition remainder subtraction.

Input [n,L], n>=0 and L>=1; return partitions of n in descending part order, reverse lexicographic, each part<=L.

split: open-access


prompt:
The exact integer partition enumeration result violates the stated contract at nonincreasing part bound.

Input [n,L], n>=0 and L>=1; return partitions of n in descending part order, reverse lexicographic, each part<=L.

split: open-access


prompt:
The exact integer partition enumeration result violates the stated contract at partition prefix append.

Input [n,L], n>=0 and L>=1; return partitions of n in descending part order, reverse lexicographic, each part<=L.

split: open-access


prompt:
The exact josephus elimination order result violates the stated contract at ring label origin.

Input [n,k,start], n>0 k>0 0<=start<n; return removal order counting current position as one.

split: open-access


prompt:
The exact josephus elimination order result violates the stated contract at starting position.

Input [n,k,start], n>0 k>0 0<=start<n; return removal order counting current position as one.

split: open-access


prompt:
The exact josephus elimination order result violates the stated contract at elimination cardinality.

Input [n,k,start], n>0 k>0 0<=start<n; return removal order counting current position as one.

split: open-access


prompt:
The exact josephus elimination order result violates the stated contract at counted removal position.

Input [n,k,start], n>0 k>0 0<=start<n; return removal order counting current position as one.

split: open-access


prompt:
The exact josephus elimination order result violates the stated contract at successor cursor after deletion.

Input [n,k,start], n>0 k>0 0<=start<n; return removal order counting current position as one.

split: open-access


prompt:
The exact involution permutations result violates the stated contract at complete assignment terminal.

Input 0<=n<=7; return lexicographically sorted permutations p of 0..n-1 satisfying p[p[i]]=i.

split: open-access


prompt:
The exact involution permutations result violates the stated contract at fixed point image.

Input 0<=n<=7; return lexicographically sorted permutations p of 0..n-1 satisfying p[p[i]]=i.

split: open-access


prompt:
The exact involution permutations result violates the stated contract at transposition partner coverage.

Input 0<=n<=7; return lexicographically sorted permutations p of 0..n-1 satisfying p[p[i]]=i.

split: open-access


prompt:
The exact involution permutations result violates the stated contract at transposition first image.

Input 0<=n<=7; return lexicographically sorted permutations p of 0..n-1 satisfying p[p[i]]=i.

split: open-access


prompt:
The exact involution permutations result violates the stated contract at paired positions removal.

Input 0<=n<=7; return lexicographically sorted permutations p of 0..n-1 satisfying p[p[i]]=i.

split: open-access


prompt:
The exact bareiss determinant result violates the stated contract at elimination pivot count.

Input nonempty square integer matrix; return exact determinant using pivoted fraction-free elimination.

split: open-access


prompt:
The exact bareiss determinant result violates the stated contract at nonzero pivot selection.

Input nonempty square integer matrix; return exact determinant using pivoted fraction-free elimination.

split: open-access


prompt:
The exact bareiss determinant result violates the stated contract at row interchange parity.

Input nonempty square integer matrix; return exact determinant using pivoted fraction-free elimination.

split: open-access


prompt:
The exact bareiss determinant result violates the stated contract at fraction free cross product.

Input nonempty square integer matrix; return exact determinant using pivoted fraction-free elimination.

split: open-access


prompt:
The exact bareiss determinant result violates the stated contract at previous pivot divisor.

Input nonempty square integer matrix; return exact determinant using pivoted fraction-free elimination.

split: open-access


prompt:
The exact rational row reduction result violates the stated contract at pivot column traversal.

Input nonempty rectangular integer matrix; return RREF with each rational entry [p,q].

split: open-access


prompt:
The exact rational row reduction result violates the stated contract at pivot admissibility.

Input nonempty rectangular integer matrix; return RREF with each rational entry [p,q].

split: open-access


prompt:
The exact rational row reduction result violates the stated contract at pivot row normalization.

Input nonempty rectangular integer matrix; return RREF with each rational entry [p,q].

split: open-access


prompt:
The exact rational row reduction result violates the stated contract at other row elimination.

Input nonempty rectangular integer matrix; return RREF with each rational entry [p,q].

split: open-access


prompt:
The exact rational row reduction result violates the stated contract at pivot row cursor.

Input nonempty rectangular integer matrix; return RREF with each rational entry [p,q].

split: open-access


prompt:
The exact rational nullspace basis result violates the stated contract at free column classification.

Input nonempty rectangular integer matrix; return canonical nullspace basis, one vector per free column increasing, with that free coordinate one and other free coordinates zero.

split: open-access


prompt:
The exact rational nullspace basis result violates the stated contract at basis free coordinate order.

Input nonempty rectangular integer matrix; return canonical nullspace basis, one vector per free column increasing, with that free coordinate one and other free coordinates zero.

split: open-access


prompt:
The exact rational nullspace basis result violates the stated contract at free coordinate normalization.

Input nonempty rectangular integer matrix; return canonical nullspace basis, one vector per free column increasing, with that free coordinate one and other free coordinates zero.

split: open-access


prompt:
The exact rational nullspace basis result violates the stated contract at pivot coordinate placement.

Input nonempty rectangular integer matrix; return canonical nullspace basis, one vector per free column increasing, with that free coordinate one and other free coordinates zero.

split: open-access


prompt:
The exact rational nullspace basis result violates the stated contract at pivot equation rearrangement.

Input nonempty rectangular integer matrix; return canonical nullspace basis, one vector per free column increasing, with that free coordinate one and other free coordinates zero.

split: open-access


prompt:
The exact exact tridiagonal solve result violates the stated contract at initial upper normalization.

Input [lower,diag,upper,rhs] integer tridiagonal system with nonzero Thomas pivots; return rational solution [p,q] per coordinate.

split: open-access


prompt:
The exact exact tridiagonal solve result violates the stated contract at initial rhs normalization.

Input [lower,diag,upper,rhs] integer tridiagonal system with nonzero Thomas pivots; return rational solution [p,q] per coordinate.

split: open-access


prompt:
The exact exact tridiagonal solve result violates the stated contract at schur diagonal update.

Input [lower,diag,upper,rhs] integer tridiagonal system with nonzero Thomas pivots; return rational solution [p,q] per coordinate.

split: open-access


prompt:
The exact exact tridiagonal solve result violates the stated contract at forward rhs elimination.

Input [lower,diag,upper,rhs] integer tridiagonal system with nonzero Thomas pivots; return rational solution [p,q] per coordinate.

split: open-access


prompt:
The exact exact tridiagonal solve result violates the stated contract at back substitution.

Input [lower,diag,upper,rhs] integer tridiagonal system with nonzero Thomas pivots; return rational solution [p,q] per coordinate.

split: open-access


prompt:
The exact exact ldl decomposition result violates the stated contract at diagonal factor progression.

Input symmetric positive definite integer matrix; return unit lower L and diagonal D as rational pairs such that A=L*D*Ltranspose.

split: open-access


prompt:
The exact exact ldl decomposition result violates the stated contract at diagonal schur complement.

Input symmetric positive definite integer matrix; return unit lower L and diagonal D as rational pairs such that A=L*D*Ltranspose.

split: open-access


prompt:
The exact exact ldl decomposition result violates the stated contract at lower factor row coverage.

Input symmetric positive definite integer matrix; return unit lower L and diagonal D as rational pairs such that A=L*D*Ltranspose.

split: open-access


prompt:
The exact exact ldl decomposition result violates the stated contract at off diagonal schur complement.

Input symmetric positive definite integer matrix; return unit lower L and diagonal D as rational pairs such that A=L*D*Ltranspose.

split: open-access


prompt:
The exact exact ldl decomposition result violates the stated contract at lower factor diagonal divisor.

Input symmetric positive definite integer matrix; return unit lower L and diagonal D as rational pairs such that A=L*D*Ltranspose.

split: open-access


prompt:
The exact integer matrix binary power result violates the stated contract at multiplicative identity seed.

Input [square integer matrix,nonnegative exponent<=12]; return exact matrix power.

split: open-access


prompt:
The exact integer matrix binary power result violates the stated contract at binary exponent digit test.

Input [square integer matrix,nonnegative exponent<=12]; return exact matrix power.

split: open-access


prompt:
The exact integer matrix binary power result violates the stated contract at selected power accumulation.

Input [square integer matrix,nonnegative exponent<=12]; return exact matrix power.

split: open-access


prompt:
The exact integer matrix binary power result violates the stated contract at base power squaring.

Input [square integer matrix,nonnegative exponent<=12]; return exact matrix power.

split: open-access


prompt:
The exact integer matrix binary power result violates the stated contract at binary exponent advancement.

Input [square integer matrix,nonnegative exponent<=12]; return exact matrix power.

split: open-access


prompt:
The exact hensel simple root lift result violates the stated contract at lifting exponent count.

Input [coefficients,p,r,k], p prime, r root mod p with nonzero derivative, k>=1; return unique root mod p^k congruent r mod p.

split: open-access


prompt:
The exact hensel simple root lift result violates the stated contract at formal derivative evaluation.

Input [coefficients,p,r,k], p prime, r root mod p with nonzero derivative, k>=1; return unique root mod p^k congruent r mod p.

split: open-access


prompt:
The exact hensel simple root lift result violates the stated contract at lift correction residue.

Input [coefficients,p,r,k], p prime, r root mod p with nonzero derivative, k>=1; return unique root mod p^k congruent r mod p.

split: open-access


prompt:
The exact hensel simple root lift result violates the stated contract at root digit extension.

Input [coefficients,p,r,k], p prime, r root mod p with nonzero derivative, k>=1; return unique root mod p^k congruent r mod p.

split: open-access


prompt:
The exact hensel simple root lift result violates the stated contract at precision modulus growth.

Input [coefficients,p,r,k], p prime, r root mod p with nonzero derivative, k>=1; return unique root mod p^k congruent r mod p.

split: open-access


prompt:
The exact lucas binomial residue result violates the stated contract at digit product identity.

Input [n,k,p], n,k>=0 p prime; return binomial(n,k) modulo p, zero when k>n. Bounds: n,k<2^30.

split: open-access


prompt:
The exact lucas binomial residue result violates the stated contract at remaining digit termination.

Input [n,k,p], n,k>=0 p prime; return binomial(n,k) modulo p, zero when k>n. Bounds: n,k<2^30.

split: open-access


prompt:
The exact lucas binomial residue result violates the stated contract at digit carry zero criterion.

Input [n,k,p], n,k>=0 p prime; return binomial(n,k) modulo p, zero when k>n. Bounds: n,k<2^30.

split: open-access


prompt:
The exact lucas binomial residue result violates the stated contract at digit binomial multiplication.

Input [n,k,p], n,k>=0 p prime; return binomial(n,k) modulo p, zero when k>n. Bounds: n,k<2^30.

split: open-access


prompt:
The exact lucas binomial residue result violates the stated contract at base prime digit shift.

Input [n,k,p], n,k>=0 p prime; return binomial(n,k) modulo p, zero when k>n. Bounds: n,k<2^30.

split: open-access


prompt:
The exact kummer binomial valuation result violates the stated contract at first addend selection.

Input [n,k,p], 0<=k<=n p prime; return exponent of p in binomial(n,k) via carries adding k and n-k. Bounds: n<2^39.

split: open-access


prompt:
The exact kummer binomial valuation result violates the stated contract at carry propagation termination.

Input [n,k,p], 0<=k<=n p prime; return exponent of p in binomial(n,k) via carries adding k and n-k. Bounds: n<2^39.

split: open-access


prompt:
The exact kummer binomial valuation result violates the stated contract at incoming carry inclusion.

Input [n,k,p], 0<=k<=n p prime; return exponent of p in binomial(n,k) via carries adding k and n-k. Bounds: n<2^39.

split: open-access


prompt:
The exact kummer binomial valuation result violates the stated contract at digit overflow carry.

Input [n,k,p], 0<=k<=n p prime; return exponent of p in binomial(n,k) via carries adding k and n-k. Bounds: n<2^39.

split: open-access


prompt:
The exact kummer binomial valuation result violates the stated contract at next prime digits.

Input [n,k,p], 0<=k<=n p prime; return exponent of p in binomial(n,k) via carries adding k and n-k. Bounds: n<2^39.

split: open-access


prompt:
The exact prime power unit factorial result violates the stated contract at prime power ring modulus.

Input [n,p,e], n>=0 p prime e>=1; return product of positive integers<=n after removing ALL p factors from each, modulo p^e. Bounds: n<=64.

split: open-access


prompt:
The exact prime power unit factorial result violates the stated contract at unit factorial identity.

Input [n,p,e], n>=0 p prime e>=1; return product of positive integers<=n after removing ALL p factors from each, modulo p^e. Bounds: n<=64.

split: open-access


prompt:
The exact prime power unit factorial result violates the stated contract at factorial factor coverage.

Input [n,p,e], n>=0 p prime e>=1; return product of positive integers<=n after removing ALL p factors from each, modulo p^e. Bounds: n<=64.

split: open-access


prompt:
The exact prime power unit factorial result violates the stated contract at all prime factor stripping.

Input [n,p,e], n>=0 p prime e>=1; return product of positive integers<=n after removing ALL p factors from each, modulo p^e. Bounds: n<=64.

split: open-access


prompt:
The exact prime power unit factorial result violates the stated contract at unit factor multiplication.

Input [n,p,e], n>=0 p prime e>=1; return product of positive integers<=n after removing ALL p factors from each, modulo p^e. Bounds: n<=64.

split: open-access


prompt:
The exact gf2 field multiplication result violates the stated contract at multiplier coefficient test.

Input [a,b,irreducible polynomial bitmask], nonnegative field elements; return carryless product reduced by that monic polynomial.

split: open-access


prompt:
The exact gf2 field multiplication result violates the stated contract at field addition operation.

Input [a,b,irreducible polynomial bitmask], nonnegative field elements; return carryless product reduced by that monic polynomial.

split: open-access


prompt:
The exact gf2 field multiplication result violates the stated contract at multiplier bit progression.

Input [a,b,irreducible polynomial bitmask], nonnegative field elements; return carryless product reduced by that monic polynomial.

split: open-access


prompt:
The exact gf2 field multiplication result violates the stated contract at irreducible polynomial reduction.

Input [a,b,irreducible polynomial bitmask], nonnegative field elements; return carryless product reduced by that monic polynomial.

split: open-access


prompt:
The exact gf2 field multiplication result violates the stated contract at field result projection.

Input [a,b,irreducible polynomial bitmask], nonnegative field elements; return carryless product reduced by that monic polynomial.

split: open-access


prompt:
The exact binary polynomial division result violates the stated contract at degree termination.

Input [a,b] integer bitmasks for F2 polynomials with b>0; return [quotient,remainder] of carryless division. Bounds: a,b<2^32.

split: open-access


prompt:
The exact binary polynomial division result violates the stated contract at leading term shift.

Input [a,b] integer bitmasks for F2 polynomials with b>0; return [quotient,remainder] of carryless division. Bounds: a,b<2^32.

split: open-access


prompt:
The exact binary polynomial division result violates the stated contract at quotient monomial accumulation.

Input [a,b] integer bitmasks for F2 polynomials with b>0; return [quotient,remainder] of carryless division. Bounds: a,b<2^32.

split: open-access


prompt:
The exact binary polynomial division result violates the stated contract at carryless leading cancellation.

Input [a,b] integer bitmasks for F2 polynomials with b>0; return [quotient,remainder] of carryless division. Bounds: a,b<2^32.

split: open-access


prompt:
The exact binary polynomial division result violates the stated contract at quotient remainder result positions.

Input [a,b] integer bitmasks for F2 polynomials with b>0; return [quotient,remainder] of carryless division. Bounds: a,b<2^32.

split: open-access


prompt:
The exact binary field inversion result violates the stated contract at first polynomial Bezout seed.

Input [a,irreducible bitmask], a nonzero with degree below modulus; return multiplicative inverse in binary field. Bounds: modulus degree is between two and six.

split: open-access


prompt:
The exact binary field inversion result violates the stated contract at second polynomial Bezout seed.

Input [a,irreducible bitmask], a nonzero with degree below modulus; return multiplicative inverse in binary field. Bounds: modulus degree is between two and six.

split: open-access


prompt:
The exact binary field inversion result violates the stated contract at Euclidean polynomial cancellation.

Input [a,irreducible bitmask], a nonzero with degree below modulus; return multiplicative inverse in binary field. Bounds: modulus degree is between two and six.

split: open-access


prompt:
The exact binary field inversion result violates the stated contract at polynomial Bezout update.

Input [a,irreducible bitmask], a nonzero with degree below modulus; return multiplicative inverse in binary field. Bounds: modulus degree is between two and six.

split: open-access


prompt:
The exact binary field inversion result violates the stated contract at constant polynomial termination.

Input [a,irreducible bitmask], a nonzero with degree below modulus; return multiplicative inverse in binary field. Bounds: modulus degree is between two and six.

split: open-access


prompt:
The exact binary field trace result violates the stated contract at Frobenius orbit initial element.

Input [a,irreducible bitmask]; return absolute field trace a+a^2+...+a^(2^(n-1)), an F2 element represented integer 0 or1.

split: open-access


prompt:
The exact binary field trace result violates the stated contract at field extension degree orbit length.

Input [a,irreducible bitmask]; return absolute field trace a+a^2+...+a^(2^(n-1)), an F2 element represented integer 0 or1.

split: open-access


prompt:
The exact binary field trace result violates the stated contract at trace field addition.

Input [a,irreducible bitmask]; return absolute field trace a+a^2+...+a^(2^(n-1)), an F2 element represented integer 0 or1.

split: open-access


prompt:
The exact binary field trace result violates the stated contract at Frobenius squaring transition.

Input [a,irreducible bitmask]; return absolute field trace a+a^2+...+a^(2^(n-1)), an F2 element represented integer 0 or1.

split: open-access


prompt:
The exact binary field trace result violates the stated contract at prime field trace representation.

Input [a,irreducible bitmask]; return absolute field trace a+a^2+...+a^(2^(n-1)), an F2 element represented integer 0 or1.

split: open-access


prompt:
The exact binary field minimal polynomial result violates the stated contract at distinct conjugate stopping.

Input [a,irreducible bitmask]; return ascending 0/1 coefficients of the minimal polynomial of a over F2, through its distinct Frobenius orbit.

split: open-access


prompt:
The exact binary field minimal polynomial result violates the stated contract at conjugate Frobenius successor.

Input [a,irreducible bitmask]; return ascending 0/1 coefficients of the minimal polynomial of a over F2, through its distinct Frobenius orbit.

split: open-access


prompt:
The exact binary field minimal polynomial result violates the stated contract at monic polynomial product identity.

Input [a,irreducible bitmask]; return ascending 0/1 coefficients of the minimal polynomial of a over F2, through its distinct Frobenius orbit.

split: open-access


prompt:
The exact binary field minimal polynomial result violates the stated contract at root constant coefficient product.

Input [a,irreducible bitmask]; return ascending 0/1 coefficients of the minimal polynomial of a over F2, through its distinct Frobenius orbit.

split: open-access


prompt:
The exact binary field minimal polynomial result violates the stated contract at monic linear term contribution.

Input [a,irreducible bitmask]; return ascending 0/1 coefficients of the minimal polynomial of a over F2, through its distinct Frobenius orbit.

split: open-access


prompt:
The exact finite field discrete transform result violates the stated contract at frequency bin range.

Input [values,p,w], len(values)=n and w has exact multiplicative order n modulo prime p; forward transform sum values[j]*w^(j*k) modulo p.

split: open-access


prompt:
The exact finite field discrete transform result violates the stated contract at sample index coverage.

Input [values,p,w], len(values)=n and w has exact multiplicative order n modulo prime p; forward transform sum values[j]*w^(j*k) modulo p.

split: open-access


prompt:
The exact finite field discrete transform result violates the stated contract at character exponent.

Input [values,p,w], len(values)=n and w has exact multiplicative order n modulo prime p; forward transform sum values[j]*w^(j*k) modulo p.

split: open-access


prompt:
The exact finite field discrete transform result violates the stated contract at modular butterfly contribution.

Input [values,p,w], len(values)=n and w has exact multiplicative order n modulo prime p; forward transform sum values[j]*w^(j*k) modulo p.

split: open-access