[Solved]7 Let M N Positive Integers Consider Following Game Called Pebble Played N N Grid Denote S Q37275817

7. Let m and n be positive integers and consider the following game called Pebble Up – played on an n n grid. We will denote the square in the ith row of the grid and the jth column of the grid by the pair (i,j). For each 1 i,j n, the square (i,j) will be given a colour (either black or white) and a number (some positive integer k < m) The grid, along with a given colour and integer for each square, will be referred to as a game board Pebble Up is played on the game board as follows. You have a bag of black and white pebbles, and for each integer k between 1 and m, you must choose to place either a black or a white pebble on all of the squares labelled with the integer k (so, squares with different numbers can have different coloured pebbles, but if two squares have the same number then they must have the same coloured pebble). After choosing a coloured pebble for each integer k, the game moves on to the next phase. For each square (i,j). with 1 < i,j <n-1, examine the set of four squares This set of four squares is said to be winning if at least one of squares has the same colour as the pebble lying on it. You win the game if every set S is winning Figure 1 depicts a game board (with n3, m-5) along with two configurations of pebbles. The middle configuration is a winning configuration: any set S of four squares has at least one pebble which has the same colour as its square. If we switch the colour of the “5” pebble from white to black, we get the configuration on the right. This is not a winning configuration since the set Si2, consisting of the four squares in the top-right corner of the game board, has each square and pebble differing in colour Here is the game formalized as language Pebble-Up 2 3 5 4 4 2 4 4 Figure 1: A game board and two possible configurations of pebbles Input: Two positive integers m, n, and for every (i,j) a colour biy (either black or white) and a positive integer ky S m. Output: Decide if it is possible to win the game on the given game board. Prove that Pebble-Up is NP-Complete. Show transcribed image text 7. Let m and n be positive integers and consider the following game called Pebble Up – played on an n n grid. We will denote the square in the ith row of the grid and the jth column of the grid by the pair (i,j). For each 1 i,j n, the square (i,j) will be given a colour (either black or white) and a number (some positive integer k
Expert Answer
Answer to 7. Let m and n be positive integers and consider the following game called Pebble Up – played on an n n grid. We will de… . . .
OR

