Finite State Machine

Description:

  • Mathematical model of computation
  • Can be in exactly one of a finite number of states at any given time.
  • A finite-state automata :
    • consists of
      • : a finite set of states
      • : a finite input alphabet
      • : a transition function
        • assigns a next state to every pair of state and input
        • such that
      • an initial or final state,
      • a set of possible accepting state,
        • also a subset of
    • example question and my attempt solution

Types of FA

Transition:

  • To change FA from one state to another in response to some inputs

Accept/reject string:

  • A string is said to be recognized or accepted by the machine, , if it takes the initial state to a final state, that is , is a state in .
  • example:
    • sample state machine
    • (question) 𝑥=01011, what is ? Is it accepted?
      • (answer) Yes
      • = S0 S1 S1 S0 S1, take from the initial to final state
    • (question) 𝑦=00110, what is ? Is it accepted?
      • (answer) No
      • = S0 S0 S1 S0 S0, doesnt take from init to final state

Language recognition by FSM

  • The language recognized or accepted by the machine , denoted by , is the set of all strings that are accepted by
  • Determine languages recognized by a machine M:
    • define final state(s) of M
    • per each final state, determine the string that take the initial to its final state
  • example

Equivalent finite-state automata:

  • Definition: Two finite-state automata are called equivalent if they recognize the same language
    • Meaning accept the same set of inputs
  • example question & solution

State table: