Ma/CS 6a Class 28: Latin Squares

Similar documents
Ma/CS 6a Class 28: Latin Squares

Ma/CS 6b Class 3: Stable Matchings

Ma/CS 6b Class 3: Stable Matchings

Lecture 1: Latin Squares!

A Latin Square of order n is an n n array of n symbols where each symbol occurs once in each row and column. For example,

1 I A Q E B A I E Q 1 A ; E Q A I A (2) A : (3) A : (4)

Ma/CS 6a Class 19: Group Isomorphisms

Ma/CS 6b Class 25: Error Correcting Codes 2

Ma/CS 6b Class 12: Graphs and Matrices

Ma/CS 6a Class 19: Isomorphisms and Subgroups

Ma/CS 6b Class 15: The Probabilistic Method 2

Introduction to Graph Theory

High-dimensional permutations and discrepancy

Completing partial Latin squares with one filled row, column and symbol

M-saturated M={ } M-unsaturated. Perfect Matching. Matchings

High-dimensional permutations

Ma/CS 6a Class 2: Congruences

Ma/CS 6b Class 24: Error Correcting Codes

Chapter 0: Preliminaries

5 Flows and cuts in digraphs

The candidates are advised that they must always show their working, otherwise they will not be awarded full marks for their answers.

Ma/CS 6b Class 20: Spectral Graph Theory

21-301, Spring 2019 Homework 4 Solutions

Chapter 1. Latin Squares. 1.1 Latin Squares

On completing partial Latin squares with two filled rows and at least two filled columns

Ma/CS 6a Class 25: Partitions

ACO Comprehensive Exam March 17 and 18, Computability, Complexity and Algorithms

15.1 Matching, Components, and Edge cover (Collaborate with Xin Yu)

Computing autotopism groups of partial Latin rectangles: a pilot study

Bipartite Matchings. Andreas Klappenecker

Planes and MOLS. Ian Wanless. Monash University

3. Linear Programming and Polyhedral Combinatorics

Spring 2017 CO 250 Course Notes TABLE OF CONTENTS. richardwu.ca. CO 250 Course Notes. Introduction to Optimization

Mutually Orthogonal Latin Squares: Covering and Packing Analogues

Recall: Matchings. Examples. K n,m, K n, Petersen graph, Q k ; graphs without perfect matching

Algebraic Methods in Combinatorics

Ma/CS 6b Class 20: Spectral Graph Theory

Integer Division. Student Probe

3. Linear Programming and Polyhedral Combinatorics

A New Characterization of König-Egervary Graphs

Transversals in Latin Squares

Chih-Hung Yen and Hung-Lin Fu 1. INTRODUCTION

Invariants for efficiently computing the autotopism group of a partial Latin rectangle

Latin squares: Equivalents and equivalence

Understand the vocabulary used to describe polynomials Add polynomials Subtract polynomials Graph equations defined by polynomials of degree 2

6.046 Recitation 11 Handout

Student Activity: Finding Factors and Prime Factors

Section 6.6 Evaluating Polynomial Functions

Graph Theory. Thomas Bloom. February 6, 2015

(x 1 +x 2 )(x 1 x 2 )+(x 2 +x 3 )(x 2 x 3 )+(x 3 +x 1 )(x 3 x 1 ).

Balanced Treatment-Control Row-Column Designs

c i r i i=1 r 1 = [1, 2] r 2 = [0, 1] r 3 = [3, 4].

Discrete Math, Spring Solutions to Problems V

Ma/CS 6a Class 2: Congruences

Math 775 Homework 1. Austin Mohr. February 9, 2011

arxiv: v2 [math.co] 24 May 2018

Construction of latin squares of prime order

COMPLETION OF PARTIAL LATIN SQUARES

2-7 Solving Absolute-Value Inequalities

EGMO 2016, Day 1 Solutions. Problem 1. Let n be an odd positive integer, and let x1, x2,..., xn be non-negative real numbers.

Rectangle Free Coloring of Grids

arxiv: v1 [math.co] 22 Apr 2014

Out-colourings of Digraphs

More on NP and Reductions

Math 10-C Polynomials Concept Sheets

Math.3336: Discrete Mathematics. Chapter 9 Relations

MATH 13 SAMPLE FINAL EXAM SOLUTIONS

NP and NP-Completeness

Matching Polynomials of Graphs

MATH FINAL EXAM REVIEW HINTS

1 Counting spanning trees: A determinantal formula

CSE613: Parallel Programming, Spring 2012 Date: May 11. Final Exam. ( 11:15 AM 1:45 PM : 150 Minutes )

Algorithm Design and Analysis

Solving Quadratic Equations by Formula

The chromatic number of ordered graphs with constrained conflict graphs

Definable Graphs and Dominating Reals

Lecture 3: Latin Squares and Groups

A Markov chain for certain triple systems

CSE 311: Foundations of Computing. Lecture 23: Finite State Machine Minimization & NFAs

Topic: Primal-Dual Algorithms Date: We finished our discussion of randomized rounding and began talking about LP Duality.

Rainbow matchings and rainbow connectedness

MODEL ANSWERS TO THE FIRST QUIZ. 1. (18pts) (i) Give the definition of a m n matrix. A m n matrix with entries in a field F is a function

Algorithm Design and Analysis

Mat 3770 Bin Packing or

Math Studio College Algebra

Non-Extendible Latin Cuboids

Algebraic Methods in Combinatorics

A Family of Perfect Factorisations of Complete Bipartite Graphs

Some results on the existence of t-all-or-nothing transforms over arbitrary alphabets

Ma/CS 6a Class 23: Generating Functions

3.4 Pascal s Pride. A Solidify Understanding Task

An Algorithmist s Toolkit September 24, Lecture 5

arxiv: v2 [math.co] 6 Apr 2016

LARGE RAINBOW MATCHINGS IN GENERAL GRAPHS. 1. Introduction

ACO Comprehensive Exam October 18 and 19, Analysis of Algorithms

Mechanical Engineering. UCSB

Row and Column Distributions of Letter Matrices

Some Open Problems Arising from my Recent Finite Field Research

Ma/CS 6a Class 18: Groups

Some Applications of pq-groups in Graph Theory

Transcription:

Ma/CS 6a Class 28: Latin Squares By Adam Sheffer Latin Squares A Latin square is an n n array filled with n different symbols, each occurring exactly once in each row and exactly once in each column. 1

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

An Empty Square Problem. Find an easy way of building an n n Latin Square. Hint. Where have we seen Latin squares in this course before? Consider a finite group G = g 1, g 2,, g n. The multiplication table of G is a Latin square. For example, consider the set G = 0,1,2,3,4 under addition mod 5. + 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 Reminder: Why a Group is a Latin Square Why is the multiplication table of G = g 1, g 2,, g n a Latin square? Consider the row/column that corresponds to g i. If two of the elements in the row/column are identical, we have g i g j = g i g k. Multiplying by g i 1 implies from the left yields g j = g k. 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

Latin Rectangles Problem. Consider an m n Latin rectangle with m n (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 m = 0, n 1, n. Rephrasing the Problem Claim. Every m n Latin rectangle (where m < n) can be extended to an m + 1 n Latin rectangle. To prove the claim, we build a bipartite graph G = V 1 V 2, E. V 1 consists of n vertices that correspond to the n symbols of the rectangle. V 2 consists of n vertices that correspond to the n entries of the new row (row m + 1). An edge v 1, v 2 V 1 V 2 means that symbol v 1 can be placed in cell v 2. 4

The Graph Completing the additional row is equivalent to finding a perfect matching in the graph. V 1 A B C D E V 2 1 2 3 4 5 Reminder: Hall's Marriage Theorem Theorem. Let G = V 1 V 2, E be a bipartite graph with V 1 = V 2. There exists a perfect matching in G if and only if for every A V 1, we have A N A. Philip Hall 5

Degrees Every vertex of V 1 has degree n m. Every symbol is in m columns of the rectangle. Every vertex of V 2 has degree n m. Every column already contains m symbols. V 1 A B C D E V 2 1 2 3 4 5 Concluding the Proof Consider a subset A V 1. The sum of the degrees of the vertices of A is n m A. Since every vertex of V 2 has degree n m, we have A N A. 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

Partially Filled Latin Square We define a partially filled Latin square of order n to be an n n table such that: Some of the cells of the table are filled with one of n 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 n, such that the table cannot be completed into a Latin square? 7

A Tight Bound Theorem. Any partially filled Latin square of order n with at most n 1 entries can be completed to a valid Latin square. Matrix Representation An n n Latin square can be represented as by 3 n 2 matrix. R 1 2 2 4 C = 1 3 1 1 E 1 4 2 4 In Row 2, Column 3, the Entry is 4 8

Valid Matrix Representation Claim. A 3 n 2 matrix M with entries in S n = 1,2,, n represents an n n Latin square iff when taking any two rows 2 of M every element of S n appears exactly once. 1 2 2 2 1 3 1 1 1 4 2 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

Conjugate Latin Squares Two Latin squares of order n 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 n n Latin square with at most n 1 entries consisting of m n/2 distinct symbols, can be completed to a valid Latin square. 10

First Steps of the Proof By conjugation, we may replace the condition at most n/2 distinct symbols with all the entries being in the first n/2 rows. m the number of non-empty rows ( n/2). r i the number of entries in row i. We reorder the rows of the matrix so that r 1 r 2 r m. Notice that r 1 + r 2 + + r m n 1. The Plan Suffices to prove: The partial square can be completed to an m n Latin rectangle. Suffices to prove #2: For every l m, if we completed rows 1,.., l 1, we can complete row l. r 1 = r 2 = r 3 = 2 r 4 = 1 l = 3 11

Perfect Matchings, Yet Again To prove that we can complete row l, we again use Hall s theorem. Define a bipartite graph G = V 1, V 2, E : Every vertex of V 1 corresponds to a symbol that is missing in the l th row. Every vertex of V 2 corresponds to an empty cell of the l th row. An edge v 1, v 2 E implies that symbol v 1 may be placed in cell v 2. We have V 2 = n r l. The End Good luck with your exams! 12