Each return loop to the start is $ab^*b$ or $ba^*a$, repeated any number of times. The string then ends in either accepting state, via $ab^*$ or $ba^*$. This gives $(ba^*a+ab^*b)^*(ab^*+ba^*)$.
More Regular Expressions and Finite Automata questions
GATE 2021 CS (CS1) Q48– Consider the following language. L = \w \0,1\* w ends with the substring 011\ Which one of…
GATE 2020 CS Q61– Consider the following language. L=\x\a,b\* number of a's in x is divisible by 2 but not…
GATE 2019 CS Q58– Let be the set of all bijections from \1,,5\ to \1,,5\, where id denotes the identity…
GATE 2018 CS Q16– Let N be an NFA with n states. Let k be the number of states of a minimal DFA which is…
GATE 2018 CS Q62– Given a language L, define Li as follows: L0=\\ and Li=Li-1 L for all i>0. The order of a…
GATE 2015 CS (CS1) Q49– [Two DFAs, each with two states. DFA M: the start state loops on b, reads a to move to the…