Introduction - If you have any usage issues, please Google them yourself
Propositional calculus formula for calculating the true value, the so-called propositional calculus formula refers to a logical variable (its value is TRUE or FALSE) and the logical operators ∧ (AND), ∨ (OR) and ┐ (NOT) according to certain rules of composition of the formula (contains the kind of computing can ∧, ∨ and ┐ expressed). Formula computing the order of ┐, ∧, ∨, and parentheses () can change the priorities. Given a propositional calculus formula and the value of a variable, to design a program to calculate the formula for the true value.
Requirements:
(1) the use of binary tree to calculate the true value of the formula. First, the stack will use the formula in infix form into postfix form then the postfix form, starting from the leaf node corresponding binary tree structure press the post-order traversal of the tree, find the value of each sub-tree, that is, each reaching a node, the value of its sub-tree has been calculated and when it reaches the root node, the obtain