12/4/2014 Ma/CS 6a Class 28: Latin Squares By Adam Sheffer Latin Squares ο A Latin square is an π × π array filled with π different symbols, each occurring exactly once in each row and exactly once in each column. 1 12/4/2014 Partial Latin Squares ο In this class, our goal is to investigate when we can solve partial filled Latin squares (i.e., Latin squares that are incomplete). An EASY Warm-up ο Problem. What happens when only one row is missing? β¦ There is a unique way of completing each column, and we can check whether the additional row is valid (it always is). 2 12/4/2014 An Empty Square ο Problem. Find an easy way of building an π × π Latin Square. β¦ Hint. Where have we seen Latin squares in this course before? β¦ Consider a finite group πΊ = π1 , π2 , β¦ , ππ . β¦ The multiplication table of πΊ is a Latin square. β¦ For example, consider the set πΊ = 0,1,2,3,4 + 0 1 2 3 4 under addition πππ 5. 0 0 1 2 3 4 1 1 2 3 4 0 2 2 3 4 0 1 3 3 4 0 1 2 4 4 0 1 2 3 Reminder: Why a Group is a Latin Square ο Why is the multiplication table of πΊ = π1 , π2 , β¦ , ππ a Latin square? β¦ Consider the row/column that corresponds to ππ . β¦ If two of the elements in the row/column are identical, we have ππ ππ = ππ ππ . β¦ Multiplying by ππβ1 implies from the left yields ππ = ππ . 0 1 2 3 4 0 0 1 2 3 4 1 1 2 3 4 0 2 2 3 4 0 1 3 3 4 0 1 2 4 4 0 1 2 3 3 12/4/2014 Latin Rectangles ο Problem. Consider an π × π Latin rectangle with π β€ π (i.e., no two elements in the same row/column are identical). β¦ Can we always complete the rectangle to a Latin square? β¦ We already know that this is true when π = 0, π β 1, π. Rephrasing the Problem ο Claim. Every π × π Latin rectangle (where π < π) can be extended to an π + 1 × π Latin rectangle. ο To prove the claim, we build a bipartite graph πΊ = π1 βͺ π2 , πΈ . β¦ π1 consists of π vertices that correspond to the π symbols of the rectangle. β¦ π2 consists of π vertices that correspond to the π entries of the new row (row π + 1). β¦ An edge π£1 , π£2 β π1 × π2 means that symbol π£1 can be placed in cell π£2 . 4 12/4/2014 The Graph ο Completing the additional row is equivalent to finding a perfect matching in the graph. π1 π2 A 1 B 2 C 3 D 4 E 5 Reminder: Hall's Marriage Theorem Theorem. Let πΊ = π1 βͺ π2 , πΈ be a bipartite graph with π1 = π2 . ο There exists a perfect matching in πΊ if and only if for every π΄ β π1 , we have π΄ β€ π π΄ . ο Philip Hall 5 12/4/2014 Degrees Every vertex of π1 has degree π β π. ο β¦ Every symbol is in π columns of the rectangle. Every vertex of π2 has degree π β π. ο β¦ Every column already contains π symbols. π1 π2 A 1 B 2 C 3 D E 4 5 Concluding the Proof ο Consider a subset π΄ β π1 . β¦ The sum of the degrees of the vertices of π΄ is πβπ π΄ . β¦ Since every vertex of π2 has degree π β π, we have π΄ β₯ π π΄ . ο By Hallβs theorem there exists a perfect matching, which implies that we can always add another row to the Latin rectangle, as long as it is not a square. 6 12/4/2014 Partially Filled Latin Square ο We define a partially filled Latin square of order π to be an π × π table such that: β¦ Some of the cells of the table are filled with one of π symbols. β¦ Any row and column contains each symbol at most once. Completing Partially Filled Latin Squares ο What is the minimum number of filled entries in a partially filled Latin square of order π, such that the table cannot be completed into a Latin square? 7 12/4/2014 A Tight Bound ο Theorem. Any partially filled Latin square of order π with at most π β 1 entries can be completed to a valid Latin square. Matrix Representation ο An π × π Latin square can be represented as by 3 × π2 matrix. 1 2 2 4 β― π πΆ= 1 3 1 1 β― 1 4 2 4 β― πΈ In Row 2, Column 3, the Entry is 4 8 12/4/2014 Valid Matrix Representation ο Claim. A 3 × π2 matrix π with entries in ππ = 1,2, β¦ , π represents an π × π Latin square iff when taking any two rows of π every element of ππ2 appears exactly once. 1 1 1 2 3 4 2 1 2 2 1 4 β― β― β― Not valid! Proof: Valid Matrix Representation ο Proof. β¦ Asking the first two rows to contain every pair exactly once corresponds to having a unique entry in every cell of the square. β¦ Asking the first and third rows to contain every pair once corresponds to having every symbol exactly once in every row. β¦ Asking last two rows to contain every pair once corresponds to having every symbol exactly once in every column. 9 12/4/2014 Conjugate Latin Squares ο Two Latin squares of order π are conjugate if their matrix representations are identical up to a permutation of the rows. β¦ By the previous claim, permuting the rows of such a matrix results in a different Latin square. A Weaker Theorem ο We prove a weaker variant of the theorem: β¦ Theorem. Any partially filled π × π Latin square with at most π β 1 entries consisting of π β€ π/2 distinct symbols, can be completed to a valid Latin square. 10 12/4/2014 First Steps of the Proof ο By conjugation, we may replace the condition at most π/2 distinct symbols with all the entries being in the first π/2 rows. β¦ π β the number of non-empty rows (β€ π/2). β¦ ππ β the number of entries in row π. β¦ We reorder the rows of the matrix so that π1 β₯ π2 β₯ β― β₯ ππ . β¦ Notice that π1 + π2 + β― + ππ β€ π β 1. The Plan Suffices to prove: The partial square can be completed to an π × π Latin rectangle. ο Suffices to prove #2: For every β β€ π, if we completed rows 1, . . , β β 1, we can complete row β. ο π1 = π2 = π3 = 2 π4 = 1 β=3 11 12/4/2014 Perfect Matchings, Yet Again To prove that we can complete row β, we again use Hallβs theorem. ο Define a bipartite graph πΊ = π1 , π2 , πΈ : ο β¦ Every vertex of π1 corresponds to a symbol that is missing in the ββth row. β¦ Every vertex of π2 corresponds to an empty cell of the ββth row. β¦ An edge π£1 , π£2 β πΈ implies that βsymbolβ π£1 may be placed in βcellβ π£2 . β¦ We have π2 = π β πβ . The End Good luck with your exams! 12
© Copyright 2026 Paperzz