Related questions with answers
Suppose P is a formula in propositional logic containing n variables. Approximate the worst-case complexity of an algorithm that runs through all possible true/false values of the n variables to see if there is an assignment that makes P true.
Solution
VerifiedGiven: is a propositional formula with variables.
Since there are at most two children to each vertex (true or false), a tree with vertices without children has a height of at least .
For each of the variables, there are 2 options: true or false.
If one event can occur in ways AND a second event can occur in ways, then the number of ways that the two events can occur in sequence is then .
Thus there are possible combinations of truth values for the variables and thus the tree representing the situation needs to have at least leaves.
The height of the tree is then at least and thus the worst-case complexity of an algorithm that runs true all possible true/false values of hte variable is .
Create an account to view solutions
Create an account to view solutions
Recommended textbook solutions

Discrete Mathematics and Its Applications
7th Edition•ISBN: 9780073383095Kenneth Rosen
Discrete Mathematics and Its Applications
8th Edition•ISBN: 9781259676512Kenneth Rosen
Essentials of Discrete Mathematics
3rd Edition•ISBN: 9781284056242 (2 more)David J. Hunter
More related questions
- algebra
1/4
- algebra
1/7