Solving a Numeric Matrix Puzzle: Get All Combinations!

In summary, the conversation discusses a game that involves swiping over a 4x4 matrix of numbers to add, subtract, or do nothing. The goal is to get specific numbers in the matrix and the number of possible combinations is 9^16. The swiping cannot be done on the same tile twice and there is a free iOS app with a similar concept. The process to find all possible combinations involves creating a program to simulate all possible swipes and using probability and convolution of random variables to find the distribution of each swipe sequence. This is a complex task that will likely require a computer to generate the possible swipe sequences.
  • #1
najken
3
0
Hi,

I am searching for a smart way of calculating all numbers in a special matrix kind of game.
The game board consist of numbers between 1 and 9 in a 4x4 matrix.

Swiping over numbers will either add up (swiping left or right), subtract (swiping up or down) or do nothing (diagonal swiping).

I wonder how many combinations there are and if there is a simple way of getting all the results. There is a free iOS app that resembles of this game idea:
http://itunes.apple.com/us/app/addictive/id543137735?l=sv&ls=1&mt=8

I would be glad for any answers, there seems to be a lot of different combinations.
 
Mathematics news on Phys.org
  • #2
Hey najken and welcome to the forums.

Can you explain the constraints of the matrix? Are there are conditions on the elements in the matrix? When you do your swiping thing how do the matrices change? What's the goal of the game?
 
  • #3
thank you

the goal of the game is to get numbers specified. it's these specified numbers I would like to find. the matrix is 4x4 random integers between 1 and 9.

You are not allowed to swipe over the same tile again. You can swipe diagonally, left, right up, down with the affect of adding and subtracting as described in post #1.
 
  • #4
If all the numbers are independent and you can all have combinations of numbers in the 4x4 matrix, the number of original configurations is 9^16 which is a big number.

The only thing now that I am confused with is the swiping. You say you can't swipe the same tile over again so I'm guessing that If I swipe the tiles (1,1) and (2,2) then I can't touch those tiles again. Is this right?
 
  • #5
that is absolutely right, and you cannot "skip" or jump over tiles that are in between to get to a tile further away.

The app I posted is kind of similar to Rumble/Ruzzle but that one works with letters and words instead of numbers
 
  • #6
Well the thing to first look at is the number of swipes you can do.

This is going to be basically a massive markov style problem: in non-mathematic speak, markov means conditional so that what you do right now affects what you do later but the thing is that this is a lot more complicated than normal markov since normal markov only takes into account what happened one time ago where-as you need to consider the entire history.

The first thing to do is to classify all the possible swipes you can do. Obviously they will always involve at least two-squares but I'm guessing they could involve at least four squares. These becomes your events.

Now given this you basically create a new board and simulate it with a computer for each possibility. Each possibility will create a constraint, so you find the number of possible moves given the history of the board and simulate those and keep going until you can't go any more.

So basically all this means is that you create a program that has simulated all possibilities and then you count all possibilities up in terms of the swipes without respect to the actual numbers.

You can code this kind of thing up with a computer and use something like C++ or even something like Python.

You store all the possible swipe histories that work and save that somewhere.

Once you have the swipes, if you want to find out the possible combinations then you will need to introduce probability and a thing called convolution of discrete random variables.

The convolution basically creates a probability distribution for X + Y + Z where X,Y,Z are independent and this deals with finding distributions of not only sums but also differences (instead of X + Y + Z you can get X - Y - Z).

You apply this to every kind of generated swipe sequence and then you will have a probability distribution that is conditional which you can expand out which will give you the probability distribution for every single combination of the game.

This is not going to be easy and will most likely require a computer to generate the possible swipe sequences so that you can create distributions for each swipe sequence.
 

FAQ: Solving a Numeric Matrix Puzzle: Get All Combinations!

How do you approach solving a numeric matrix puzzle?

To solve a numeric matrix puzzle, it is important to first understand the rules and objectives of the puzzle. Then, start by identifying any patterns or clues in the puzzle that can help guide your solution. It may also be helpful to break the puzzle down into smaller sections or rows/columns to focus on one section at a time.

What are some strategies for finding all combinations in a numeric matrix puzzle?

One strategy for finding all combinations in a numeric matrix puzzle is to use a process of elimination. Start by filling in the known numbers in the puzzle and then use logic to determine the possible combinations for the remaining spaces. Another strategy is to use trial and error, plugging in different numbers and checking if they fit the puzzle's rules and objectives.

What should I do if I get stuck while solving a numeric matrix puzzle?

If you get stuck while solving a numeric matrix puzzle, take a step back and try to approach the puzzle from a different angle. Look for any new patterns or clues that you may have missed before. It can also be helpful to take a break and come back to the puzzle with a fresh perspective.

Can a numeric matrix puzzle have more than one solution?

It is possible for a numeric matrix puzzle to have more than one solution, but the objective is usually to find the most efficient or optimal solution. Some puzzles may also have multiple solutions that are equally valid.

Are there any shortcuts or tips for solving numeric matrix puzzles?

One tip for solving numeric matrix puzzles is to use the process of elimination to narrow down the possible combinations for each space. Another tip is to start with the most constrained rows or columns first, as these may have fewer possible combinations. Additionally, it can be helpful to use a pencil and eraser to make changes and keep track of the possible combinations as you solve the puzzle.

Back
Top