高校数学の質問スレ(医者・東大卒専用) Part438 (882レス)
上下前次1-新
抽出解除 必死チェッカー(本家) (べ) 自ID レス栞 あぼーん
771: 2025/03/31(月) 11:28:24.79 ID:u+Kd/O/2(1/3)調 AAS
# 赤玉a個、黒玉b個、白玉c個、青玉d個の合計(a+b+c+d)個の玉を空箱なしで3つの箱に分けて入れる。箱を区別しないとき、入れ方は何通りあるか?"
solve=function(a,b,c,d){
divide = function(n) {
indices = expand.grid(i = 0:n, j = 0:n)
indices = indices[indices$j >= indices$i, ]
result = lapply(1:nrow(indices), function(k) {
x = indices[k, ]
matrix(c(x$i, x$j - x$i, n - x$j), nrow = 1)
})
return(result)
}
reds = divide(a)
blacks = divide(b)
whites = divide(c)
blues = divide(d)
box3 = list()
combinations = expand.grid(red = reds, black = blacks, white = whites, blue = blues)
box3 = apply(combinations, 1, function(x) {
red = x[[1]]
black = x[[2]]
white = x[[3]]
blue = x[[4]]
box = do.call(rbind, lapply(1:3, function(i) {
sum_values = red[i] + black[i] + white[i] + blue[i]
if (sum_values > 0) c('red'=red[i], 'black'=black[i], 'white'=white[i], 'blue'=blue[i]) else NULL
}))
if (!is.null(box) & nrow(box) == 3) {
sorted_box = box[order(apply(box, 1, paste, collapse = ",")), ]
return(sorted_box)
}
return(NULL)
})
length(unique(Filter(Negate(is.null), box3)))
}
f=function(a,b,c,d){
ball=c(a,b,c,d)
x=(a+2)*(b+2)*(c+2)*(d+2)
y=(a+1)*(b+1)*(c+1)*(d+1)
z=floor(a/2+1)*floor(b/2+1)*floor(c/2+1)*floor(d/2+1)
u=ifelse(all(ball%%2==0),1,0)
v=ifelse(all(ball%%2==0),1,0)
x*y/96-(3*y-3*z-3*u+4*v)/6-u*v
}
p=sample(10,4)
p
solve(p[1],p[2],p[3],p[4])
f(p[1],p[2],p[3],p[4])
772(3): 2025/03/31(月) 11:30:34.00 ID:u+Kd/O/2(2/3)調 AAS
>>770
結論:収束値の限界と物理的解決
ご指摘の通り、多角形近似や数値積分の収束値が円周の長さであることは、π を用いずに厳密に証明するのは困難です。
これらの方法では、結果が「円周らしい値」に近づくことは示せても、それが円周そのものである自明性は欠けます。なぜなら、円周の長さの数学的定義が πと結びついている以上、π を排除すると「円周とは何か」を再定義する必要が生じるからです。
773: 2025/03/31(月) 11:35:19.58 ID:u+Kd/O/2(3/3)調 AAS
# 赤玉a個、黒玉b個、白玉c個、青玉d個の合計(a+b+c+d)個の玉を空箱なしで3つの箱に分けて入れる。箱を区別しないとき、入れ方は何通りあるか?"
solve=function(a,b,c,d){
divide = function(n) {
indices = expand.grid(i = 0:n, j = 0:n)
indices = indices[indices$j >= indices$i, ]
result = lapply(1:nrow(indices), function(k) {
x = indices[k, ]
matrix(c(x$i, x$j - x$i, n - x$j), nrow = 1)
})
return(result)
}
reds = divide(a)
blacks = divide(b)
whites = divide(c)
blues = divide(d)
box3 = list()
combinations = expand.grid(red = reds, black = blacks, white = whites, blue = blues)
box3 = apply(combinations, 1, function(x) {
red = x[[1]]
black = x[[2]]
white = x[[3]]
blue = x[[4]]
box = do.call(rbind, lapply(1:3, function(i) {
sum_values = red[i] + black[i] + white[i] + blue[i]
if (sum_values > 0) c('red'=red[i], 'black'=black[i], 'white'=white[i], 'blue'=blue[i]) else NULL
}))
if (!is.null(box) & nrow(box) == 3) {
sorted_box = box[order(apply(box, 1, paste, collapse = ",")), ]
return(sorted_box)
}
return(NULL)
})
length(unique(Filter(Negate(is.null), box3)))
}
f=function(a,b,c,d){
ball=c(a,b,c,d)
x=(a+2)*(b+2)*(c+2)*(d+2)
y=(a+1)*(b+1)*(c+1)*(d+1)
z=floor(a/2+1)*floor(b/2+1)*floor(c/2+1)*floor(d/2+1)
u=ifelse(all(ball%%2==0),1,0)
v=ifelse(all(ball%%3==0),1,0)
x*y/96-(3*y-3*z-3*u+4*v)/6-u*v
}
p=sample(10,4)
solve(p[1],p[2],p[3],p[4])
f(p[1],p[2],p[3],p[4])
上下前次1-新書関写板覧索設栞歴
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ
ぬこの手 ぬこTOP 0.037s