Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
18
22
family_id
stringlengths
11
25
category
stringclasses
7 values
subcategory
stringclasses
46 values
difficulty
stringclasses
4 values
language
stringclasses
1 value
problem
stringlengths
1
29.2k
context
stringlengths
0
14k
constraints
listlengths
0
1
reasoning_mode
stringclasses
4 values
solution
stringlengths
1
31.9k
answer
stringlengths
1
623
answer_type
stringclasses
12 values
verification
dict
quality_score
float64
80
99
source
stringclasses
10 values
source_license
stringclasses
4 values
generator
stringclasses
40 values
char_count
int64
4
32.2k
est_tokens
int64
1
8k
token_count
int64
-1
-1
br-algo-proc-00000001
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(11)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 3 * f(n - 1) + 5 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=8, f(3)=29, f(4)=92, f(5)=281, f(6)=848, f(7)=2549, f(8)=7652, f(9)=22961, f(10)=68888, f(11)=206669. Result: f(11) = 206669.
206669
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 3 * f(n - 1) + 5\n\nassert f(11) == 206669" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
301
73
-1
br-algo-proc-00000002
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(10)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 2 * f(n - 1) + 11 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=13, f(3)=37, f(4)=85, f(5)=181, f(6)=373, f(7)=757, f(8)=1525, f(9)=3061, f(10)=6133. Result: f(10) = 6133.
6133
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 2 * f(n - 1) + 11\n\nassert f(10) == 6133" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
282
69
-1
br-algo-proc-00000003
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(7)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 5 * f(n - 1) + 4 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=9, f(3)=49, f(4)=249, f(5)=1249, f(6)=6249, f(7)=31249. Result: f(7) = 31249.
31249
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 5 * f(n - 1) + 4\n\nassert f(7) == 31249" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
251
61
-1
br-algo-proc-00000004
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([5, 18, 30, 12, 6], 10)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=5 <= 10: acc -= 1 -> -1 - i=1, val=18 > 10: acc += 18*2 -> 35 - i=2, val=30 > 10: acc += 30*3 -> 125 - i=3, val=12 > 10: acc += 12*4 -> 173 - i=4, val=6 <= 10: acc -= 1 -> 172 Return value: 172.
172
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([5, 18, 30, 12, 6], 10) == 172" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
522
129
-1
br-algo-proc-00000005
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([27, 20, 26, 1], 6)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=27 > 6: acc += 27*1 -> 27 - i=1, val=20 > 6: acc += 20*2 -> 67 - i=2, val=26 > 6: acc += 26*3 -> 145 - i=3, val=1 <= 6: acc -= 1 -> 144 Return value: 144.
144
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([27, 20, 26, 1], 6) == 144" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
478
118
-1
br-algo-proc-00000006
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-14, 21, 8, -7, 27, 1, 3, 16], 13)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=-14 <= 13: acc -= 1 -> -1 - i=1, val=21 > 13: acc += 21*2 -> 41 - i=2, val=8 <= 13: acc -= 1 -> 40 - i=3, val=-7 <= 13: acc -= 1 -> 39 - i=4, val=27 > 13: acc += 27*5 -> 174 - i=5, val=1 <= 13: acc -= 1 -> 173 - i=6, val=3 <= 13: acc -= 1 -> 172 - i=7, val=16 > 13: acc += 16*8 -> 300 Return ...
300
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-14, 21, 8, -7, 27, 1, 3, 16], 13) == 300" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
643
160
-1
br-algo-proc-00000007
algo-bigo-O(log n)
algorithmic_computational
complexity_analysis
intermediate
en
Determine the tight worst-case time complexity (Big-O) in terms of n: ```python lo, hi = 0, n - 1 while lo <= hi: mid = (lo + hi) // 2 if a[mid] == t: break elif a[mid] < t: lo = mid + 1 else: hi = mid - 1 ```
[]
direct
Binary search halves the interval each iteration, taking at most floor(log2(n)) + 1 steps: O(log n).
O(log n)
asymptotic
{ "status": "verified", "method": "solver", "check_code": "assert True" }
99
procedural_generator
Apache-2.0
proc_algo_bigo_v2
334
81
-1
br-algo-proc-00000008
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([6, -5, -1, 28, 9], -5)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=6 > -5: acc += 6*1 -> 6 - i=1, val=-5 <= -5: acc -= 1 -> 5 - i=2, val=-1 > -5: acc += -1*3 -> 2 - i=3, val=28 > -5: acc += 28*4 -> 114 - i=4, val=9 > -5: acc += 9*5 -> 159 Return value: 159.
159
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([6, -5, -1, 28, 9], -5) == 159" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
518
128
-1
br-algo-proc-00000009
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([24, -6, 11, -2, 14], 1)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=24 > 1: acc += 24*1 -> 24 - i=1, val=-6 <= 1: acc -= 1 -> 23 - i=2, val=11 > 1: acc += 11*3 -> 56 - i=3, val=-2 <= 1: acc -= 1 -> 55 - i=4, val=14 > 1: acc += 14*5 -> 125 Return value: 125.
125
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([24, -6, 11, -2, 14], 1) == 125" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
518
128
-1
br-algo-proc-00000010
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([10, 25, -6, 3, -4, 15, 25], 3)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=10 > 3: acc += 10*1 -> 10 - i=1, val=25 > 3: acc += 25*2 -> 60 - i=2, val=-6 <= 3: acc -= 1 -> 59 - i=3, val=3 <= 3: acc -= 1 -> 58 - i=4, val=-4 <= 3: acc -= 1 -> 57 - i=5, val=15 > 3: acc += 15*6 -> 147 - i=6, val=25 > 3: acc += 25*7 -> 322 Return value: 322.
322
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([10, 25, -6, 3, -4, 15, 25], 3) == 322" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
597
148
-1
br-algo-proc-00000011
algo-bigo-O(n log n)
algorithmic_computational
complexity_analysis
intermediate
en
Determine the tight worst-case time complexity (Big-O) in terms of n: ```python for i in range(n): j = 1 while j < n: j *= 2 ```
[]
direct
Outer loop runs n times; inner loop doubles j from 1 to n in O(log n) steps. Total: O(n log n).
O(n log n)
asymptotic
{ "status": "verified", "method": "solver", "check_code": "assert True" }
99
procedural_generator
Apache-2.0
proc_algo_bigo_v2
250
60
-1
br-algo-proc-00000012
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(10)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 1 * f(n - 1) + 5 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=6, f(3)=11, f(4)=16, f(5)=21, f(6)=26, f(7)=31, f(8)=36, f(9)=41, f(10)=46. Result: f(10) = 46.
46
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 1 * f(n - 1) + 5\n\nassert f(10) == 46" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
267
66
-1
br-algo-proc-00000013
algo-bigo-O(n^2)
algorithmic_computational
complexity_analysis
intermediate
en
Determine the tight worst-case time complexity (Big-O) in terms of n: ```python for i in range(n): for j in range(i, n): total += a[i] * a[j] ```
[]
direct
Inner loop runs n - i times; summing 1..n yields n(n+1)/2 = O(n^2).
O(n^2)
asymptotic
{ "status": "verified", "method": "solver", "check_code": "assert True" }
99
procedural_generator
Apache-2.0
proc_algo_bigo_v2
231
56
-1
br-algo-proc-00000014
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(5)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 3 * f(n - 1) + 9 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=12, f(3)=45, f(4)=144, f(5)=441. Result: f(5) = 441.
441
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 3 * f(n - 1) + 9\n\nassert f(5) == 441" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
224
55
-1
br-algo-proc-00000016
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([30, 10, 6, 29, 22, 20, -3, 10], 14)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=30 > 14: acc += 30*1 -> 30 - i=1, val=10 <= 14: acc -= 1 -> 29 - i=2, val=6 <= 14: acc -= 1 -> 28 - i=3, val=29 > 14: acc += 29*4 -> 144 - i=4, val=22 > 14: acc += 22*5 -> 254 - i=5, val=20 > 14: acc += 20*6 -> 374 - i=6, val=-3 <= 14: acc -= 1 -> 373 - i=7, val=10 <= 14: acc -= 1 -> 372 Ret...
372
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([30, 10, 6, 29, 22, 20, -3, 10], 14) == 372" ...
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
648
161
-1
br-algo-proc-00000017
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([29, 3, 10, -11], 0)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=29 > 0: acc += 29*1 -> 29 - i=1, val=3 > 0: acc += 3*2 -> 35 - i=2, val=10 > 0: acc += 10*3 -> 65 - i=3, val=-11 <= 0: acc -= 1 -> 64 Return value: 64.
64
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([29, 3, 10, -11], 0) == 64" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
475
118
-1
br-algo-proc-00000019
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(8)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 2 * f(n - 1) + 11 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=13, f(3)=37, f(4)=85, f(5)=181, f(6)=373, f(7)=757, f(8)=1525. Result: f(8) = 1525.
1525
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 2 * f(n - 1) + 11\n\nassert f(8) == 1525" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
257
63
-1
br-algo-proc-00000020
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(4)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 1 * f(n - 1) + 10 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=11, f(3)=21, f(4)=31. Result: f(4) = 31.
31
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 1 * f(n - 1) + 10\n\nassert f(4) == 31" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
212
52
-1
br-algo-proc-00000022
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-13, -7, -8, 21], -1)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=-13 <= -1: acc -= 1 -> -1 - i=1, val=-7 <= -1: acc -= 1 -> -2 - i=2, val=-8 <= -1: acc -= 1 -> -3 - i=3, val=21 > -1: acc += 21*4 -> 81 Return value: 81.
81
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-13, -7, -8, 21], -1) == 81" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
479
119
-1
br-algo-proc-00000023
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(9)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 2 * f(n - 1) + 3 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=5, f(3)=13, f(4)=29, f(5)=61, f(6)=125, f(7)=253, f(8)=509, f(9)=1021. Result: f(9) = 1021.
1021
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 2 * f(n - 1) + 3\n\nassert f(9) == 1021" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
264
65
-1
br-algo-proc-00000024
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(4)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 5 * f(n - 1) + 1 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=6, f(3)=31, f(4)=156. Result: f(4) = 156.
156
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 5 * f(n - 1) + 1\n\nassert f(4) == 156" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
213
52
-1
br-algo-proc-00000027
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(8)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 4 * f(n - 1) + 3 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=7, f(3)=31, f(4)=127, f(5)=511, f(6)=2047, f(7)=8191, f(8)=32767. Result: f(8) = 32767.
32767
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 4 * f(n - 1) + 3\n\nassert f(8) == 32767" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
261
64
-1
br-algo-proc-00000028
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([15, 22, -11, 18], 7)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=15 > 7: acc += 15*1 -> 15 - i=1, val=22 > 7: acc += 22*2 -> 59 - i=2, val=-11 <= 7: acc -= 1 -> 58 - i=3, val=18 > 7: acc += 18*4 -> 130 Return value: 130.
130
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([15, 22, -11, 18], 7) == 130" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
481
119
-1
br-algo-proc-00000029
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-1, -5, -6, 18, 21, 1, 22, 9], 1)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=-1 <= 1: acc -= 1 -> -1 - i=1, val=-5 <= 1: acc -= 1 -> -2 - i=2, val=-6 <= 1: acc -= 1 -> -3 - i=3, val=18 > 1: acc += 18*4 -> 69 - i=4, val=21 > 1: acc += 21*5 -> 174 - i=5, val=1 <= 1: acc -= 1 -> 173 - i=6, val=22 > 1: acc += 22*7 -> 327 - i=7, val=9 > 1: acc += 9*8 -> 399 Return value: ...
399
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-1, -5, -6, 18, 21, 1, 22, 9], 1) == 399" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
635
158
-1
br-algo-proc-00000032
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([13, 30, -8, 21], 4)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=13 > 4: acc += 13*1 -> 13 - i=1, val=30 > 4: acc += 30*2 -> 73 - i=2, val=-8 <= 4: acc -= 1 -> 72 - i=3, val=21 > 4: acc += 21*4 -> 156 Return value: 156.
156
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([13, 30, -8, 21], 4) == 156" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
479
119
-1
br-algo-proc-00000033
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([18, 1, 23, 21, -5, 23], 12)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=18 > 12: acc += 18*1 -> 18 - i=1, val=1 <= 12: acc -= 1 -> 17 - i=2, val=23 > 12: acc += 23*3 -> 86 - i=3, val=21 > 12: acc += 21*4 -> 170 - i=4, val=-5 <= 12: acc -= 1 -> 169 - i=5, val=23 > 12: acc += 23*6 -> 307 Return value: 307.
307
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([18, 1, 23, 21, -5, 23], 12) == 307" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
566
140
-1
br-algo-proc-00000034
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(5)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 4 * f(n - 1) + 5 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=9, f(3)=41, f(4)=169, f(5)=681. Result: f(5) = 681.
681
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 4 * f(n - 1) + 5\n\nassert f(5) == 681" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
223
55
-1
br-algo-proc-00000035
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([2, -15, 5, -10, 17, -10], -4)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=2 > -4: acc += 2*1 -> 2 - i=1, val=-15 <= -4: acc -= 1 -> 1 - i=2, val=5 > -4: acc += 5*3 -> 16 - i=3, val=-10 <= -4: acc -= 1 -> 15 - i=4, val=17 > -4: acc += 17*5 -> 100 - i=5, val=-10 <= -4: acc -= 1 -> 99 Return value: 99.
99
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([2, -15, 5, -10, 17, -10], -4) == 99" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
560
139
-1
br-algo-proc-00000036
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([4, 29, -4, 23, -6, 27], -4)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=4 > -4: acc += 4*1 -> 4 - i=1, val=29 > -4: acc += 29*2 -> 62 - i=2, val=-4 <= -4: acc -= 1 -> 61 - i=3, val=23 > -4: acc += 23*4 -> 153 - i=4, val=-6 <= -4: acc -= 1 -> 152 - i=5, val=27 > -4: acc += 27*6 -> 314 Return value: 314.
314
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([4, 29, -4, 23, -6, 27], -4) == 314" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
564
140
-1
br-algo-proc-00000038
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(10)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 2 * f(n - 1) + 5 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=7, f(3)=19, f(4)=43, f(5)=91, f(6)=187, f(7)=379, f(8)=763, f(9)=1531, f(10)=3067. Result: f(10) = 3067.
3067
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 2 * f(n - 1) + 5\n\nassert f(10) == 3067" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
278
68
-1
br-algo-proc-00000039
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(4)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 5 * f(n - 1) + 2 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=7, f(3)=37, f(4)=187. Result: f(4) = 187.
187
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 5 * f(n - 1) + 2\n\nassert f(4) == 187" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
213
52
-1
br-algo-proc-00000040
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([27, 8, 8, 23, 1], 0)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=27 > 0: acc += 27*1 -> 27 - i=1, val=8 > 0: acc += 8*2 -> 43 - i=2, val=8 > 0: acc += 8*3 -> 67 - i=3, val=23 > 0: acc += 23*4 -> 159 - i=4, val=1 > 0: acc += 1*5 -> 164 Return value: 164.
164
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([27, 8, 8, 23, 1], 0) == 164" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
514
127
-1
br-algo-proc-00000041
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([29, -13, -11, 15, 1], -3)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=29 > -3: acc += 29*1 -> 29 - i=1, val=-13 <= -3: acc -= 1 -> 28 - i=2, val=-11 <= -3: acc -= 1 -> 27 - i=3, val=15 > -3: acc += 15*4 -> 87 - i=4, val=1 > -3: acc += 1*5 -> 92 Return value: 92.
92
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([29, -13, -11, 15, 1], -3) == 92" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
522
130
-1
br-algo-proc-00000043
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(7)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 5 * f(n - 1) + 8 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=13, f(3)=73, f(4)=373, f(5)=1873, f(6)=9373, f(7)=46873. Result: f(7) = 46873.
46873
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 5 * f(n - 1) + 8\n\nassert f(7) == 46873" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
252
61
-1
br-algo-proc-00000044
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(11)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 1 * f(n - 1) + 7 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=8, f(3)=15, f(4)=22, f(5)=29, f(6)=36, f(7)=43, f(8)=50, f(9)=57, f(10)=64, f(11)=71. Result: f(11) = 71.
71
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 1 * f(n - 1) + 7\n\nassert f(11) == 71" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
277
68
-1
br-algo-proc-00000045
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(10)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 5 * f(n - 1) + 1 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=6, f(3)=31, f(4)=156, f(5)=781, f(6)=3906, f(7)=19531, f(8)=97656, f(9)=488281, f(10)=2441406. Result: f(10) = 2441406.
2441406
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 5 * f(n - 1) + 1\n\nassert f(10) == 2441406" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
296
72
-1
br-algo-proc-00000047
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-6, 8, -9, 24, 19, -7, -14], 3)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=-6 <= 3: acc -= 1 -> -1 - i=1, val=8 > 3: acc += 8*2 -> 15 - i=2, val=-9 <= 3: acc -= 1 -> 14 - i=3, val=24 > 3: acc += 24*4 -> 110 - i=4, val=19 > 3: acc += 19*5 -> 205 - i=5, val=-7 <= 3: acc -= 1 -> 204 - i=6, val=-14 <= 3: acc -= 1 -> 203 Return value: 203.
203
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-6, 8, -9, 24, 19, -7, -14], 3) == 203" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
598
148
-1
br-algo-proc-00000048
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-13, 8, 8, -3, -4, 16, 3, 17], 1)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=-13 <= 1: acc -= 1 -> -1 - i=1, val=8 > 1: acc += 8*2 -> 15 - i=2, val=8 > 1: acc += 8*3 -> 39 - i=3, val=-3 <= 1: acc -= 1 -> 38 - i=4, val=-4 <= 1: acc -= 1 -> 37 - i=5, val=16 > 1: acc += 16*6 -> 133 - i=6, val=3 > 1: acc += 3*7 -> 154 - i=7, val=17 > 1: acc += 17*8 -> 290 Return value: 2...
290
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-13, 8, 8, -3, -4, 16, 3, 17], 1) == 290" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
634
157
-1
br-algo-proc-00000049
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(10)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 3 * f(n - 1) + 3 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=6, f(3)=21, f(4)=66, f(5)=201, f(6)=606, f(7)=1821, f(8)=5466, f(9)=16401, f(10)=49206. Result: f(10) = 49206.
49206
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 3 * f(n - 1) + 3\n\nassert f(10) == 49206" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
285
70
-1
br-algo-proc-00000050
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([28, 29, 10, 7, -13, 4, 8, -13], 15)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=28 > 15: acc += 28*1 -> 28 - i=1, val=29 > 15: acc += 29*2 -> 86 - i=2, val=10 <= 15: acc -= 1 -> 85 - i=3, val=7 <= 15: acc -= 1 -> 84 - i=4, val=-13 <= 15: acc -= 1 -> 83 - i=5, val=4 <= 15: acc -= 1 -> 82 - i=6, val=8 <= 15: acc -= 1 -> 81 - i=7, val=-13 <= 15: acc -= 1 -> 80 Return value...
80
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([28, 29, 10, 7, -13, 4, 8, -13], 15) == 80" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
637
158
-1
br-algo-proc-00000051
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(8)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 4 * f(n - 1) + 12 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=16, f(3)=76, f(4)=316, f(5)=1276, f(6)=5116, f(7)=20476, f(8)=81916. Result: f(8) = 81916.
81916
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 4 * f(n - 1) + 12\n\nassert f(8) == 81916" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
265
65
-1
br-algo-proc-00000054
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-9, 20, -2, 7, 15, 14, 17, 20], 13)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=-9 <= 13: acc -= 1 -> -1 - i=1, val=20 > 13: acc += 20*2 -> 39 - i=2, val=-2 <= 13: acc -= 1 -> 38 - i=3, val=7 <= 13: acc -= 1 -> 37 - i=4, val=15 > 13: acc += 15*5 -> 112 - i=5, val=14 > 13: acc += 14*6 -> 196 - i=6, val=17 > 13: acc += 17*7 -> 315 - i=7, val=20 > 13: acc += 20*8 -> 475 Re...
475
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-9, 20, -2, 7, 15, 14, 17, 20], 13) == 475" ...
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
649
161
-1
br-algo-proc-00000055
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([16, 13, 10, -10, 2], 10)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=16 > 10: acc += 16*1 -> 16 - i=1, val=13 > 10: acc += 13*2 -> 42 - i=2, val=10 <= 10: acc -= 1 -> 41 - i=3, val=-10 <= 10: acc -= 1 -> 40 - i=4, val=2 <= 10: acc -= 1 -> 39 Return value: 39.
39
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([16, 13, 10, -10, 2], 10) == 39" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
519
129
-1
br-algo-proc-00000057
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([26, -12, -1, 5, 5, -2, 24, 25], 9)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=26 > 9: acc += 26*1 -> 26 - i=1, val=-12 <= 9: acc -= 1 -> 25 - i=2, val=-1 <= 9: acc -= 1 -> 24 - i=3, val=5 <= 9: acc -= 1 -> 23 - i=4, val=5 <= 9: acc -= 1 -> 22 - i=5, val=-2 <= 9: acc -= 1 -> 21 - i=6, val=24 > 9: acc += 24*7 -> 189 - i=7, val=25 > 9: acc += 25*8 -> 389 Return value: 38...
389
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([26, -12, -1, 5, 5, -2, 24, 25], 9) == 389" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
634
157
-1
br-algo-proc-00000059
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([4, -6, 20, -5, 2, 20, -12], 3)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=4 > 3: acc += 4*1 -> 4 - i=1, val=-6 <= 3: acc -= 1 -> 3 - i=2, val=20 > 3: acc += 20*3 -> 63 - i=3, val=-5 <= 3: acc -= 1 -> 62 - i=4, val=2 <= 3: acc -= 1 -> 61 - i=5, val=20 > 3: acc += 20*6 -> 181 - i=6, val=-12 <= 3: acc -= 1 -> 180 Return value: 180.
180
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([4, -6, 20, -5, 2, 20, -12], 3) == 180" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
592
147
-1
br-algo-proc-00000060
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([0, 22, -4, 26, -11, 8, 23], 8)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=0 <= 8: acc -= 1 -> -1 - i=1, val=22 > 8: acc += 22*2 -> 43 - i=2, val=-4 <= 8: acc -= 1 -> 42 - i=3, val=26 > 8: acc += 26*4 -> 146 - i=4, val=-11 <= 8: acc -= 1 -> 145 - i=5, val=8 <= 8: acc -= 1 -> 144 - i=6, val=23 > 8: acc += 23*7 -> 305 Return value: 305.
305
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([0, 22, -4, 26, -11, 8, 23], 8) == 305" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
597
148
-1
br-algo-proc-00000061
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([24, 13, 15, 7, 22, 12, 22, -13], -5)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=24 > -5: acc += 24*1 -> 24 - i=1, val=13 > -5: acc += 13*2 -> 50 - i=2, val=15 > -5: acc += 15*3 -> 95 - i=3, val=7 > -5: acc += 7*4 -> 123 - i=4, val=22 > -5: acc += 22*5 -> 233 - i=5, val=12 > -5: acc += 12*6 -> 305 - i=6, val=22 > -5: acc += 22*7 -> 459 - i=7, val=-13 <= -5: acc -= 1 -> 4...
458
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([24, 13, 15, 7, 22, 12, 22, -13], -5) == 458"...
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
655
163
-1
br-algo-proc-00000062
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-6, -10, 20, 18, 19, 19, 11], 14)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=-6 <= 14: acc -= 1 -> -1 - i=1, val=-10 <= 14: acc -= 1 -> -2 - i=2, val=20 > 14: acc += 20*3 -> 58 - i=3, val=18 > 14: acc += 18*4 -> 130 - i=4, val=19 > 14: acc += 19*5 -> 225 - i=5, val=19 > 14: acc += 19*6 -> 339 - i=6, val=11 <= 14: acc -= 1 -> 338 Return value: 338.
338
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-6, -10, 20, 18, 19, 19, 11], 14) == 338" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
611
152
-1
br-algo-proc-00000064
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-14, -15, 19, -9, 6], 3)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=-14 <= 3: acc -= 1 -> -1 - i=1, val=-15 <= 3: acc -= 1 -> -2 - i=2, val=19 > 3: acc += 19*3 -> 55 - i=3, val=-9 <= 3: acc -= 1 -> 54 - i=4, val=6 > 3: acc += 6*5 -> 84 Return value: 84.
84
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-14, -15, 19, -9, 6], 3) == 84" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
514
128
-1
br-algo-proc-00000065
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-14, 28, -15, 9, 27, 23, 23, -4], -2)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=-14 <= -2: acc -= 1 -> -1 - i=1, val=28 > -2: acc += 28*2 -> 55 - i=2, val=-15 <= -2: acc -= 1 -> 54 - i=3, val=9 > -2: acc += 9*4 -> 90 - i=4, val=27 > -2: acc += 27*5 -> 225 - i=5, val=23 > -2: acc += 23*6 -> 363 - i=6, val=23 > -2: acc += 23*7 -> 524 - i=7, val=-4 <= -2: acc -= 1 -> 523 R...
523
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-14, 28, -15, 9, 27, 23, 23, -4], -2) == 523...
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
652
162
-1
br-algo-proc-00000068
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(9)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 1 * f(n - 1) + 1 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=2, f(3)=3, f(4)=4, f(5)=5, f(6)=6, f(7)=7, f(8)=8, f(9)=9. Result: f(9) = 9.
9
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 1 * f(n - 1) + 1\n\nassert f(9) == 9" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
246
61
-1
br-algo-proc-00000069
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([19, -4, -15, 13, -5, 11, 27, -8], 10)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=19 > 10: acc += 19*1 -> 19 - i=1, val=-4 <= 10: acc -= 1 -> 18 - i=2, val=-15 <= 10: acc -= 1 -> 17 - i=3, val=13 > 10: acc += 13*4 -> 69 - i=4, val=-5 <= 10: acc -= 1 -> 68 - i=5, val=11 > 10: acc += 11*6 -> 134 - i=6, val=27 > 10: acc += 27*7 -> 323 - i=7, val=-8 <= 10: acc -= 1 -> 322 Ret...
322
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([19, -4, -15, 13, -5, 11, 27, -8], 10) == 322...
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
650
161
-1
br-algo-proc-00000070
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(4)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 3 * f(n - 1) + 10 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=13, f(3)=49, f(4)=157. Result: f(4) = 157.
157
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 3 * f(n - 1) + 10\n\nassert f(4) == 157" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
215
53
-1
br-algo-proc-00000073
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([29, 28, -4, 27], 8)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=29 > 8: acc += 29*1 -> 29 - i=1, val=28 > 8: acc += 28*2 -> 85 - i=2, val=-4 <= 8: acc -= 1 -> 84 - i=3, val=27 > 8: acc += 27*4 -> 192 Return value: 192.
192
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([29, 28, -4, 27], 8) == 192" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
479
119
-1
br-algo-proc-00000074
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(10)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 5 * f(n - 1) + 11 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=16, f(3)=91, f(4)=466, f(5)=2341, f(6)=11716, f(7)=58591, f(8)=292966, f(9)=1464841, f(10)=7324216. Result: f(10) = 7324216.
7324216
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 5 * f(n - 1) + 11\n\nassert f(10) == 7324216" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
302
73
-1
br-algo-proc-00000075
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-7, -4, 14, 24, 0, 6, -3], 11)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=-7 <= 11: acc -= 1 -> -1 - i=1, val=-4 <= 11: acc -= 1 -> -2 - i=2, val=14 > 11: acc += 14*3 -> 40 - i=3, val=24 > 11: acc += 24*4 -> 136 - i=4, val=0 <= 11: acc -= 1 -> 135 - i=5, val=6 <= 11: acc -= 1 -> 134 - i=6, val=-3 <= 11: acc -= 1 -> 133 Return value: 133.
133
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-7, -4, 14, 24, 0, 6, -3], 11) == 133" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
601
149
-1
br-algo-proc-00000078
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-9, 26, 22, 22], 5)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=-9 <= 5: acc -= 1 -> -1 - i=1, val=26 > 5: acc += 26*2 -> 51 - i=2, val=22 > 5: acc += 22*3 -> 117 - i=3, val=22 > 5: acc += 22*4 -> 205 Return value: 205.
205
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-9, 26, 22, 22], 5) == 205" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
480
119
-1
br-algo-proc-00000079
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(4)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 1 * f(n - 1) + 12 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=13, f(3)=25, f(4)=37. Result: f(4) = 37.
37
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 1 * f(n - 1) + 12\n\nassert f(4) == 37" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
212
52
-1
br-algo-proc-00000081
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([6, 20, -3, -8], -4)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=6 > -4: acc += 6*1 -> 6 - i=1, val=20 > -4: acc += 20*2 -> 46 - i=2, val=-3 > -4: acc += -3*3 -> 37 - i=3, val=-8 <= -4: acc -= 1 -> 36 Return value: 36.
36
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([6, 20, -3, -8], -4) == 36" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
477
118
-1
br-algo-proc-00000082
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-8, -8, 17, 13], 10)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=-8 <= 10: acc -= 1 -> -1 - i=1, val=-8 <= 10: acc -= 1 -> -2 - i=2, val=17 > 10: acc += 17*3 -> 49 - i=3, val=13 > 10: acc += 13*4 -> 101 Return value: 101.
101
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-8, -8, 17, 13], 10) == 101" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
482
119
-1
br-algo-proc-00000083
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-7, 3, 0, 14, 0, 10, -11, 23], 7)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=-7 <= 7: acc -= 1 -> -1 - i=1, val=3 <= 7: acc -= 1 -> -2 - i=2, val=0 <= 7: acc -= 1 -> -3 - i=3, val=14 > 7: acc += 14*4 -> 53 - i=4, val=0 <= 7: acc -= 1 -> 52 - i=5, val=10 > 7: acc += 10*6 -> 112 - i=6, val=-11 <= 7: acc -= 1 -> 111 - i=7, val=23 > 7: acc += 23*8 -> 295 Return value: 29...
295
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-7, 3, 0, 14, 0, 10, -11, 23], 7) == 295" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
633
157
-1
br-algo-proc-00000084
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([0, 17, -11, 10, 2], 4)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=0 <= 4: acc -= 1 -> -1 - i=1, val=17 > 4: acc += 17*2 -> 33 - i=2, val=-11 <= 4: acc -= 1 -> 32 - i=3, val=10 > 4: acc += 10*4 -> 72 - i=4, val=2 <= 4: acc -= 1 -> 71 Return value: 71.
71
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([0, 17, -11, 10, 2], 4) == 71" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
511
127
-1
br-algo-proc-00000085
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(5)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 5 * f(n - 1) + 1 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=6, f(3)=31, f(4)=156, f(5)=781. Result: f(5) = 781.
781
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 5 * f(n - 1) + 1\n\nassert f(5) == 781" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
223
55
-1
br-algo-proc-00000089
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-7, 11, -14, 5, 25], -2)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=-7 <= -2: acc -= 1 -> -1 - i=1, val=11 > -2: acc += 11*2 -> 21 - i=2, val=-14 <= -2: acc -= 1 -> 20 - i=3, val=5 > -2: acc += 5*4 -> 40 - i=4, val=25 > -2: acc += 25*5 -> 165 Return value: 165.
165
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-7, 11, -14, 5, 25], -2) == 165" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
523
130
-1
br-algo-proc-00000090
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(5)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 4 * f(n - 1) + 6 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=10, f(3)=46, f(4)=190, f(5)=766. Result: f(5) = 766.
766
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 4 * f(n - 1) + 6\n\nassert f(5) == 766" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
224
55
-1
br-algo-proc-00000091
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([9, -2, -9, -11], 3)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=9 > 3: acc += 9*1 -> 9 - i=1, val=-2 <= 3: acc -= 1 -> 8 - i=2, val=-9 <= 3: acc -= 1 -> 7 - i=3, val=-11 <= 3: acc -= 1 -> 6 Return value: 6.
6
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([9, -2, -9, -11], 3) == 6" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
465
116
-1
br-algo-proc-00000094
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([13, -9, 15, -15, 9, 8, -4], 4)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=13 > 4: acc += 13*1 -> 13 - i=1, val=-9 <= 4: acc -= 1 -> 12 - i=2, val=15 > 4: acc += 15*3 -> 57 - i=3, val=-15 <= 4: acc -= 1 -> 56 - i=4, val=9 > 4: acc += 9*5 -> 101 - i=5, val=8 > 4: acc += 8*6 -> 149 - i=6, val=-4 <= 4: acc -= 1 -> 148 Return value: 148.
148
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([13, -9, 15, -15, 9, 8, -4], 4) == 148" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
596
148
-1
br-algo-proc-00000097
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(8)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 4 * f(n - 1) + 6 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=10, f(3)=46, f(4)=190, f(5)=766, f(6)=3070, f(7)=12286, f(8)=49150. Result: f(8) = 49150.
49150
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 4 * f(n - 1) + 6\n\nassert f(8) == 49150" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
263
64
-1
br-algo-proc-00000098
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-15, 7, 23, 22, 13, 12, 26, 19], 1)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=-15 <= 1: acc -= 1 -> -1 - i=1, val=7 > 1: acc += 7*2 -> 13 - i=2, val=23 > 1: acc += 23*3 -> 82 - i=3, val=22 > 1: acc += 22*4 -> 170 - i=4, val=13 > 1: acc += 13*5 -> 235 - i=5, val=12 > 1: acc += 12*6 -> 307 - i=6, val=26 > 1: acc += 26*7 -> 489 - i=7, val=19 > 1: acc += 19*8 -> 641 Retur...
641
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-15, 7, 23, 22, 13, 12, 26, 19], 1) == 641" ...
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
646
160
-1
br-algo-proc-00000101
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(9)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 5 * f(n - 1) + 7 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=12, f(3)=67, f(4)=342, f(5)=1717, f(6)=8592, f(7)=42967, f(8)=214842, f(9)=1074217. Result: f(9) = 1074217.
1074217
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 5 * f(n - 1) + 7\n\nassert f(9) == 1074217" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
283
69
-1
br-algo-proc-00000102
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([24, 2, 15, -10, 26, -10, -3, 23], 8)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=24 > 8: acc += 24*1 -> 24 - i=1, val=2 <= 8: acc -= 1 -> 23 - i=2, val=15 > 8: acc += 15*3 -> 68 - i=3, val=-10 <= 8: acc -= 1 -> 67 - i=4, val=26 > 8: acc += 26*5 -> 197 - i=5, val=-10 <= 8: acc -= 1 -> 196 - i=6, val=-3 <= 8: acc -= 1 -> 195 - i=7, val=23 > 8: acc += 23*8 -> 379 Return val...
379
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([24, 2, 15, -10, 26, -10, -3, 23], 8) == 379"...
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
642
159
-1
br-algo-proc-00000103
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(11)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 5 * f(n - 1) + 6 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=11, f(3)=61, f(4)=311, f(5)=1561, f(6)=7811, f(7)=39061, f(8)=195311, f(9)=976561, f(10)=4882811, f(11)=24414061. Result: f(11) = 24414061.
24414061
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 5 * f(n - 1) + 6\n\nassert f(11) == 24414061" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
317
77
-1
br-algo-proc-00000104
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(11)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 1 * f(n - 1) + 12 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=13, f(3)=25, f(4)=37, f(5)=49, f(6)=61, f(7)=73, f(8)=85, f(9)=97, f(10)=109, f(11)=121. Result: f(11) = 121.
121
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 1 * f(n - 1) + 12\n\nassert f(11) == 121" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
283
70
-1
br-algo-proc-00000105
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(7)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 4 * f(n - 1) + 11 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=15, f(3)=71, f(4)=295, f(5)=1191, f(6)=4775, f(7)=19111. Result: f(7) = 19111.
19111
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 4 * f(n - 1) + 11\n\nassert f(7) == 19111" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
253
62
-1
br-algo-proc-00000106
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(6)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 2 * f(n - 1) + 9 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=11, f(3)=31, f(4)=71, f(5)=151, f(6)=311. Result: f(6) = 311.
311
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 2 * f(n - 1) + 9\n\nassert f(6) == 311" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
233
57
-1
br-algo-proc-00000108
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-4, 4, 15, -14, -11, -9, 5, -7], 3)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=-4 <= 3: acc -= 1 -> -1 - i=1, val=4 > 3: acc += 4*2 -> 7 - i=2, val=15 > 3: acc += 15*3 -> 52 - i=3, val=-14 <= 3: acc -= 1 -> 51 - i=4, val=-11 <= 3: acc -= 1 -> 50 - i=5, val=-9 <= 3: acc -= 1 -> 49 - i=6, val=5 > 3: acc += 5*7 -> 84 - i=7, val=-7 <= 3: acc -= 1 -> 83 Return value: 83.
83
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-4, 4, 15, -14, -11, -9, 5, -7], 3) == 83" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
629
156
-1
br-algo-proc-00000110
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-11, 25, 3, 19, 5, -10], 11)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=-11 <= 11: acc -= 1 -> -1 - i=1, val=25 > 11: acc += 25*2 -> 49 - i=2, val=3 <= 11: acc -= 1 -> 48 - i=3, val=19 > 11: acc += 19*4 -> 124 - i=4, val=5 <= 11: acc -= 1 -> 123 - i=5, val=-10 <= 11: acc -= 1 -> 122 Return value: 122.
122
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-11, 25, 3, 19, 5, -10], 11) == 122" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
564
140
-1
br-algo-proc-00000111
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-6, 23, 14, 2], 6)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=-6 <= 6: acc -= 1 -> -1 - i=1, val=23 > 6: acc += 23*2 -> 45 - i=2, val=14 > 6: acc += 14*3 -> 87 - i=3, val=2 <= 6: acc -= 1 -> 86 Return value: 86.
86
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-6, 23, 14, 2], 6) == 86" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
472
117
-1
br-algo-proc-00000117
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(11)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 4 * f(n - 1) + 6 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=10, f(3)=46, f(4)=190, f(5)=766, f(6)=3070, f(7)=12286, f(8)=49150, f(9)=196606, f(10)=786430, f(11)=3145726. Result: f(11) = 3145726.
3145726
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 4 * f(n - 1) + 6\n\nassert f(11) == 3145726" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
311
76
-1
br-algo-proc-00000118
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(11)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 2 * f(n - 1) + 9 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=11, f(3)=31, f(4)=71, f(5)=151, f(6)=311, f(7)=631, f(8)=1271, f(9)=2551, f(10)=5111, f(11)=10231. Result: f(11) = 10231.
10231
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 2 * f(n - 1) + 9\n\nassert f(11) == 10231" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
296
72
-1
br-algo-proc-00000121
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([5, -14, 28, 29, 0], 11)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=5 <= 11: acc -= 1 -> -1 - i=1, val=-14 <= 11: acc -= 1 -> -2 - i=2, val=28 > 11: acc += 28*3 -> 82 - i=3, val=29 > 11: acc += 29*4 -> 198 - i=4, val=0 <= 11: acc -= 1 -> 197 Return value: 197.
197
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([5, -14, 28, 29, 0], 11) == 197" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
521
129
-1
br-algo-proc-00000123
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([20, -8, 29, 2, 26], -3)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=20 > -3: acc += 20*1 -> 20 - i=1, val=-8 <= -3: acc -= 1 -> 19 - i=2, val=29 > -3: acc += 29*3 -> 106 - i=3, val=2 > -3: acc += 2*4 -> 114 - i=4, val=26 > -3: acc += 26*5 -> 244 Return value: 244.
244
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([20, -8, 29, 2, 26], -3) == 244" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
525
130
-1
br-algo-proc-00000124
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([11, -5, -14, 22, 18, -8, -15, 17], 2)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=11 > 2: acc += 11*1 -> 11 - i=1, val=-5 <= 2: acc -= 1 -> 10 - i=2, val=-14 <= 2: acc -= 1 -> 9 - i=3, val=22 > 2: acc += 22*4 -> 97 - i=4, val=18 > 2: acc += 18*5 -> 187 - i=5, val=-8 <= 2: acc -= 1 -> 186 - i=6, val=-15 <= 2: acc -= 1 -> 185 - i=7, val=17 > 2: acc += 17*8 -> 321 Return val...
321
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([11, -5, -14, 22, 18, -8, -15, 17], 2) == 321...
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
643
160
-1
br-algo-proc-00000125
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([10, -15, 22, -1, 4, 9], 0)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=10 > 0: acc += 10*1 -> 10 - i=1, val=-15 <= 0: acc -= 1 -> 9 - i=2, val=22 > 0: acc += 22*3 -> 75 - i=3, val=-1 <= 0: acc -= 1 -> 74 - i=4, val=4 > 0: acc += 4*5 -> 94 - i=5, val=9 > 0: acc += 9*6 -> 148 Return value: 148.
148
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([10, -15, 22, -1, 4, 9], 0) == 148" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
554
137
-1
br-algo-proc-00000127
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(11)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 2 * f(n - 1) + 10 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=12, f(3)=34, f(4)=78, f(5)=166, f(6)=342, f(7)=694, f(8)=1398, f(9)=2806, f(10)=5622, f(11)=11254. Result: f(11) = 11254.
11254
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 2 * f(n - 1) + 10\n\nassert f(11) == 11254" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
297
73
-1
br-algo-proc-00000129
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([0, -4, 10, 7, -13, 2, 30, -13], 15)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=0 <= 15: acc -= 1 -> -1 - i=1, val=-4 <= 15: acc -= 1 -> -2 - i=2, val=10 <= 15: acc -= 1 -> -3 - i=3, val=7 <= 15: acc -= 1 -> -4 - i=4, val=-13 <= 15: acc -= 1 -> -5 - i=5, val=2 <= 15: acc -= 1 -> -6 - i=6, val=30 > 15: acc += 30*7 -> 204 - i=7, val=-13 <= 15: acc -= 1 -> 203 Return value...
203
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([0, -4, 10, 7, -13, 2, 30, -13], 15) == 203" ...
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
639
159
-1
br-algo-proc-00000132
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(11)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 1 * f(n - 1) + 4 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=5, f(3)=9, f(4)=13, f(5)=17, f(6)=21, f(7)=25, f(8)=29, f(9)=33, f(10)=37, f(11)=41. Result: f(11) = 41.
41
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 1 * f(n - 1) + 4\n\nassert f(11) == 41" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
276
68
-1
br-algo-proc-00000133
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([23, 20, 25, -5], -4)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=23 > -4: acc += 23*1 -> 23 - i=1, val=20 > -4: acc += 20*2 -> 63 - i=2, val=25 > -4: acc += 25*3 -> 138 - i=3, val=-5 <= -4: acc -= 1 -> 137 Return value: 137.
137
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([23, 20, 25, -5], -4) == 137" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
485
120
-1
br-algo-proc-00000135
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(7)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 5 * f(n - 1) + 11 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=16, f(3)=91, f(4)=466, f(5)=2341, f(6)=11716, f(7)=58591. Result: f(7) = 58591.
58591
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 5 * f(n - 1) + 11\n\nassert f(7) == 58591" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
254
62
-1
br-algo-proc-00000136
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([11, 3, 20, 15, -9, 18, -11], -5)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=11 > -5: acc += 11*1 -> 11 - i=1, val=3 > -5: acc += 3*2 -> 17 - i=2, val=20 > -5: acc += 20*3 -> 77 - i=3, val=15 > -5: acc += 15*4 -> 137 - i=4, val=-9 <= -5: acc -= 1 -> 136 - i=5, val=18 > -5: acc += 18*6 -> 244 - i=6, val=-11 <= -5: acc -= 1 -> 243 Return value: 243.
243
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([11, 3, 20, 15, -9, 18, -11], -5) == 243" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
610
151
-1
br-algo-proc-00000138
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([22, 10, 8, -6, -6, 1, 27, 4], 13)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=22 > 13: acc += 22*1 -> 22 - i=1, val=10 <= 13: acc -= 1 -> 21 - i=2, val=8 <= 13: acc -= 1 -> 20 - i=3, val=-6 <= 13: acc -= 1 -> 19 - i=4, val=-6 <= 13: acc -= 1 -> 18 - i=5, val=1 <= 13: acc -= 1 -> 17 - i=6, val=27 > 13: acc += 27*7 -> 206 - i=7, val=4 <= 13: acc -= 1 -> 205 Return value...
205
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([22, 10, 8, -6, -6, 1, 27, 4], 13) == 205" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
637
158
-1
br-algo-proc-00000140
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(9)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 4 * f(n - 1) + 9 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=13, f(3)=61, f(4)=253, f(5)=1021, f(6)=4093, f(7)=16381, f(8)=65533, f(9)=262141. Result: f(9) = 262141.
262141
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 4 * f(n - 1) + 9\n\nassert f(9) == 262141" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
279
68
-1
br-algo-proc-00000142
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([16, -6, 26, -1], -1)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=16 > -1: acc += 16*1 -> 16 - i=1, val=-6 <= -1: acc -= 1 -> 15 - i=2, val=26 > -1: acc += 26*3 -> 93 - i=3, val=-1 <= -1: acc -= 1 -> 92 Return value: 92.
92
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([16, -6, 26, -1], -1) == 92" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
479
119
-1
br-algo-proc-00000143
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(10)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 3 * f(n - 1) + 8 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=11, f(3)=41, f(4)=131, f(5)=401, f(6)=1211, f(7)=3641, f(8)=10931, f(9)=32801, f(10)=98411. Result: f(10) = 98411.
98411
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 3 * f(n - 1) + 8\n\nassert f(10) == 98411" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
289
71
-1
br-algo-proc-00000144
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([16, 28, 5, -7, 9, 24, 2], -4)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=16 > -4: acc += 16*1 -> 16 - i=1, val=28 > -4: acc += 28*2 -> 72 - i=2, val=5 > -4: acc += 5*3 -> 87 - i=3, val=-7 <= -4: acc -= 1 -> 86 - i=4, val=9 > -4: acc += 9*5 -> 131 - i=5, val=24 > -4: acc += 24*6 -> 275 - i=6, val=2 > -4: acc += 2*7 -> 289 Return value: 289.
289
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([16, 28, 5, -7, 9, 24, 2], -4) == 289" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
603
150
-1
br-algo-proc-00000146
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-10, 26, 29, -4, 9, -1, 15], 8)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
short
Execution trace: - i=0, val=-10 <= 8: acc -= 1 -> -1 - i=1, val=26 > 8: acc += 26*2 -> 51 - i=2, val=29 > 8: acc += 29*3 -> 138 - i=3, val=-4 <= 8: acc -= 1 -> 137 - i=4, val=9 > 8: acc += 9*5 -> 182 - i=5, val=-1 <= 8: acc -= 1 -> 181 - i=6, val=15 > 8: acc += 15*7 -> 286 Return value: 286.
286
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-10, 26, 29, -4, 9, -1, 15], 8) == 286" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
601
149
-1
br-algo-proc-00000147
algo-trace-loop
algorithmic_computational
execution_tracing
easy
en
Trace the Python function and determine the exact return value of `compute([-13, 0, 19, -13, 7, -14], 5)`: ```python def compute(nums, thresh): acc = 0 for i, val in enumerate(nums): if val > thresh: acc += val * (i + 1) else: acc -= 1 return acc ```
[]
direct
Execution trace: - i=0, val=-13 <= 5: acc -= 1 -> -1 - i=1, val=0 <= 5: acc -= 1 -> -2 - i=2, val=19 > 5: acc += 19*3 -> 55 - i=3, val=-13 <= 5: acc -= 1 -> 54 - i=4, val=7 > 5: acc += 7*5 -> 89 - i=5, val=-14 <= 5: acc -= 1 -> 88 Return value: 88.
88
numeric
{ "status": "verified", "method": "execution", "check_code": "def compute(nums, thresh):\n acc = 0\n for i, val in enumerate(nums):\n if val > thresh:\n acc += val * (i + 1)\n else:\n acc -= 1\n return acc\n\nassert compute([-13, 0, 19, -13, 7, -14], 5) == 88" }
99
procedural_generator
Apache-2.0
proc_algo_trace_v2
553
137
-1
br-algo-proc-00000148
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(4)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 3 * f(n - 1) + 3 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=6, f(3)=21, f(4)=66. Result: f(4) = 66.
66
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 3 * f(n - 1) + 3\n\nassert f(4) == 66" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
210
52
-1
br-algo-proc-00000154
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(10)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 5 * f(n - 1) + 5 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=10, f(3)=55, f(4)=280, f(5)=1405, f(6)=7030, f(7)=35155, f(8)=175780, f(9)=878905, f(10)=4394530. Result: f(10) = 4394530.
4394530
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 5 * f(n - 1) + 5\n\nassert f(10) == 4394530" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
299
73
-1
br-algo-proc-00000155
algo-trace-rec
algorithmic_computational
recursion_tracing
intermediate
en
Evaluate `f(4)` for the recursive function below: ```python def f(n): if n <= 1: return 1 return 2 * f(n - 1) + 9 ```
[]
direct
Bottom-up evaluation: f(1)=1, f(2)=11, f(3)=31, f(4)=71. Result: f(4) = 71.
71
numeric
{ "status": "verified", "method": "execution", "check_code": "def f(n):\n if n <= 1:\n return 1\n return 2 * f(n - 1) + 9\n\nassert f(4) == 71" }
99
procedural_generator
Apache-2.0
proc_algo_rec_v2
211
52
-1
End of preview. Expand in Data Studio

Bookbearer Reasoning (Sm0r3s/bookbearer-reasoning)

Bookbearer Reasoning is a tokenizer-agnostic, commercially permissive, ~1B-token reasoning corpus built for training and evaluating compact-to-midsize language models (within an 8,192-token context window). It ships as two Parquet configurations:

  • sft (202 zstd Parquet shards): Verified and curated reasoning problems, step-by-step solutions, and final answers across 7 core reasoning domains.
  • dpo (47 zstd Parquet shards): Paired preference examples (chosen vs. rejected) targeting common arithmetic, logical fallacy, and false-premise failure modes.

Dataset Composition (7 Categories)

Category Target Share Est. Token Budget Procedural Share Primary Upstream Sources
Mathematics 25% ~250M 15% AI-MO/NuminaMath-1.5, nvidia/OpenMathReasoning, open-r1/OpenR1-Math-220k
Logical & Deductive 20% ~200M 25% open-thoughts/OpenThoughts3-1.2M, nvidia/Llama-Nemotron-Post-Training-Dataset
Contextual & Multi-Hop 15% ~150M 15% hotpotqa/hotpot_qa, ucinlp/drop, rajpurkar/squad_v2
Scientific & Engineering 10% ~100M 20% open-thoughts/OpenThoughts3-1.2M (science), nvidia/Llama-Nemotron-Post-Training-Dataset (science)
Algorithmic & Computational 10% ~100M 15% nvidia/OpenCodeReasoning, open-thoughts/OpenThoughts3-1.2M (code)
Planning & Decision-Making 10% ~100M 25% glaiveai/glaive-function-calling-v2, nvidia/Llama-Nemotron-Post-Training-Dataset (chat)
Critical Thinking & Uncertainty 10% ~100M 30% rajpurkar/squad_v2 (unanswerables), nyu-mll/multi_nli

Quality, Verification & Deduplication Pipeline

Every record passes through a multi-stage filtering and verification funnel before being written to Parquet:

  1. Deterministic Verification (Procedural Core): 26 procedural problem families across all 7 categories are verified via SymPy symbolic assertions, constraint solvers, or isolated Python subprocess execution (python -I with strict CPU, memory, and 2-second timeouts).
  2. Tone & Format Cleaning: Strips <think>/</think> tags, emojis, and sycophantic filler prefixes to maintain a clean, model-agnostic analyst style.
  3. Quality Rubric (>= 75.0 / 100): Filters out empty fields, unverified outputs, and examples exceeding 8,000 estimated tokens (4 chars ≈ 1 token).
  4. Adaptive Length Guardrail: Classifies solutions into direct (≤64 tok), short (≤256 tok), moderate (≤1,024 tok), and extended (>1,024 tok), soft-capping extended upstream traces at 22% to preserve concise reasoning.
  5. Benchmark Decontamination: Filters prompts against 13-gram shingles from openai/gsm8k and allenai/ai2_arc (ARC-Challenge) test splits.
  6. 3-Layer Deduplication: Persistent SQLite deduplication on exact (context + problem) MD5, normalized (context + problem) MD5, and normalized solution MD5.
  7. Zero-Leak Family Splits: Deterministic splitting by family_id (94% train / 3% validation / 3% test) so template variants never leak across splits.

Schema

sft Config

Column Type Description
id string Unique record identifier
family_id string Problem family identifier used for zero-leak splitting
category string One of the 7 reasoning categories
subcategory string Fine-grained domain or task type
difficulty string beginner, easy, intermediate, or advanced
language string ISO language code (en)
problem string Problem statement or question
context string Supporting passages, premises, or tool schemas (empty if none)
constraints list<string> Explicit problem constraints (if applicable)
reasoning_mode string direct, short, moderate, or extended
solution string Clean step-by-step reasoning and explanation
answer string Concise final answer
answer_type string Expected answer format (numeric, rational, boolean, categorical, etc.)
verification struct {status, method, check_code} (symbolic, execution, solver, evidence, model_reviewed)
quality_score float64 Rubric score (75.0–100.0)
source string Upstream dataset repo or procedural_generator
source_license string Upstream license tag
generator string Procedural family or upstream source identifier
char_count int64 Total character length
est_tokens int64 Tokenizer-agnostic estimated tokens (char_count // 4)
token_count int64 Reserved for exact tokenizer audits (-1 by default)

dpo Config

Column Type Description
id string Unique pair identifier
family_id string Problem family identifier
category string Reasoning category
difficulty string Difficulty tier
prompt string Input problem
chosen string Verified correct reasoning and answer
rejected string Plausible flawed reasoning (e.g., sign error, undistributed middle, triangle inequality violation)
difference_explanation string Explicit explanation of the error in rejected
source string procedural_dpo
source_license string Apache-2.0

Usage

from datasets import load_dataset

# Load the SFT reasoning corpus (streaming recommended)
sft_ds = load_dataset("Sm0r3s/bookbearer-reasoning", "sft", split="train", streaming=True)
print(next(iter(sft_ds)))

# Load the DPO error-correction preference pairs
dpo_ds = load_dataset("Sm0r3s/bookbearer-reasoning", "dpo", split="train", streaming=True)
print(next(iter(dpo_ds)))

Licensing & Attribution

The dataset curation pipeline, schema, and procedurally generated records are released under Apache-2.0. Upstream subsets retain their original permissive licenses (Apache-2.0, CC-BY-4.0, CC-BY-SA-4.0, OANC/CC-BY), tracked per row in the source and source_license columns. ````[cite: 1]

Downloads last month
472

Collection including Sm0r3s/bookbearer-reasoning