How to Play Sudoku & Win Integer Programming Formulation of a Popular Game Sven LeyfferSven Leyffer, Argonne, Feb. 15, 2005 (windoze powerpoint sumi painting.

Slides:



Advertisements
Similar presentations
Integer Optimization Basic Concepts Integer Linear Program(ILP): A linear program except that some or all of the decision variables must have integer.
Advertisements

BU Decision Models Integer_LP1 Integer Optimization Summer 2013.
1 LP Duality Lecture 13: Feb Min-Max Theorems In bipartite graph, Maximum matching = Minimum Vertex Cover In every graph, Maximum Flow = Minimum.
Lecture 3 Linear Programming: Tutorial Simplex Method
Solving IPs – Cutting Plane Algorithm General Idea: Begin by solving the LP relaxation of the IP problem. If the LP relaxation results in an integer solution,
© Imperial College London Eplex: Harnessing Mathematical Programming Solvers for Constraint Logic Programming Kish Shen and Joachim Schimpf IC-Parc.
G53CLP Constraint Logic Programming Modeling CSPs – Case Study I Dr Rong Qu.
Modeling problems with Integer Linear Programming (ILP) Name: Chuan Huang.
EE 553 Integer Programming
Lecture 10: Integer Programming & Branch-and-Bound
Progress in Linear Programming Based Branch-and-Bound Algorithms
EMIS 8373: Integer Programming Valid Inequalities updated 4April 2011.
1 One Size Fits All? : Computational Tradeoffs in Mixed Integer Programming Software Bob Bixby, Mary Fenelon, Zonghao Gu, Ed Rothberg, and Roland Wunderling.
Solving Integer Programs. Natural solution ideas that don’t work well Solution idea #1: Explicit enumeration: Try all possible solutions and pick the.
Computational Methods for Management and Economics Carla Gomes
Approximation Algorithms
1 Maximum matching Max Flow Shortest paths Min Cost Flow Linear Programming Mixed Integer Linear Programming Worst case polynomial time by Local Search.
Optimization for Network Planning Includes slide materials developed by Wayne D. Grover, John Doucette, Dave Morley © Wayne D. Grover 2002, 2003 E E 681.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy under contract.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy under contract.
Branch and Bound Algorithm for Solving Integer Linear Programming
ECE Synthesis & Verification - LP Scheduling 1 ECE 667 ECE 667 Synthesis and Verification of Digital Circuits Scheduling Algorithms Analytical approach.
1 Planning and Scheduling to Minimize Tardiness John Hooker Carnegie Mellon University September 2005.
1 Contents college 3 en 4 Book: Appendix A.1, A.3, A.4, §3.4, §3.5, §4.1, §4.2, §4.4, §4.6 (not: §3.6 - §3.8, §4.2 - §4.3) Extra literature on resource.
Lift-and-Project cuts: an efficient solution method for mixed-integer programs Sebastian Ceria Graduate School of Business and Computational Optimization.
LP formulation of Economic Dispatch
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding ILPs with Branch & Bound ILP References: ‘Integer Programming’
(Not in text).  An LP with additional constraints requiring that all the variables be integers is called an all-integer linear program (IP).  The LP.
Decision Procedures An Algorithmic Point of View
Operations Research Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester ITGD4207 University of Palestine.
CPS 270: Artificial Intelligence More search: When the path to the solution doesn’t matter Instructor: Vincent.
MILP algorithms: branch-and-bound and branch-and-cut
1 Chapter 4: Integer and Mixed-Integer Linear Programming Problems 4.1 Introduction to Integer and Mixed-Integer Linear Programming 4.2 Solving Integer.
Sudoku Solver Comparison A comparative analysis of algorithms for solving Sudoku.
WOOD 492 MODELLING FOR DECISION SUPPORT
15.053Tuesday, April 9 Branch and Bound Handouts: Lecture Notes.
Column Generation By Soumitra Pal Under the guidance of Prof. A. G. Ranade.
Branch-and-Cut Valid inequality: an inequality satisfied by all feasible solutions Cut: a valid inequality that is not part of the current formulation.
Divide and Conquer Optimization problem: z = max{cx : x  S}
CPS Brief introduction to linear and mixed integer programming
FATCOP: A Mixed Integer Program Solver Michael FerrisQun Chen Department of Computer Sciences University of Wisconsin-Madison Jeff Linderoth, Argonne.
Integer Programming (정수계획법)
Integer LP In-class Prob
M Tech Project – First Stage Improving Branch-And-Price Algorithms For Solving 1D Cutting Stock Problem Soumitra Pal [ ]
FATCOP: A Mixed Integer Program Solver Michael FerrisQun Chen University of Wisconsin-Madison Jeffrey Linderoth Argonne National Laboratories.
Chapter 2. Optimal Trees and Paths Combinatorial Optimization
Integer Programming, Branch & Bound Method
Introduction to Integer Programming Integer programming models Thursday, April 4 Handouts: Lecture Notes.
Sebastian Ceria Graduate School of Business and
Lap Chi Lau we will only use slides 4 to 19
Integer Programming An integer linear program (ILP) is defined exactly as a linear program except that values of variables in a feasible solution have.
Optimization Problems
Topics in Algorithms Lap Chi Lau.
The minimum cost flow problem
Role and Potential of TAs for Industrial Scheduling Problems
Lecture 11: Tree Search © J. Christopher Beck 2008.
The CPLEX Library: Mixed Integer Programming
Instructor: Vincent Conitzer
MILP algorithms: branch-and-bound and branch-and-cut
Integer Linear Programming
MIP Tools Branch and Cut with Callbacks Lazy Constraint Callback
Integer Programming (정수계획법)
Instructors: Fei Fang (This Lecture) and Dave Touretzky
Integer Programming (정수계획법)
Constraint satisfaction problems
Sudoku.
Integer Linear Programming
Branch-and-Bound Algorithm for Integer Program
Constraint satisfaction problems
Integer Linear Programming
Presentation transcript:

How to Play Sudoku & Win Integer Programming Formulation of a Popular Game Sven LeyfferSven Leyffer, Argonne, Feb. 15, 2005 (windoze powerpoint sumi painting style)

Sudoku Rules Given initial data Fill digits 1-9 into boxes such that Every digit 1-9 appears in every row, column, and 3x3 box. Works for letters, names etc

Solving Sudoku Eliminate rows & cols from 3x3 box E.g. eliminate 2 from 3x3 box:

Solving Sudoku Eliminate rows & cols from 3x3 box E.g. eliminate 2 from 3x3 box: Gives new

Solving Sudoku Eliminate rows & cols from 3x3 box E.g. eliminate 2 from 3x3 box: Gives new 2 Continue …

Solving Sudoku Eliminate rows & cols from 3x3 box E.g. eliminate 2 from 3x3 box: Gives new 2 Continue … … fill other digits

Solving Sudoku Eliminate rows & cols from 3x3 box E.g. eliminate 2 from 3x3 box: Gives new 2 Continue … … fill other digits Fill 3x3 boxes

Solving Sudoku by Integer Optimization 0-1 variables model digit assignment & linear equations model rules … gives integer linear program (ILP) NP-complete (graph coloring) problem (6,670,903,752,021,072,936,960 sols) Solve using ILP solvers: CPLEX, MINTO See ~leyffer/sudoku/ for AMPL models

Branch-and-Bound Solver Solve continuous relaxation: [0,1] Branch on non- integral variable:  Two new probs:  Set y=1 or y=0 Continue until all nodes explored

Solution to Simple Example Solver: CPLEX Simple Problem:  Time: 0  Nodes: 0 … AMPL presolve Challenging Problem  Time: 0.03 seconds  Nodes: 0 … integral LP soln

Sudokus Without Solutions No solution AMPL/CPLEX: Infeasible constraints by presolve Proof of non- existence of solution

Sudokus With Multiple Solutions Many solution AMPL/MINTO: Find first solution Integer cuts to remove solution Resolve to find new solution Stop when infeasible Soln at root node what ’ s the secret?

AMPL ’ s Primal Presolve Transform problem to smaller/easier equivalent problem Remove fixed variables Remove constraints that express variable bounds Iteratively tighten bounds on variables, using Gauss-Seidel Todd has experience with NCP presolve!

MINTO ’ s Primal Heuristics Find solution early … reduce tree-search Probing: tentatively set binaries to 0 or 1 Rounding & feasibility pump LP relaxation: solution x … round to r(x) Solve LP min dist(y,r(x)) subject to Ax=b LP solution y … round to r(y) & repeat Heuristics: genetic algorithms, et al.

Integer Optimization Applications Crew scheduling Machine scheduling Reactor core reload: Max fuel efficiency Subject to safety & diffusion PDE Find reloading schedule … integer & nonlinear

Constrained Logic Programming CLP origins: AI & logic CLP: declarative language to formulate logical problems, scheduling etc CLP: combines constraints with logic & constraint satisfaction CLP allows tailored solutions/rules CHIP, ECLiPSe, GNU Prolog, IF/Prolog, ILOG, Koalog, MOzart, and SICStus

References: Wikipedia: en.wikipedia.org/wiki/Sudoku Th. Koch: How to Solve Sudoku … M.J. Chlond: IP Modeling: Su Doku (05) W. Shortz: Sudoku – 100 wordless puzzles Fourer & Gay: AMPL ’ s Primal Presolve (93) Sudoku Programmers Forum