← 返回首頁
Randomized Algorithms 隨機化演算法視覺化
Fisher-Yates Shuffle
點擊「洗牌」開始
Reservoir Sampling
串流:
蓄水池 (Reservoir):
點擊「取樣」開始
Monte Carlo 估算 Pi
點擊「模擬」開始
Randomized Algorithms
Fisher-Yates Shuffle
O(n), 均勻隨機排列
Reservoir Sampling
O(n), 從串流中均勻取樣 k 個
Monte Carlo Pi
隨機投點,pi/4 = 圓內/總數
Miller-Rabin
機率質數測試,錯誤率 <= 4^(-k)