Problem 1.1 from KP Consider a game of Nim with four piles, of sizes 9, 10, 11, 12. (a) Is this position a win for the next player or the previous player (assuming optimal play)? Describe the winning first move. (b) Consider the same initial position, but suppose that each player is allowed to remove at most 9 chips in a single move (other rules of Nim remain in force). Is this an N- or P-position? Solution (a) We can use Bouton's theorem for this part. Just compute the Nim-sum of the components. We see that: 9 = (1001) 2 10 = (1010) 2 11 = (1011) 2 12 = (1100) ₂ The Nim-sum, (1001) 2 (1010) ₂ (1011) ₂ (1100)₂ = 0, therefore the position is an N-position. A winning move would be to take the pile of 12 chips to 8 chips. (b) If there is a restriction at most 9 chips can be removed in a single move, this game is now a sum of 4 subtraction games, all with subtraction sets {1,2,3,..., 9}. We will use the Sprague- Grundy theorem to see if the position is in P or in N. The Sprague-Grundy value of this game is g,(x) = x(mod 10) or the remainder of x when divided by 10. The SG value of the position (9, 10, 11, 12) is given by the Nim-sum of the SG values of the component positions. We can see that the SG value of (9, 10, 11, 12) is not zero, and so it is not a P position, but in N. There are at least 2 winning moves: 128 still works, or we could take 9 →3. Note that on the exam, you would have to explicitly show your reasoning.
Problem 1.1 from KP Consider a game of Nim with four piles, of sizes 9, 10, 11, 12. (a) Is this position a win for the next player or the previous player (assuming optimal play)? Describe the winning first move. (b) Consider the same initial position, but suppose that each player is allowed to remove at most 9 chips in a single move (other rules of Nim remain in force). Is this an N- or P-position? Solution (a) We can use Bouton's theorem for this part. Just compute the Nim-sum of the components. We see that: 9 = (1001) 2 10 = (1010) 2 11 = (1011) 2 12 = (1100) ₂ The Nim-sum, (1001) 2 (1010) ₂ (1011) ₂ (1100)₂ = 0, therefore the position is an N-position. A winning move would be to take the pile of 12 chips to 8 chips. (b) If there is a restriction at most 9 chips can be removed in a single move, this game is now a sum of 4 subtraction games, all with subtraction sets {1,2,3,..., 9}. We will use the Sprague- Grundy theorem to see if the position is in P or in N. The Sprague-Grundy value of this game is g,(x) = x(mod 10) or the remainder of x when divided by 10. The SG value of the position (9, 10, 11, 12) is given by the Nim-sum of the SG values of the component positions. We can see that the SG value of (9, 10, 11, 12) is not zero, and so it is not a P position, but in N. There are at least 2 winning moves: 128 still works, or we could take 9 →3. Note that on the exam, you would have to explicitly show your reasoning.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education