Title: On Completing Latin Squares
1On Completing Latin Squares
- Iman Hajirasouliha
- Joint work with
- Hossein Jowhari, Ravi Kumar, and Ravi Sundaram
2Definitions
- What is a Latin Square and a Partial Latin Square
(PLS)? - The PLSE problem Given a PLS, fill the maximum
number of empty cells using numbers in n
without violating the constraints. - The k-PLSE problem How many empty cells of a PLS
can be filled properly using at most k n
different numbers?
Introduction, 2/3-e Approx. for PLSE, 1-1/e-e
Approx. for k-PLSE, Conclusion
3Motivations and Applications
- Interesting object for mathematicians, Evans
conjecture(1960) says that a PLS with n-1 filled
cells can be completed. (Proved by Smetaniuk in
1981) - Sudoku puzzles, one of the current fads, are PLSs
with additional properties. - The problem has application in error-correcting
codes and recently optical networks.
Introduction, 2/3-e Approx. for PLSE, 1-1/e-e
Approx. for k-PLSE, Conclusion
4Previous and New Results
- The PLSE problem is NP-Complete (Colbourn 1984)
- The PLSE problem is APX-hard (This paper)
- 1-1/ee hardness for the k-PLSE problem. (This
paper)
Introduction, 2/3-e Approx. for PLSE, 1-1/e-e
Approx. for k-PLSE, Conclusion
5A problem equivalent to PLSE
- The 3EDM Problem finding the number of maximum
edge disjoint triangles in a tripartite simple
graph.
columns
a
b
c
d
a
a
rows
b
a
b
c
c
b
d
d
c
d
1
3
2
4
numbers
Introduction, 2/3-e Approx. for PLSE, 1-1/e-e
Approx. for k-PLSE, Conclusion
6Local Search Algorithm for 3EDM
- Let G be an instance of 3EDM
- Fix a constant t 7.
- Start from any arbitrary valid solution.
- If possible, replace s t triangles in the
current solution with s1 edge-disjoint triangles
to get another valid solution. - Since the size of solution increases in each step
by one, the algorithm runs in polynomial time.
Introduction, 2/3-e Approx. for PLSE, 1-1/e-e
Approx. for k-PLSE, Conclusion
7Local Search Analysis
- Let TT1,, Tm be the set of edge disjoint
triangles of OPT and TT1,, Tn be the set
of triangles found by the heuristic. - Construct a bipartite graph H with
- vertex set T ? T.
- Connect Ti and Tj in H, iff Ti and Tj share an
edge in G.
T1
T1
T2
T2
. . .
Tm
Tn
H
Optimal Triangles
Local Search Triangles
Introduction, 2/3-e Approx. for PLSE, 1-1/e-e
Approx. for k-PLSE, Conclusion
8Hurkens-Schrijver Theorem
- Let H be a bipartite graph with vertex set X ? Y
Xn, Ym. - Let k 3 and assume
- For each y in Y, deg (y) k.
- Every subset of size t of X has a system of
distinct representatives in Y. - Then
Introduction, 2/3-e Approx. for PLSE, 1-1/e-e
Approx. for k-PLSE, Conclusion
9PLSE and H-S Theorem
- H satisfies the Hurkens-Schrijver conditions.
- deg (Tj) 3 for each Tj.
- Every subset of size t in T has a System of
Distinct Representation in T (due to local
search). - Setting k3, we get the 2/3-e bound. For t7 we
beat the previous result
T1
T1
T2
T2
. . .
Tm
Tn
H
Optimal Triangles
Local Search Triangles
Introduction, 2/3-e Approx. for PLSE, 1-1/e-e
Approx. for k-PLSE, Conclusion
10The k-PLSE problem
- How many cells of a PLS can be filled using at
most k n different numbers? - A natural greedy algorithm
- Repeat k times
- Pick the number c which can fill the most
cells. Fill those cells with c. - The greedy algorithm is a ½ - approximation
algorithm.
Introduction, 2/3-e Approx. for PLSE, 1-1/e-e
Approx. for k-PLSE, Conclusion
11Greedy algorithm analysis
- OPT solution and greedy solution are sets of
triples (i, j, k). To each triple y in OPT,
we assign a triple x in greedy solution as
accountable. - Given y(i, j, k) in OPT, we have three cases
- 1) cell x(i, j, t) is in Greedy. x is
accountable for y.
Introduction, 2/3-e Approx. for PLSE, 1-1/e-e
Approx. for k-PLSE, Conclusion
12- 2) (i, j) is empty in Greedy but k has been used
in Greedy. We can assign a distinct x(i, j, k)
in Greedy to y. Consider the iteration where
Greedy chooses k. -
- Cells with number 1 in OPT
- Cells with number 1 in Greedy
Introduction, 2/3-e Approx. for PLSE, 1-1/e-e
Approx. for k-PLSE, Conclusion
13- 3) cell (i, j) is empty in Greedy and number k
is missing in Greedy. For each number c in OPT we
can assign a number c in Greedy which is missing
in OPT.
OPT
Greedy
Red cells in OPT are mapped to Yellow cells in
Greedy
Introduction, 2/3-e Approx. for PLSE, 1-1/e-e
Approx. for k-PLSE, Conclusion
14LP relaxation of the problem
- A way to extend the PLS with a number represents
a matching. - Mc is the set of all matchings that extends the
PLS with number c. - ycM is 1 when Matching M is chosen.
Introduction, 2/3-e Approx. for PLSE, 1-1/e-e
Approx. for k-PLSE, Conclusion
151-1/e-e approximation
- 1. Solve the LP program.
- 2. Multiply the variables by 1-e.
- 3. For each number pick a matching randomly
according to the probability associated with the
matchings. - 4. If matchings intersect in a cell, choose one
of them arbitrarily for the cell. - Expectation of the size of solution obtained is
bigger than (1-1/e-e)LPOPT - With a constant probability, at most k numbers
have been picked.
Introduction, 2/3 Approx. for PLSE, 1-1/e-e
Approx. for k-PLSE, Conclusion
16Conclusion
- We defined a new and natural variation of the
PLSE problem and obtained simple approximation
algorithms for the PLSE and k-PLSE problems. - Our results for the PLSE problem is an
improvement and for the k-PLSE problem is the
best possible.
Introduction, 2/3 Approx. for PLSE, 1-1/e-e
Approx. for k-PLSE, Conclusion