In the context of finite state machines (FSMs), the terms “accept” and “recognize” refer to the fundamental concepts of determining whether a given input string belongs to the language defined by the FSM. While these terms are often used interchangeably, there are subtle differences in their implications that can be elucidated through a comprehensive analysis.
To begin with, let us define a finite state machine as a mathematical model used to describe and analyze systems with discrete inputs and outputs. It consists of a set of states, a set of input symbols, a set of output symbols (in Mealy or Moore machines), a transition function, and an initial state. Optionally, one or more states are designated as final (or accepting) states. The transition function defines how the FSM moves from one state to another based on the current state and the input symbol. The FSM can also produce an output symbol during this transition (in Mealy/Moore variants, though this may be omitted in purely accept/reject automata).
The term “accept” in the context of FSMs refers to the process of determining whether a given input string leads the FSM to a final (or accepting) state. In other words, if the FSM reaches a final state after processing the entire input string, it is said to accept that string. This implies that the input string is recognized as a valid sequence according to the language defined by the FSM. On the other hand, if the FSM does not reach a final state (or gets stuck in a non-final state), the input string is not accepted.
By contrast, the term “recognize” in the context of FSMs refers to the broader concept of determining whether a given input string belongs to the language defined by the FSM. It encompasses both acceptance and rejection. If the FSM accepts the input string, it is recognized as a valid sequence; if the FSM rejects the string, it is recognized as an invalid sequence. Thus, “recognize” describes the overall ability of the machine to classify input strings as belonging or not belonging to the language.
Example: An FSM for Even Number of 1s
To illustrate these concepts, let us consider an example of a simple FSM that recognizes a binary string with an even number of 1s. This FSM will have two states: an initial state (S0) and one other state (S1). The input alphabet consists of two symbols: 0 and 1. The transition function is defined as follows:
- From S0, if the input symbol is 0, the FSM remains in S0 (since the number of 1s is still even).
- From S0, if the input symbol is 1, the FSM transitions to S1 (the count of 1s goes from even to odd).
- From S1, if the input symbol is 0, the FSM remains in S1 (still an odd number of 1s).
- From S1, if the input symbol is 1, the FSM transitions back to S0 (odd to even).
Here, S0 represents “even number of 1s so far,” and S1 represents “odd number of 1s so far.” Because we want to accept (i.e., finalize) strings with an even number of 1s, S0 is designated as the final (accepting) state, and S1 is designated as a non-final state.
Consider the input string “1010”:
- Start in S0 (even 1s = 0). - Read '1': move to S1 (odd number of 1s now). - Read '0': stay in S1 (still one 1 total, which is odd). - Read '1': transition to S0 (now two 1s total, which is even). - Read '0': remain in S0 (still two 1s total).
After processing the entire string “1010,” the FSM is in S0, which is the final state. Therefore, the string “1010” is accepted by this machine, and it is recognized as a valid sequence in the language (i.e., it has an even number of 1s).
On the other hand, if we consider the input string “1011”:
- Start in S0 (even count = 0). - Read '1': move to S1 (odd count = 1). - Read '0': stay in S1 (odd count = 1). - Read '1': move to S0 (even count = 2). - Read '1': move back to S1 (odd count = 3).
After processing “1011,” the FSM ends in S1, a non-final state. Hence, the string is not accepted. Nevertheless, we still say the machine “recognizes” or “classifies” the string—just that it recognizes it as invalid for the language of “even number of 1s.”
Thus, while the terms “accept” and “recognize” are often used interchangeably in the context of finite state machines, there is a subtle distinction between them. “Accept” specifically refers to whether a particular input ends in a final state, whereas “recognize” indicates whether the FSM is capable of distinguishing valid strings from invalid strings within the language it defines.
Other recent questions and answers regarding Examination review:
- Can all languages be recognized by finite state machines? Explain your answer.
- Define the language recognized by a finite state machine and provide an example.
- How can we design a finite state machine that recognizes strings that do not contain a specific sequence, such as "0011"?
- Explain the distinction between the empty string and the empty language in the context of finite state machines.

