GET EMAIL UPDATES FROM POWERTOFLY
By signing up you accept the Terms of Service and Privacy Policy
BROWSE CATEGORIES
GET EMAIL UPDATES FROM POWERTOFLY
Tech Talk

How to use Integer Linear Puzzling to Attain Sudoku Fame & Fortune

Jan. 16th 2018

If you're not familiar with Sudoku, it's a popular game consisting of a 9x9 grid of numbers (1-9), that is further broken into three smaller 3x3 grids, where each line and grid must use each number (1-9) only once.

My name is Lauren and I'm a victim of the Sudoku "guess and check".

Sure, there may be one easy row that I can complete by doing some simple algebra, but when it comes to the "extra hard" puzzles, you can forget it. Each puzzle has 729 parameters, so the odds of my "guess and check" method being accurate the first time around are pretty slim.

Luckily, Allison Morgan has discovered a way to use Integer Linear Programming to solve Sudoku puzzles, and it only takes a few minutes!

"The first constraint requires that each cell, denoted by its row and column, contains one value. The second and third constraints maintain that only one of a value is contained within a column and row, respectively. The last constraint fixes that only one of a value is found in each subgrid.

And how exactly do you solve it?

"I used the Python package for solving LP problems called PuLP to solve the "Hard 1" sudoku above. PuLP has some nice existing documentation for how to use its software for this problem. This is another thorough explanation of using LP to solve sudoku puzzles, with supplementary code.

My adaptation of PuLP's sudoku example can be found here. Note that my edited constraints simply satisfy the starting state of my particular puzzle."

While the excitement from my "guess and check" method may have been lost to a formula, for any perfectionist like myself, I can sleep easy knowing the puzzle was successfully completed (and I learned about linear puzzling along the way!).

Career Advice

How to Respond to a Performance Improvement Plan

Ah, the dreaded PIP.

Performance improvement plans (PIPs) can feel scary. They have a (not entirely unearned) reputation for being the first step on the road to an eventual firing. And sometimes managers do implement PIPs solely to appease HR by ensuring that they made every last effort to make a given employee successful before terminating that employee.

READ MORE AND DISCUSS Show less
Smartsheet Inc.

Thinking of Applying to Smartsheet? - Meet the VP of People

We recently chatted with Megan Hansen, VP of People at Smartsheet, who oversee the employee lifecycle from Talent Acquisition to Alumni support.

Get a behind-the-scenes look at the company's culture and values, and learn how you can make your application stand out!

To learn more about Smartsheet and their open roles, click here.

For Employers

How Leaders Can Support Their Black Employees

A five-step framework for addressing systematic racism at work

The world has changed in the past few weeks.

We're watching corporations and organizations across the world come out in support of Black lives in droves. Many of those organizations are doing so for the first time in their history.

READ MORE AND DISCUSS Show less
T Rowe Price Group Inc

Preparing for the Unexpected: ​How Maria Fava Found Her Confidence as a Bicultural, Bilingual Woman at T. Rowe Price

Born in Mexico City and raised in Guadalajara, Maria Fava never would have predicted that she'd have a career in financial services. And certainly not in Maryland.

Over two decades ago, when Maria moved to the U.S. to study psychology at the University of Texas at Arlington, she'd planned on moving back to Mexico to study law after graduation. Instead, she fell in love with an unassuming Italian-American her senior year. She married him and moved to Maryland, his home state.

READ MORE AND DISCUSS Show less
Remote

How to Succeed as a (Remote) Quip Intern: Advice from Mai Sha and Leslie Carr

When the pandemic began in spring and her friends (and fellow Carnegie Mellon master's students) started to find out that their offers for summer internships were canceled, Mai Sha held her breath.

READ MORE AND DISCUSS Show less
Loading...
© Rebelmouse 2020