This problem is an example of constructing a circuit using the minimum number of NOR gates (devices with two inputs and one output) that will perform the logical function specified by a truth table. This problem is formulated as a binary optimization problem using the Gurobi Python API and solved with the Gurobi Optimizer.
This model is example 12 from the fifth edition of Model Building in Mathematical Programming, by H. Paul Williams on pages 266-267 and 320-321.
This example is at the intermediate level where we assume that you know Python and the Gurobi Python API and that you have some knowledge of building mathematical optimization models.
For details on licensing or on running the notebooks, see the overview on Modeling Examples
© Gurobi Optimization, LLC