高校数学の質問スレ(医者・東大卒専用) Part438 (991レス)
高校数学の質問スレ(医者・東大卒専用) Part438 http://rio2016.5ch.net/test/read.cgi/math/1723152147/
上
下
前
次
1-
新
通常表示
512バイト分割
レス栞
487: 132人目の素数さん [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
メモ帳
(0/65535文字)
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 504 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
1.476s*