Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Lecture9a_FSM.doc
Скачиваний:
3
Добавлен:
19.11.2019
Размер:
5.49 Mб
Скачать

Formal definition

A Mealy machine is a 6-tuple, (S, S0, Σ, Λ, T, G), consisting of the following:

  • a finite set of states (S)

  • a start state (also called initial state) S0 which is an element of (S)

  • a finite set called the input alphabet (Σ)

  • a finite set called the output alphabet (Λ)

  • a transition function (T : S × Σ → S) mapping a state and the input alphabet to the next state

  • an output function (G : S × Σ → Λ) mapping each state and the input alphabet to the output alphabet.

Example 1.

Электронные часы разнообразных функциональных возможностей являются одним из наиболее широко применяемых в быту электронных приборов, управление которыми построено на основе конечно-автоматной модели. Они обычно показывают: время, дату; у них имеется функции такие как "установка времени и даты", "Секундомер", "Будильник"и т.п. Упрощенная структурная схема электронных часов показана на рис.1.5

Fig.13. Электронные часы.

Регистры отображают либо время, либо дату, либо секундомер в зависимости от "Управления". Устройство управления построено на основе модели конечного автомата. Конечный автомат реагирует на нажатия кнопки "а" на корпусе переходом в состояние "Установка минут", в котором событие нажатия кнопки "b" вызовет увеличение числа. Устройство управления построено на основе модели конечного автомата, граф которого показан на рис.1.6 .

Fig.13. The state diagram of an electronic watch.

Моноид — полугруппа с нейтральным элементом. Таким образом, моноидом называется множество M, на котором задана бинарная ассоциативная операция, обычно именуемая умножением, и в котором существует такой элемент e, что e x x x e для любого …

Диаграмма состояний электронных часов.

A classic form of a state diagram for a finite state machine is a directed graph with the following elements:

  • States Q: a finite set of vertices normally represented by circles and labeled with unique designator symbols or words written inside them;

  • Input symbols Σ: a finite collection of input symbols or designators;

  • Output symbols Z: a finite collection of output symbols or designators;

The output function ω represents the mapping of input symbols into output symbols, denoted mathematically as ω : Σ × QZ.

  • Edges δ: represent the "transitions" between two states as caused by the input (identified by their symbols drawn on the "edges"). An 'edge' is usually drawn as an arrow directed from the present-state toward the next-state. This mapping describes the state transitions that is to occur on input of a particular symbol. This is written mathematically as δ : Σ × QZ

  • Start state q0: (not shown in the examples below). The start state is usually represented by an arrow with no origin pointing to the state. In older texts, the start state is not shown and must be inferred from the text.

Accepting state(s) F: If used, for example for accepting automata, is the accepting state. It is usually drawn as a double circle. Sometimes the accept state(s) function as

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]