Solver Example
- 02:37
Understand how to apply the Solver Tool, to solve this puzzle
Glossary
Constraints Puzzle Solver ParametersTranscript
Let's use the solver tool to solve this puzzle square. So, within the puzzle square we have these nine cells, which I'm gonna color in yellow. And within the puzzle square, we can only use each number from one to nine once. The sum of each row and column must add up to 15. So, these are some functions along the rows and along the columns. The numbers must all be positive, so that's the numbers in the square, and the numbers must all be integers. So, let's have a look at the tool alt A Y two. Here's the solver tool.
Right, now we not got an objective here, but what we do have to tell the tool is which cells it's allowed to change. So, the variable cells are the nine yellow cells in this example. And now, what we're going to do is add some constraints. Okay, we're gonna add some constraints. We're going to say, right, first thing we're going do each number, we're gonna use each number once. So, we're gonna add using each number once. So, we select the nine yellow cells and then middle layer we're gonna select diff for different. That means all those cells are going to be different. Okay, another thing we want to do is the sum of the columns and the rows must add up to 15. So, let's start off then with the columns, or with the rows even, we'll select those three cells there and we're gonna say these must all equal 15. We'll add that. We're gonna do the same with the columns. We're gonna grab those three cells and we're gonna say that each of these values must also be 15. The numbers must all be positive. So, if they all must all be positive, then that means that we select, again, we'll select them all. They must all be greater than or equal to one. Okay, and they should also be less than or equal to nine Right, and I think that, oh no, one more thing. They must also all be integers. Okay, so we'll add one more rule and that is each value must be an integer. Okay, so we're gonna add that and we'll cancel that one we don't need anymore. That's all the rules that we need now. And now, we have to do is hit solve at the bottom. So, I'm gonna hit the solve button at the bottom there and with a little bit of luck, da-da-da, we should see that, yes, there we go. That we've used all the digits from one to nine once and that the rows and the columns add up to 15.