Fact-checked by Grok 2 weeks ago

Finite-state machine

A finite-state machine (FSM), also known as a finite automaton, is an abstract consisting of a of states, an input alphabet, a that maps states and inputs to next states, a start state, and a set of accepting states. It processes input strings sequentially, changing states based on each symbol, and accepts the string if it ends in an accepting state, thereby recognizing languages in the Chomsky hierarchy's regular class. This model captures systems with limited memory, where behavior depends only on the current state and input, without retaining unbounded history. The origins of finite-state machines trace back to early 20th-century efforts in modeling neural activity and logical computation. In 1943, Warren McCulloch and proposed finite automata as a simplified model of neural networks in their paper "A Logical Calculus of the Ideas Immanent in Nervous Activity," laying foundational work for and . The concept was formalized in during the 1950s, with George H. Mealy and independently developing output-producing variants in 1955–1956, known as Mealy and Moore machines, which extend basic FSMs to produce outputs alongside state transitions. and provided a rigorous mathematical framework in 1959, proving the equivalence between deterministic finite automata and nondeterministic ones, earning them the 1976 for contributions to automata theory. Finite-state machines come in several variants tailored to specific needs. Deterministic finite automata (DFAs) have a unique transition for each state-input pair, ensuring predictable behavior, while nondeterministic finite automata (NFAs) allow multiple or (no-input) transitions, offering more concise representations but equivalent computational power to DFAs via subset construction. Transducer variants like Mealy machines generate outputs on transitions, and machines on states, enabling modeling of reactive systems. FSMs underpin regular expressions, as shown by Stephen Kleene in 1956, linking them to in compilers and lexical analyzers. In practice, finite-state machines are fundamental to , modeling everything from simple protocols and vending machines to complex hardware controllers and software parsers. They enable efficient design of digital circuits via state minimization techniques, such as those from the Myhill-Nerode theorem (1957–1958), which equates language distinguishability to state count. Despite their simplicity, FSMs form the basis for more powerful models like pushdown automata, highlighting their role in the hierarchy of .

Introduction

Definition and Motivation

A finite-state machine is an abstract that represents systems capable of exhibiting sequential behavior through a limited set of conditions known as . At any given moment, the machine resides in exactly one , which encapsulates the relevant history of prior inputs, and transitions to another based on the current input. This structure allows the machine to produce outputs dependent on both the current and input, providing a for modeling processes with finite where the system's response to future inputs is determined solely by its present condition rather than an unlimited record of the past. The concept traces back to Warren McCulloch and Walter Pitts' 1943 model of neural activity, with significant formalization in the 1950s as part of early efforts in automata theory to model digital circuits and recognize patterns in sequences, such as those encountered in language processing. Early foundations were laid by Warren McCulloch and Walter Pitts in 1943, who modeled neural activity using finite automata in their paper "A Logical Calculus of the Ideas Immanent in Nervous Activity," laying foundational work for cybernetics and automata theory. Stephen Kleene's 1956 work formalized finite automata, building on McCulloch and Pitts' models, and introduced regular expressions as a means to represent events in nerve nets, linking them to the computational capabilities of simple neural models and laying the groundwork for understanding sequential logic in hardware design. Building on this, Michael Rabin and Dana Scott's 1959 paper formalized finite automata for classifying input tapes and solving decision problems, emphasizing their role in theoretical computer science and circuit synthesis. Key developments in during the 1950s and 1960s further solidified the finite-state machine's foundations, particularly through its connection to regular languages—the class of patterns recognizable by such machines. Kleene's introduction of regular expressions in his 1956 paper provided an algebraic notation for describing these languages, enabling precise specifications of state transitions and influencing compiler design and text processing. This era's advancements highlighted the model's utility in abstracting real-world systems like communication protocols and control devices, where exhaustive memory is neither necessary nor feasible. The emphasis on finiteness stems from the model's inherent limitation to a fixed number of states, which bounds the and computational compared to universal models like the . Unlike , which simulate arbitrary computation via an infinite tape for unbounded storage, finite-state machines are constrained to recognize only regular languages and cannot handle computations requiring indefinite , such as those involving nested structures or . This restriction makes them ideal for efficient, predictable implementations in resource-limited environments like embedded systems.

Turnstile Example

A coin-operated provides a classic illustration of a finite-state machine in operation, modeling in environments such as or amusement parks. The turnstile begins in a locked , preventing until a valid input is received. Inserting a unlocks the mechanism, allowing a user to push through and advance to the next position, after which it relocks to require another payment for subsequent entries. This setup demonstrates how the machine's behavior depends on its current and incoming events, ensuring controlled and predictable responses. The turnstile FSM features two primary states: locked, where entry is barred, and unlocked, where passage is permitted. The inputs consist of two events: , representing payment insertion, and , simulating the physical to rotate the arms. Outputs are implicit and state-dependent; in the locked state, no passage occurs, while in the unlocked state, the turnstile rotates to allow one person through, effectively granting access. These elements capture the machine's reactive nature without explicit signaling beyond mechanical feedback. The transitions define how inputs alter states, with invalid inputs typically resulting in no change to maintain security. A coin input in the locked state triggers a transition to unlocked, enabling entry. Conversely, a push input in the unlocked state returns it to locked after allowing passage. If a push occurs in the locked state, the machine remains locked, ignoring the attempt. A coin input in the unlocked state also leaves it unchanged, as payment is unnecessary post-unlock. These rules ensure the FSM only advances on valid sequences, rejecting unauthorized actions. To handle error conditions, such as repeated invalid pushes or forced entry attempts, the model can be extended with a jammed or violation for . In this augmented FSM, abnormal events like pushing a locked or excessive force trigger a to the violation , where an alarm activates and the mechanism halts. Recovery occurs via a event, returning to the locked and deactivating the alarm, thus incorporating handling without disrupting the core logic. The following table summarizes the transitions for the basic turnstile FSM:
Current StateInputNext StateAction/Output
LockedUnlockedUnlock
LockedPushLockedNo action (ignore)
UnlockedPushLockedAllow passage, relock
UnlockedUnlockedNo action (ignore)
This representation highlights the deterministic flow, where each state-input pair yields a unique outcome.

Fundamental Concepts

States, Inputs, and Outputs

A finite-state machine (FSM) consists of a of states, denoted as Q, which represent the distinct conditions or modes in which the machine can exist at any given time. Exactly one state is active at any moment, capturing the system's configuration or "memory" of past inputs. Among these, there is a designated initial state q_0 \in Q, from which the machine begins operation upon receiving its first input. For FSMs functioning as acceptors or recognizers, a F \subseteq Q identifies the accepting states, where the machine halts after processing an input string if it determines the input is valid according to the defined language. The inputs to an FSM are drawn from a finite input \Sigma, a set of or events that can trigger changes in the machine's . These inputs serve as the stimuli processed sequentially, with each representing a discrete event or signal that the machine responds to. The term "event" is often used more broadly to encompass any input that causes a change, including external signals in reactive systems. Synonymous includes "" for individual elements of \Sigma and "conditions" interchangeably with in descriptive contexts. Outputs are relevant primarily in transducer models of FSMs, where the machine not only changes states but also produces responses from an output alphabet \Gamma. In the Mealy model, outputs are generated as a total function \lambda: Q \times \Sigma \to \Gamma, depending on both the current state and the input, allowing immediate reaction during transitions. This approach, introduced by , enables outputs to vary dynamically with incoming stimuli. Conversely, in the model, outputs are determined solely by the current state via a total function \lambda: Q \to \Gamma, producing consistent responses for each state regardless of the triggering input. This model, proposed by , simplifies output logic by associating it directly with states. Some FSM designs distinguish active states, where outputs or actions occur, from idle states, in which the machine awaits input without generating responses. For illustration, consider a FSM with states "locked" and "unlocked," where inputs from \Sigma = \{ \text{[coin](/page/Coin)}, \text{push} \} drive , and outputs indicate access granted or denied.

Transitions and Events

In finite-state machines (FSMs), define the dynamic behavior by specifying how the machine moves from one state to another in response to inputs. A is a mapping that, given the current state and an input, determines the next state and may also produce an output. This mechanism ensures that the FSM evolves predictably based on its configuration, with often triggered synchronously at clock edges in implementations. In event-driven or reactive systems, transitions are initiated by events, which serve as the inputs prompting changes. Events can include signals, user actions, or environmental stimuli, and the FSM responds by firing a valid if the event is applicable to the current ; otherwise, the event is typically ignored to maintain stability. For instance, in a turnstile system, a "coin" event in the locked triggers a to the unlocked , while a "push" event in the same is ignored, preventing unauthorized passage without altering the . Nondeterminism introduces the possibility of multiple transitions from the same for a given input, allowing the FSM to branch to several potential next states, which models or parallelism in . This contrasts with deterministic FSMs, where each input uniquely determines the next , and is explored further in classifications of FSM types. Sequences of transitions form paths through the state space, enabling complex behaviors such as , where the machine loops back to a previous to repeat actions. In the turnstile example, a emerges from the unlocked via a "" back to locked, allowing repeated use after and modeling ongoing operation. These paths capture the FSM's response to input sequences, ensuring consistent handling of repetitive or iterative scenarios. Dead states act as sinks in the FSM, representing error conditions where no further valid transitions are possible, trapping the machine indefinitely regardless of subsequent inputs. They are commonly used for error handling, such as in implementations where invalid sequences lead to a fault state requiring external . In design, dead states help isolate failures without disrupting the overall model.

Mathematical Model

Formal Components

A finite-state machine, in its basic form as an acceptor or recognizer, is formally defined as a quintuple M = (Q, \Sigma, \delta, q_0, F), where Q is a of states, \Sigma is a finite input , \delta: Q \times \Sigma \to Q is the transition that maps a current and an input to a next , q_0 \in Q is the initial , and F \subseteq Q is the set of accepting states. This structure assumes that both Q and \Sigma are finite, ensuring the machine's computational resources remain bounded, and that \delta is a total , defined for every pair in Q \times \Sigma. For machines that produce outputs, known as finite-state transducers, the basic tuple is extended with a finite output alphabet \Gamma and an output function \lambda. In a , outputs depend solely on the current , with \lambda: Q \to \Gamma; the full tuple is thus (Q, \Sigma, \Gamma, \delta, q_0, \lambda), where accepting states F may be omitted if the machine is not used as an acceptor. This model ensures that the output is determined immediately upon entering a state, independent of the triggering input. In contrast, a associates outputs with transitions, so \lambda: Q \times \Sigma \to \Gamma; the becomes (Q, \Sigma, \Gamma, \delta, q_0, \lambda), or equivalently, the transition function can incorporate outputs as \delta: Q \times \Sigma \to Q \times \Gamma. Here, the output is produced based on both the current state and the input symbol, allowing for more immediate response to inputs but potentially leading to different output timing compared to Moore machines. As with the basic FSM, finiteness of Q, \Sigma, and \Gamma is required, and functions are total for completeness.

Transition Function and Semantics

The transition function, denoted as \delta, is a central component of a finite-state machine (FSM) that specifies how the machine changes states in response to inputs. For a deterministic FSM (DFA), \delta is a total \delta: Q \times \Sigma \to Q, mapping each pair of a current state q \in Q and an input symbol \sigma \in \Sigma to a unique next state in Q. In a nondeterministic FSM (NFA), \delta is a partial \delta: Q \times \Sigma \to 2^Q, where $2^Q is the power set of Q, allowing the machine to transition to a set of possible next states (or none, if partial). The of an FSM are defined by its computation or run on an input w = \sigma_1 \sigma_2 \dots \sigma_n \in \Sigma^*, starting from the initial q_0 \in Q. The run proceeds iteratively: the after the first symbol is q_1 = \delta(q_0, \sigma_1), then q_2 = \delta(q_1, \sigma_2), and so on, yielding a final q_n = \delta(q_{n-1}, \sigma_n) after all symbols. For a DFA, the run produces a unique sequence of ; for an NFA, it may produce a set of possible sequences, with acceptance if at least one path reaches a in the accepting set F \subseteq Q. The machine accepts w if q_n \in F. To handle outputs, FSMs are classified into Moore and Mealy types, which differ in how outputs are generated during a run. In a , outputs are associated solely with states, producing an output sequence where each output depends only on the current state (e.g., output at step k is a function of q_k). In a , outputs are associated with state-input pairs, so the output at each step depends on both the current state and the input symbol (e.g., output for \sigma_k is a function of q_{k-1} and \sigma_k). The recognized by an FSM M, denoted L(M), consists of all strings w \in \Sigma^* that lead to an accepting state under the extended transition \hat{\delta}: Q \times \Sigma^* \to 2^Q (or to Q for DFAs), defined recursively as \hat{\delta}(q, \epsilon) = \{q\} and \hat{\delta}(q, w\sigma) = \bigcup_{q' \in \hat{\delta}(q, w)} \delta(q', \sigma), with w \in L(M) if \hat{\delta}(q_0, w) \cap F \neq \emptyset. Kleene's theorem establishes the equivalence between the languages recognized by FSMs and those described by expressions, showing that FSMs capture exactly the languages.

Representations

State Diagrams and Visual Notations

State diagrams provide a graphical representation of finite-state machines (FSMs), visually depicting the where states are shown as nodes, typically circles or rounded rectangles, and transitions between states are illustrated as directed edges or arrows. These edges are labeled with inputs that trigger the transition, and in output-producing FSMs, such as Mealy machines, the labels may also include corresponding outputs, for example, "coin/unlock" to denote an input event and its resulting action. This notation allows designers to intuitively map the sequence of states and events, grounding the abstract components of states, transitions, and the transition function in a comprehensible visual form. In object-oriented modeling, UML state machines extend traditional state diagrams with advanced features to handle more complex behaviors. States in UML are represented as rounded rectangles, which can contain nested substates for , and transitions are arrows annotated with triggers, conditions ( expressions like [x > 0]), and actions (e.g., /setFlag). Entry and exit actions are specified within state compartments, executed automatically upon entering or leaving a , while history states—denoted by a circle with an "H" for shallow history or "H*" for deep history—allow the machine to resume from the most recent active substate configuration after interruption. These extensions make UML state machines suitable for modeling reactive systems in . SDL (Specification and Description Language) state machines, standardized by for systems, employ a graphical notation where states are depicted as rectangular boxes within process diagrams, and transitions are flow lines triggered by input signals or spontaneous events. Channels, represented as lines connecting blocks or processes, define communication paths with unidirectional or bidirectional signal routes, while signals—discrete events with optional parameters—are the primary inputs that consume from input queues to fire transitions. This structure supports concurrent, distributed systems by modeling agents (e.g., processes) as extended FSMs with explicit interfaces via gates and channels. Other visual notations related to FSMs include Harel statecharts, which extend state diagrams with and to manage complexity in reactive systems; states can nest substates, and orthogonal regions allow independent state machines within a , with transitions broadcast across components. Petri nets, while distinct, model concurrency using places (circles), transitions (bars), and tokens, offering a graph-based alternative to FSMs for systems with multiple simultaneous states but differing in their emphasis on rather than strict sequential transitions. The primary advantages of state diagrams and their variants lie in their intuitiveness for design and : they facilitate visual inspection of state sequences and transitions, enabling early detection of inconsistencies like conflicting inputs or unreachable states, which simplifies in complex FSMs compared to purely textual or tabular forms.

Tabular Representations

Tabular representations provide a structured, non-graphical method to specify finite-state machines (FSMs) by enumerating all possible state transitions in a format, facilitating precise implementation and . Unlike visual diagrams, these tables offer an exhaustive listing of behaviors, making them suitable for automated processing and formal analysis. The is the primary tabular form, with rows representing the current states of the FSM and columns corresponding to possible inputs. Each cell in the table specifies the next state and, for output-producing FSMs, the associated output produced upon transition. This format encodes the FSM's transition function directly, allowing for straightforward translation into code or hardware logic, such as ROM-based implementations where the table serves as a lookup . For deterministic FSMs, each input-state pair yields a unique next state, ensuring the table is complete without ambiguity. A variant known as the state/event table emphasizes events—discrete occurrences that trigger transitions—over continuous inputs, which is particularly useful in reactive systems where behaviors respond to asynchronous signals like user actions or sensor . In this representation, columns are labeled with rather than inputs, and cells indicate the next or no change (often denoted by a or ), along with any actions. This approach highlights event-driven dynamics, making it easier to model systems with sporadic inputs, such as control software. Tabular representations offer several advantages, including exhaustiveness that ensures all transitions are explicitly defined, reducing the risk of overlooked behaviors compared to graphical notations. They are compact for FSMs with few states and inputs, enabling easy automation in tools for , , and , and they support efficient hardware realization through direct mapping to . Additionally, tables clarify ignored events by including entries for non-effecting cases, promoting clarity in design. Consider the classic example, a coin-operated gate with two states: Locked and Unlocked. Inputs are coin insertion and push attempts, with outputs controlling the lock mechanism. The for this is as follows:
Current StateInputNext StateOutput
LockedcoinUnlockedunlock
LockedpushLockednone
UnlockedcoinUnlockednone
UnlockedpushLockedlock
This table fully captures the turnstile's behavior: a coin unlocks from Locked, a push locks from Unlocked, and extraneous actions yield no change. Despite their strengths, tabular representations face limitations in scalability for large state spaces, as the table size grows exponentially with the number of states and inputs, potentially leading to unwieldy matrices that hinder manual review. Unused states in encoded representations may also require additional logic to handle invalid entries, complicating implementation. For complex FSMs, complementary views like state diagrams may be needed for initial intuition, though tables excel in precision.

Classifications

Deterministic versus Nondeterministic

Finite-state machines can be classified as deterministic or nondeterministic based on how they handle transitions in response to inputs. In a deterministic finite-state machine (DFSM), the transition \delta: Q \times \Sigma \to Q is a total , ensuring that for each q \in Q and input symbol \sigma \in \Sigma, there is exactly one next \delta(q, \sigma). This property guarantees a unique computation path for any input sequence, making DFSMs predictable and suitable for implementations requiring unambiguous behavior. In contrast, a nondeterministic finite-state machine (NFSM) allows multiple possible next states for a given state and input. Its transition function is defined as \delta: Q \times \Sigma \to 2^Q, where $2^Q is the power set of Q, meaning \delta(q, \sigma) yields a set of possible next states, potentially empty, singleton, or larger. This nondeterminism models choice or parallelism, where the machine is considered to accept an input if at least one path leads to an accepting state. An extension, the \epsilon-NFSM (or NFSM with epsilon transitions), further allows spontaneous transitions without consuming input, via \delta: Q \times (\Sigma \cup \{\epsilon\}) \to 2^Q, where \epsilon denotes the and enables state changes for modeling spontaneity or optional steps. Despite these differences, NFSMs and \epsilon-NFSMs are equivalent to DFSMs in expressive power: every NFSM recognizes the same class of languages as some DFSM. This equivalence is established through the (or subset construction) algorithm, which converts an NFSM with n states into a DFSM whose states are subsets of the original set, resulting in up to $2^n states. The construction proceeds by defining the DFSM's initial as the set of all reachable states from the NFSM's start via \epsilon-closures (if applicable), and its transitions by taking the union of next states under \delta followed by \epsilon-closures. While effective, this can lead to exponential state growth in the worst case, highlighting a between nondeterminism's conciseness in design and determinism's efficiency in simulation.

Acceptors and Recognizers

In automata theory, an acceptor, also known as a finite-state acceptor, is a finite-state machine that determines whether a given input string belongs to a specified language by processing the string sequentially and deciding acceptance or rejection based solely on the final state reached. Upon consuming the entire input, the machine accepts the string if it ends in one of a designated set of accepting states; otherwise, it rejects the string. This binary decision mechanism positions acceptors as fundamental models for recognizing patterns in input sequences without producing additional outputs. The term recognizer is often used synonymously with acceptor, referring to a finite-state machine that computes the language it recognizes, denoted as L(M) \subseteq \Sigma^*, where \Sigma is the input and M is the machine. Both deterministic and nondeterministic finite-state machines can function as acceptors or recognizers, as the acceptance depends on the structure of states and transitions rather than the nature of . The L(M) consists precisely of those strings that lead to an accepting state after processing. The class of languages recognized by finite-state acceptors is known as the languages, which are characterized by their ability to be described by regular expressions or generated by grammars. languages exhibit closure properties under key operations: they are closed under , meaning if L_1 and L_2 are , then L_1 \cup L_2 is ; under , so L_1 \cap L_2 is ; and under complement, so the complement \Sigma^* \setminus L is for any L. These properties enable the construction of acceptors for complex languages by combining simpler ones via product constructions or expression manipulations. A subclass of acceptors known as classifiers extends the binary accept/reject decision to produce n-ary outputs, where n > 2, assigning input strings to one of multiple categories or class labels rather than a simple membership verdict. For instance, in tasks, a classifier might label strings as positive or negative based on final states, generalizing the acceptor's role in . A minimal example of an acceptor is the that recognizes binary strings of even length over the \Sigma = \{0, 1\}. This machine uses two states: an initial state q_e representing even length (accepting) and q_o representing odd length (non-accepting). Transitions alternate between these states on input 0 or 1: from q_e to q_o, and from q_o to q_e. The accepted is all even-length strings, such as \epsilon, 01, 10, but rejects odd-length strings like 0 or 11.

Transducers and Sequencers

Finite-state transducers extend finite-state machines by associating outputs with transitions, enabling them to map input strings over an input \Sigma to output strings over an output \Gamma. Formally, a (FST) is defined as a 5-tuple M = (Q, \Sigma, \Gamma, \delta, s), where Q is a of states, s \in Q is the start state, and \delta: Q \times \Sigma \to Q \times \Gamma^* is the transition function that specifies both the next state and an output string (possibly empty) for each input symbol. This structure allows FSTs to recognize a while simultaneously translating it into another , distinguishing them from acceptors, which produce no output beyond acceptance. FSTs are particularly valuable in for morphological analysis, where they model the mapping between surface forms of words and their underlying structures. For instance, they can parse inflected words by relating input letter sequences to output analyses of stems and affixes, supporting bidirectional operations like and generation. This application traces to foundational work by Kaplan and Kay, who demonstrated that phonological rewrite rules can be compiled into equivalent FSTs, enabling efficient processing of morphological rules as regular relations. Pioneering implementations, such as Koskenniemi's two-level , further leveraged FSTs to handle constraints between lexical and surface representations in finite-state frameworks. Two prominent subtypes of transducers are Mealy and Moore machines, which differ primarily in the timing of output generation relative to state changes. In a Mealy machine, outputs are produced directly on transitions, depending on both the current state and the input symbol, allowing immediate response to inputs but potentially requiring more complex synchronization in hardware implementations. This model, introduced by Mealy in 1955, facilitates compact designs where outputs reflect transitional behavior. Conversely, a Moore machine generates outputs solely based on the current state, independent of the immediate input, which simplifies output logic but introduces a one-step delay since outputs update only after transitions complete. Moore's 1956 formulation emphasized this state-centric approach for analyzing sequential machine experiments. The choice between them often balances responsiveness against design simplicity; Mealy machines typically require fewer states for equivalent functionality, while Moore machines enhance stability by decoupling outputs from inputs. Sequencers represent another variant of output-generating finite-state machines, operating autonomously without external inputs to produce predefined output over time or internal events. These are essentially cyclic or autonomous FSMs where transitions occur based on state alone or fixed timing, generating periodic patterns such as in counters or behavior sequencing in control systems. For example, a simple sequencer might cycle through states to output a repeating like 1010, functioning as a with an empty input alphabet. A practical illustration of a is a that accepts coin inputs and selections to dispense products while returning change. Consider a offering peanuts (P, 65¢) or Doritos (D, 45¢), with inputs including quarters (q, 25¢), half-dollars (h, 50¢), and return (R). Starting in state s, input P followed by q, q, h (total 100¢) transitions through states tracking selection and accumulated value, ultimately outputting P upon R while issuing +35 (35¢ change in nickels). This Mealy-style mapping ensures outputs like product dispensation and change occur on relevant transitions, modeling real-time input-output relations.

Applications

Software and Compiler Design

Finite-state machines are integral to in design, where they facilitate the tokenization of by recognizing patterns such as identifiers, literals, and keywords defined via regular expressions. The standard approach begins with converting regular expressions into nondeterministic finite automata (NFAs) using , which builds the NFA through recursive composition of subexpressions with transitions for , , and operations. This NFA is then transformed into a (DFA) via the subset construction algorithm, enabling linear-time scanning of the input stream to produce tokens without . In syntax analysis, shift-reduce parsers leverage finite-state machines to perform , maintaining a of symbols and using an underlying DFA to determine actions—shift the next input symbol onto the or reduce by applying a production rule—based on the current state and lookahead token. This FSM-driven control ensures efficient recognition of context-free grammars in languages like LR(0) and LALR(1), as implemented in tools such as or . Modern software libraries and tools continue to rely on FSMs for text processing in compilers. For instance, Flex, a widely used lexer generator, automates the creation of efficient C-based scanners by compiling user-specified regular expressions into DFAs, optimizing for speed through techniques like table-driven state transitions. An illustrative example is a DFA for keyword recognition in a programming language like C, where states represent partial matches (e.g., after reading 'i' for "if" or "int"), with distinct accepting states triggering token output upon full pattern completion, such as transitioning to accept "if" while rejecting invalid extensions like "iff".

Hardware and Control Systems

Finite-state machines form the basis of sequential circuits in digital hardware, where the current state is stored in flip-flops and transitions are computed using gates based on inputs and the present state. Synchronous designs synchronize these elements with a to ensure stable operation. The number of flip-flops required equals the logarithm base two of the number of states, with deriving next-state signals for the flip-flop inputs and output signals. The standard Huffman model encapsulates this hardware architecture, featuring flip-flops for state memory, for next-state and output generation, and a clock for , often including circuitry for initialization. For instance, a four-state controller might use two flip-flops to encode states in binary or , minimizing logic complexity through adjacent state assignments that share similar transitions. This model supports both machines, where outputs depend solely on the current state for enhanced stability, and Mealy machines, where outputs also incorporate inputs for faster response. In control systems, finite-state machines orchestrate behaviors, such as in vending machines that through states like user selection, waiting for money insertion, product delivery, and servicing to manage multi-item dispensing and auto-billing. controllers similarly employ FSMs to alternate between states, for example, north-south green and east-west green, triggered by sensors detecting vehicles and timed to ensure safe intervals of 30 seconds per phase. implementations in these controllers promote output stability by tying light signals directly to states, avoiding glitches from input changes. Network protocols leverage FSMs for reliable communication, as exemplified by the Transmission Control Protocol (TCP), which uses a state machine with phases including LISTEN for incoming connections, SYN-SENT and SYN-RECEIVED for handshake, ESTABLISHED for data transfer, and closing states like FIN-WAIT-1, CLOSE-WAIT, LAST-ACK, and TIME-WAIT to manage termination and lingering packets. Transitions occur on events such as SYN or FIN segments, user calls like OPEN or CLOSE, or timeouts, ensuring ordered and error-checked octet streams. Finite-state machines are synthesized into field-programmable gate arrays (FPGAs) and application-specific integrated circuits () using hardware description languages like , where state encodings and transition logic are described in modules that tools infer into flip-flops and gates during the design flow. This process supports efficient implementation by modeling states, inputs, and outputs in behavioral or structural code, optimized for the target hardware's timing and area constraints. A practical example is an modeled as an FSM with states such as idle (waiting for requests), moving (ascending or descending), and doors open (loading/unloading passengers), where transitions respond to floor sensors, button presses, and safety interlocks to sequence motor activation and door operations safely. In a simplified two-floor variant, the FSM shifts from a ground (red light on, green off) to a first-floor (red off, green on) on an up input, and reverses on a down input, using to drive indicators.

Implementation and Optimization

Practical Implementation Techniques

Finite-state machines (FSMs) can be implemented in software using procedural constructs like , which directly encode the current state and transitions based on inputs. In this approach, a represents the current state, and a evaluates it to execute state-specific logic and determine the next state. This method is straightforward for simple FSMs, as seen in code where states are enumerated constants and transitions are handled within clock or loops. For example, in applications, nested manage sequential behaviors like LED blinking patterns. For more modular software implementations, especially in , the State design encapsulates state-specific behaviors in separate classes, allowing the context object to delegate actions and transitions dynamically. This avoids monolithic conditional logic by defining an abstract State interface with methods for handling inputs, which concrete state classes implement. In , enums can extend this by associating each state with transition logic and actions, enabling type-safe FSMs where enum values override methods to process events and return the next state. For instance, an enum-based FSM for order processing might define states like PENDING and SHIPPED, each with a processPayment method that triggers transitions based on conditions. This approach enhances for medium-complexity systems. In hardware design, FSMs are realized using hardware description languages like or , where state registers store the current as a binary-encoded value, and computes the next state and outputs. The typically involves a synchronous always block sensitive to the clock edge, using a case statement to map current states and inputs to next states, while output logic is derived separately as functions of the state and inputs. For example, in , a 2-bit register holds up to four states, with transitions encoded as assignments within the case to ensure glitch-free operation. This Moore or Mealy model is synthesized into flip-flops and logic gates for FPGA or ASIC deployment. follows a similar with processes for sequential and combinational elements. Specialized tools facilitate FSM implementation in domain-specific contexts, such as parser generation with or , which produce code for shift-reduce parsers based on LALR(1) grammars. These tools construct an underlying where states represent parser configurations, and tables dictate shifts (pushing tokens) or reduces (applying rules) on input symbols, effectively implementing the FSM for syntactic analysis. 's output includes state tables that drive the parsing loop, resolving conflicts via precedence declarations. Similarly, Stateflow in enables graphical FSM modeling for control systems, where charts define hierarchical states, transitions with guards, and actions in or code, integrated with blocks for simulation and . States are drawn with entry/exit/do actions, and handles timing, supporting reusable subcharts for complex behaviors like mode switching in automotive systems. In embedded systems, hybrid FSM implementations combine polling-based state evaluation with interrupt-driven to handle asynchronous inputs efficiently. Here, the main loop polls for state transitions in a super-loop architecture, while interrupts populate event queues that trigger state changes, reducing latency for responses without busy-waiting. This approach suits resource-constrained microcontrollers, where FSMs manage peripherals like sensors, using message queues to differentiate and avoid conflicts. For instance, timer interrupts can simulate clock ticks for the FSM, blending procedural code with . A key challenge in practical FSM implementations, particularly for large designs, is state explosion, where the number of states grows exponentially due to concurrent components or intricate interactions, rendering exhaustive enumeration computationally infeasible. This occurs even in modest systems with multiple independent processes, as the state space multiplies combinatorially, complicating and . Mitigation involves hierarchical or abstraction techniques, but these limit full behavioral analysis.

State Minimization Methods

State minimization in finite-state machines (FSMs) seeks to construct an equivalent machine with the minimal number of states while preserving the original or output . This process reduces complexity, memory usage, and implementation costs without altering functionality, making it essential for optimizing designs in software and . For deterministic finite-state machines (DFSMs), the Myhill-Nerode provides the theoretical foundation, establishing that the minimal DFSM recognizing a is unique up to . The defines state equivalence based on the Nerode right : two states p and q are indistinguishable if, for every input string w, the machine starting from p accepts w if and only if it accepts w from q. This partitions the states into equivalence classes, where each class represents a single state in the minimal machine. The refinement algorithm realizes this theorem for DFSMs by iteratively merging indistinguishable states. Initially proposed by , it begins with a coarse —typically separating accepting and non-accepting states—and refines it by checking transitions: states in the same are split if they lead to different blocks under some input symbol. Refinement continues until no further splits occur, yielding the minimal ; the algorithm runs in O(n²) time for n states, where each iteration scans transitions to identify distinctions. Hopcroft's algorithm enhances this approach with a divide-and-conquer strategy, achieving O(n log n) . It maintains an initial and a of splitter sets (blocks that distinguish others), processing them to refine blocks more efficiently by only splitting when a non-trivial splitter is found, avoiding exhaustive pairwise checks. This improvement is particularly impactful for large automata, as demonstrated in analyses showing tight worst-case bounds. For nondeterministic finite-state machines (NDFSMs), direct minimization is computationally harder (), so the standard method involves first determinizing the NDFSM via subset construction to obtain a DFSM, potentially in size, and then applying DFSM minimization techniques like Hopcroft's algorithm. This two-step process yields a minimal equivalent NDFSM only indirectly, as the resulting DFA's states correspond to subsets of the original, but it ensures behavioral equivalence for the recognized language.

Extensions and Alternatives

Alternative Semantics

Alternative semantics of finite-state machines (FSMs) extend the classical deterministic or nondeterministic models by incorporating elements of , timing, or partial membership, thereby relaxing strict while maintaining a finite state space. These variants address limitations in modeling real-world systems where inputs may be probabilistic, time-dependent, or imprecise, allowing for more flexible representations in applications like and control. Unlike classical FSMs, which assume crisp transitions based on exact input symbols, alternative semantics introduce quantitative measures to handle variability. Probabilistic finite-state machines (PFSMs), also known as probabilistic automata, assign probabilities to transitions rather than deterministic outcomes, enabling the modeling of processes. Introduced by in 1963, PFSMs generalize finite automata by allowing each transition from a state on an input symbol to lead to a next state with an associated probability, where the sum of probabilities from any state on a given input equals one. These models are foundational to Markov chains and hidden Markov models (HMMs), where states may be unobserved, and transitions reflect probabilistic dependencies; for instance, PFSMs underpin sequence modeling in and bioinformatics by estimating the likelihood of input sequences. A key difference from classical FSMs is the shift from acceptance based on path existence to acceptance via probability thresholds, such as deeming a string accepted if the total probability of reaching an accepting state exceeds a predefined value. Timed automata represent another extension, integrating clock variables to constrain transitions based on elapsed time, suitable for specifying real-time behaviors in embedded systems. Formulated by Alur and Dill in 1994, a timed automaton augments a standard FSM with dense real-valued clocks that evolve uniformly and can be reset or tested against integer constants during transitions. This semantics relaxes the input-driven timing of classical FSMs by enforcing temporal guards, such as requiring a transition only after a clock exceeds 5 units but before it reaches 10, enabling verification of properties like bounded response times in protocols. Unlike purely discrete classical models, timed automata capture continuous time while preserving decidability for reachability through region graphs. Fuzzy finite-state machines (FFSMs) incorporate theory to allow states and transitions to have degrees of membership between 0 and 1, accommodating imprecise or uncertain environments. Pioneered by and Fu in 1969, FFSMs define transition functions that output fuzzy subsets of states, reflecting partial activations rather than choices. This approach differs from classical FSMs by replacing deterministic or probabilistic selections with graded possibilities, often using max-min compositions for fuzzy relations, which proves useful in control systems for handling noisy sensor data. For example, in a probabilistic acceptor variant adapted for fuzzy inputs, an FFSM might assign membership degrees to states based on partial matches in noisy , such as identifying distorted handwriting where classical models fail due to exact symbol requirements. Overall, these semantics maintain finiteness but broaden applicability by softening the boundaries of state changes.

Beyond Finite States

Finite-state machines (FSMs) occupy the lowest level of the , corresponding to Type-3 grammars that generate . These models are limited to recognizing patterns without memory beyond a of states, as formalized in early work on linguistic structures. A key limitation of FSMs is their inability to recognize non-regular languages, such as the set {a^n b^n | n ≥ 0}, which requires matching equal numbers of symbols in a way that demands unbounded counting. This is proven using the , which states that any sufficiently long string in a can be divided into segments where the first can be repeated without leaving the language; applying it to a^n b^n with n larger than the pumping length yields strings outside the set, contradicting regularity. To address these limitations, pushdown automata extend FSMs by incorporating an unbounded , enabling recognition of context-free languages (Type-2 in the ), such as balanced parentheses or programming language syntax. This addition allows the model to handle nested or recursive structures that exceed finite memory. Hierarchical state machines, exemplified by Statecharts, introduce nested states and to manage in large systems, allowing substates and concurrent behaviors without exploding the state space exponentially. Developed as a visual extension of traditional FSMs, they facilitate modeling reactive systems like user interfaces or embedded controllers. In stochastic settings, infinite-state Markov chains generalize FSMs by permitting countably infinite states, modeling processes like queueing systems or random walks where the state space grows without bound while preserving the Markov property of memoryless transitions. These serve as limits of finite models in analyzing long-term behaviors in probabilistic systems. Extensions beyond finite states are necessary when applications involve nested dependencies, unbounded memory requirements, or infinite possibilities, such as in parsing context-free grammars or simulating continuous stochastic phenomena.

References

  1. [1]
    [PDF] 3 Finite-State Machines - Jeff Erickson
    Finite-state machines were first formally defined in the mid-20th century, but people have been building automata for centuries, if not millennia.Missing: history | Show results with:history
  2. [2]
    Basics of Automata Theory - Stanford Computer Science
    Finite-state machines are ideal computation models for a small amount of memory, and do not maintain memory. This mathematical model of a machine can only reach ...
  3. [3]
    [PDF] Finite State Machines: Definitions; Verification
    A (deterministic) finite state machine consists of: – A finite number of states, where one state is designated as the initial.
  4. [4]
    [PDF] Finite Automata and Their Decision Proble'ms#
    Abstract: Finite automata are considered in this paper as instruments for classifying finite tapes. Each one- tape automaton defines a set of tapes, ...
  5. [5]
    [PDF] Representation of Events in Nerve Nets and Finite Automata - RAND
    REPRESENTATION OF EVENTS. IN NERVE NETS AND PINITE AUTOMATA. s. c. Kleene. INTRODUCTION: RM-704. 1. Stimulus and Response: An organism or robot receives certain ...
  6. [6]
    [PDF] Regular Languages and Finite Automata - Computer Science
    Sep 16, 2010 · In a 1959 paper [5], Michael Rabin and Dana Scott presented a comprehensive study of the theory of finite automata, for which they received ...
  7. [7]
    Regular expressions and finite state automata Lecture 6
    Feb 17, 2024 · Turnstile states: locked and unlocked · Turnstile transitions: push and coin · Transition move from state to state. E.g., coin causes unlock, push ...
  8. [8]
    [PDF] CSE 105
    Example: subway turnstile. • A subway turnstile is locked until a token ... Sequence of states in the machine, starting with the initial state, determined.<|control11|><|separator|>
  9. [9]
    [PDF] UML Tutorial: Finite State Machines - UCSB
    What is a Finite State Machine? Consider a subway turnstile. This simple device is governed by an equally simple FSM. Figure 1 shows part of that FSM.
  10. [10]
    Finite-State Machine - an overview | ScienceDirect Topics
    A Mealy FSM is a finite state machine where the outputs are determined by the current state and the input. This means that the state diagram will include an ...
  11. [11]
    9.1.1: Finite-State Machine Overview - Engineering LibreTexts
    Apr 29, 2021 · An example of a simple mechanism that can be modeled by a state machine is a turnstile. A turnstile, used to control access to subways and ...Example: coin-operated turnstile · Representations · Usage · Classification
  12. [12]
    What Is a State Machine? - MATLAB & Simulink - MathWorks
    A state machine (or finite state machine) is a representation of an event-driven, reactive system that transitions from one state to another.
  13. [13]
    Mealy Machine - an overview | ScienceDirect Topics
    A Mealy Machine is a finite state machine with states, input/output symbols, transition and output functions, where output depends on current state and input.Missing: original | Show results with:original
  14. [14]
    A Method for Synthesizing Sequential Circuits - Mealy - 1955
    A new method of synthesis is developed which emphasizes formal procedures rather than the more familiar intuitive ones.Missing: original | Show results with:original
  15. [15]
  16. [16]
    [PDF] FINITE STATE MACHINE: PRINCIPLE AND PRACTICE
    The main application of an FSM is to realize operations that are performed in a sequence of steps.
  17. [17]
    None
    ### Summary of Transitions and Events in Finite State Machines (Yacoub and Ammar, Chapter 10)
  18. [18]
    [PDF] Nondeterministic Finite Automata
    In a nondeterministic finite automaton (NFA), for each state there can be zero, one, two, or more transitions corresponding to a particular symbol.
  19. [19]
    [PDF] Regular Languages
    Dead States. A DFA may have a dead state, a state which is not final, and which the machine cannot leave, regardless of the remaining inputs.<|control11|><|separator|>
  20. [20]
    [PDF] Introduction to Automata Theory, Languages, and Computation
    Hopcroft, John E., 1939-. Introduction to automata theory, languages, and computation / John E. Hopcroft, Rajeev Motwani, Jeffrey D. Ullman.-2nd ed. p. cm. ISBN ...
  21. [21]
    [PDF] Regular Languages and Finite Automata
    We will be making use of mathematical models of physical systems called finite automata, or finite state machines to recognise whether or not a string is in a ...
  22. [22]
    [PDF] Finite State Machines - Robotics
    Nov 24, 2023 · The given formal definition of an FSM ensures that it is deterministic, since the transition function δ is a function, not a one-to-many mapping ...
  23. [23]
    [PDF] Formal Definition of DFA
    Finite Automata. Defining the computation of an FA M=(Q,Σ,q. 0. ,A,δ). Extended transition function δ* : Q×Σ* → Q : 1) For every q ∈ Q, let δ*(q,Λ) = 2) For ...
  24. [24]
    Finite State Machine | Our Pattern Language
    Finite state machine (FSM) allows for the concept of history, which is referred to as a state. A current state is determined by past states of the system.Context · Solution · Example · Known Uses
  25. [25]
    [PDF] 3 Finite-State Machines
    A finite-state machine is a formal model of any system/machine/algorithm that can exist in a finite number of states and that transitions among those states ...
  26. [26]
    [PDF] Finite State Machines - MIT
    Moore and Mealy FSMs : different output generation outputs yk. = f k. (S) inputs x0...xn. • Moore FSM: Comb. Logic. CLK n. Registers. Comb. Logic. D. Q present ...
  27. [27]
  28. [28]
    Kleene's Theorem --- Part 1
    It states that any regular language is accepted by an FA and conversely that any language accepted by an FA is regular. Theorem 1 (Part 1 of Kleene's theorem): ...
  29. [29]
    Finite State Machines | Sequential Circuits | Electronics Textbook
    Up to now, every circuit that was presented was a combinatorial circuit. That means that its output is dependent only by its current inputs.
  30. [30]
    [PDF] Finite State Machines - Cornell: Computer Science
    (1) Draw a state diagram. (2) Write output and next-state tables. (3) Encode states, inputs, and outputs as bits. (4) Determine logic equations for next ...<|separator|>
  31. [31]
    UML State Machine Diagrams - Overview of Graphical Notation
    Entry actions of states entered on the implicit direct path from the deep history to the innermost state(s) represented by a deep history are performed. The ...Missing: extensions | Show results with:extensions
  32. [32]
    [PDF] Specification and Description Language (SDL)
    SDL defines clear interfaces between blocks and processes by means of a combined channel and signal route architecture. This communication architecture with ...
  33. [33]
    [PDF] ITU-T Rec. Z.100 (11/99) Specification and description language ...
    This Recommendation defines SDL (Specification and Description Language) intended for unambiguous specification and description of telecommunications systems.
  34. [34]
    Statecharts: a visual formalism for complex systems - ScienceDirect
    We present a broad extension of the conventional formalism of state machines and state diagrams, that is relevant to the specification and design of complex ...<|separator|>
  35. [35]
    State Machines and Petri Nets - UNC Computer Science
    State Machines and Petri Nets Overview, Modeling Process and Structure, finite state machine (FSM), Petri net (Pnet), Basic finite state machines.Basic finite state automata · Formal languages · Basic Petri nets
  36. [36]
    [PDF] State Machine Design
    Those parts of digital systems whose outputs depend on their past inputs as well as their current ones can be modeled as finite state machines. The “history ...
  37. [37]
    L06: Finite State Machines - Computation Structures
    A finite state machine has a periodic CLOCK input. A rising clock edge will trigger the transition from the current state to the next state. The FSM has a some ...<|control11|><|separator|>
  38. [38]
    Finite state machine - University of Washington
    A finite state machine can be represented by a diagram, a table, or Z notation. The diagram shows states and transitions, the table shows the next state for ...Missing: explanation | Show results with:explanation
  39. [39]
    Model Finite State Machines Using State Transition Tables
    In a state transition table, rows represent the states in your system. The transition columns specify the conditions, condition actions, and destination states ...Program a State Transition Table · Create a State Transition Table
  40. [40]
    [PDF] Introduction to Automata Theory, Languages, and Computation
    Hopcroft, John E., 1939-. Introduction to automata theory, languages, and computation / John E. Hopcroft, Rajeev Motwani, Jeffrey D. Ullman.-2nd ed. p. cm ...
  41. [41]
    [PDF] ON THE SYNTHESIS OF FINITE-STATE ACCEPTORS - DTIC
    We introduce a number of definitions largely following the notation of Ginsburg [6]. Definition 2.1. A nondetenministic automaton A is a five-tuple. QE, f, Qo, ...
  42. [42]
    [PDF] Theoretical Computational Linguistics: Finite-state Automata
    Feb 11, 2025 · The term acceptor means this machine solves membership problem: ... When the automata are finite-state, it means that the memory they require.
  43. [43]
    [PDF] Chapter 1 - Introduction and Basic Definitions
    Briefly, a deterministic finite automaton, also called a recognizer or acceptor, is a mathematical model of a finite-state computing device that recognizes a ...<|control11|><|separator|>
  44. [44]
  45. [45]
    [PDF] Closure Properties of Regular Languages - Stanford InfoLab
    ◇Recall a closure property is a statement that a certain operation on languages, when applied to languages in a class. (e.g., the regular languages), ...
  46. [46]
    [PDF] 1 Closure Properties
    Regular Languages are closed under complementation, i.e., if L is regular then. L = Σ∗ \ L is also regular. Proof. • If L is regular, then there is a DFA M = (Q ...
  47. [47]
    [PDF] 1 Introducing Finite Automata - CS 373: Theory of Computation
    Figure 14: Automaton accepting strings of even length. Pattern Recognition. Problem. Design an automaton that accepts all strings over {0,1} that have 001 as ...
  48. [48]
    [PDF] Lecture Notes: Finite State Transducers 1 Defining FST
    Definition 1 A Finite State Transducer (FST) is a 5-tuple M = (Q,Σ,Γ, δ, s) where. • Q is a finite set of states,. • Σ is a finite set of input symbols,. • Γ ...
  49. [49]
    [PDF] Finite-State Transducers in Language and Speech Processing
    These transducers have been successfully used in the representation of large-scale dictionaries, computational morphology, and local grammars and syntax. We ...
  50. [50]
    [PDF] Lecture 15. Finite State Transducers and OT Issues
    Nov 16, 2004 · A finite state transducer is a finite state automaton in which the members of Σ (the symbols labeling the arcs) are pairs, triples, etc., rather ...
  51. [51]
    BSTJ 34: 5. September 1955: A Method for Synthesizing Sequential ...
    Jan 19, 2013 · Bell System Technical Journal, 34: 5. September 1955 pp 1045-1079. A Method for Synthesizing Sequential Circuits. (Mealy, George H ... PDF WITH ...
  52. [52]
  53. [53]
    Automata Studies. (AM-34) on JSTOR
    GEDANKEN-EXPERIMENTS ON SEQUENTIAL MACHINES. (pp. 129-154). Edward F. Moore ... K. de Leeuw, E. F. Moore, C. E. Shannon and N. Shapiro. https://www.jstor ...
  54. [54]
    Edward F. Moore. Gedanken-experiments on sequential machines ...
    Gedanken-experiments on sequential machines. Automata studies, edited by CE Shannon and J. McCarthy, Annals of Mathematics studies no. 34, litho-printed, ...
  55. [55]
    [PDF] Finite State Transducers; Specifying Control Logic
    A finite state transducer is a variant of the notion of a finite state machine. • Recall that a finite state machine corresponds to a language, i.e., to.
  56. [56]
    [PDF] ARMS: Autonomous Robots for Military Systems
    Feb 28, 2001 · An FSM can be in one state at a ... Originally computed via an A* algorithm, the spatial reasoner mod- ule uses a finite state sequencer.
  57. [57]
    Finite State Transducers
    A finite state transducer is illustrated with a transition diagram such as the one in Figure 9.4. A transition diagram is a labeled directed graph whose ...
  58. [58]
    [PDF] Regular expression search algorithm - Oil Shell
    Volume 11 / Number 6 / June, 1968. Communications of the ACM. 419. Page 2. current search path. It is represented by @ with one input path and two output paths ...
  59. [59]
    [PDF] Lexical Analysis Finite Automata
    Finite automata are formal models of computation that can accept regular languages corresponding to regular expressions.
  60. [60]
    [PDF] MIT 6.035 Introduction to Shift-Reduce Parsing
    Consists of. • Pushdown stack (can have terminals and nonterminals). • Finite state automaton control. • Can do one of three actions (based on state and ...
  61. [61]
    Shift/Reduce Parsing - Compiler Construction
    As mentioned above, for all LR parsers, the states that are pushed onto the stack represent the states in an underlying finite-state machine. Each state ...
  62. [62]
    Lexical Analysis With Flex, for Flex 2.6.2: Top - Will Estes
    Oct 22, 2016 · This manual describes flex , a tool for generating programs that perform pattern-matching on text. The manual includes both tutorial and ...Can I get the flex manual in... · How does flex compile the... · A.1 Makefiles and Flex
  63. [63]
    [PDF] From strings to ASTs (1): finite state automata for lexing
    A finite state automaton (FSA) is a tuple A = (A,S,i,F,R) such that the following is true. ▷ A is a finite set, called the alphabet of the automaton.
  64. [64]
    [PDF] Analysis and Design of Finite State Machines
    Synchronous sequential circuits are realized using combinational logic and flip-flops. Sequential circuits are also referred to as Finite State. Machines (FSM) ...
  65. [65]
    [PDF] ELEC 2200-002 Digital Logic Circuits Fall 2014 Sequential Circuits ...
    The general hardware architecture of an FSM, known as Huffman model, consists of: Flip-flops for storing the state. Combinational logic to generate outputs and ...
  66. [66]
    Finite State Machine based Vending Machine Controller with Auto ...
    May 16, 2012 · Finite State Machine (FSM) modelling is the most crucial part in developing proposed model as this reduces the hardware.
  67. [67]
    [PDF] Finite state machine (FSM) Traffic light control example
    Sensors (inputs) in each lane to detect car. • NScar: a car in either the north or south bound lanes. • EWcar: a car in either the east or west bound lanes.
  68. [68]
  69. [69]
    Verilog Tutorial - ASIC World
    This page contains Verilog tutorial, Verilog Syntax, Verilog Quick Reference, PLI, modelling memory and FSM, Writing Testbenches in Verilog, Lot of Verilog ...Verilog Synthesis Tutorial · Verilog In One Day · Verilog Operators · Introduction
  70. [70]
  71. [71]
    [PDF] Example finite state machine - cs.Princeton
    In this example, we'll be designing a controller for an elevator. The elevator can be at one of two floors: Ground or First.
  72. [72]
    Finite State Machine Using Switch Statement. - Arduino Forum
    Dec 15, 2012 · A switch statement is a commonly used structure to implement a FSM. Nested switches can work for more complex problems, but I'd start out simple.Missing: pattern | Show results with:pattern
  73. [73]
    State - Refactoring.Guru
    State is a behavioral design pattern that lets an object alter its behavior when its internal state changes. It appears as if the object changed its class.
  74. [74]
    Implementing Simple State Machines with Java Enums | Baeldung
    Jan 25, 2024 · In this tutorial, we'll have a look at State Machines and how they can be implemented in Java using Enums. We'll also explain the advantages ...
  75. [75]
    Creating Finite State Machines in Verilog - Technical Articles
    Jan 1, 2021 · This article describes the basics of finite state machines and shows a practical way of implementing them in the Verilog Hardware Description Language.
  76. [76]
    Finite State Machines in Hardware: Theory and Design (with VHDL ...
    30-day returnsA comprehensive guide to designing hardware-implemented finite state machines, featuring detailed examples in VHDL and SystemVerilog languages with practical ...
  77. [77]
    Bison 3.8.1
    Summary of each segment:
  78. [78]
    Model a Finite State Machine - MATLAB & Simulink - MathWorks
    Model a finite state machine in Stateflow by creating a chart, drawing states for operating modes, and transitions between them. Create a Simulink model with ...
  79. [79]
    Finite State Machines (FSM) in Embedded Systems (Part 4)
    May 22, 2024 · This post aims to give you a general overview of what to expect when designing and implementing a concurrent system without going into specific ...
  80. [80]
    The state explosion problem | SpringerLink
    The state explosion problem occurs when the number of states a system can reach is too large to handle realistically, when using state space methods.
  81. [81]
    [PDF] an/n log n algorithm for minimizing - CMU School of Computer Science
    AN n log n ALGORITHM FOR MINIMIZING STATES IN A FINITE AUTOMATON. John Hopcroft. Stanford University. Introduction. Most basic texts on finite automata give ...
  82. [82]
    Moore Edward F.. Gedanken-experiments on sequential machines ...
    Aug 6, 2025 · Gedanken-experiments on sequential machines. Automata studies, edited by Shannon C. E. and McCarthy J., Annals of Mathematics studies no. 34, litho-printed, ...
  83. [83]
    (PDF) Hopcroft's algorithm and tree-like automata - ResearchGate
    Aug 9, 2025 · PDF | Minimizing a deterministic finite automata ... Algorithm for Minimizing States in a Finite Automaton. Article. Jan 1971. John Hopcroft.
  84. [84]
  85. [85]
    [PDF] Syntactic Minimization Of Nondeterministic Finite Automata - DROPS
    The classical algorithm for state minimization of nfas is the Kameda-Weiner method [18], recently given a fresh perspective based on atoms of regular ...
  86. [86]
    Probabilistic automata - ScienceDirect.com
    Probabilistic automata (pa) are a generalization of finite deterministic automata. We follow the formulation of finite automata in Rabin and Scott (1959).Missing: seminal | Show results with:seminal<|control11|><|separator|>
  87. [87]
    [PDF] A theory of timed automata* - CIS UPenn
    Alur, R. and D.L. Dill, A theory of timed automata, Theoretical Computer Science 126 (1994). 183-235. We propose timed (j&e).Missing: seminal | Show results with:seminal
  88. [88]
    [PDF] TIIKEE MODELS FOR TIE DESCRIPTION OF LANGUAGE
    We study the formal properties of a set of grammatical trans- formations that carry sentences with phra.se structure into new sentences with derived phrase.
  89. [89]
    [PDF] proving languages not regular using Pumping Lemma
    The Pumping Lemma is used for proving that a language is not regular. Here is the Pumping Lemma. If L is a regular language, then there is an integer n > 0 ...
  90. [90]
    [PDF] Finite-State Machines and Pushdown Automata
    The FSM has proven to be a very useful model for many practical tasks and deserves to be among the tools of every practicing computer scientist.
  91. [91]
    [PDF] Statecharts: A Visual Formalism for Complex Systems
    Finite state machines and their corresponding state-transition diagrams (or state diagrams for short) are the formal mechanism for collecting such fragments.
  92. [92]
    [PDF] Markov chain convergence: from finite to infinite - probability.ca
    In this paper, we consider the extent to which bounds for finite Markov chains can be extended to infinite chains. ... In this section we consider extensions of ...
  93. [93]
    [PDF] Context-Free Languages and Pushdown Automata
    The presentation focuses on two basic tools: context-free grammars and pushdown automata. These are indeed the standard tools to generate and to recognize ...