Draft
Tags: matroid
[3x3 sudoku]
+---+---+---+
+---+-B | B | B | ← band 1 (each 3 rows)
↓ +---+---+---+
Block | B | B | B | ← band 2
↑ +---+---+---+
+---+-B | B | B | ← band 3
+---+---+---+
↑ ↑ ↑
stacks (each 3 columns)
Note that a
sudoku contains
bands,
stacks and
blocks. So there are
cells and each cell can be filled with some number in
.
Solving
sudoku is NP-hard.see wikipedia
1 matroid on constraint set
We will see that there is a matroid with constraints as its groundset.The idea is from the joint work of authors in the mathoverflow question.
I think this is a simpler and more intuitive proof.
Let
be the set of constraints. Take a subset
of constraints. We say that
spans a constraint
if every filled sudoku grid (with fixed dimension) satisfies
also satisfies
.
Then
is the maximal set of satisfied constraints if we check
.We will work on vector spaces. To avoid confusions we use
for sudoku span function and use
for the span function in vector spaces and matroids.
Theorem1
Let
be a finite set. A function
is the span function of a matroid iff
It follows immediately from the definition of our span function that
(1.) and (2.) are satisfied. We need to prove (3).
Let’s forget about matroids for now and try to understand why some
constraints are not necessary. A vague idea is that the sudoku grid
structure comes with some information about the occurrence of the
correctly filled numbers in some cells.
The definition of “satisfy” does not reveal information of the sudoku
structure. To solve this issue, consider a linear mapping
for every filled sudoku grid
.
For a cell
,
we define
to be an
dimensional vector, which indicates the number of occurrence of each
number in
.
Then
is satisfied by sudoku grid
iff
.
Note that our linear mapping
works on linear combinations of
,
so we slightly change its type to
where
is the vector space generated by elements in
.- for all ;
- if and , then ;
- if , and , then .
Later we will see that
is not linearly independent and thus is not a base of
.
Consider vectors
(sum of rows in a band
)
and
(sum of blocks in the same band). They cover exactly the same set of
cells. So for any grid
,
.
The same happens for columns and blocks in the same stack. We denote by
the subspace of
in which
is
for all grid
.
Lemma2
Let
be a set of constraints and let
be a constraint. Then
spans
in the sudoku if and only if
in the vector space
.
Note that
spans
means that for any sudoku grid
such that
for all
,
we have
.
[the if part] Since
,
we can write
as
where
and
.
It follows from the linearity of
that
holds for every grid satisfying
.
Then we pick a correctly filled grid
.
One can see that
which implies
.
Then we have
.
[the only if part] Suppose by contradiction that
and for every
satisfying
we have
.
We can write
where
’s
are in the basis
but not in the span. Again there is a
that satisfies every constraint and we have
.
Now consider any grid
that satisfies
.
We have
.
Note that
is the subspace of
spanned by vectors in
.
This requires some properties of the sudoku graph and
does not hold for all perfect graphs. See the
example in the matroid union post.
Now we show (3) in Theorem
1 for sudoku span.
Proofof (3)
It follows by Lemma 2 that
for
.
Note that
satisfies condition (3). It is easy to see that if
satisfies (3) then
also satisfies (3). Then it follows that
is a span function of a matroid.
2 sudoku on graphs
We are going to play Sudoku on a class of connected graphs whose clique number equals the chromatic number , and in which every edge belongs to some maximum clique. For example, bipartite graphs, sudoku graphs and octahedron belong to this class. Here are some graph classes that every edge belongs to some maximum clique:- odd cycles.
- bipartite graphs. and we have sudoku matroid on maximum cliques.
- sudoku graphs. and sudoku matroid ✓
- octahedron. and sudoku matroid ×
- and that
- maximum cliques cover all edges?
2.1 solvability
Let be a graph in which every edge is in a maximum clique. Let be the clique line graph of , in which the vertex set is the set of maximum cliques and there are -parallel edges if two cliques share vertices. Note that one can also think about the uniform hypergraph of maximum cliques and see that is the line graph of an uniform hypergraph. There are some existing works on uniform hypergraph coloring. Czumaj and Sohler [1] showed an -tester for -colorability of -uniform hypergraphs with running time . Note that the definition of proper coloring on hypergraphs is no monochromatic hyperedge. Our sudoku problem is equivalent to the following questions:- Whether a
-uniform
hypergraph is
-rainbow
colorable. A hypergraph is
-rainbow
colorable if there exists a vertex coloring using
colors such that each hyperedge has all the
colors. See [2]
and [3]
for references. Another equivalent question is that if a given
-uniform
hypergraph is
-partite.I guess there should be some papers showing that it’s NP-complete to decide if a -uniform hypergraph is -partite. haven’t found one.
- Find the strong chromatic number of -uniform hypergraphs. A coloring is strong if no color appears twice in the same hyperedge. (see [4]) We want to check if .
Lemma3
If
is a tree, then
is a perfect graph.
Proof
is chordal.
Lemma4
If
is bipartite, then
.
Proof
Let
be a maximum clique in
.
There are maximum cliques sharing vertices with
.
We write
for the vertex intersections. One can see that if
is nonempty then we will have a triangle in the clique line graph
.
So we assume
’s
are disjoint since
is bipartite.
Now consider an edge coloring of
and recover from it a proper vertex coloring of
.
It follows from Kőnig’s theorem that
has an edge coloring using exactly
colors where
is the max degree in
.
Note that each edge in
corresponds to a shared vertex of two cliques. We color the vertex with
the same color as the corresponds edge in
.
Now the partial coloring is proper for each clique since colors are
taken from a proper edge coloring. Finally, one can see that for each
maximum clique the number of uncolored vertices is exactly the number of
unused colors, since
’s
are disjoint.
Remark
Bipartite
covers octahedron and even cycles but not sudoku graphs.
First we need to find a nice characterization of line graph or something
else that covers sudoku graphs but excludes odd cycles. I guess there
should be some connections in group theory. The plan is to try graph
classes in Graph
families defined by their automorphisms. Note that regular graphs,
vertex-transitive graphs and Cayley graphs won’t work.
2.2 integral, Cayley and NEPS
Sudoku graphs are integral Cayley graphs. I guess integral might be a key property to separate odd cycles and sudoku graphs, since the only integral odd cycle is which does not contradict the condition.2.2.1 integral & NEPS
Torsten Sander [5] proved that sudoku graphs are integral. By integral it means that the eigenvalues of the adjacency matrix are all integral. Sander’s proof basically shows that sudoku graphs are NEPS of four complete graphs and then uses a existing theorem on eigenvalues of NEPS. Given a set and graphs , the non-complete extended -sum (NEPS) of these graphs with respect to basis is the graph with vertex set and edge set such that are adjacent iff there exists some -tuple such that whenever and are adjacent in whenever .
Lemma5
Let
be an integer and
.
If
is the NEPS of
for basis then
is a sudoku graph.
See Figure 3 in [5] for the
proof.
2.2.2 Cayley
Let be a group and let be a generating set of . The Cayley graph is a directed regular graph in which the vertices are the elements in and there is an edge from to with label for every . A sudoku graph with vertices is a Cayley graph of the abelian group . (Sudoku graphs are undirected. Consider a bi-directional edge undirected.) There’s a one-to-one mapping from every vertex in sudoku graph (every cell in sudoku grid) to . The tuple indexes the vertex in the -th band, -th row in that band, -th stack and -th column in that stack.(assuming numbers are 0-indexed.) Then the generating set is Now one can see that each tuple in the basis of NEPS corresponds to a pattern of elements in generating set.2.3 matroid on maximum cliques
…References
[1]
A.
Czumaj, C. Sohler, Testing Hypergraph
Coloring, in: Automata, Languages and
Programming, Springer, Berlin, Heidelberg, 2001: pp.
493–505 10.1007/3-540-48224-5_41.
[2]
V.
Guruswami, R. Saket, Hardness of Rainbow
Coloring Hypergraphs, in: 37th
IARCS Annual Conference on
Foundations of Software
Technology and Theoretical
Computer Science (FSTTCS
2017), Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl,
Germany, 2018: pp. 33:1–33:15 10.4230/LIPIcs.FSTTCS.2017.33.
[3]
V.
Guruswami, S. Sandeep, Rainbow Coloring
Hardness via Low Sensitivity
Polymorphisms, SIAM Journal on Discrete
Mathematics. 34 (2020) 520–537 10.1137/19M127731X.
[4]
G.
Agnarsson, M.M. Halldórsson, Strong Colorings of
Hypergraphs, in: Approximation and Online
Algorithms, Springer, Berlin, Heidelberg, 2005: pp.
253–266 10.1007/978-3-540-31833-0_21.
[5]
T.
Sander, Sudoku graphs are integral, The Electronic Journal of
Combinatorics. 16 (2009) N25 10.37236/263.