To construct an NFA that accepts the language L = {w ∈ {a, b}* : w does not end in "ab"}, we can follow these steps:
1. Start with three states: q0, q1, and q2.
2. Set q0 as the initial state and mark it as the start state.
3. Mark q2 as the final state.
4. For the transition function, define the following transitions:
a. From q0 to q0 on input 'a'.
b. From q0 to q1 on input 'b'.
c. From q1 to q0 on input 'a'.
d. From q1 to q1 on input 'b'.
e. From q1 to q2 on input 'a' or 'b'.
Here is the graphical representation of the NFA:
```
a b
┌───▼───┐ │
q0 │ q0 │───┘
└───┬───┘
│ b
▼
┌───▼───┐
│ q1 │
└───┬───┘
│ a,b
▼
(q2)
```
To find the regular expression corresponding to the NFA, we can use the state elimination method:
1. Start with the initial NFA and label the states as q0, q1, and q2.
2. Remove the final state q2 and merge it with q1.
3. Update the transitions accordingly:
a. From q0 to q0 on input 'a'.
b. From q0 to q1 on input 'b'.
c. From q1 to q0 on input 'a'.
d. From q1 to q1 on input 'b' or 'a'.
4. Remove q2 and update the transitions as follows:
a. From q0 to q0 on input 'a'.
b. From q0 to q1 on input 'b'.
c. From q1 to q0 on input 'a'.
d. From q1 to q1 on input 'b' or 'a'.
e. From q0 to q1 on input 'a' or 'b'.
5. Remove q2 and update the transitions as follows:
a. From q0 to q0 on input 'a'.
b. From q0 to q1 on input 'b'.
c. From q1 to q0 on input 'a'.
d. From q1 to q1 on input 'b' or 'a'.
e. From q0 to q1 on input 'a' or 'b'.
f. From q1 to q1 on input 'a' or 'b'.
The resulting regular expression is (a + b)*(ba + bb + ε), where '+' represents union (or), '*' represents concatenation, and ε represents the empty string.
Note: The regular expression may vary based on the conventions used for representing regular expressions.