Calculates the minimization of a boolean expression using the Quine-McCluskey algorithm.

const min = Chalkboard.bool.minimize("x & y | x & z", ["x", "y", "z"]); // Returns "x & (y | z)"
  • Parameters

    • input: string

      The boolean expression

    • variables: string[]

      An array of variable names (order matters)

    Returns string