Question: ( a ) How could you encode Boolean expressions in CNF over our alphabet { a , b } ? Assume that the variables in
a How could you encode Boolean expressions in CNF over our alphabet
Assume that the variables in the expression are dots, and that each of
these variables occurs in at least one literal in the expression.
Your encoding scheme should be such that each Boolean expression in CNF us
ing these variables, can be encoded and different expressions are encoded differently.
Subject to this, it should be reasonably efficient, ie not produce strings that are
unduly long.
Let CNF be the language of string representations of Boolean expressions in
CNF with exactly three literals in each clause and with no literals duplicated in any
clause and no clauses duplicated.
b Give the best upper bound you can for the length of the string used, in your
scheme, for Boolean expressions in CNF with clauses and variables.
c Outline how a Turing machine would recognise CNF
d In terms of and how many steps would a Turing machine need to take, in
the worst case, to decide if an input string belongs to CNF
e Now give a time bound in terms of the number of letters in the input string,
in bigO notation.
f How would you classify CNF using language classes we have studied? Is it
finite, regular, contextfree, decidable, Justify your answer.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
