高校数学の質問スレ(医者・東大卒専用) Part438 (991レス)
上
下
前
次
1-
新
487
: 2024/12/30(月)03:17
ID:DAgtZ3Zg(2/5)
AA×
[240|
320
|
480
|
600
|
100%
|
JPG
|
べ
|
レス栞
|
レス消
]
487: [sage] 2024/12/30(月) 03:17:30.79 ID:DAgtZ3Zg (* 遷移行列の定義 *) P = { {0, 0.5, 0.5, 0, 0}, (* S0: 初戦 A vs B *) {0, 0, 0, 0.5, 0.5}, (* S1: A vs C *) {0, 0, 0, 0.5, 0.5}, (* S2: B vs C *) {0.5, 0, 0, 0, 0.5}, (* S3: 再試合 A vs B *) {0.5, 0, 0, 0.5, 0} (* S4: 再試合 B vs A *) }; (* 遷移行列の転置 *) PT = Transpose[P]; (* 固有値と固有ベクトルの計算 *) {eigValues, eigVectors} = Eigensystem[PT]; (* 固有値1に対応する固有ベクトル *) stationaryVector = Select[eigVectors, Norm[PT.# - #] & /@ eigValues == 1 ][[1]]; (* 正規化(確率の総和を1にする) *) stationaryVector = stationaryVector/Total[stationaryVector]; (* 各プレイヤーの勝率を計算 *) AWin = stationaryVector[[2]] + stationaryVector[[4]]; BWin = stationaryVector[[3]] + stationaryVector[[5]]; CWin = stationaryVector[[1]]; (* 結果表示 *) {stationaryVector, AWin, BWin, CWin} http://rio2016.5ch.net/test/read.cgi/math/1723152147/487
遷移行列の定義 初戦 再試合 再試合 遷移行列の転置 固有値と固有ベクトルの計算 固有値に対応する固有ベクトル 正規化確率の総和をにする 各プレイヤーの勝率を計算 結果表示
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 504 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
ぬこの手
ぬこTOP
0.033s