Magic square - PowerPoint PPT Presentation

About This Presentation
Title:

Magic square

Description:

1st stab. Use sumVars(x) = sumVars(y) where x and y are ... 2nd stab. Use allDiff (must have Iceberg for claire!) But what is k? How does model perform? ... – PowerPoint PPT presentation

Number of Views:1957
Avg rating:3.0/5.0
Slides: 20
Provided by: Pat376
Category:
Tags: magic | square | stab

less

Transcript and Presenter's Notes

Title: Magic square


1
Magic square An example of how to represent a
problem
An idea from Chris Beck
2
  • 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

3
1st stab
  • 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

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?
4
2nd stab
  • 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

Use allDiff
But what is k?
How does model perform?
5
(No Transcript)
6
(No Transcript)
7
Is this solution unique?
8
Magic square on the web
http//mathworld.wolfram.com/MagicSquare.html
http//mathforum.org/alejandre/magic.square.html
9
(No Transcript)
10
Is there an order 3 magic square with the number
5 in one of the outer corners?
11
(No Transcript)
12
(No Transcript)
13
(No Transcript)
14
(No Transcript)
15
(No Transcript)
16
(No Transcript)
17
(No Transcript)
18
(No Transcript)
19
Thanks to Chris Beck
Write a Comment
User Comments (0)
About PowerShow.com