ããããããããã¨ãã«äººæ°ãå¤ãã¨ããããå¢ãã¦ããªããªãçµãããªãã£ãçµé¨ãããã¨æãã¾ã
\(n\)人ã§ãããããããæã«ããã 1人ã®åè
ã決ã¾ãã¾ã§ã®åæ°ã®æå¾
å¤(å¹³ååæ°)ãè¨ç®ãã¦ã¿ã¾ãã
ã¾ã大人æ°ã§ãããã«åè² ãã¤ãã²ã¼ãã¼ããããããåãä¸ãã¦ãã¾ã
ãã®è¨äºã§ã¯ãã人ãã°ã¼ã»ãã§ãã»ãã¼ãåºã確çã¯ããããçããã¨ãã¾ã
ããããã
ã¾ãçµæãç¥ããã人ã®ããã«æåã«ã°ã©ããè¼ãã¦ããã¾ã
横軸ã人æ°ã縦軸ããã ä¸äººã®åè
ã決ã¾ãã¾ã§ã®ãããããã®å¹³ååæ°ã§ã
\(10\)人ã§ç´\(24\)åã\(15\)人ã§ç´\(159\)åã¨ã人æ°ãå¢ããã¨åæ°ã®æå¾
å¤ãæ¥æ¿ã«å¢ãã¦ããã®ããããã¨æãã¾ã
äººæ° | åæ°ã®æå¾ å¤ |
---|---|
1 | 0 |
2 | 1.5 |
3 | 2.25 |
4 | 3.21428571429 |
5 | 4.48571428571 |
6 | 6.2198156682 |
7 | 8.64673579109 |
8 | 12.1044437994 |
9 | 17.0919352918 |
10 | 24.3495977585 |
11 | 34.9794609867 |
12 | 50.6250205168 |
13 | 73.7403531089 |
14 | 107.993133673 |
15 | 158.86844073 |
æ±ãæ¹
æ±ãæ¹ãç°¡åã«èª¬æãã¾ã
\(E_n\)ãæ®ã\(n\)人ããã¨ãã®æ®ãåæ°ã®æå¾
å¤ã¨ãã¾ã
\(P(n, k)\)ãæ®ã\(n\)人ããã¨ãã«\(k\)人ãåã¤ç¢ºçã¨ãã¾ã(\(k=n\)ã®ã¨ãã¯ããã)
æå¾
å¤ãæ¡ä»¶ä»ãæå¾
å¤ã使ã£ã¦æ¸ãç´ãã¨ä»¥ä¸ã®å¼ãæãç«ã¡ã¾ã
\(E_n = \sum_{k=1}^n P(n, k)(E_k + 1) = 1 + \sum_{k=1}^n P(n, k)E_k\)
\(P(n, k)\)ã¯åã£ã人ã®æãã°ã¼ã»ãã§ãã»ãã¼ã®3éããããã«\(n\)人ãã\(k\)人ã®é¸ã³æ¹ã®æ°ãããã¦ãå
¨ä½ã®å ´åã®æ°ã§å²ãã¨ä»¥ä¸ã®ãããªå¼ã«ãªãã¾ã
$$P(n, k) = \frac{3 \times \binom{n}{k}}{3^n}$$
æ®ã\(1\)人ã®æãããããããã¯çµãã£ã¦ããã®ã§\(E_1 = 0\)
以ä¸ãã\(E_n\)ã\(n\)ãå°ããæ¹ããé ã«è¨ç®ãããã¨ãã§ãã¾ã
試ãã«\(E_2\)ãè¨ç®ãã¦ã¿ã¾ã
$$E_2 = 1 + \sum_{k=1}^2 P(2, k)E_k = 1 + P(2, 1)E_1 + P(2, 2)E_2$$ \(E_1=0\)ã使ãã¤ã¤å¼å¤å½¢ããã¨ä»¥ä¸ã®ããã«ãªãã\(2\)人ã§ãããããããã¯å¹³å\(1.5\)åã§çµäºãããã¨ããããã¾ã
$$E_2=\frac{1}{1 - P(2, 2)} = \frac{1}{1 - \frac{1}{3}}=\frac{3}{2}$$
ã²ã¼ãã¼ããããã
ä¸ã§è¦ãããã«ãæ®éã®ãããããã§ã¯äººæ°ãå¢ããã¨ãªããªãçµããã¾ãã
ã²ã¼ãã¼ãããããã¨ãã人æ°ãå¤ãã¦ãããã«åæã決ã¾ããããããã®äºç¨®ãããã¾ã
åºæ¬çãªã«ã¼ã«ã¨ãã¦ã¯ä¸çªåºãã¦ãã人æ°ãå°ãªãæãåã¡ã¾ã
ä¸çªåºãã¦ãã人æ°ãå°ãªãæãè¤æ°ãã£ãå ´åã«ã¯ããããã®æã®éã§æ®éã®ãããããã®æã®å¼·å¼±ã«ãã£ã¦åæã決ã¾ãã¾ã
以ä¸ã®ã°ã©ããè¦ãã¨ãããããã«ãã²ã¼ãã¼ãããããã¯äººæ°ãå¢ãã¦ãå¿
è¦ãªåæ°ããã¾ãå¢ããããã¨ã\(100\)人ã§ãã£ã¦ãå¹³åç´\(3.7\)åã§åè
ã決ã¾ãã¾ã
äººæ° | åæ°ã®æå¾ å¤ |
---|---|
1 | 0 |
2 | 1.5 |
3 | 1.5 |
4 | 1.38461538462 |
5 | 1.3875 |
6 | 1.5 |
7 | 1.66483516484 |
8 | 1.8325357168 |
9 | 2.03065384615 |
10 | 2.11280299063 |
æ±ãæ¹
åºæ¬çã«ã¯æ®éã®ãããããã¨åæ§ã«ä»¥ä¸ã®å¼ãè¨ç®ããã°ããã§ã
\(E_n = \sum_{k=1}^n P(n, k)(E_k + 1) = 1 + \sum_{k=1}^n P(n, k)E_k\)
ãã ã\(P(n, k)\)ã®è¨ç®ãé£ãããªãã¾ã
以ä¸ã®å¼ã¯ããã¡ãã£ã¨æ´çã§ããããªæ°ããã¾ããæ°åãå°½ããã®ã§ããã£ã¨ããæ¹æ³ããã£ããæãã¦ããã ããã¨å¬ããã§ã
ã¾ã人æ°ãæå°ã®æã\(1\)種é¡ã§åå©ããå ´åãèãã¾ã
ãã®ææ®ãã®æã¯\(1\)種é¡ã¨\(2\)種é¡ã®\(2\)éããèãããã¾ã
ãã®æã®ç¢ºçããããã\(P_{a, 1}(n, k), P_{a, 2}(n, k)\)ã¨ããã¾ã
\(P_{a, 1}(n, k)\)ã¯åå©ããæã\(3\)種é¡ãæ®ãã®æã\(2\)種é¡ã人ã®é¸ã³æ¹ã\(\binom{n}{k}\)éãèããããã®ã§ä»¥ä¸ã®ãããªå¼ã«ãªãã¾ã
$$P_{a, 1}(n, k) = \frac{3 \times 2 \times \binom{n}{k}}{3^n}$$åæ§ã«\(P_{a, 2}(n, k)\)ã¯ã\(k\)人ã®æ¬¡ã«å¤ãæã®äººæ°ã\(m\)ã¨ããã¨ã以ä¸ã®ãããªå¼ã«ãªãã¾ã
$$P_{a, 2}(n, k) = \sum_{m = k + 1}^{n - 2k - 1} \frac{3 \times \binom{n}{k} \times \binom{n - k}{m}}{3^n}$$
次ã«äººæ°ãæå°ã®æã\(2\)種é¡ãã£ãå ´åãèãã¾ã
ãã®æã®ç¢ºçã\(P_{b}(n, k)\)ã¨ãã¾ã
åå©ããæã\(3\)種é¡ã人ã®é¸ã³æ¹ã\(\binom{n}{k}\)éãããã\(\binom{n - k}{k}\)éãèããããã®ã§ã以ä¸ã®ãããªå¼ã«ãªãã¾ã
$$P_{b}(n, k)=\begin{cases} \Large \frac{3 \times \binom{n}{k} \times \binom{n - k}{k}}{3^n} & \text{($3k < n$ or $n = 2k$)} \\ 0 & \text{(otherwise)}\end{cases}$$
以ä¸ãã\(P(n, k) = P_{a, 1}(n, k) + P_{a, 2}(n, k) + P_{b}(n, k)\)ã¨ãªãã®ã§ã\(E_n\)ãè¨ç®ã§ãã¾ã
ãã¾ã: ã°ã¼ãã§ããã¼ã§3ã°ã«ã¼ãã«åãããã¨ãã®ãåçã«åãããã¾ã§ã®å¹³ååæ°
ã°ã¼ã»ãã§ãã»ãã¼ã®ã©ããåºãããã§3ã°ã«ã¼ãã«åãããã®ããã£ããã¨ãããã¨æãã¾ããããã¾ãåçã«åãããã¾ã§ã®åæ°ã®æå¾
å¤ãæ±ãã¾ã
人æ°ã\(3\)ã§å²ãåããªãæã¯ããã¨ãã°\(5\)人ã®æã¯\((1, 2, 2)\)人ã®ããã«ä½ããã§ããã ãåçã«åãããæçµäºã¨ãã¾ã
åçã«åããã¦çµäºããããã¾ãåãããã«ç¹°ãè¿ããã®ã©ã¡ãããªã®ã§ã\(n\)人ã®æã®æå¾
å¤ã\(E_n\)ãçµäºç¢ºçã\(P(n)\)ã¨ããã¨ã\(E_n = \frac{1}{P(n)}\)ã¨ç°¡åã«è¨ç®ã§ãã¾ã
ã°ã©ãã«ããã¨ä»¥ä¸ã®ããã«ãªãã\(3\)ã®åæ°ã®äººæ°ã®æã¯åçã«åããã¥ãããã¨ããããã¾ã
äººæ° | åæ°ã®æå¾ å¤ |
---|---|
1 | 0 |
2 | 1.5 |
3 | 4.5 |
4 | 2.25 |
5 | 2.7 |
6 | 8.1 |
7 | 3.47142857143 |
8 | 3.90535714286 |
9 | 11.7160714286 |
10 | 4.68642857143 |
\(P(n)\)ã®å¼ã¯ä»¥ä¸ã®ããã«ãªã£ã¦ãã¾ã
$$P(n)= \LARGE\begin{cases}
\frac{\binom{n}{\frac{1}{3}n} \times \binom{n - \frac{1}{3}n}{\frac{1}{3}n}}{3^n} & \text{($n \equiv 0 \pmod 3$)} \\
\frac{3 \times\binom{n}{\left\lfloor\frac{1}{3}n\right\rfloor} \times \binom{n - \left\lfloor\frac{1}{3}n\right\rfloor}{\left\lfloor\frac{1}{2}\left(n - \left\lfloor\frac{1}{3}n\right\rfloor\right)\right\rfloor}}{3^n} & \text{(otherwise)}
\end{cases}$$
å³ãæ¸ãã®ã«ä½¿ã£ãPythonã®ã½ã¼ã¹ã³ã¼ã
ããããã
# -*- coding: utf-8 -*- import math,string,itertools,fractions,heapq,collections,re,array,bisect from pylab import * def make_comb_dp(n): dp = [[0] * (n + 1) for i in xrange(n + 1)] for i in xrange(n + 1): dp[i][0] = 1 dp[i][i] = 1 for i in xrange(2, n + 1): for j in xrange(1, i): dp[i][j] = dp[i - 1][j - 1] + dp[i - 1][j] return dp N = 15 comb = make_comb_dp(N) dp = [0] * (N + 1) for i in xrange(2, N + 1): Z = 0 dp[i] += 1 for j in xrange(1, i): prob = 3.0 * comb[i][j] / (3 ** i) dp[i] += prob * dp[j] Z += prob if Z != 0: dp[i] /= Z for i, e in enumerate(dp[1:], 1): print '|{}|{}|'.format(i, e) plot(dp[1:], lw=4) xticks(range(15), range(1, 16)) xlabel('$n$') ylabel('$E_n$') show()
ã²ã¼ãã¼ããããã
# -*- coding: utf-8 -*- import math,string,itertools,fractions,heapq,collections,re,array,bisect from pylab import * def n(): return int(raw_input()) def make_comb_dp(n): dp = [[0] * (n + 1) for i in xrange(n + 1)] for i in xrange(n + 1): dp[i][0] = 1 dp[i][i] = 1 for i in xrange(2, n + 1): for j in xrange(1, i): dp[i][j] = dp[i - 1][j - 1] + dp[i - 1][j] return dp N = 100 comb = make_comb_dp(N) dp = [0] * (N + 1) for i in xrange(2, N + 1): D = 1.0 / (3 ** i) Z = 0 dp[i] += 1 for j in xrange(1, (i + 1) / 2): prob = 3 * 2 * comb[i][j] * D for k in xrange(j + 1, (i - j) / 2 + 1): prob += 3 * comb[i][j] * comb[i - j][k] * D * (1 if k == i - j - k else 2) dp[i] += prob * dp[j] Z += prob for j in xrange(1, i + 1): if j < i - 2 * j or i - 2 * j == 0: prob = 3 * comb[i][j] * comb[i - j][j] * D dp[i] += prob * dp[j] Z += prob if Z != 0: dp[i] /= Z for i, e in enumerate(dp[1:], 1): print '|{}|{}|'.format(i, e) plot(dp[1:], lw=4) xticks(range(0, N, 10), range(1, N + 1, 10)) xlabel('$n$') ylabel('$E_n$') xlim((0, N - 1)) show()
ã°ã¼ãã§ããã¼ã§3ã°ã«ã¼ãã«åçã«åããã
# -*- coding: utf-8 -*- import math,string,itertools,fractions,heapq,collections,re,array,bisect from pylab import * def n(): return int(raw_input()) def make_comb_dp(n): dp = [[0] * (n + 1) for i in xrange(n + 1)] for i in xrange(n + 1): dp[i][0] = 1 dp[i][i] = 1 for i in xrange(2, n + 1): for j in xrange(1, i): dp[i][j] = dp[i - 1][j - 1] + dp[i - 1][j] return dp N = 15 comb = make_comb_dp(N) expect = [0] * (N + 1) for i in xrange(2, N + 1): if i % 3 == 0: expect[i] = (3.0 ** i) / (comb[i][i / 3] * comb[i - i / 3][i / 3]) else: expect[i] = (3.0 ** i) / (3 * comb[i][i / 3] * comb[i - i / 3][(i - i / 3) / 2]) for i, e in enumerate(expect[1:], 1): print '|{}|{}|'.format(i, e) plot(expect[1:], lw=4) xticks(range(0, N), range(1, N + 1)) xlabel('$n$') ylabel('$E_n$') xlim((0, N - 1)) show()