Infron · Motif 3 · 46문항 × 3회 · Python TAR. 131,072 output tokens · 기본 1,800초 · 6+1 turns. ACC는 전체 138회, Pass@1은 각 문항의 첫 유효 시도, Pass@3는 3회 내 정답으로 계산합니다.
16개의 공과 1부터 6까지의 자연수가 하나씩 적혀 있는 여섯 개의 빈 상자가 있다. 한 개의 주사위를 사용하여 다음 시행을 한다. 주사위를 한 번 던져 나온 눈의 수가 k일 때, k가 홀수이면 1,3,5가 적힌 상자에 공을 각각 1개씩 넣고, k가 짝수이면 k의 약수가 적힌 상자에 공을 각각 1개씩 넣는다. 이 시행을 4번 반복한 후 여섯 개의 상자에 들어 있는 모든 공의 개수의 합이 홀수일 때, 3이 적힌 상자에 들어 있는 공의 개수가 2가 적힌 상자에 들어 있는 공의 개수보다 1개 더 많을 확률은?
[원문 그림의 텍스트 전사] 그림은 공 16개와 1,2,3,4,5,6으로 표시된 빈 상자 여섯 개를 나타낸다. 추가 조건은 없다.
① ② ③ ④ ⑤
최종 답은 선택지 번호 1~5 중 하나를 안에 쓰세요.
Recorded Python call:
import itertools
from math import factorial
# Die faces 1-6. For each face, which boxes get a ball:
# odd (1,3,5): boxes 1,3,5
# even: divisors
box_map = {
1: [1,3,5],
2: [1,2],
3: [1,3,5],
4: [1,2,4],
5: [1,3,5],
6: [1,2,3,6],
}
# Enumerate all (a,b,c,d,e,f) with sum 4
configs = []
for a in range(5):
for b in range(5):
for c in range(5):
for d in range(5):
for e in range(5):
for f in range(5):
if a+b+c+d+e+f == 4:
configs.append((a,b,c,d,e,f))
total_prob = 0
prob_odd = 0
prob_favorable = 0
favorable_configs = []
odd_configs = []
for (a,b,c,d,e,f) in configs:
# count balls in each box
counts = [0]*7 # 1-indexed
counts[1] = a*1 + b*1 + c*1 + d*1 + e*1 + f*1 # box1 always +1 per roll
# Actually let me compute properly
# box1: from every roll
counts[1] = 4
# box2: from rolls 2,4,6 -> b,d,f
counts[2] = b + d + f
# box3: from odd rolls (1,3,5) -> a,c,e and roll 6 -> f
counts[3] = a + c + e + f
# box4: from roll 4 -> d
counts[4] = d
# box5: from odd rolls -> a,c,e
counts[5] = a + c + e
# box6: from roll 6 -> f
counts[6] = f
total = sum(counts[1:])
multinomial = factorial(4) // (factorial(a)*factorial(b)*factorial(c)*factorial(d)*factorial(e)*factorial(f))
prob = multinomial / (6**4)
total_prob += prob
is_odd = (total % 2 == 1)
box3_minus_box2 = counts[3] - counts[2]
is_favorable = is_odd and (box3_minus_box2 == 1)
if is_odd:
odd_configs.append(((a,b,c,d,e,f), counts, total))
if is_favorable:
favorable_configs.append(((a,b,c,d,e,f), counts, total))
print("Total prob check:", total_prob)
print("Number of configs:", len(configs))
print("Number of odd configs:", len(odd_configs))
print("Number of favorable configs:", len(favorable_configs))
print()
print("P(total odd):", sum(p for _,_,_ in [(c,_,p) for c,_,_ in [(x,_,0) for x in []]]) if False else "")
# Recompute properly
prob_odd_val = 0
prob_fav_val = 0
for (a,b,c,d,e,f) in configs:
counts = [0, 4, b+d+f, a+c+e+f, d, a+c+e, f]
total = sum(counts[1:])
multinomial = factorial(4) // (factorial(a)*factorial(b)*factorial(c)*factorial(d)*factorial(e)*factorial(f))
prob = multinomial / (6**4)
if total % 2 == 1:
prob_odd_val += prob
if total % 2 == 1 and counts[3]-counts[2] == 1:
prob_fav_val += prob
print("P(total odd) =", prob_odd_val)
print("P(total odd AND box3-box2=1) =", prob_fav_val)
print("Conditional probability =", prob_fav_val / prob_odd_val)
print()
print("All odd configs:")
for (a,b,c,d,e,f), counts, total in odd_configs:
print(f" ({a},{b},{c},{d},{e},{f}) counts={counts[1:]} total={total} b3-b2={counts[3]-counts[2]}")
print()
print("All favorable configs:")
for (a,b,c,d,e,f), counts, total in favorable_configs:
print(f" ({a},{b},{c},{d},{e},{f}) counts={counts[1:]} total={total} b3-b2={counts[3]-counts[2]}")
Recorded Python call:
from math import factorial
from fractions import Fraction
# Count with exact integer weights (multinomial coefficients)
odd_weight = 0
fav_weight = 0
configs = []
for a in range(5):
for b in range(5):
for c in range(5):
for d in range(5):
for e in range(5):
for f in range(5):
if a+b+c+d+e+f == 4:
counts = [0, 4, b+d+f, a+c+e+f, d, a+c+e, f]
total = sum(counts[1:])
mc = factorial(4)//(factorial(a)*factorial(b)*factorial(c)*factorial(d)*factorial(e)*factorial(f))
if total % 2 == 1:
odd_weight += mc
if total % 2 == 1 and counts[3]-counts[2] == 1:
fav_weight += mc
print("Odd weight:", odd_weight, "=", Fraction(odd_weight, 6**4))
print("Fav weight:", fav_weight, "=", Fraction(fav_weight, 6**4))
print("Conditional:", Fraction(fav_weight, odd_weight))
print("6^4 =", 6**4)
Recorded Python call:
from math import factorial
# Verify total weight = 6^4
total_weight = 0
for a in range(5):
for b in range(5):
for c in range(5):
for d in range(5):
for e in range(5):
for f in range(5):
if a+b+c+d+e+f == 4:
mc = factorial(4)//(factorial(a)*factorial(b)*factorial(c)*factorial(d)*factorial(e)*factorial(f))
total_weight += mc
print("Total weight:", total_weight, "= 6^4 =", 6**4)
# Also verify odd weight by independent method: P(b+f odd)
# b = count of 2s, f = count of 6s in 4 rolls
# Each roll: P(2)=1/6, P(6)=1/6, P(other)=4/6
# b+f = number of rolls that are 2 or 6
# P(b+f odd) = sum over odd k of C(4,k) * (2/6)^k * (4/6)^(4-k)
# where 2/6 = P(2 or 6), 4/6 = P(other)
import math
odd_check = 0
for k in range(5):
if k % 2 == 1:
odd_check += math.comb(4, k) * (2/6)**k * (4/6)**(4-k)
print("P(b+f odd) via binomial:", odd_check)
print("640/1296 =", 640/1296)
Recorded Python call:
from math import factorial
from fractions import Fraction
# Final clean computation with exact fractions
# Let a,b,c,d,e,f = counts of faces 1..6 in 4 rolls, sum=4
# Box contents:
# B1=4, B2=b+d+f, B3=a+c+e+f, B4=d, B5=a+c+e, B6=f
# Total = 4 + (b+d+f)+(a+c+e+f)+d+(a+c+e)+f = 4+2a+b+2c+2d+2e+3f
# Parity: Total ≡ b+f (mod 2). Total odd ⟺ b+f odd.
# Box3 - Box2 = (a+c+e+f)-(b+d+f) = (a+c+e)-(b+d)
# Need Box3-Box2=1 ⟺ a+c+e = b+d+1
# With S=a+c+e, T=b+d+f, S+T=4:
# S = b+d+1, T = b+d+f, so 2(b+d)+f=3
# f odd: f=1→b+d=1; f=3→b+d=0
# Total odd: b+f odd. f=1→b odd... wait b+1 odd ⟺ b even → b=0,d=1. f=3→b+3 odd ⟺ b even→b=0,d=0.
# So favorable: (f=1,b=0,d=1,S=2) or (f=3,b=0,d=0,S=1)
# Weights
# Case f=1,b=0,d=1,S=2: sum_{a+c+e=2} 4!/(a!c!e!1!1!)
w1 = sum(factorial(4)//(factorial(a)*factorial(c)*factorial(e)*1*1)
for a in range(3) for c in range(3) for e in range(3)
if a+c+e==2)
# Case f=3,b=0,d=0,S=1: sum_{a+c+e=1} 4!/(a!c!e!3!)
w2 = sum(factorial(4)//(factorial(a)*factorial(c)*factorial(e)*factorial(3))
for a in range(2) for c in range(2) for e in range(2)
if a+c+e==1)
fav = w1 + w2
print("Favorable weight:", fav)
# Odd total weight: P(b+f odd) = sum_{k odd} C(4,k)(2/6)^k(4/6)^(4-k) * 6^4
import math
odd_w = sum(math.comb(4,k)*(2)**k*(4)**(4-k) for k in range(5) if k%2==1)
print("Odd weight:", odd_w)
print("Conditional:", Fraction(fav, odd_w))
Solution
Let be the number of times faces appear in 4 rolls, with .
Box contents (each roll contributes):
- Odd roll (1,3,5): boxes each get
- Even roll: box gets in each divisor-box of
- boxes , ,
So:
Total .
Modulo 2: . So is odd is odd.
Condition :
Let (odd-roll count), (even-roll count), . Then:
Substituting and :
Since is even, must be odd: .
- : . Parity odd odd even . Then (so ): solutions.
- : . Parity odd: odd ✓. Then (so ): solutions.
Weighted probability (multinomial weight , total weight ):
Favorable weight:
- :
- :
- Total favorable .
Odd-total weight: odd odd, where :
Therefore:
Comparative Analysis (Pprobability_28) (Average across runs)
Averages use reported measurements only. Missing usage is not treated as zero.