You need to write a program that would compile the truth table of the entered DNF, for example (A & B) | (B & C) (A & B) | (B & C) , and for this expression to output a truth table.

Closed due to the fact that the essence of the question is incomprehensible by the participants Vladimir Martyanov , pavel , gbg , Kromster , Streletz 8 Oct '16 at 4:18 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • eight
    need - write. - ixSci
  • one
    I suggest the algorithm. You are applying for the decision to the most diluted excellent pupil on your stream. You promise in exchange a note or a cheat sheet for any humanitarian discipline. - VladD
  • 2
    @VladD is better to pay in hard currency. Who needs these humanities? :) - gbg

1 answer 1

  1. Parse expression. A sorting station algorithm will do.
  2. Following the results of the analysis, find out the number of parameters
  3. Following the results of the analysis, learn how to calculate the value of the formula on the parameter vector X
  4. Generating all possible combinations for the vector X (they will be 2 ^ n, where n is the dimension of the vector), fill in the truth table.

If you expect me to write you a code, you will not wait.