ArticleslgStudy

mathematics

Subtract a square

Subtract a square is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Subtract a square rather than just read about it. In short: Subtract-a-square (also referred to as take-a-square) is a two-player mathematical subtraction game. It is played by two people with a pile of coins (or other tokens) between them.

Key takeaways

  • Subtract a square belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Subtract a square to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Subtract a square from memory before moving on to harder problems.

Reference excerpt

Subtract-a-square (also referred to as take-a-square) is a two-player mathematical subtraction game. It is played by two people with a pile of coins (or other tokens) between them. The players take turns removing coins from the pile, always removing a non-zero square number of coins. The game is usually played as a normal play game, which means that the player who removes the last coin wins. It is an impartial game, meaning that the set of moves available from any position does not depend on whose turn it is. Solomon W. Golomb credits the invention of this game to Richard A. Epstein.

Example A normal play game starting with 13 coins is a win for the first player provided they start with a subtraction of 1:

player 1: 13 - 1*1 = 12

Player 2 now has three choices: subtract 1, 4 or 9. In each of these cases, player 1 can ensure that within a few moves the number 2 gets passed on to player 2:

player 2: 12 - 1*1 = 11 player 2: 12 - 2*2 = 8 player 2: 12 - 3*3 = 3 player 1: 11 - 3*3 = 2 player 1: 8 - 1*1 = 7 player 1: 3 - 1*1 = 2 player 2: 7 - 1*1 = 6 or: 7 - 2*2 = 3 player 1: 6 - 2*2 = 2 3 - 1*1 = 2

Now player 2 has to subtract 1, and player 1 subsequently does the same:

player 2: 2 - 1*1 = 1 player 1: 1 - 1*1 = 0 player 2 loses

Mathematical theory In the above example, the number '13' represents a winning or 'hot' position, whilst the number '2' represents a losing or 'cold' position. Given an integer list with each integer labeled 'hot' or 'cold', the strategy of the game is simple: try to pass on a 'cold' number to your opponent. This is always possible provided you are being presented a 'hot' number. Which numbers are 'hot' and which numbers are 'cold' can be determined recursively:

the number 0 is 'cold', whilst 1 is 'hot' if all numbers 1 .. N have been classified as either 'hot' or 'cold', then the number N+1 is 'cold' if only 'hot' numbers can be reached by subtracting a positive square the number N+1 is 'hot' if at least one 'cold' number can be reached by subtracting a positive square Using this algorithm, a list of cold numbers is easily derived:

0, 2, 5, 7, 10, 12, 15, 17, 20, 22, 34, 39, 44, … (sequence A030193 in the OEIS) A faster divide and conquer algorithm can compute the same sequence of numbers, up to any threshold n {\displaystyle n} , in time O ( n log 2 ⁡ n ) {\displaystyle O(n\log ^{2}n)} . There are infinitely many cold numbers. More strongly, the number of cold numbers up to some threshold n {\displaystyle n} must be at least proportional to the square root of n {\displaystyle n} , for otherwise there would not be enough of them to provide winning moves from all the hot numbers. Cold numbers tend to end in 0, 2, 4, 5, 7, or 9. Cold values that end with other digits are quite uncommon. This holds in particular for cold numbers ending in 6. Out of all the over 180,000 cold numbers less than 40 million, only one ends in a 6: 11,356. No two cold numbers can differ by a square, because if they did then a move from the larger of the two to the smaller would be winning, contradicting the assumption that they are both cold. Therefore, by the Furstenberg–Sárközy theorem, the natural density of the cold numbers is zero. That is, for every ϵ > 0 {\displaystyle \epsilon >0} , and for all sufficiently large n {\displaystyle n} , the fraction of the numbers up to n {\displaystyle n} that are cold is less than ϵ {\displaystyle \epsilon } . More strongly, for every n {\displaystyle n} there are

O ( n / ( log ⁡ n ) 1 4 log ⁡ log ⁡ log ⁡ log ⁡ n ) {\displaystyle O(n/(\log n)^{{\frac {1}{4}}\log \log \log \log n})}

cold numbers up to n {\displaystyle n} . The exact growth rate of the cold numbers remains unknown, but experimentally the number of cold positions up to any given threshold n {\displaystyle n} appears to be roughly n 0.7 {\displaystyle n^{0.7}} .

Extensions The game subtract-a-square can also be played with multiple numbers. At each turn the player to make a move first selects one of the numbers, and then subtracts a square from it. Such a 'sum of normal games' can be analysed using the Sprague–Grundy theorem. This theorem states that each position in the game subtract-a-square may be mapped onto an equivalent nim heap size. Optimal play consists of moving to a collection of numbers such that the nim-sum of their equivalent nim heap sizes is zero, when this is possible. The equivalent nim heap size of a position may be calculated as the minimum excluded value of the equivalent sizes of the positions that can be reached by a single move. For subtract-a-square positions of values 0, 1, 2, ... the equivalent nim heap sizes are

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Subtract a square

Start with the simplest possible case. Write down what Subtract a square claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Subtract a square before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Subtract a square ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Subtract a square

In research
Subtract a square appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Subtract a square in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Subtract a square is common in secondary-school and first-year university syllabi. It links to neighbouring topics Combinatorial game theory, Mathematical games, so understanding it makes those chapters shorter.
In everyday life
Look for Subtract a square outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Subtract a square in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Subtract a square means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Subtract a square out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Subtract a square in simple terms?

Subtract-a-square (also referred to as take-a-square) is a two-player mathematical subtraction game. It is played by two people with a pile of coins (or other tokens) between them.

Why does Subtract a square matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Subtract a square?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Subtract a square.

Tags

  • Combinatorial game theory
  • Mathematical games

Keep exploring