how to find the actual states of a logic for the sates machine?
I don't understand the question. Are you asking how to construct one?
means that we are having a problem and its solving logic,
and we want to solve it using a state machine.
then on which basis, we can find the states
Mmm, shouldn't the states already be apparent if you find yourself needing to implement a state machine?
Maybe if you explain what you are trying to solve using a state machine, we could give more detailed explanation.