Connect with us

Thought Leaders

From Puzzles to Practicality: The Growing Significance of Mathematical Optimization

mm

Did you consider yourself a mathematician the last time you sat down to solve a Sudoku puzzle? It’s certainly a mentally stimulating activity—review the squares, jot down a few potential answers, scan your rows, columns, and distinct 3×3 blocks for repeat numbers—but is it really math?

The answer, it turns out, is yes. Solving a Sudoku puzzle is ultimately an act of mathematical optimization. Each move you make is a choice constrained by logic, spatial rules, and the desire to solve the puzzle as quickly as possible. These driving factors are all hallmarks of an optimization problem in action.

Optimization—finding the best solution out of many possible outcomes—is an incredibly common practice. It’s a form of problem-solving found across the “gaming” spectrum, from simple pencil-and-paper puzzles like Sudoku to traditional board games and popular video games. It’s also becoming increasingly embedded in the systems that run our daily lives, influencing everything from the routes our delivery drivers take to the sales online retailers offer, to the decisions that keep our homes supplied with electricity.

How does mathematical optimization’s common thread run through such a diverse array of games, puzzles, supply chain logistics, and even critical infrastructure? Let’s dig deeper and find out.

What is Mathematical Optimization?

Mathematical optimization uses the power of math to examine complex, real-world problems and determine the best possible solution. It’s an incredibly powerful tool for approaching multifaceted problems that are saddled with a multitude of variables and challenges. Through the power of algorithmic thinking, optimization can review each of the many potential outcomes to such a problem and provide an unbiased recommendation.

Like a board or puzzle game, it does this by following a set of core instructions. Every mathematical optimization puzzle includes three core components:

  1. The Objective Function: The end goal you want to achieve.
  2. Decision Variables: Variables that represent the items involved that you could control and/or change in order to reach your objective.
  3. Constraints: The rules and/or limitations that you absolutely must follow.

By translating these components into mathematical representations, mathematical optimization can analyze them, extrapolate the outcomes associated with changes to each variable, and determine the best possible solution for the specified objective.

Optimization in the Games We Play

This may, understandably, sound somewhat complex and technical—especially if you get into the intricacies of the linear, nonlinear, and mixed-integer programming operating behind the scenes. But as we alluded to earlier, mathematical optimization can be found in the simplest of places, including the games we play and puzzles we like to solve.

Let’s take a deeper look at our Sudoku example: on the surface, this puzzle game seems pretty straightforward. It's a feasibility problem, where you’re presented with a partial grid of numbers that you need to assess and determine the best possible solutions. When playing this game, you’re aware of the following factors:

  1. Objective Function: Filling out the entire Sudoku grid with numbers that minimize the violations of the rules of the puzzle.
  2. Decision Variables: Which numbers you choose to write in which of the empty squares.
  3. Constraints: You cannot repeat the same number more than once in a single row, column, or 3×3 block of the Sudoku grid.

Whether you’re conscious of it or not, your consideration of these factors—and subsequent choice of the best possible solutions for each blank square—constitute an optimization problem. The operations of Sudoku can be directly mapped to an optimization procedure known as “probing,” in which you tentatively fix a variable's value to a specific bound to explore the logical consequences and gain additional information about the problem's larger structure.

While they may not involve probing, similar features of optimization are present across a range of popular games. When you play chess, you’re limited by which pieces can move in which fashion and make decisions that will help you gather your opponent’s pieces and checkmate their king. In Tetris, you need to rotate and align blocks in the optimal fashion based on their shape and capacity to fill and delete rows. Even popular strategy-based video games like Cities: Skylines, SimCity, and Civilization require careful resource assessment and allotment to optimize everything from zoning and traffic management to military strategy. Each of these actions, to some degree or another, is an exercise in optimization.

Practical Applications of Optimization

This same sentiment extends beyond puzzles, board games, and computer strategy games to the decisions that shape our daily lives. Let’s consider a common optimization use case: managing the energy grid.

Electricity is an essential utility, quite literally powering our daily lives. Energy grids must balance supply and demand in real time, balancing load and minimizing cost while avoiding unexpected downtime or blackouts. It must do so by considering the field of viable power plants and deciding which to turn on or off to meet expected demand, creating a complex mixed-integer problem involving the following factors:

  1. Objective Function: Deliver reliable and sustainable electricity to customers at minimum cost.
  2. Decision Variables: Power plant generation levels, power flow routing, generator on/off status, charge and discharge schedules for energy storage systems, and load shifting strategies.
  3. Constraints: Supply must consistently and totally meet demand, all while accounting for each plant/generator’s maximum output, transmission capacity, environmental and regulatory caps, and operational safety margins.

There’s definitely more to account for here than in a game of Sudoku. Even so, utility companies can use mathematical optimization to solve these complex problems easily and efficiently, leveraging the same algorithm that solves even the hardest Sudoku problems in fractions of a second. Each factor—from a plant’s total generation capacity to a neighborhood’s historic demand level data—can be translated into mathematical variables and constraints and input into a commercial-grade optimization solver. The solver will then analyze the enormous number of potential outcomes, assess their viability, and present the company with an unbiased, ideal solution for their grid management needs, sometimes within seconds.

Optimization’s Promising Future

This is not exclusive to the energy industry, either. Your delivery drivers take optimized routes, dropping packages off in an efficient and gas-saving manner. Your online shopping experience is constantly tailored to present you with optimal product placement; from the ads you see to the sales you’re offered. If you’re a fan of your local NFL team, their matchups are the result of schedule optimization.

The use of optimization is growing, presenting organizations with the improved capacity to streamline their decision-making and achieve more consistent and sustainable success. As artificial intelligence and machine learning continue to evolve, they help to further bolster the capabilities of commercial solvers, creating stronger and more efficient tools for any business facing complex challenges.

Whether it’s in a game of Sudoku or managing a regional power grid, optimization helps make decision-making less of a burden. Its accessibility and pervasiveness will only make our lives easier—even as our decisions become more complex.

Dr. Ed Klotz has over 30 years of experience in the mathematical optimization software industry. Over the course of his career at IBM, ILOG, Inc., and CPLEX Optimization, Inc., he has worked with a wide array of customers to help them solve some of world’s most challenging mathematical optimization problems. In his role as a Senior Mathematical Optimization Specialist on the Gurobi R&D team, Dr. Klotz works closely with customers to support them in implementing and utilizing the power of mathematical optimization in their organizations.