00:01
So we are requested to find a solution to a 4x4 sutoku puzzle by using, setting it up as a satisfiability problem.
00:20
So the rules of 4x4 sudoku are almost identical to the 9x9.
00:33
Each row must contain exactly one of each number, 1, 2, 3, 4.
00:38
Each column must contain exactly one of each number, one to three four.
00:43
And each quadrant must contain exactly one of each number, one to 34.
00:49
And here's a little bit of a graphical showcase of what these rules are referring to.
01:00
So two unspoken rules is that for every single coordinate, it on the grid for every number and for every other number.
01:24
If the numbers are different and the first number is occupying the tile, that means the second number cannot be occupying the tile.
01:37
It's essentially saying that in one tile, you can't put one, two, three, and four all in a single tile.
01:46
A second rule says that for each tile, there must be at least one character occupying it.
02:06
So it essentially restricts it such that you cannot leave empty tiles on the board for it to be a solution.
02:21
To model the first official rule that each row must contain exactly one of each number, 234 we simply say for each row for each number there must be a column where it's occupied by that number so instead for each row for each number it must be occupying one of the four columns there is a derivative rule off of the ground rules and this one which states that for each row, for each number, for every column and every alternative column, the columns are different and the number n is in these coordinates.
03:36
Then the same number cannot be in the same row, but different column.
03:45
So this is forbidding that you put...
03:50
Number three here and then repeat again like three here.
03:59
But yeah, the reason why i put a place down here is an alternative rule is because you can actually derive this rule from this one over here and this one over here.
04:20
I will not show the logical proof for it, but it should make intuitive sense.
04:27
Moving on.
04:32
For the second of the official rules, each column must contain each number.
04:40
Simply to say for every column, for every number, there must be a row in which is being occupied by that number.
04:52
Just as before, there is this alternative rule, which makes this mutual exclusion for every column.
05:00
The numbers only in one row and only one roll now it gets a little more complex which you reach the third official rule saying each quadrant must contain exactly one of each number so you do for every left half and right oh sorry for every diagonal and horizontal, sorry, very vertical and horizontal quadrant for each number, the number must exist in one of the four tiles belonging to that quadrant as such.
06:07
So this essentially covers for the zero zero quadrant, for the zero one quadrant, for the one zero quadrant, so and so forth.
06:25
So i might have shifted up which one's what.
06:28
It's not the point.
06:33
Just as the prior two base rules, they have their derivative rule.
06:43
This gets quite large.
06:47
Essentially just repeats that for each quadrant for each number, for each tile in the quadrant.
07:00
And for each other tile in the quadrant, quadrant.
07:08
If these tiles in the quadrant are not the same, and the number already exists in this tile, that means the number can't also exist in the other tile of the same quadrant...