
q0 - start state
q4 - accpetance state
B - Blank symbol
Starting from q0 state the input head is at first 'a' on the tape. Explaining regarding the states
q0 : In this state when the input head sees 'a' it replaces with 'X' and moves right changing its state to q1. But if it sees b implying that there are more b's than a's which is not required denoted by moving to state q5 which is literally dead state.
q1 : In this state all a's and b's are left as it is moving right unless it encounters a Blank symbol 'B' or 'Y'(which is the replacement for 'b'). As it encounters 'B' or 'Y' it changes its state to q2 and start moving left of the tape in turing machine.
q2: In this state if it sees 'b' it replaces it with 'Y' and continue to move left and change it's state to q3, But if it sees 'a' denoting more number of a's and is one of the case of acceptance state and if it sees 'X' it denotes equal number of both which is the other case of acceptance.
q3: This state is similar in nature to q1 but it continues to move left unless it sees 'X' which is recent replacement for 'a' identifying that 'a' has been visited.
q4: As explained in q2, if q2 state sees either 'X' or 'a' move to acceptance state and here direction is unimportant.
q5: This state identifies if the input has more number of b's than a's. Here it is not required.