CSCI 35500 SP 2026

Go to homepage

Last updated: 2026-04-26

CS 355 ILP Project: Sudoku

This is the second (and last) project we will have in CS 355, on integer linear programming and OR-Tools. Due dates and other information will be available on the course website. Please ask any questions you have about this project in class.

Problem statement

In this project you will solve a Sudoku puzzle using integer linear programming. You will be given a specific puzzle to solve, and you will need to define an ILP formulation to model Sudoku and pass your problem in to verify that it works.

If you are unfamiliar with Sudoku, you can read about the puzzle on Wikipedia: Wikipedia page for Sudoku

The goal of Sudoku is to fill in every empty box with numbers, so that for every row, column, and (outlined) 3x3 box, each number from 1 to 9 is used exactly once.

For an example, try out the Sudoku generator and solver linked under the section on Inputs below.

Instructions

Task

You must:

  1. Model the general Sudoku problem as a linear program.
  2. Use Python to implement your model and solve the Sudoku puzzle you were given as an input.

Inputs

You can get your input data here: Sudoku generator

To get your input, type your EMPLID into the Seed field and hit “Generate New”. Make sure you double check that you have typed your EMPLID correctly, as I will be grading based on whether your solution matches the expected result - a typo in your EMPLID could result in a completely different Sudoku puzzle.

This will generate a new Sudoku puzzle for you to use. You will probably want to pass the Python list format to your solver because it’s easier to work with.

You can (and should) check your puzzle solution by comparing it to the output given by the “Solve an ASCII puzzle” utility.

Submission

Submit a Jupyter notebook to Brightspace that has the following in it:

Requirements

For each of the following requirements that you do not follow, you will lose 5 points:

Submission/grading

Submit your Jupyter notebook file to Brightspace.

Grading:

AI tools/external resources reminder

Use whatever resources you feel comfortable with.

There are no restrictions.