全國中小學科展

將錯就錯的knuth 河內塔

科展類別

臺灣國際科展

屆次

2004年

科別

電腦科學

學校名稱

臺北市立建國高級中學

指導老師

文士豪、游森棚

作者

余相甫、李安盛

關鍵字

河內塔,巴斯卡三角形

摘要或動機

在這篇報告中,我們探索了「將錯就錯的Knuth 河內塔問題」。傳統河內塔問題在電腦科學上佔有重要的地位,是一個極具內涵的模型。由於這個模型的深厚數學內涵,使其和巴斯卡三角形建立了緊密的連結,且利用這個緊密的數學連結,設計出復原任意起始狀態的良好演算法。Knuth 河內塔起因於數學家Knuth 在論文[3]中,描述傳統的河內塔問題時所發生的一次筆誤。在這個新的規則之下,我們意外發現Knuth 河內塔存在著一個和傳統河內塔平行的模型,此模型在電腦科學及數學上有著完全不同於傳統河內塔的內涵。我們的研究主要如下:(分別為內文中的四大段)(一) 結構分析。移動環所需要的次數,如何移動環並分析每一次動作所動的環,及每個環何時被動到並給出演算法。(二) 正整數的分割。所有的移動步驟將正整數做了一個新的分割(Partition);此分割模k之後有良好的循環性質。(三) 費波那契真分數的排序。這個正整數的分割形成一張表,這張表恰好就是分子分母皆為費波那契真分數之排序。(四) 隨意亂排的Knuth 河內塔復原演算法。在Knuth 河內塔的規定下將起始狀態改變,找出良好的復原演算法,並分析。 In this project we study the "Knuth Hanoi Tower", which is motivated by a typo in a paper of Knuth. This inadvertently typo leads to a new rule of moving the discs on the Hanoi Tower (see introduction below for definition). Although seemingly similar to the traditional Hanoi-Tower problem, it turns out that under this rule the "Knuth Hanoi Tower" problem consists of amazing properties, and is totally different from the traditional one. Our study focuses on the following directions: (1) Structure analyzing: We analysis the sequences recording the disc moving and offer enumeration results and recurrsive/non-recurrsive algorithms. (2) Partition of N: The moving sequence forms a partition (a table) of N, which has an amazing congruence property. (3) The order of Fibonacci proper fraction: The row/column of the partition table is, even more amazing, exactly the order when sorting the Fibonacci proper fraction with fixed denominator/numerator. (4) The Restoration of an arbitrary initial state: We offer an efficient algorithm for restoring any initial state of discs. We hope that our study on the "Knuth Hanoi Tower" offers a simple, neat, and new example on the theory of Algorithm, Number theory and Combinatorics.

將錯就錯的knuth 河內塔

Adobe Reader(Pdf)檔案