我碰到過一個問題。grundy的遊戲把一堆東西劃分成兩個不等長的樁
有N堆石頭,其中ith堆有xi寶石。愛麗絲和鮑勃玩下面的遊戲:
a. Alice starts, and they alternate turns.
b. In a turn, a player can choose any one of the piles of stones and divide the stones in it into any number of unequal piles such that no two of the piles you create should have the same number of stones. For example, if there 8 stones in a pile, it can be divided into one of these set of piles: (1,2,5), (1,3,4), (1,7), (2,6) or (3,5).
c. The player who cannot make a move (because all the remaining piles are indivisible) loses the game.
鑑於樁的起始組,誰假設兩個球員都打出最佳狀態而贏得比賽?
最重要的說法 - 「如果Alice贏了別人,答案應該是Alice,答案是Bob。」
現在我的問題是,如果我們最初只有一堆8塊石頭,實際的答案是鮑勃。但據我所知,如果愛麗絲將8個寶石的初始組合分成兩組,即7和1,即 8-> 7 + 1 ,那麼如果愛麗絲以最佳策略玩耍,則無法贏得鮑勃)。但答案是鮑勃。有人能幫我找出答案是鮑勃的原因嗎?我認爲我上面標記爲最重要的陳述在這個答案中很重要,但我還沒有弄明白。誰能幫忙?你可以參考這個鏈接,其中顯示了完全相同的插圖Wikipedia of "Grundy's Game"
任何基本的想法也讚賞。
夥計們這就是我面臨的確切問題。任何小想法也表示讚賞。
Grundy's game extended to more than two heaps
您引用的維基百科文章特別指出,愛麗絲可以以8個開頭的成績獲勝。誰說在這種情況下答案應該是Bob? – 2012-03-20 17:05:06
我認爲你對格蘭迪遊戲的描述與維基百科的不同。在你的,你可以把一堆石頭分成任意數量的不等的樁,例如8 - > 1,2,5。在維基百科的版本中,您只能將一堆石頭劃分爲兩個不相等的樁,所以8 - > 1,2,5不是合法的移動。所以維基百科的遊戲可能會有與你不同的結果。 – Kevin 2012-03-20 17:23:35
@凱文謝謝。請閱讀我在答案中給出的評論,如果可能的話,請幫助。 – Sushant 2012-03-21 10:56:54