Open access peer-reviewed chapter

Problem Solving of Mathematical Games

Written By

David Ginat

Submitted: 23 September 2022 Reviewed: 10 October 2022 Published: 23 November 2022

DOI: 10.5772/intechopen.108520

From the Edited Volume

Game Theory - From Idea to Practice

Edited by Branislav Sobota

Chapter metrics overview

104 Chapter Downloads

View Full Metrics

Abstract

Mathematical games are problems that involve algorithmic solutions. The solutions require recognition of hidden patterns and capitalization on these patterns. The natural tendency of many problem solvers is to devise algorithms without fully unfolding patterns. Such an approach lacks rigor and may lead to undesired outcomes. This chapter underlines a rigorous approach, of first focusing on the characteristics of a posed game and then developing its algorithmic solution. The solution development “goes” hand-in-hand with the realization of correctness. The approach is based on declarative observations, which capture the “what” of patterns prior to the “how” of game-strategy instructions. We illustrate the approach with colorful mathematical games of different characteristics and underline elements of solution processes, including creativity, problem-solving features, and mathematical notions.

Keywords

  • problem solving
  • Mathematical games
  • creativity
  • declarative and operational perspectives
  • invariance

1. Introduction

Mathematical games are mostly two-player games. Their specifications involve initial positions (states) and sets of rules for the players’ moves. The two players play in alternating turns, and the game ends upon reaching a final position. The winner is usually the player who makes the last move. Most games are complete information games, in the sense that the game information is known at any given time to both players. The assumption is that each player always makes the best move available for her. Positions that lead to a win are winning positions for the player who moves next, and positions from which one will lose, regardless of her following moves, are losing positions. The player who moves first is the first player, and the other is the second player.

In most games, an a priori analysis of the game may “tell” which initial positions are winning positions and who will be the winner. The challenge for problem solvers is to employ an analysis that will reveal for each initial position whether it is a winning or a losing position and to offer a sound playing strategy for winning the game [1]. The winning strategy involves algorithmic instructions, based on unfolded underlying patterns. Recognition of hidden patterns and capitalization on patterns are the core of mathematical problem solving [2].

The primary inclination of many problem solvers is to invoke an operational perspective [3, 4], in which they focus on the instructions for the winner to follow (e.g., “if the position is such, then apply move-1, else apply move-2”). However, such a route may lead to erroneous playing strategies as well as partial argumentation of correctness. A preceding declarative (assertional) perspective is desirable. Such perspective focuses primarily on explicit identification and specification of declarative characteristics of the problem (game) at hand, before devising algorithmic operations [3, 4, 5]. It expresses thinking at the problem level [6] of a given problem and constitutes the patterns on which an operational solution will be based and argued to be correct. A problem-solving process that combines declarative and operative perspectives enables zooming in and out between abstraction levels—the higher patterns level and the lower concrete-operation level [7].

In this chapter, we demonstrate the latter with problem-solving processes that involve creativity for revealing underlying, hidden patterns. The creativity is expressed with flexible thinking and associations [8, 9]. The displayed processes do not always end with explicit algorithmic statements, but rather with insightful patterns, from which the reader may infer the algorithmic operations and realize their justification.

The next section displays solution processes of colorful two-player games. The games are simply stated and involve basic mathematics, yet their problem solving is not straightforward. We posed the games to mathematics/computer science (math/CS) junior and senior students, including some CS Olympiad trainees, and observed diverse problem-solving approaches. We elaborate on our experience and shed light on characteristics of student behaviors.

Advertisement

2. Operative and declarative game-solution routes

This section displays different problem-solving processes that illuminate the assets and importance of the declarative perspective. The section is divided into five sub-sections. Each sub-section illustrates, with one or more games, a feature that appears in game problem solving. The problem solving of some games involves more than one feature. Some features are general in mathematics and/or algorithmics, beyond problem solving of games.

In a displayed problem-solving process, we lead the reader through constructive and creative observations [2]. When the reader will follow a presented solution process, the train of thought may seem simple, since it is developed through suitable observations. Yet, in our experience, many problem solvers struggle. We use the conventions of calling the first player in all the games Alice and the second player Beth. In addition, we do not always indicate winning/losing positions; and in one game the last to move is not necessarily the winner.

2.1 Pairing

The first game involves basic geometry. The solution of the game is based on a priori pairing of game elements, such that when a player engages one of the elements of a pair, the response to that is to engage the element that was a priori paired with this element.

2.2 Closed shape on a grid

Alice and Beth play a game of connecting points in an M × N grid, in alternating turns. Each player, on her turn, connects two adjacent points, vertically or horizontally, which were not yet connected. Alice plays first. She connects points with red lines. Beth connects points with blue lines. Alice’s goal is to obtain a closed polygon composed of solely red lines. Beth’s goal is to prevent Alice from obtaining her goal. Would you prefer to be Alice or Beth in order to win the game?

Figure 1 shows a possible instantiation of the game, which ended in Alice’s win. The last move in the game, made by Alice, was the drawing of a red line that “closed” the perimeter of the red polygon. (It could be any of the red lines of the perimeter.) Beth may win in another possible instantiation of the game, if she will manage to “interrupt” Alice so that there will be no red-perimeter polygon.

Figure 1.

A game that ended in Alice’s win.

Problem solvers play the game with one another and offer various heuristic rules. Many feel that Beth may always win the game, but their strategies of line drawing are often vague and not rigorously justified. They attempt different strategies for “blocking” Alice but are unable to pinpoint a solid problem characteristic on which to capitalize. They experience difficulties with relating the game rules to a concrete property of “blocking.” A creative, declarative perspective observation unfolds such a property.

  • Every polygon has a bottom-right corner, of a shape, composed of a vertical line and a horizontal line.

This simple property captures elegantly a characteristic of every polygon on the grid. It involves pairing of the two lines that compose the specified corner. A winning strategy for Beth is rather clear—for every new red line that Alice will draw, Beth will respond with its paired line (that will be blue), such that the two lines will compose a bottom-right corner. (Some boundary lines need no response.) The justification is clear from the above characteristic. The two possible blue-line responses of Beth for a red line of Alice are displayed in Figure 2.

Figure 2.

Blue-line responses of Beth to Alice’s red lines.

They key point in solving the game is that of relating a suitable “grid-polygon” property to the idea of “blocking.” We noticed that such property may be tied to the playing feature of pairing (which will also appear in later games here). But just invoking pairing is insufficient. One has to examine polygon characteristics and identify a property to tie to pairing. Those who do not seek a corresponding polygon property do not reach a sound solution.

2.3 Invariance

The game below involves collection of numbers in a line. Unlike many mathematical games, it may end in a draw. The challenge is to devise a strategy that will lead to a win or a draw. It was posed as the first task of the 1996 International Olympiad in Informatics (IOI’96) [10]. The game solution is based on unfolding an appearance of the mathematical feature of invariance. Many problem solvers do not turn to this feature.

2.4 Left/Right Ends

Alice and Beth play a game of removing numbers from a line of 2 N numbers. Each player collects a number on her turn from one of the ends (a player may choose different ends in different turns). The removal of numbers ends when the line is empty. At this stage, each player sums the numbers she collected. Devise a strategy for Alice (the first player), which guarantees that her sum will be either larger than or equal to Beth’s sum.

Many problem solvers follow an operative approach that focuses on local ends of the given line. They notice right away that it may be wrong to select the end number that is larger than the other end, since the inner value next to that chosen end may be large (and will become available to the opponent). They suggest looking at the delta of each end, which is the difference between the end number and the number next to it. They offer to select the end number from the end whose delta is larger; that is, select the better “gained minus exposed.” We illustrate this idea with the line of numbers in Figure 3.

Figure 3.

A game line of eight numbers.

Alice will compute the two “end deltas”—7–8 on the left end and 6–4 on the right end. Since −1 is smaller than 2, Alice will take the 6 from the right end. Beth will take any end number that she wishes, and Alice will calculate again the new “end deltas” in the same way for her next choice. And so on.

At first glance, this local strategy seems promising and leads to a win for many line examples. (Does it lead to a win in the line below?) However, its local focus on the line ends, and not on the whole line, may lead to a loss. Falsifying examples are not immediate, but one may find lines of length smaller than 10 for which this strategy will fail. Some problem solvers do not notice the latter and “argue” correctness with partial, heuristic argumentation. Others who do notice the difficulty try to “patch” it in diverse unsuccessful ways.

One should seek a sound declarative observation on which to capitalize. The natural tendency may be to focus on the values of the given line numbers. But a creative, flexible thinking may lead to the examination of locations of the numbers in the original line. The line includes an even amount of numbers. This yields an illuminating observation when we look at the parities of the locations of the original line. (Half of the locations are odd, and half are even.)

  • In every move of Alice, she will have a choice between two numbers, whose parities of locations in the original line are different (one even and one odd).

  • In every move of Beth, she will have a choice between two numbers, whose parities of locations in the original line are equal.

We examine these observations with the line of numbers in Figure 3. If, for example, Alice will remove the 6, then Beth will have to choose between 7 and 4, which were originally in odd locations. Regardless of which number Beth will choose, Alice will receive a line whose ends were in locations of different parities in the original line.

At this point, a playing strategy can be devised for Alice. She may force a game in which she will collect all the numbers that are originally in the odd locations or all the numbers that are originally in the even locations. Thus, in the beginning of the game, she will see which sum is larger—that of the numbers in the odd locations or that of the numbers in the even locations—and decide accordingly. The numbers of these sums are illustrated in red and blue in Figure 4.

Figure 4.

Line numbers colored according to the parities of their locations.

The creative aspect of this strategy stems from examining locations, without looking at the values in these locations (in the beginning of the analysis). This demonstrates the asset of turning to a declarative perspective, in trying to obtain an insight into the problem, prior to the development of any algorithmic solution.

Many problem solvers are “fixated” on values throughout their problem-solving process and miss this perspective. Such a phenomenon is typical of those who turn immediately to an operative perspective, seeking an algorithmic solution right away, without carefully analyzing first the problem at hand.

The above observations are specified in an invariance manner, in the sense that they relate to every move of a player, throughout the game. Invariance is a powerful means in both mathematics and computer science, for “capturing” properties of recurring states (e.g., [11]). As such, it is most relevant for games, as a means for characterizing recurring positions throughout a game. We shall see an additional example of invariance in the next games, when formulating a winning strategy that forces a sequence of losing positions on the loser of a game.

The displayed strategy involves pre-processing, which occurs here when the game data is provided and before making the first move. Pre-processing is a useful and powerful feature in algorithm design [11].

The presented strategy guarantees that Alice will not lose the game, but there may be initial lines for which she will end in a draw when she can actually win. A computational approach, employing dynamic programming [11], will yield a maximal sum for Alice in each game. The interested reader is welcome to program the latter. It will be based on computing the maximal sum that can be obtained by the winner in a separate game for every sub-sequence of the original line.

2.5 State-space reduction

In many games, the general state space may be very large. However, the winner may direct the game, so it will be played in a very particular path, and many legal states (positions) will be out of reach. The path will involve a limited number of winning and losing positions. One occurrence of this phenomenon may be reached by disabling the usage of game pieces. The following problem solving illustrates this phenomenon, with a variant of the game of domino.

2.6 Domino line

Alice and Beth play domino with a pile of N×(N + 1)/2 stones, of the pairs <1,1>, <1,2 > up to <N-1,N>, <N,N>. The order of the two integers in a stone does not matter; that is, the single stone <K,L > may be rotated and become <L,K>. Each player sees all the stones in the pile throughout the game. At the beginning of the game, Alice picks from the pile any stone that she wishes and starts a line of stones by putting the first stone. From this point on, each player picks a stone from the remaining pile and lengthens the line, to the left or to the right (as she wishes), by putting her chosen stone according to the domino rules (neighboring ends of adjacent stones match). Figure 5 displays a possible game state after five moves. The game ends when there are no stones in the pile with which one can lengthen the line. The player who makes the last move wins. Devise a strategy for winning the game.

Figure 5.

A game state after five moves.

At first glance, problem solvers get the impression that this is a simple game to analyze. Yet, many struggle, sometimes considerably. Some problem solvers seek a winning strategy by using all the game stones. Others try a table for keeping track of used stones. And some represent the game with a graph and try to devise an algorithm for expanding a path in the graph. All these attempts yield partial operational schemes, which are cumbersome and/or erroneous.

The solution of this game may be reached in two stages of declarative observations. A common theme in many games is an ordered reply to every opponent move. This was explicit in the first game that we presented, with the notion of pairing. This notion could be applied here if each domino stone was doubled. In such a case, Beth could win by responding to every move of Alice with a paired stone.

Unfortunately, we do not have such pairs of stones in our game. Yet, in a creative first step, we may temporarily simplify the game, by leaving out stones that may look more “problematic”—the “doubles” stones, of the form <K,K>. And we may create pairs with some of the remaining stones, in an original way, according to the following observation.

  • In a game with no doubles, one may pair some of the stones, using the integers 1 and 2, such that for every X > 2, the two stones < 1,X > and < 2,X > will be a pair.

This pairing does not involve all the stones of the game. But we may direct the game so that only stones with 1 or 2 will actually participate in the game. This can be done according to the following observation.

  • In a game with no doubles, if Alice will start the game by putting the stone < 1,2>, then Alice may force the game to be played only with stones of the form < 1,X > and < 2,X > (X > 2), as Alice may reply to Beth’s stone with its paired stone. After every move of Alice, each end of the line will be either 1 or 2.

Figure 6 displays a line of three stones reached after three moves according to the above idea. Alice started with the left-most <1,2 > stone, Beth put <2,4>, and Alice replied with <4,1 > − the stone paired with <2,4 >.

Figure 6.

The game state after three moves, of forcing only stones with 1, 2, or both.

At this point, we may “return” the doubles to the game. The addition of the doubles may seem problematic at first glance, as doubles do not have paired stones. But with some flexibility, of using the idea of a “long stone,” we may overcome this challenge.

  • In the original game, with doubles, it is possible to create a “long stone” from a sequence of three stones that will serve as the stone < 1,2 > in the previous observation. If Alice will start with the stone < 1,1>, Beth will follow with the stone < 1,Z>, and Alice will respond with the stone < Z,Z>; the sequence < 1,1 > <1,Z > <Z,Z > may be viewed as a “long <1,Z> stone,” and from this point on, the integers 1 and Z will serve as 1 and 2 in the previous observation.

Figure 7 illustrates the above “long stone” idea, where the number 5 is Z.

Figure 7.

A “long” <1,5> stone.

The above creative observation yields a winning strategy for Alice, in a game in which only stones with 1 and Z will be used.

The strategy correctness is rather clear, based on the creative idea of the “long <1,Z> stone” and the notion of pairing. Notice that this winning strategy narrows the game considerably. It forces the game to be played with a small set of stones. The path in which the game is played alternates between winning positions and losing positions. In particular, Alice leads Beth in each of her moves to a losing position, which is characterized by line ends that are either 1 or Z. This narrows considerably Beth’s options of choosing a valid stone, and for any stone that she will choose, Alice has a reply. Notice the invariance feature of the line after each of Alice’s moves.

The problem-solving process progressed gradually, through three observations, obtained from flexible, creative ideas. These ideas express divergent thinking. Although the end result is simple and clear, progress could not occur without such thinking. Problem solvers who are not invoking the notions of pairing and invariance and are less creative struggle here with unfruitful heuristic attempts.

2.7 In spite of incomplete information

Sometimes one may devise a strategy that is only based on the game information provided in the game specification. While the game information will be incomplete during the game, one may still win by knowing only the rules that the opponent obeys. This is illustrated with the following game.

2.8 Wall of doors

Alice and Beth play a game with a wall of N doors. The doors are numbered 1 to N. Alice walks along the wall and opens and closes doors. Beth moves behind the wall from door to door. Alice does not know Beth’s location throughout the game. When the game starts, Beth stands behind one of the doors. Alice may open any door that she wishes in order to see if Beth is behind. If Beth is there, the game ends with Alice’s win. Otherwise, Alice closes the door, and Beth moves to an adjacent door, on the right or left (as she chooses; though if she is near an end door, then she has only one choice). Alice does not see Beth’s move. Then, Alice opens a door again, which can be the same door or any other door. The game continues for at most 5 N opening attempts. If Alice finds Beth, then she wins; otherwise Beth wins. Would you like to be Alice or Beth?

Figure 8 displays a game state in which the red-hair Alice is about to open door 3. Beth is behind door 6. After Alice will realize that Beth is not behind door 3, Alice will close that door, and Beth will move to door 5 or door 7. Alice will then try to open any other door, or the same door, and the game will continue accordingly.

Figure 8.

A game state in which Alice is in front of door 3 and Beth is behind door 6.

As we may see, Beth’s location is hidden from Alice throughout the game, including the beginning. The question is whether Alice can always find Beth in spite of her limited information. Problem solvers attempt various operational methods for Alice. Many conjecture that Alice should start from one of the ends, move in one direction, and sometimes try to open doors twice (or more). Their attempts are usually not clearly phrased and not displayed with sound argumentation of correctness.

A declarative perspective may illuminate problem characteristics on which to capitalize. We present three observations, which are unfolded gradually, in trying to understand the occurrences that lead to opening a door behind which Beth is standing. The first observation is trivial. Yet in our experience, it is not that naturally invoked, as problem solvers are “busy” with operational ideas for Alice, rather than with observations.

  • If Alice will open a door that is two doors away from Beth and then they will both move toward each other, then Alice will find Beth.

  • So is the case if Alice will open a door that is of an even distance from Beth, and they will move toward each other, while Alice is opening every door on the way.

  • And so is the case if their initial distance is even when Alice will open a door and will then move toward Beth, opening every door on the way, and Beth will move as she likes (including reaching the end of the wall and moving back).

The last assertion implies that if Alice will first open a door in one of the wall ends and then open every door on the way to the other end, then she will find Beth if their initial distance is even. However, this “one pass” will not end successfully if their initial distance is odd. The odd distance between them will be kept all along. The following observation offers a way to change the parity of the distance between them.

  • Opening a door twice in a row changes the parity of the distance between the girls.

Thus, if Alice will reach the other end of the wall without finding Beth, she will infer that their initial distance was odd. Alice will open the end door twice and find Beth on her way back to the first door. All in all, Alice will not open more than 2 N + 1 doors.

The gradual declarative observations paved the way to the elegant solution. The underlying mathematical element was parity of the distance between the two girls. We may recall the relevance of parity (of locations) in the Left/Right Ends game. As in the previous games, here too one may formulate an invariant for describing and arguing about the correctness of the devised strategy.

2.9 Natural number properties

Many games involve natural numbers. One such game is the well-known game of Nim [1]. The winning strategies in these games capitalize on properties of numbers and involve the features of pairing and invariance. Some also relate to the notions of parity and/or symmetry. We display below three games with such features.

2.10 Powers of 2

Alice and Beth play a game with 10 piles of tokens. The first pile is with one (20) token, the second is with 21 tokens, the third is with 22 tokens, and so on. The largest pile contains 29 tokens. Each player, on her turn, selects 5 of the piles (as she wishes) and removes one token from each of the selected piles. The game ends when no move can be played (too few non-empty files). Devise a strategy for winning the game.

Problem solvers who turn to the operational approach in trying to devise a strategy experience difficulties with the sole token in the smallest pile. A declarative approach will first focus on patterns of powers of 2. The following basic property may be relevant.

  • Every power of 2 is greater (by 1) than the sum of all the powers of 2 that are smaller.

Figure 9 displays the first five piles. One may visually notice the observation above about the relation between each pile and those on its left.

Figure 9.

The smaller five piles of the ten piles.

This property may be elegantly tied to our game, with the following observation.

  • The game will end when the 6 smallest piles will be emptied, and at this point, none of the 4 largest piles will be empty.

The latter observation is justified by the recognition that even if each of the four largest piles will be selected in every move of the game, one token will still be removed from one of the six smaller piles. The observation yields a simple useful idea that addresses the difficulty that stems from the sole token in the smallest pile.

  • The 4 largest piles may be used as a “bank” from which tokens may be removed, in order to reach an invariant property with the 6 smaller piles.

Alice may win the game by removing in her first move the single token of the smallest pile plus a token from each of the four largest piles and then keeping the following invariant.

  • The number of tokens in each of the 6 smaller piles will be even after each move (of Alice).

Alice will keep the above invariant by duplicating each of Beth’s moves. The amount of 0 tokens in each of the six smallest piles will be reached only by Alice. In retrospect, the simple property of powers of 2, plus the idea of using the larger piles as a “bank,” paved the way to the winning strategy.

2.11 Co-Primes

Alice and Beth play a game with a line of N successive positive integers, N > 11, from K to K + N-1. Each player, on her turn, removes an integer from the line. After N-2 turns, two integers will remain. If these two integers are co-prime, then Alice wins; otherwise, Beth wins. For which initial sequence of integers will Alice win, and for which will Beth win? Devise a strategy for winning the game.

Upon approaching the problem, one may wonder whether the values of N and K are important. In our experience, quite a few problem solvers do not examine N and K at first glance, and seek a winning strategy for Alice, by focusing on removal of integers that have many divisors. They attempt some heuristic strategies but do not advance much. Meanwhile, some notice that every second integer in the initial line is an even number and change their initial train of thought, this time seeking a winning strategy for Beth.

The main theme in these hasty, heuristic attempts is their operational approach, based on intuitive, partial observations. The more competent problem solvers seek underlying characteristics. They first analyze the given problem and wonder about properties of co-primes. Obviously, a prime number is a co-prime with any other number. But it is unclear whether such a characteristic may be useful. It may be better to seek another co-prime characteristic. Further examination yields a simple and elegant observation.

  • Every two successive integers are co-primes.

This observation implies a simple winning strategy for Alice when N is odd, which will be based on the following line pattern.

  • Every line of 2L successive integers may be divided into pairs of successive integers, which are co-primes.

The latter pattern implies that for the case of odd N, Alice may divide the initial line into adjacent pairs of successive integers, except for the left (or right) end. She will first remove this end and then respond to each of Beth’s moves by removing the integer paired with the one just removed by Beth.

So the problem is solved for the cases of an odd N, with the pairing feature. May this strategy be relevant also for the cases of an even N? Not quite. The player who plays first may not pair all the integers remaining after her first move. When N is even, the number of even integers in the line equals the number of odd integers. We notice the following.

  • Alice must remove an even integer in each of her (N/2)-1 moves.

If Alice will not do so, Beth may lead the game to two even integers in the end. But if Alice will solely focus on the even numbers, Beth may leave two odd integers that are multiples of 3 if the initial line is long enough. What is long enough?

  • Every line of more than 11 successive integers includes at least two odd integers that are multiples of 3.

Since the initial line length is larger than 11, Beth will win the game when N is even. All in all, the declarative perspective gradually paved the way to the winning strategies with a series of corresponding observations.

2.12 Powers of primes

Alice and Beth play a game with two piles of tokens. Each player, on her turn, removes from one of the piles a number of tokens that is a power of a prime (the power 0 is also legal). For example, from a pile of 15 tokens, one may remove in one turn any number of tokens apart from 6, 10, 12, 14, and 15. The game ends when both piles are empty. Devise a strategy for winning the game.

As with previous games, quite a few problem solvers attempt various operational ideas of removing tokens. Some recall a two-pile variant of the game of Nim and attempt symmetry, trying to equalize the amount of tokens in the piles. They realize that this idea may not be applied in some initial positions. Others focus on emptying one pile first (e.g., the smaller) and then proceeding to the second. They feel that their ideas lack rigor.

Gradual progress combined with declarative observations offers a fruitful and sound result. As a first step, we may solve the case of a single pile. Upon examining game scenarios with very small piles, we may notice the following.

  • In a game with a single pile, the amount of 6 tokens is the smallest amount from which the game will not end in one move, since 6 is the multiplication of two different primes. Thus, 6 is a losing position.

Further examination of game scenarios with larger piles reveals that in a game with a single pile, the amounts of 12 and 18 are also losing positions (for the player who is about to play). A corresponding generalization may be observed. We specify it in two (equivalent) ways—with the indication of losing positions and with invariance.

  • In a game with a single pile, the losing positions are ones with token amounts that are multiples of 6. The winner should keep the following invariant: after each of her moves, the amount of tokens in the pile will be a multiple of 6.

The initial positions in which the number of tokens is not a multiple of 6 are winning positions, as in each of them the first to play may lead to the above invariant in one step. At this stage, we may move to the second step—the original game. For some initial positions, it is impossible to equalize the amounts of tokens in the piles in one move. This is the case in the example of Figure 10, with piles of token amounts of 3 and 9.

Figure 10.

Piles that cannot be equalized in one move.

Perhaps it is possible to obtain some variant of equal amounts. We noticed the importance of multiples of 6. With some flexible, creative thinking, we reach the following declarative observations related to the notion of remainder.

  • If the remainders of division by 6, of the token amounts in both piles, are equal, then the next move will yield different remainders, and the move that follows may yield equal remainders.

  • In a game with two piles, the losing positions are ones in which the remainders of division by 6, of the token amounts in both piles, are equal. The winner should keep the following invariant: after each of her moves, the remainders of division by 6, of the token amounts in both piles, will be equal.

All in all, for the initial positions in which the difference between the amounts of tokens in the piles is not a multiple of 6, Alice will win. In all the other initial positions, Beth will win. The path to the final observation was gradual, and as with previous games, declarative observations and creativity paved the way.

Advertisement

3. Conclusion

We illustrated the essential role of the declarative perspective in problem solving of mathematical games. This perspective leads the problem solver to first examine characteristics of the problem at hand and then capitalize on them in devising an algorithmic winning strategy. Such a problem-solving process yields not only the algorithmic solution but also its justification. The focus on problem characteristics expresses the highest level (level 4) of abstraction in the ladder of abstraction levels during algorithm design [6]. In particular, this level is higher than the program level (level 2) of this ladder, which corresponds to the operational perspective that focuses on the actual algorithmic instructions.

The illustrated declarative perspective in the game solutions expresses suitable employment of the component of control in Schoenfeld’s cognitive model of problem solving [2]. This component “directs and monitors” progress in the process and combines the invocations of relevant resources and heuristics as well as justifications. Invoked resources involve mathematical properties such as polygon characteristics, list locations, parity, modular arithmetic, and number characteristics. They also involve game features such as pairing, invariance, and pre-processing. Invoked heuristics involve problem decomposition, modification, simplification, and more. Suitable invocations and applications of these elements paved the way to elegant game solutions that were displayed here.

A primary additional component of the cognitive model is that of beliefs, including beliefs in the way to approach a problem and progress and evaluate the outcome. The main difference between more competent and less competent problem solvers stems from the demonstration of more proper and less proper control and beliefs [2]. Many problem solvers that we described followed an operational perspective that was insufficient for obtaining sound outcomes, in terms of suitable algorithmic solutions and rigorous justifications. The competent problem solvers sought sound underlying patterns prior to, or together with the operative outcomes.

The different practices also affected creative behaviors. Those who expressed divergent, flexible thinking while seeking patterns reached constructive ideas on which they capitalized, while those who were focused right away on the final algorithmic outcomes demonstrated limited points of view and fixation. One must develop awareness of the important role of the elements described and illustrated here. Such development may occur with realization of the differences between the suitable and less suitable, or unsuitable, routes for progress.

References

  1. 1. Berlekamp ER, Conway JH, Guy RK. Winning ways for your mathematical plays. 2018
  2. 2. Schoenfeld AH. Learning to think mathematically: Problem solving, metacognition, and sense making in mathematics (Reprint). Journal of Education. 2016;196(2):1-38
  3. 3. Denning PJ, editor. A debate on teaching computing science. Communications of the ACM. 1989;32(12):1397-1414
  4. 4. Ginat D. Mathematical operators and ways of reasoning. The Mathematical Gazette. 2005;89(514):7-14
  5. 5. Ginat D. Hasty design, futile patching and the elaboration of rigor. ACM SIGCSE Bulletin. 2007;39(3):161-165
  6. 6. Perrenet J, Groote JF, Kaasenbrood E. Exploring students' understanding of the concept of algorithm: Levels of abstraction. ACM SIGCSE Bulletin. 2005;37(3):64-68
  7. 7. Wing JM. Computational thinking. Communications of the ACM. 2006 Mar;49(3):33-35
  8. 8. Torrance EP, Rockenstein ZL. Styles of thinking and creativity. Learning Strategies and Learning Styles. 1988:275-290
  9. 9. Ginat D. Learning from wrong and creative algorithm design. ACM SIGCSE Bulletin. 2008;40(1):26-30
  10. 10. https://ioinformatics.org/page/ioi-1996/22
  11. 11. Cormen TH, Leiserson CE, Rivest RL, Stein C. Introduction to Algorithms. Cambridge, Massachusetts: MIT Press; 2022

Written By

David Ginat

Submitted: 23 September 2022 Reviewed: 10 October 2022 Published: 23 November 2022