All the CNF productions are in the form :
A --> BC(maximum 2 non terminal)
B --> a(terminal)
C --> b(terminal)
So, it is seen than to derive a terminal we need one step (Ex: B --> a). Also a non-terminal can derive maximum 2 non-terminals. (Ex: A-->BC).
Ok, let's say we have a string 'ab'. Now 'a' can be derived from B and 'b' can be derived from C.
A
/ \ (One step)
B C
| | (One step)
a b
So, one step is used to derive a and b from B and C.
Now, we have two non-terminals. These two can be derived in one step in best case as A --> BC.
Generally, if we have |w| = n, then one step is needed for generating all the terminals from non-terminals.
Now we have 'n' non-terminals. To derive these n non-terminal we need n/2 non-terminals in the above level because every non-terminal can derive maximum 2 non-terminals.
Again to derive these n/2 non-terminals we need (n/2)/2 = n/4 non terminals. This step continues until it reaches to one non-terminal which is the start symbol. So n/2,n/4,n/8,.....,n/2k where n/2k = 1
or, 2k = n
or, k = log2|w|.
So total steps = log2|w| (for getting n non terminals) + 1 (for getting n terminals)
= log2|w| + 1
= total height
Option (A)