主題
Search

Ryser 公式


矩陣積和式的公式

 perm(a_(ij))=(-1)^nsum_(s subset= {1,...,n})(-1)^(|s|)product_(i=1)^nsum_(j in s)a_(ij),

其中,求和是對 {1,...,n} 的所有子集進行的,並且 |s|s 中元素的數量。 透過選擇子集可以最佳化此公式,使得每次只更改一個元素(這正是格雷碼),從而將加法的次數從 n^2 減少到 n

結果表明,在漢諾塔遊戲中第 k 步之後移動的盤子數量與 Ryser 公式的第 k被加數中需要新增或刪除的元素相同 (Gardner 1988, Vardi 1991, p. 111)。


另請參閱

行列式, 格雷碼, 積和式, 漢諾塔

使用 探索

參考文獻

Gardner, M. "The Icosian Game and the Tower of Hanoi." Ch. 6 in Hexaflexagons and Other Mathematical Diversions: The First Scientific American Book of Puzzles and Games. New York: Simon and Schuster, pp. 55-62, 1959.Gardner, M. Time Travel and Other Mathematical Bewilderments. New York: W. H. Freeman, 1988.Knuth, D. E. The Art of Computer Programming, Vol. 2: Seminumerical Algorithms, 3rd ed. Reading, MA: Addison-Wesley, p. 515, 1998.Nijenhuis, A. and Wilf, H. Chs. 7-8 in Combinatorial Algorithms. New York: Academic Press, 1975.Vardi, I. Computational Recreations in Mathematica. Reading, MA: Addison-Wesley, p. 111, 1991.

在 中引用

Ryser 公式

請引用為

Weisstein, Eric W. “Ryser 公式。” 來自 -- 資源。 https://mathworld.tw/RyserFormula.html

學科分類