Random Latin squares and Sudoku designs generation
|
|
|
- Bonnie Gallagher
- 9 years ago
- Views:
Transcription
1 Electronic Journal of Statistics Vol. 8 (2014) ISSN: DOI: /14-EJS913 Random Latin squares and Sudoku designs generation Roberto Fontana Dept. of Mathematical Sciences Politecnico di Torino Italy [email protected] Abstract: Uniform random generation of Latin squares is a classical problem. In this paper we prove that both Latin squares and Sudoku designs are maximum cliques of properly defined graphs. We have developed a simple algorithm for uniform random sampling of Latin squares and Sudoku designs. The corresponding SAS code is available in the supplementary material. AMS 2000 subject classifications: Primary 62K15. Keywords and phrases: Latin squares, Sudoku designs, random generation, cliques. Received May Introduction Generating uniformly distributed random Latin squares is a a topic with a long history in the design of experiments and related fields. Already in 1933, F. Yates [10] wrote...it would seem theoretically preferable to choose a square at random from all the possible squares of given size. The widely used algorithm for generating random Latin squares of a given order is given in [7]. It is based on a proper set of moves that connect all the squares and make the distribution of visited squares approximately uniform. In this paper, we present a new approach that is based on the equivalence between Latin squares and maximum cliques of a graph. This approach is also valid for Sudoku designs. The paper is organized as follows. In Section 2, the equivalence between Latin squares (Sudoku designs) and maximum cliques of a suitable graph is demonstrated. Section 3 describes an algorithm for generating uniformly distributed random Latin squares and Sudoku designs. The corresponding SAS code is available in the supplementary material [6]. Concluding remarks are made in Section Latin squares and Sudoku designs are maximum cliques 2.1. Latin squares A Latin square of order n is an n n matrix L n in which each of n distinct symbols appear n times, once in each row and one in each column. For the 883
2 884 R. Fontana sake of simplicity we consider the integers 1,2,...,n as symbols. We denote by L n [,c],c = 1,...,n (L n [r, ],r = 1,...,n) the columns (the rows) of L n and by L n the set of all the Latin squares of order n. For example, a Latin square of order 4, L 4 L 4, is given by L 4 = (1) We can look at a Latin square L n = [l rc ;r,c = 1,...,n] as a set of n disjoint permutation matrices, following the approach recently adopted in [4] and [5]. For each symbol s, s = 1,...,n we consider the n n matrix P (s) = [p (s) rc ; r,c = 1,...,n] where { p (s) rc = 1 if l rc = s 0 otherwise. Given a permutation matrix P the corresponding permutation π = (π 1,...,π n ) of (1,...,n) is defined as π = P1 n where1 n isthe n 1column vectorwhoseelements are1,...,n. Viceversa,given a permutation π = (π 1,...,π n ) of (1,...,n) the corresponding permutation matrix P = [p rc ;r,c = 1,...,n] is defined as { 1 if c = π r p rc = 0 otherwise. (2) We denote by φ the function that transforms a permutation π of (1,...,n) into a permutation matrix P = φ(π) according to Equation (2). For the Latin square L 4 L 4 of Equation (1), the permutation matrix P (2) is given by P (2) = and the corresponding permutation π (2) of (1,2,3,4) is π (2) = (2,3,4,1). It immediately follows that a Latin square of order n can be written as L n = P (1) +2P (2) + +np (n) (3) where P (s),s = 1,...,n are mutually disjoint permutation matrices. Two permutation matrices P (s) and P (t) are disjoint if and only if p (s) rc p (t) rc = 0 for each r,c {1,...,n}. Equivalently two permutations π (s) and π (t) are disjoint if and only if π r (s) π r (t) for r = 1,...,n.
3 Random Latin squares and Sudoku designs generation 885 Without loss of generality, as we will explain below, assume that P (1) = I n where I n is the n n identity matrix. The permutation π (1) corresponding to P (1) is the identity permutation ι n, π (1) ι n = (1,...,n). Let us denote by P n the set of all the permutations of {1,...,n} and, given π P n, by L π n L n the set of all the Latin squares of order n for which P (1) = φ(π) and P (2) < < P (n) where P (s) < P (t) or, equivalently, π (s) < π (t) means that (π (s) 1,...,π(s) n ) < lex (π (t) 1,...,π(t) n ). The symbol < lex denotes the standard lexicographic order, (a 1,...,a n ) < lex (b 1,...,b n ) m > 0 i < m a i = b i and a m < b m. For simplicity we will write < in place of < lex. As it will become clear later on, any order between permutations can be chosen. Let us consider L ιn n, the set of all the Latin squares of order n for which P (1) = I n and P (2) < < P (n). As L ιn n is built, we can generate all the Latin squares of order n, L n L n, considering 1. all the (n 1)! permutations (s 2,...,s n ) of the symbols 2,...,n and assigning them to the permutation matrices P (2),...P (n) I n +s 2 P (2) + +s n P (n) ; 2. all the n! sets L π n where π P n is a permutation of (1,...,n). We observe that L π n contains all the Latin squares that are generated permuting the columns of a Latin square L n of L ιn n L π n = {[L n[,π 1 ]... L n [,π n ]] : L n L ιn n }. It follows that in order to generate a random Latin square L n it is sufficient: 1. to generate a random Latin square L (1) n L ιn n ; 2. to generate L (2) n by a random permutation of the symbols 2,...,n of L (1) n ; 3. to generate L n by a random permutation of the columns of L (1) We observe that the number #L n of Latin squares of order n is n. #L n = n!(n 1)!#L ιn n. (4) It is worth noting that the suggested approach, making use of symbols and columns permutations, allows us to reduce the number of Latin squares to be explicitly considered from #L n to #L ιn n with a reduction factor equal to n!(n 1)!. More specifically, the third step of the procedure above is based on the assigment of the initial permutation matrix P (1) = I n. To generate a Latin square L n L ιn n we have to build n 1 permutation matrices P (s),s = 2,...,n, P (2) < < P (n), that are mutually disjoint and that are disjoint with I n. In the language of permutations, a permutation δ that is disjoint with the identity permutation ι n, i.e. δ r r,r = 1,...,n, is called a derangement. The permutation matrix P = [p rc ;r,c = 1,...,n] of a derangement δ, P = φ(δ), satisfies the condition p rr = 0,r = 1,...,n. It follows that we have to build n 1 derangements δ (s),s = 2,...,n of (1,...,n), δ (2) < < δ (n) such that δ r (s) δ r (t),r = 1,...,n for each s,t {2,...,n},s t.
4 886 R. Fontana Let D n P n be the set of all the derangements of (1,...,n): we denote by d n the number of derangements of (1,...,n), d n = #D n. Let G n = (V n,e n ) be the undirected graph whose set of vertices V n is the set of derangements D n and whose set of edges E n contains all the couples of derangements (δ (i),δ (j) ),i < j such that δ r (i) δ r (j),r = 1,...,n. The following theorem, which to the best of our knowledge is new, holds. Theorem 1. The Latin squares L n of order n of L ιn n C n 1 of size n 1 of G n = (V n,e n ) C n 1 are the largest cliques of G n. C n 1 = (δ (2),...,δ (n) ), δ (2) < < δ (n). Proof. A Latin square L n L ιn n can be written as L n = I n +2P (2) + +np (n) are the ordered cliques where P (s) is the permutation matrix corresponding to the derangement δ (s) = P (s) 1 n,s = 2,...,n and δ (2) < < δ (n). The derangements δ (s) are disjoint. It follows that {δ (2),...,δ (n) } is a clique of G n. Viceversa, given the clique {δ (2),...,δ (n) } with δ (2) < < δ (n) we build L n = I n +2φ(δ (2) )+ +nφ(δ (n) ) where φ is defined in Equation (2). It is immediately evident that L n = L n. Finally, Latin squares correspond to the largest cliques because it is evident that it is not possible to find a set of m > n derangements of {1,...,n} that are disjoint Sudoku designs For the definition of Sudoku designs we refer to [1] In 1956, W. U. Behrens ([2]) introduced a specialisation of Latin squares which he called gerechte. The n n grid is partitioned into n regions, each containing n cells of the grid; we are required to place the symbols 1,...,n into the cells of the grid in such a way that each symbol occurs once in each row, once in each column, and once in each region. The row and column constraints say that the solution is a Latin square, and the last constraint restricts the possible Latin squares. By this point, many readers will recognize that solutions to Sudoku puzzles are examples of gerechte designs, where n = 9 and the regions are the 3 3 subsquares. (The Sudoku puzzle was invented, with the name number place, by Harold Garns in 1979.) Analogously to Latin squares, we describe a Sudoku design in terms of Sudoku permutation matrices, as discussed in [4] and [5]. Let us define the regions in which the matrix is divided. We will refer to regions as boxes. Let us consider a n n matrix, where n = p 2 and p is a positive integer. Its row and column positions (i, j) are coded with the integer
5 Random Latin squares and Sudoku designs generation 887 from 0 to p 2 1. We define boxes B k,m, k,m = 0,...,p 1 as the following sets of positions B k,m = {(i,j) : kp i < (k +1)p,mn j < (m+1)n}. It follows that any n n matrix A can be partitioned into submatrices A km corresponding to boxes B k,m. An n n matrix S n is a Sudoku, if in each row, in each column and in each box, each of the integers 1,..., n appears exactly once. We denote by S n the set of all the n n Sudokus. In Sudoku literature, the set of boxes B b,m, m = 0,...,p 1 constitutes the b th band, b = 0,...,p 1, while the set of boxes B k,s, k = 0,...,p 1 constitutes the s th stack, s = 0,...,p 1. Let us define a Sudoku permutation matrix P, referred to as an S-matrix P, as a permutation matrix of order n which has exactly one 1 in each submatrix P k,m correspondingtoboxesb k,m,k,m = 0,...,p 1.Letusdenoteby P n P n the set of all Sudoku permutations. An n n Sudoku S n identifies n matrices P (i), i = 1,...,n, where P (i) is the S-matrix corresponding to the positions occupied by the integer i. It follows that a Sudoku S n S n can be written as S n = P (1) +2 P (2) + +n P (n). (5) We observe that P (1),..., P (n) are mutually disjoint and that Equation (5) is the analogue of Equation (3) for Sudoku designs. We observe that the identity permutation ι n is not a Sudoku permutation, apart from the trivial n = 2 case. We can easily generate S-matrices. Let us define a more compact representation of an S-matrix S, by building the p p matrix S, whose elements are the only possible position, within each box, where S is equal to 1. Among the S-matrices we can define S 0,n whose elements (S 0,n ) km, k,m = 1,...,p are For the n = 4 case we obtain (S 0,n) km = (m,k). S 0,4 = [ (1,1) (2,1) (1,2) (2,2) and the corresponding S-matrix S 0,4 is For the n = 9 case we obtain S 0,4 = S0,9 = ]. (1,1) (2,1) (3,1) (1,2) (2,2) (3,2) (1,3) (2,3) (3,3)
6 888 R. Fontana and the corresponding S-matrix S 0,9 is S 0,9 = We will denote by σ 0,n the permutation corresponding to the S-matrix S 0,n, σ 0,n = S 0,n 1 n. It will play the role of the identity permutation ι n for Sudoku designs. All the S-matrices can be generated by permuting the rows within each band and the columns within each stack. It follows that the total number of S-matrices is p! 2p, [4]. Let G n = (Ṽn,Ẽn) be the undirected graph whose set of vertices Ṽn is the set of derangements of σ 0,n that are also S-permutations, briefly Sudokuderangements, and whose set of edges E n contains all the couple of Sudokuderangements ( δ (i), δ (j) (i) (j) ),i < j such that δ r δ r,r = 1,...,n. Theorem 1 holds if we replace the graph G n with the graph G n. We observe that G n is a subgraph of G n. Let us denote by Sn σ0,n the set of all the Sudokus of order n for which P (1) = S 0,n and P (2) < < P (n). As Sn σ0,n is built, we can generate all the Sudokus of order n = p 2 considering 1. all the (n 1)! permutations (s 2,...,s n ) of the symbols 2,...,n and assigning them to the permutation matrices P (2) (n),... P I n +s 2 P(2) + +s n P(n) 2. all the p! 2p sets S σ n where σ is a Sudoku permutation of (1,...,n). For the total number of Sudokus of order n we get Equation (6) which is the equivalent of Equation (4): #S n = (n 1)!p! 2p #S σ0,n n (6) 3. An algorithm for random sampling 3.1. Latin squares The algorithm takes n as input and gives L n, a random Latin square of order n, as output. The main steps of the algorithm are as follows.
7 Random Latin squares and Sudoku designs generation Build the undirected graph G n = (V n,e n ): (a) generate V n D n, the set of all the derangements δ (i),i = 1,...,d n of {1,...,n}; (b) generate E n, the set of all the edges corresponding to all the couples of derangements (δ (i),δ (j) ),i < j such that δ r (i) δ r (j),r = 1,...,n. 2. Generate all the largest cliques of G n. 3. Randomly extract one of the largest clique and order its vertices lexicographically. Let use denote this ordered clique by C n 1 = (δ (2),...,δ (n) ). The corresponding Latin square is L (1) n = I n +2φ(δ (2) )+ +nφ(δ (n) ). 4. Randomly choose one permutation σ = (s 2,...,s n ) of (2,...,n) and generate L (2) n = I n +s 2 φ(δ (2) )+ +s n φ(δ (n) ). 5. Randomly choose one permutation γ of (1,...,n) and generate L n permuting the columns of L (2) n according to γ. It should be pointed out that in the SAS code the generic derangement δ is stored as the coordinate vector (δ 1,...,δ n ). We now describe the algorithm for n = WegenerateD 5 takingallthepermutationsδ of(1,...,5)suchthatδ r r, r = 1,...,5.D 5 contains44derangements.we denote byδ (i),i = 1,...,44 the elements of D We generate E 5 considering all the ( 44 2) = 946 couples of derangements (δ (s),δ (t) ), δ (s) < δ (t) such that δ r (s) δ r (t),r = 1,...,5. We find 276 edges.thegraphg 5,generatedusingthefunctiontkplotoftheRpackage igraph, [3], is shown in Figure We use the function largest.cliques of the R package igraph, [3], to get all the largest cliques of D 0,5. Equivalently we can use the Optnet procedure of SAS/OR, [11] or Cliquer, [8]. We find 56 cliques of size We randomly choose one clique C 4 and we order it lexicographically C 4 = (δ (11),δ (17),δ (23),δ (37) ) where δ (11) = (2,5,4,3,1), δ (17) = (3,4,5,1,2), δ (23) = (4,1,2,5,3) and δ (37) = (5,3,1,2,4). The corresponding Latin square is L (1) 5 = I n + 2φ(δ (2) )+3φ(δ (17) )+4φ(δ (30) )+5φ(δ (36) ), that is L (1) = (7)
8 890 R. Fontana Fig 1. The graph G we finally get L 5 by randomly choosing one permutation σ for the symbols 2,...,5, σ = (4,3,2,5), and one permutation γ for the columns 1,...,5, γ = (3,1,2,4,5) L 5 = (8) Sudoku designs The algorithm remains the same apart from the substitution of the graph G n with G n and by limiting the permutations of step (5) to the permutations of the rows within band and of the columns within stacks. For example, for the case n = 2 2 we find three maximum cliques of G 4. By randomly choosing one permutation of the symbols 2,3,4 among the six available, and one S-matrix to be used as P (1), among the sixteen available, we can randomly generate one Sudoku design from the total of 288, (#S 4 = 288).
9 Random Latin squares and Sudoku designs generation 891 Table 1 Number of derangements of (1,...,n), n Computational aspects We ran the algorithm using a standard laptop (CPU Intel Core i7-2620m CPU 2.70 GHz 2.70 GHz, RAM 8 Gb). We were able to solve the problems corresponding to the orders up to n = 7 for which we found 16,942,080 cliques. For n = 7 we used Cliquer [8] to find all the cliques. Taking into account symbol and column permutations our algorithm was able to extract uniformly at random a Latin square of order 7 among all the order 7 Latin squares that are 7!6!16,942,080= 61,479,419,904,000. For Latin squares the number of nodes of G n coincides with the number of derangements (see Table 1). For Sudoku designs the numbers of Sudokuderangements are 7 for n = 4 and 17,972 for n = 9. If n becomes large with respect to the available computational resources it is possible to replace the graph G n ( G n ) with a random subgraph A k n (Ãk n ) of it, where k denotes the number of the selected nodes. We point out that, if we take one clique at random from those of the subgraph A k n (Ãk n ), the distribution from which we are sampling is not uniform. Nonetheless, this approach can be useful for selecting the starting point of the algorithm described in [7], which is based on moves between different designs. We experimented with this approach for the 9 9 Sudoku design, which is the most common structure for the popular Sudoku puzzle. We randomly chose 809 Sudoku derangements among the 17, 972 available. The subgraph has 112, 579 edges. Its largest cliques have dimensions equal to 8 and are 73. By randomly choosing one clique, one permutation of the symbols 2,...,9 and one Sudoku matrix we can generate the Sudoku S 9 S 9 S 9 = It is worth noting that recent advances in software for huge graph analysis (millions of nodes) make it possible to manage problems that are extremely interesting from a practical point of view.
10 892 R. Fontana 4. Conclusion This paper presented a simple algorithm for uniform random sampling from the population of Latin squares and Sudoku designs. The algorithm is based on the largest cliques of proper graphs and has been implemented in SAS. The code exports the graph in a format that can be used by other software, like Cliquer, [8]. The algorithm could be run using the entire graph G n up to an order n equal to 7 on a standard desktop machine. Future research will aim at testing the algorithm for higher orders. Recent advances in graph analytics on huge graphs such as those naturally arising in social sciences (see e.g. [9] for an overview on the subject), make this objective feasible and challenging at the same time. In this case, as a first approach the algorithm could remain the same, i.e. based on sampling the largest cliques of the proper graphs, G n for Latin squares or G n for Sudoku designs. Other approaches that could be used for higher orders rely on the replacement ofg n ( G n ) with a randomsubgraph A k n (Ãk n ). As we discussed in the paper, if we take one clique at random from those of the subgraph A k n (Ãk n), the distribution from which we are sampling is not uniform. Nonetheless, this approach can be useful for selecting the starting point of the algorithm described in [7], which is based on moves between different designs. Another possibility that could be investigated is based on building a (non-uniform) distribution of the subgraphs so that the random sampling of the largest cliques becomes uniform. The order of the nodes of G n ( G n ) could be used to build such a distribution ofthe subgraphs. 5. Acknowledgements The author wishes to thank the Editor and Referee for the accurate revision that helped produce a clearer version of the work. Supplementary Material Supplement to Random Latin squares and Sudoku designs generation (doi: /14-EJS913SUPP;.zip). References [1] Bailey, R. A., Cameron, P. J. and Connelly, R. (2008). Sudoku, gerechte designs, resolutions, affine space, spreads, reguli, and Hamming codes. Amer. Math. Monthly MR [2] Behrens, W. (1956). Feldversuchsanordnungen mit verbessertem Ausgleich der Bodenunterschiede. Zeitschrift für Landwirtschaftliches Versuchsund Untersuchungswesen [3] Csardi, G. and Nepusz, T. (2006). The igraph software package for complex network research. InterJournal Complex Systems 1695.
11 Random Latin squares and Sudoku designs generation 893 [4] Dahl, G. (2009). Permutation matrices related to Sudoku. Linear Algebra and Its Applications MR [5] Fontana, R.(2011). Fractions of permutations. An application to Sudoku. Journal of Statistical Planning and Inference MR [6] Fontana, R. (2014). Supplement to Random Latin squares and Sudoku designs generation. DOI: /14-EJS913SUPP. [7] Jacobson, M. T. and Matthews, P. (1996). Generating uniformly distributed random Latin squares. Journal of Combinatorial Designs MR [8] Niskanen, S. and Östergård, P. R. (2003). Cliquer User s Guide: Version 1.0. Helsinki University of Technology. [9] Shao, B., Wang, H. and Xiao, Y. (2012). Managing and mining large graphs: Systems and implementations. In Proceedings of the 2012 International Conference on Management of Data ACM. [10] Yates, F. (1933). The formation of Latin squares for use in field experiments. Empire Journal of Experimental Agriculture [11] (2012). SAS/OR(R) 12.1 User s Guide: Network Optimization Algorithms.
AN ALGORITHM FOR DETERMINING WHETHER A GIVEN BINARY MATROID IS GRAPHIC
AN ALGORITHM FOR DETERMINING WHETHER A GIVEN BINARY MATROID IS GRAPHIC W. T. TUTTE. Introduction. In a recent series of papers [l-4] on graphs and matroids I used definitions equivalent to the following.
DATA ANALYSIS II. Matrix Algorithms
DATA ANALYSIS II Matrix Algorithms Similarity Matrix Given a dataset D = {x i }, i=1,..,n consisting of n points in R d, let A denote the n n symmetric similarity matrix between the points, given as where
MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m
MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS 1. SYSTEMS OF EQUATIONS AND MATRICES 1.1. Representation of a linear system. The general system of m equations in n unknowns can be written a 11 x 1 + a 12 x 2 +
MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS
MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS Systems of Equations and Matrices Representation of a linear system The general system of m equations in n unknowns can be written a x + a 2 x 2 + + a n x n b a
A note on companion matrices
Linear Algebra and its Applications 372 (2003) 325 33 www.elsevier.com/locate/laa A note on companion matrices Miroslav Fiedler Academy of Sciences of the Czech Republic Institute of Computer Science Pod
DETERMINANTS IN THE KRONECKER PRODUCT OF MATRICES: THE INCIDENCE MATRIX OF A COMPLETE GRAPH
DETERMINANTS IN THE KRONECKER PRODUCT OF MATRICES: THE INCIDENCE MATRIX OF A COMPLETE GRAPH CHRISTOPHER RH HANUSA AND THOMAS ZASLAVSKY Abstract We investigate the least common multiple of all subdeterminants,
Minimally Infeasible Set Partitioning Problems with Balanced Constraints
Minimally Infeasible Set Partitioning Problems with alanced Constraints Michele Conforti, Marco Di Summa, Giacomo Zambelli January, 2005 Revised February, 2006 Abstract We study properties of systems of
Determinants in the Kronecker product of matrices: The incidence matrix of a complete graph
FPSAC 2009 DMTCS proc (subm), by the authors, 1 10 Determinants in the Kronecker product of matrices: The incidence matrix of a complete graph Christopher R H Hanusa 1 and Thomas Zaslavsky 2 1 Department
SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH
31 Kragujevac J. Math. 25 (2003) 31 49. SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH Kinkar Ch. Das Department of Mathematics, Indian Institute of Technology, Kharagpur 721302, W.B.,
Practical Guide to the Simplex Method of Linear Programming
Practical Guide to the Simplex Method of Linear Programming Marcel Oliver Revised: April, 0 The basic steps of the simplex algorithm Step : Write the linear programming problem in standard form Linear
= 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that
Instructions. Answer each of the questions on your own paper, and be sure to show your work so that partial credit can be adequately assessed. Credit will not be given for answers (even correct ones) without
FUZZY CLUSTERING ANALYSIS OF DATA MINING: APPLICATION TO AN ACCIDENT MINING SYSTEM
International Journal of Innovative Computing, Information and Control ICIC International c 0 ISSN 34-48 Volume 8, Number 8, August 0 pp. 4 FUZZY CLUSTERING ANALYSIS OF DATA MINING: APPLICATION TO AN ACCIDENT
Chapter 3. Distribution Problems. 3.1 The idea of a distribution. 3.1.1 The twenty-fold way
Chapter 3 Distribution Problems 3.1 The idea of a distribution Many of the problems we solved in Chapter 1 may be thought of as problems of distributing objects (such as pieces of fruit or ping-pong balls)
Row Echelon Form and Reduced Row Echelon Form
These notes closely follow the presentation of the material given in David C Lay s textbook Linear Algebra and its Applications (3rd edition) These notes are intended primarily for in-class presentation
160 CHAPTER 4. VECTOR SPACES
160 CHAPTER 4. VECTOR SPACES 4. Rank and Nullity In this section, we look at relationships between the row space, column space, null space of a matrix and its transpose. We will derive fundamental results
Optimal Scheduling for Dependent Details Processing Using MS Excel Solver
BULGARIAN ACADEMY OF SCIENCES CYBERNETICS AND INFORMATION TECHNOLOGIES Volume 8, No 2 Sofia 2008 Optimal Scheduling for Dependent Details Processing Using MS Excel Solver Daniela Borissova Institute of
On the k-path cover problem for cacti
On the k-path cover problem for cacti Zemin Jin and Xueliang Li Center for Combinatorics and LPMC Nankai University Tianjin 300071, P.R. China [email protected], [email protected] Abstract In this paper we
A Performance Comparison of Five Algorithms for Graph Isomorphism
A Performance Comparison of Five Algorithms for Graph Isomorphism P. Foggia, C.Sansone, M. Vento Dipartimento di Informatica e Sistemistica Via Claudio, 21 - I 80125 - Napoli, Italy {foggiapa, carlosan,
Visualization of textual data: unfolding the Kohonen maps.
Visualization of textual data: unfolding the Kohonen maps. CNRS - GET - ENST 46 rue Barrault, 75013, Paris, France (e-mail: [email protected]) Ludovic Lebart Abstract. The Kohonen self organizing
Mathematics of Sudoku I
Mathematics of Sudoku I Bertram Felgenhauer Frazer Jarvis January, 00 Introduction Sudoku puzzles became extremely popular in Britain from late 00. Sudoku, or Su Doku, is a Japanese word (or phrase) meaning
Notes on Determinant
ENGG2012B Advanced Engineering Mathematics Notes on Determinant Lecturer: Kenneth Shum Lecture 9-18/02/2013 The determinant of a system of linear equations determines whether the solution is unique, without
Lecture 1: Systems of Linear Equations
MTH Elementary Matrix Algebra Professor Chao Huang Department of Mathematics and Statistics Wright State University Lecture 1 Systems of Linear Equations ² Systems of two linear equations with two variables
Linearly Independent Sets and Linearly Dependent Sets
These notes closely follow the presentation of the material given in David C. Lay s textbook Linear Algebra and its Applications (3rd edition). These notes are intended primarily for in-class presentation
Genetic Algorithms and Sudoku
Genetic Algorithms and Sudoku Dr. John M. Weiss Department of Mathematics and Computer Science South Dakota School of Mines and Technology (SDSM&T) Rapid City, SD 57701-3995 [email protected] MICS 2009
Lecture 7: NP-Complete Problems
IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Basic Course on Computational Complexity Lecture 7: NP-Complete Problems David Mix Barrington and Alexis Maciel July 25, 2000 1. Circuit
INDISTINGUISHABILITY OF ABSOLUTELY CONTINUOUS AND SINGULAR DISTRIBUTIONS
INDISTINGUISHABILITY OF ABSOLUTELY CONTINUOUS AND SINGULAR DISTRIBUTIONS STEVEN P. LALLEY AND ANDREW NOBEL Abstract. It is shown that there are no consistent decision rules for the hypothesis testing problem
University of Lille I PC first year list of exercises n 7. Review
University of Lille I PC first year list of exercises n 7 Review Exercise Solve the following systems in 4 different ways (by substitution, by the Gauss method, by inverting the matrix of coefficients
MATH 304 Linear Algebra Lecture 18: Rank and nullity of a matrix.
MATH 304 Linear Algebra Lecture 18: Rank and nullity of a matrix. Nullspace Let A = (a ij ) be an m n matrix. Definition. The nullspace of the matrix A, denoted N(A), is the set of all n-dimensional column
USE OF EIGENVALUES AND EIGENVECTORS TO ANALYZE BIPARTIVITY OF NETWORK GRAPHS
USE OF EIGENVALUES AND EIGENVECTORS TO ANALYZE BIPARTIVITY OF NETWORK GRAPHS Natarajan Meghanathan Jackson State University, 1400 Lynch St, Jackson, MS, USA [email protected] ABSTRACT This
Mathematical finance and linear programming (optimization)
Mathematical finance and linear programming (optimization) Geir Dahl September 15, 2009 1 Introduction The purpose of this short note is to explain how linear programming (LP) (=linear optimization) may
Pythagorean vectors and their companions. Lattice Cubes
Lattice Cubes Richard Parris Richard Parris ([email protected]) received his mathematics degrees from Tufts University (B.A.) and Princeton University (Ph.D.). For more than three decades, he has lived
arxiv:1203.1525v1 [math.co] 7 Mar 2012
Constructing subset partition graphs with strong adjacency and end-point count properties Nicolai Hähnle [email protected] arxiv:1203.1525v1 [math.co] 7 Mar 2012 March 8, 2012 Abstract Kim defined
Solving Systems of Linear Equations
LECTURE 5 Solving Systems of Linear Equations Recall that we introduced the notion of matrices as a way of standardizing the expression of systems of linear equations In today s lecture I shall show how
Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs
CSE599s: Extremal Combinatorics November 21, 2011 Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs Lecturer: Anup Rao 1 An Arithmetic Circuit Lower Bound An arithmetic circuit is just like
Enumerating possible Sudoku grids
Enumerating possible Sudoku grids Bertram Felgenhauer Department of Computer Science TU Dresden 00 Dresden Germany [email protected] Frazer Jarvis Department of Pure Mathematics University of Sheffield,
JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004
Scientiae Mathematicae Japonicae Online, Vol. 10, (2004), 431 437 431 JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS Ondřej Čepeka and Shao Chin Sung b Received December May 12, 2003; revised February
Zachary Monaco Georgia College Olympic Coloring: Go For The Gold
Zachary Monaco Georgia College Olympic Coloring: Go For The Gold Coloring the vertices or edges of a graph leads to a variety of interesting applications in graph theory These applications include various
Linear Codes. Chapter 3. 3.1 Basics
Chapter 3 Linear Codes In order to define codes that we can encode and decode efficiently, we add more structure to the codespace. We shall be mainly interested in linear codes. A linear code of length
A Review of Sudoku Solving using Patterns
International Journal of Scientific and Research Publications, Volume 3, Issue 5, May 2013 1 A Review of Sudoku Solving using Patterns Rohit Iyer*, Amrish Jhaveri*, Krutika Parab* *B.E (Computers), Vidyalankar
OPTIMAL DESIGN OF DISTRIBUTED SENSOR NETWORKS FOR FIELD RECONSTRUCTION
OPTIMAL DESIGN OF DISTRIBUTED SENSOR NETWORKS FOR FIELD RECONSTRUCTION Sérgio Pequito, Stephen Kruzick, Soummya Kar, José M. F. Moura, A. Pedro Aguiar Department of Electrical and Computer Engineering
. P. 4.3 Basic feasible solutions and vertices of polyhedra. x 1. x 2
4. Basic feasible solutions and vertices of polyhedra Due to the fundamental theorem of Linear Programming, to solve any LP it suffices to consider the vertices (finitely many) of the polyhedron P of the
5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1
5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1 General Integer Linear Program: (ILP) min c T x Ax b x 0 integer Assumption: A, b integer The integrality condition
Why? A central concept in Computer Science. Algorithms are ubiquitous.
Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online
Classification of Cartan matrices
Chapter 7 Classification of Cartan matrices In this chapter we describe a classification of generalised Cartan matrices This classification can be compared as the rough classification of varieties in terms
A search based Sudoku solver
A search based Sudoku solver Tristan Cazenave Labo IA Dept. Informatique Université Paris 8, 93526, Saint-Denis, France, [email protected] Abstract. Sudoku is a popular puzzle. In this paper we
Binary vs Analogue Path Monitoring in IP Networks
Binary vs Analogue Path Monitoring in IP Networks Hung X. Nguyen and Patrick Thiran School of Computer and Communication Sciences, EPFL CH-1015 Lausanne, Switzerland {hung.nguyen, patrick.thiran}@epfl.ch
The Determinant: a Means to Calculate Volume
The Determinant: a Means to Calculate Volume Bo Peng August 20, 2007 Abstract This paper gives a definition of the determinant and lists many of its well-known properties Volumes of parallelepipeds are
Math 202-0 Quizzes Winter 2009
Quiz : Basic Probability Ten Scrabble tiles are placed in a bag Four of the tiles have the letter printed on them, and there are two tiles each with the letters B, C and D on them (a) Suppose one tile
Suk-Geun Hwang and Jin-Woo Park
Bull. Korean Math. Soc. 43 (2006), No. 3, pp. 471 478 A NOTE ON PARTIAL SIGN-SOLVABILITY Suk-Geun Hwang and Jin-Woo Park Abstract. In this paper we prove that if Ax = b is a partial signsolvable linear
Matrix Multiplication
Matrix Multiplication CPS343 Parallel and High Performance Computing Spring 2016 CPS343 (Parallel and HPC) Matrix Multiplication Spring 2016 1 / 32 Outline 1 Matrix operations Importance Dense and sparse
Midterm Practice Problems
6.042/8.062J Mathematics for Computer Science October 2, 200 Tom Leighton, Marten van Dijk, and Brooke Cowan Midterm Practice Problems Problem. [0 points] In problem set you showed that the nand operator
REPEATED TRIALS. The probability of winning those k chosen times and losing the other times is then p k q n k.
REPEATED TRIALS Suppose you toss a fair coin one time. Let E be the event that the coin lands heads. We know from basic counting that p(e) = 1 since n(e) = 1 and 2 n(s) = 2. Now suppose we play a game
Solution to Homework 2
Solution to Homework 2 Olena Bormashenko September 23, 2011 Section 1.4: 1(a)(b)(i)(k), 4, 5, 14; Section 1.5: 1(a)(b)(c)(d)(e)(n), 2(a)(c), 13, 16, 17, 18, 27 Section 1.4 1. Compute the following, if
3. Linear Programming and Polyhedral Combinatorics
Massachusetts Institute of Technology Handout 6 18.433: Combinatorial Optimization February 20th, 2009 Michel X. Goemans 3. Linear Programming and Polyhedral Combinatorics Summary of what was seen in the
Weakly Secure Network Coding
Weakly Secure Network Coding Kapil Bhattad, Student Member, IEEE and Krishna R. Narayanan, Member, IEEE Department of Electrical Engineering, Texas A&M University, College Station, USA Abstract In this
Linear Algebra and TI 89
Linear Algebra and TI 89 Abdul Hassen and Jay Schiffman This short manual is a quick guide to the use of TI89 for Linear Algebra. We do this in two sections. In the first section, we will go over the editing
Linear Programming I
Linear Programming I November 30, 2003 1 Introduction In the VCR/guns/nuclear bombs/napkins/star wars/professors/butter/mice problem, the benevolent dictator, Bigus Piguinus, of south Antarctica penguins
Continued Fractions and the Euclidean Algorithm
Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction
Francesco Sorrentino Department of Mechanical Engineering
Master stability function approaches to analyze stability of the synchronous evolution for hypernetworks and of synchronized clusters for networks with symmetries Francesco Sorrentino Department of Mechanical
THE SIGN OF A PERMUTATION
THE SIGN OF A PERMUTATION KEITH CONRAD 1. Introduction Throughout this discussion, n 2. Any cycle in S n is a product of transpositions: the identity (1) is (12)(12), and a k-cycle with k 2 can be written
A linear combination is a sum of scalars times quantities. Such expressions arise quite frequently and have the form
Section 1.3 Matrix Products A linear combination is a sum of scalars times quantities. Such expressions arise quite frequently and have the form (scalar #1)(quantity #1) + (scalar #2)(quantity #2) +...
We shall turn our attention to solving linear systems of equations. Ax = b
59 Linear Algebra We shall turn our attention to solving linear systems of equations Ax = b where A R m n, x R n, and b R m. We already saw examples of methods that required the solution of a linear system
6. Cholesky factorization
6. Cholesky factorization EE103 (Fall 2011-12) triangular matrices forward and backward substitution the Cholesky factorization solving Ax = b with A positive definite inverse of a positive definite matrix
A Negative Result Concerning Explicit Matrices With The Restricted Isometry Property
A Negative Result Concerning Explicit Matrices With The Restricted Isometry Property Venkat Chandar March 1, 2008 Abstract In this note, we prove that matrices whose entries are all 0 or 1 cannot achieve
1.2 Solving a System of Linear Equations
1.. SOLVING A SYSTEM OF LINEAR EQUATIONS 1. Solving a System of Linear Equations 1..1 Simple Systems - Basic De nitions As noticed above, the general form of a linear system of m equations in n variables
Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions.
Chapter 1 Vocabulary identity - A statement that equates two equivalent expressions. verbal model- A word equation that represents a real-life problem. algebraic expression - An expression with variables.
COUNTING INDEPENDENT SETS IN SOME CLASSES OF (ALMOST) REGULAR GRAPHS
COUNTING INDEPENDENT SETS IN SOME CLASSES OF (ALMOST) REGULAR GRAPHS Alexander Burstein Department of Mathematics Howard University Washington, DC 259, USA [email protected] Sergey Kitaev Mathematics
Cryptography and Network Security. Prof. D. Mukhopadhyay. Department of Computer Science and Engineering. Indian Institute of Technology, Kharagpur
Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Module No. # 01 Lecture No. # 12 Block Cipher Standards
Outline 2.1 Graph Isomorphism 2.2 Automorphisms and Symmetry 2.3 Subgraphs, part 1
GRAPH THEORY LECTURE STRUCTURE AND REPRESENTATION PART A Abstract. Chapter focuses on the question of when two graphs are to be regarded as the same, on symmetries, and on subgraphs.. discusses the concept
Split Nonthreshold Laplacian Integral Graphs
Split Nonthreshold Laplacian Integral Graphs Stephen Kirkland University of Regina, Canada [email protected] Maria Aguieiras Alvarez de Freitas Federal University of Rio de Janeiro, Brazil [email protected]
WHERE DOES THE 10% CONDITION COME FROM?
1 WHERE DOES THE 10% CONDITION COME FROM? The text has mentioned The 10% Condition (at least) twice so far: p. 407 Bernoulli trials must be independent. If that assumption is violated, it is still okay
1 A duality between descents and connectivity.
The Descent Set and Connectivity Set of a Permutation 1 Richard P. Stanley 2 Department of Mathematics, Massachusetts Institute of Technology Cambridge, MA 02139, USA [email protected] version of 16 August
Linear Algebra Notes
Linear Algebra Notes Chapter 19 KERNEL AND IMAGE OF A MATRIX Take an n m matrix a 11 a 12 a 1m a 21 a 22 a 2m a n1 a n2 a nm and think of it as a function A : R m R n The kernel of A is defined as Note
a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.
Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given
Direct Methods for Solving Linear Systems. Matrix Factorization
Direct Methods for Solving Linear Systems Matrix Factorization Numerical Analysis (9th Edition) R L Burden & J D Faires Beamer Presentation Slides prepared by John Carroll Dublin City University c 2011
Systems of Linear Equations
Systems of Linear Equations Beifang Chen Systems of linear equations Linear systems A linear equation in variables x, x,, x n is an equation of the form a x + a x + + a n x n = b, where a, a,, a n and
Exact Polynomial-time Algorithm for the Clique Problem and P = NP for Clique Problem
xact Polynomial-time Algorithm for the Clique Problem and P = NP for Clique Problem Kanak Chandra Bora Department of Computer Science & ngineering Royal School of ngineering & Technology, Betkuchi, Guwahati-7810,
Lecture 3: Finding integer solutions to systems of linear equations
Lecture 3: Finding integer solutions to systems of linear equations Algorithmic Number Theory (Fall 2014) Rutgers University Swastik Kopparty Scribe: Abhishek Bhrushundi 1 Overview The goal of this lecture
Perron vector Optimization applied to search engines
Perron vector Optimization applied to search engines Olivier Fercoq INRIA Saclay and CMAP Ecole Polytechnique May 18, 2011 Web page ranking The core of search engines Semantic rankings (keywords) Hyperlink
1 The Line vs Point Test
6.875 PCP and Hardness of Approximation MIT, Fall 2010 Lecture 5: Low Degree Testing Lecturer: Dana Moshkovitz Scribe: Gregory Minton and Dana Moshkovitz Having seen a probabilistic verifier for linearity
UNCOUPLING THE PERRON EIGENVECTOR PROBLEM
UNCOUPLING THE PERRON EIGENVECTOR PROBLEM Carl D Meyer INTRODUCTION Foranonnegative irreducible matrix m m with spectral radius ρ,afundamental problem concerns the determination of the unique normalized
Frans J.C.T. de Ruiter, Norman L. Biggs Applications of integer programming methods to cages
Frans J.C.T. de Ruiter, Norman L. Biggs Applications of integer programming methods to cages Article (Published version) (Refereed) Original citation: de Ruiter, Frans and Biggs, Norman (2015) Applications
A note on fast approximate minimum degree orderings for symmetric matrices with some dense rows
NUMERICAL LINEAR ALGEBRA WITH APPLICATIONS Numer. Linear Algebra Appl. (2009) Published online in Wiley InterScience (www.interscience.wiley.com)..647 A note on fast approximate minimum degree orderings
(67902) Topics in Theory and Complexity Nov 2, 2006. Lecture 7
(67902) Topics in Theory and Complexity Nov 2, 2006 Lecturer: Irit Dinur Lecture 7 Scribe: Rani Lekach 1 Lecture overview This Lecture consists of two parts In the first part we will refresh the definition
Graph Security Testing
JOURNAL OF APPLIED COMPUTER SCIENCE Vol. 23 No. 1 (2015), pp. 29-45 Graph Security Testing Tomasz Gieniusz 1, Robert Lewoń 1, Michał Małafiejski 1 1 Gdańsk University of Technology, Poland Department of
MapReduce and Distributed Data Analysis. Sergei Vassilvitskii Google Research
MapReduce and Distributed Data Analysis Google Research 1 Dealing With Massive Data 2 2 Dealing With Massive Data Polynomial Memory Sublinear RAM Sketches External Memory Property Testing 3 3 Dealing With
Design of LDPC codes
Design of LDPC codes Codes from finite geometries Random codes: Determine the connections of the bipartite Tanner graph by using a (pseudo)random algorithm observing the degree distribution of the code
Solving Systems of Linear Equations Using Matrices
Solving Systems of Linear Equations Using Matrices What is a Matrix? A matrix is a compact grid or array of numbers. It can be created from a system of equations and used to solve the system of equations.
PRIME FACTORS OF CONSECUTIVE INTEGERS
PRIME FACTORS OF CONSECUTIVE INTEGERS MARK BAUER AND MICHAEL A. BENNETT Abstract. This note contains a new algorithm for computing a function f(k) introduced by Erdős to measure the minimal gap size in
A Partition-Based Efficient Algorithm for Large Scale. Multiple-Strings Matching
A Partition-Based Efficient Algorithm for Large Scale Multiple-Strings Matching Ping Liu Jianlong Tan, Yanbing Liu Software Division, Institute of Computing Technology, Chinese Academy of Sciences, Beijing,
WHEN DOES A CROSS PRODUCT ON R n EXIST?
WHEN DOES A CROSS PRODUCT ON R n EXIST? PETER F. MCLOUGHLIN It is probably safe to say that just about everyone reading this article is familiar with the cross product and the dot product. However, what
GENERATING SETS KEITH CONRAD
GENERATING SETS KEITH CONRAD 1 Introduction In R n, every vector can be written as a unique linear combination of the standard basis e 1,, e n A notion weaker than a basis is a spanning set: a set of vectors
Applied Algorithm Design Lecture 5
Applied Algorithm Design Lecture 5 Pietro Michiardi Eurecom Pietro Michiardi (Eurecom) Applied Algorithm Design Lecture 5 1 / 86 Approximation Algorithms Pietro Michiardi (Eurecom) Applied Algorithm Design
Generalized modified linear systematic sampling scheme for finite populations
Hacettepe Journal of Mathematics and Statistics Volume 43 (3) (204), 529 542 Generalized modified linear systematic sampling scheme for finite populations J Subramani and Sat N Gupta Abstract The present
LEVERRIER-FADEEV ALGORITHM AND CLASSICAL ORTHOGONAL POLYNOMIALS
This is a reprint from Revista de la Academia Colombiana de Ciencias Vol 8 (106 (004, 39-47 LEVERRIER-FADEEV ALGORITHM AND CLASSICAL ORTHOGONAL POLYNOMIALS by J Hernández, F Marcellán & C Rodríguez LEVERRIER-FADEEV
