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 and Interview Tips

Learn About Inside Sales at Commvault

Stephanie Acker, director of inside sales at Commvault, gave us a behind-the-scenes look at the company's application process, culture, and values, as well as her own career journey.

READ MORE AND DISCUSS Show less
popular

How These 9 Companies Are Celebrating Difference This Autism Awareness or Acceptance Month

Five million adults in the U.S. have autism spectrum disorder, per the CDC. More are considered neurodivergent, which can refer to people with autism, ADHD, and dyslexia.

You've met some of them—maybe they're your family, friends, classmates, or coworkers, or perhaps you identify as neurodivergent yourself.

READ MORE AND DISCUSS Show less
Webinars

Elevating Black Women Virtual Summit: Learn more about Our Partners, Sponsors & Speakers

Learn more about our amazing speakers and sponsors at our April 2021 virtual summit Diversity Reboot: Elevating Black Women, three days of conversations and panels plus an interactive virtual career fair.

From everyone here at PowerToFly we want to extend a BIG thank you to everyone who tuned into last week's Diversity Reboot: Elevating Black Women. In case you missed a talk or you'd like to revisit one of our great conversations, don't worry, all of the fireside chats and panels will be available to watch for free on PowerToFly soon.

We were thrilled to present conversations on such important subjects as the racial wealth gap, the importance of affordable child care, how BIPOC youth are leading the way on combatting the climate crisis, the importance of black women in entrepreneurship and business, being an ally for communities outside of your own, plus tech talks, fireside chats with Black woman founders, panels with DEI leaders and much more.

We want to extend a HUGE thanks to our amazing sponsors MINDBODY, Smartsheet, NGA, Procore Technologies, S&P Global, PayPal and PwC whose support made this event possible.

Finally, don't forget to visit our Merch Store and grab yourself some PowerToFly apparel. 100% of the proceeds from our sales will be going to TransTech Social, supporting transgender people in tech.

READ MORE AND DISCUSS Show less
Career Advice

The NBA’s CMO Kate Jhaveri on Her Marketing Superpower: Building Community

Kate Jhaveri does one thing every day that she suggests you try: belly laughs.

The EVP and Chief Marketing Officer at the NBA credits her two kids with much of that levity—"They're very silly and they, at least once a day, make me laugh out loud," she says—though she seeks to make those lighter connections with her team at work, too.

READ MORE AND DISCUSS Show less
© Rebelmouse 2020