Magic square An example of how to represent a problem An idea from Chris Beck.

Slides:



Advertisements
Similar presentations
Albrecht Dürer And his magic square. On the wall to the right hangs the magic square Dürer created.
Advertisements

Mathematics. Matrices and Determinants-1 Session.
Maths for Computer Graphics
Solving systems using matrices
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 14 Elimination Methods.
Module 6 Matrices & Applications Chapter 26 Matrices and Applications I.
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
CE 311 K - Introduction to Computer Methods Daene C. McKinney
Adding and Subtracting Decimals. Essential Question: How do I add and subtract decimals? Always line up decimals Add and subtract like you always do Bring.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Review for Chapter 4 Important Terms, Symbols, Concepts 4.1. Systems of Linear Equations in Two Variables.
Using Matrices A matrix is a rectangular array that can help us to streamline the solving of a system of equations The order of this matrix is 2 × 3 If.
Matrices Addition & Subtraction Scalar Multiplication & Multiplication Determinants Inverses Solving Systems – 2x2 & 3x3 Cramer’s Rule.
10.4 Matrix Algebra 1.Matrix Notation 2.Sum/Difference of 2 matrices 3.Scalar multiple 4.Product of 2 matrices 5.Identity Matrix 6.Inverse of a matrix.
Matrices. Definitions  A matrix is an m x n array of scalars, arranged conceptually as m rows and n columns.  m is referred to as the row dimension.
Matrix Algebra and Regression a matrix is a rectangular array of elements m=#rows, n=#columns  m x n a single value is called a ‘scalar’ a single row.
Prepared by Deluar Jahan Moloy Lecturer Northern University Bangladesh
Meeting 18 Matrix Operations. Matrix If A is an m x n matrix - that is, a matrix with m rows and n columns – then the scalar entry in the i th row and.
ME 142 Engineering Computation I Matrix Operations in Excel.
Chapter 2 … part1 Matrices Linear Algebra S 1. Ch2_2 2.1 Addition, Scalar Multiplication, and Multiplication of Matrices Definition A matrix is a rectangular.
CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.
A DDING AND S UBTRACTING D ECIMALS. E SSENTIAL Q UESTION AND I NFORMATION : How do I add and subtract decimals? Always line up decimals Add and subtract.
SRINIVASA RAMANUJAN AND HIS MAGIC SQUARE.
10.4 Matrix Algebra 1.Matrix Notation 2.Sum/Difference of 2 matrices 3.Scalar multiple 4.Product of 2 matrices 5.Identity Matrix 6.Inverse of a matrix.
2.5 – Determinants and Multiplicative Inverses of Matrices.
An Introduction to Constraint Programming in JChoco.
Unit 3: Matrices. Matrix: A rectangular arrangement of data into rows and columns, identified by capital letters. Matrix Dimensions: Number of rows, m,
Graeko-Latin Squares. Arrange the playing cards in a 4 by 4 grid such that each value occurs once in each row and once in each column and each suit.
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
Introduction Types of Matrices Operations
10.4 Matrix Algebra. 1. Matrix Notation A matrix is an array of numbers. Definition Definition: The Dimension of a matrix is m x n “m by n” where m =
A very brief introduction to Matrix (Section 2.7) Definitions Some properties Basic matrix operations Zero-One (Boolean) matrices.
2.1 Matrix Operations 2. Matrix Algebra. j -th column i -th row Diagonal entries Diagonal matrix : a square matrix whose nondiagonal entries are zero.
Matrices. Matrix A matrix is an ordered rectangular array of numbers. The entry in the i th row and j th column is denoted by a ij. Ex. 4 Columns 3 Rows.
1 Matrix Math ©Anthony Steed Overview n To revise Vectors Matrices.
1.5 Matricies.
Simplifying 1 + 2a + b + 1 a + b a + b + 1 2a b + a + b
9-4 Determinants and Cramer’s Rule
Lesson 3.3 Adding and Subtracting Decimals
Lesson 4.2 Adding and Subtracting Decimals
Lesson 4.2 Adding and Subtracting Decimals
Adding and Subtracting Decimals
Multiplying Matrices.
9-4 Determinants and Cramer’s Rule
Adding and Subtracting Decimals
2. Matrix Algebra 2.1 Matrix Operations.
Multiplying Matrices.
Lattice Multiplication
Objective: Today we will investigate the ‘magic’ in magic squares.
SRINIVASA RAMANUJAN AND HIS MAGIC SQUARE.
Lesson 35 Adding and Subtracting Decimals
Simplifying 1 + 2a + b + 1 a + b a + b + 1 2a b + a + b
Albrecht Dürer And his magic square.
Unit 3: Matrices
Section 2.4 Matrices.
Magic Squares   10   X.
MATRICES Operations with Matrices Properties of Matrix Operations
Albrecht Dürer And his magic square.
Multiplying Matrices.
Adding and Subtracting Decimals
An example of how to represent a problem
Adding and Subtracting Decimals
© T Madas.
Magical Hexagons (Teachers notes):
Albrecht Dürer And his magic square.
Adding and Subtracting Decimals
Multiplying Matrices.
Multiplying Matrices.
Lesson 37 Adding and Subtracting Decimals
Albrecht Dürer And his magic square.
Multiplying Matrices.
Presentation transcript:

Magic square An example of how to represent a problem An idea from Chris Beck

put a number in each square each number is different a number is in the range 1 to 16 the sum of a column is the same as a sum of a row the same as the sum of a main diagonal

Back to CP

put a number in each square each number is different a number is in the range 1 to 16 the sum of a column is the same as a sum of a row the same as the sum of a main diagonal 1st stab Use sum(x) = sum(y) where x and y are - different rows - different columns - different diagonals Every element of the array is different - represent as a clique of not equals How does it go? For propagation and search?

put a number in each square each number is different a number is in the range 1 to 16 the sum of a column is the same as a sum of a row the same as the sum of a main diagonal 2nd stab Use allDiff But what is k? How does model perform?

Magic

Could edit this

Magic What is k?

Magic Just a counter

Magic S is actual square v is S flattened

Magic Create S, its transpose TS and S flattened into v

Magic That’s why we flattened S

Magic Transpose is neat (thanks Neil Moore)

Is this solution unique?

Magic square on the web

Is there an order 3 magic square with the number 5 in one of the outer corners?

Thanks to Chris Beck