Calculates the prime implicants of a boolean expression using its Karnaugh map.

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

    • input: string

      The boolean expression

    • variables: string[]

      An array of variable names (order matters)

    Returns string[]