ahmed-alllam / AlphaLogos

Boolean Function Analyzer and Synthesis Optimization Tool
http://alpha-logos-1464863388.eu-west-3.elb.amazonaws.com/
MIT License
1 stars 0 forks source link

Solve PI table using 3-step heuristics #30

Closed MohamedEbrahem1 closed 11 months ago

MohamedEbrahem1 commented 11 months ago

Is your feature request related to a problem? Please describe. Complete our steps to solving QM by using the 3-step heuristics to solve PI table. Describe the solution you'd like Apply Petrick's Algorithm and find the minimum solutions

  1. Input: Prime implicant chart, list of prime implicants, and the number of columns.

  2. Create a list of sets called productTerms to store the product terms for each column.

  3. Initialize a set called currentTerm with all the implicants.

  4. Create an empty list called solutions to store the minimum solutions.

  5. While the currentTerm is not empty:

a. Check if the currentTerm covers all columns:

c. Create an empty set called nextTerm.

d. Iterate over each implicant in the currentTerm:

e. Set the nextTerm as the new currentTerm.

  1. Return the solutions list.