I have the following question regarding a situation given and we are then required to derive a regular expression out of it.
What i have to do now i to give a regular expression for this language described by the knob movement from A,B and C. Because i have to go through B if i were to traverse to C, and vice versa, i know that B must be present as part of the expression.
Here's what i attempted:
ABC U ABA U BAB U BCB U CBA U CBC
Simplifying it:
AB(C U A) U B(AB U CB) U CB(A U C)
I'm not entirely sure if I'm doing it right as I find out that I'm brute forcing. I'm terrible at deriving regular expressions so I'll appreciate some corrections.