十年

  :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

有限狀態自動機

Finite automaton 有限狀態自動機

 

【例題】如何描述從家裡開車到學校的決策行為過程?

【題解】利用finite automata 來描述整個行為的決策過程。

 

   

上圖可以用下表表示之:

 

狀態\輸入

啟動

綠燈

紅燈

到家

停車

開車

 

 

 

開車

 

開車

剎車

停車

剎車

 

開車

剎車

 

 

l          有限狀態集合(a finite set of states) = {停車, 開車, 剎車}

l          有限輸入集合(a finite set of permissible input symbols) = {啟動, 紅燈, 綠燈, 到家}

l          上表為「狀態轉換規則」(state transition function)

l          起始狀態(initial state)及最終狀態(final state)均為停車(必為「有限狀態集合」之元素)

 

【定義】

A nondeterministic finite automaton is a 5-tuple M = (Q, E, D, I, F), where

(1) Q is a finite set of states;

(2) E is a finite set of permissible input symbols;

(3) D is called the state transition function, which is a mapping from Q X E to Q;

(4) I, an element of Q, is the initial state 

(5) F, a subset of Q, is the set of final states.

 

 

 

 

posted on 2005-02-17 09:33  留不住的时光  阅读(528)  评论(0)    收藏  举报