# Boolean Logic in Polynomials

DevFeed: [Boolean Logic in Polynomials](<https://devfeed.tech/articles/boolean-logic-in-polynomials-40414.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2017/07/24/boolean-logic-in-quadratic-polynomials/>)

Published: 2017-07-24T09:00:38Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [polynomials](<https://devfeed.tech/topics/polynomials.md>), [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>)

Tags: [boolean](<https://devfeed.tech/tags/boolean.md>), [boolean-satisfiability](<https://devfeed.tech/tags/boolean-satisfiability.md>), [logic](<https://devfeed.tech/tags/logic.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [np-hard](<https://devfeed.tech/tags/np-hard.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [polynomials](<https://devfeed.tech/tags/polynomials.md>)

## AI overview

This tutorial shows how to represent Boolean logic formulas with polynomials by using multiplication for conjunction and 1 minus a variable for negation. It explains how the construction relates Boolean satisfiability to the hardness of multivariable polynomial root-finding and constrained polynomial optimization.

## Source excerpt

Problem: Express a boolean logic formula using polynomials. I.e., if an input variable $ x$ is set to $ 0$, that is interpreted as false, while $ x=1$ is interpreted as true. The output of the polynomial should be 0 or 1 according to whether the formula is true or false as a whole. Solution: You can do this using a single polynomial. Illustrating with an example: the formula is $ \neg[(a \vee b) \wedge (\neg c \vee d)]$ also known as