馬可夫演算法

馬可夫演算法係用咗類似形式文法嘅規則喺符號串上操作嘅字符串重寫系統。

例子 
以下係一個馬可夫演算法嘅例子。

規則 
"A" -> "apple"
"B" -> "bag"
"S" -> "shop"
"T" -> "the"
"the shop" -> "my brother"
"a never used" -> ."terminating rule"

輸入 
"I bought a B of As from T S."

執行 
如果段馬可夫演算法收到呢個輸入，段演算法會以以下嘅步驟改變串字：
"I bought a B of As from T S."
"I bought a B of apples from T S."
"I bought a bag of apples from T S."
"I bought a bag of apples from T shop."
"I bought a bag of apples from the shop."
"I bought a bag of apples from my brother."

然後段演算法終結。

運算理論

演算法