中山資工-離散期中考

536 views
Skip to first unread message

Jason Wang

unread,
Dec 18, 2014, 5:10:06 AM12/18/14
to
不好意思,又要麻煩助教了

關於下列這題畫出FSM,我不是很確定我的答案(如附圖)

(a) Construct a state diagram for a finite state machine with I = O = {0, 1}
that recognizes all strings in the language {11} {0, 1}* {00}, where I is the input 
alphabet and O is the output alphabet of the machine.

(b) Construct a state 
diagram for a finite state machine that recognizes all strings in {11} {01}* {00}.


FSM.jpg

林立宇

unread,
Dec 21, 2014, 10:33:18 AM12/21/14
to zjh...@googlegroups.com
這樣畫會有些問題
你設計的FSM變成是一旦過程中有出現"子字串"為題目要的, 那就會接受
但題目要的字串應該是嚴格要求開始為11
所以當一開始不是11時, 你不能讓它繞回前面的state重跑
應該要直接reject之後所有的可能
也就是說你可以造一個state, 讓一開始不是11的都直接連到那個state
在那個state中, 不管是輸入0還是1, output都是0

Jason Wang

unread,
Dec 21, 2014, 11:48:46 AM12/21/14
to zjh...@googlegroups.com
謝謝助教幫我突破盲點!!

一直自以為substring的時候也能被recognized

我一整個被老師考倒了= =
現在覺得自己是個很弱的助教...

下圖是新畫的,麻煩助教再過目一下。




10846650_779039922149637_1770819745_n.jpg

林立宇

unread,
Dec 25, 2014, 6:58:43 AM12/25/14
to zjh...@googlegroups.com
看起來沒問題了
不用怕弱, 很多人也都是邊教邊學
當助教是很好的學習機會, 加油!

Jason Wang

unread,
Dec 25, 2014, 7:11:54 AM12/25/14
to zjh...@googlegroups.com
謝謝助教

在這裡也祝福大家能考上理想的研究所!!
Reply all
Reply to author
Forward
0 new messages