NTU-Exam 板


LINE

課程名稱︰計算理論 課程性質︰選修 課程教師︰顏嗣鈞 開課學院:電資學院 開課系所︰電機系 考試日期(年月日)︰2011/11/14 考試時限(分鐘):9:10 ~ 12:00 是否需發放獎勵金:是 (如未明確表示,則不予發放) 試題 : Theory of Comutation Midterm Exam, Nov. 14,2011 1. (21 pts) Are the following statements true of false.Justify by a proof or a suitable counterexample. (a) If L_1 is finite and L_1 ∪ L_2 is regular then L_2 is regular. (b) If L_1 is regular (and infinite) and L_1 . L_2 is regular then L_2 is regular. (c) If L^* is regular,so is L. (d) Consider a language L and a homomorphism h. If h(L) is regular ,then L is always regualr. (e) Let L_1 ⊆L_2 (over alphabet Σ) both be regular languages. If L_2 can be accepted by a DFA with n states ,then L_1 can always be accepted by some DFA with no more than n states. (f) (R∪S)^* =R^* ∪ S^* ,where R and S are two languages. (g) (R∩S)T=RT∩ST, where R,S and T are languages. 2. (4 pts) Give a regular expression for the language containing all strings of 0's and 1's such that every pair of adjacent 0's appears before any pair of adjacent 1's. (Fpr example,01001011011 is in the language,while 011001011 is not.) ─ ─ 3. (10 pts) A shuffle of two strings x,y∈Σ^* denoted by x||y is the set of strings that can be obtained by interleaving the strings x and y in any manner. For example ab||cd ={abcd,acbd,acdb,cabd,cadb,cdab}. (The strings need not be of the same length.) For two sets of strings A,B , the shuffle is defined as A||B=∪_x∈A ,y∈B x||y. Prove that if both A and B are regular,then A||B is also regular. 4. (10 pts) Define L_1 # L_2 ={x#y | x∈L_1 ,y∈L_2 , |x|=|y|},where # is a new symbol. Is the following statement true or false ? Justify your answer. ─If L_1 and L_2 are regular ,then L_1 # L_2 is also regular. 5. (10 pts) Use the pumping lemma to show that L={0^n l^m|n,m≧1 and m leaves a remainder of 3 when divided by n} is not regular.(For example,0^4 1^7, 0^5 1^13 are in L.) (Hint: Let p be the pumping constant.Take ω=0^p+4 1^p+7.) 6. (10 pts) Given a language L⊆Σ^* and two strings x,y∈Σ^* , x≡_L y iff ∀z∈Σ^* , xz∈L ⇔ yz∈L.Give the ≡_L equivalence classes of the language L=a^*ba^*. Also draw a minimum DFA accepting L. 7. (10 pts) Let L be a language. Show that if every subset of L is regular, then L must be finite (i.e.,containing a finite number of strings). (Hint:Prove it by contradiction. Note that for every ω'∈ L such that |ω'| > 2|ω|).(|ω| denotes the length of ω.) Use the pumping lemme if needed.) 8. (10 pts) Consider the ε-NFA defined in Figure 1 (where → and * mark the initial and final states,respectively): ─────────────── │ │ ε │ a │ b │ c │ ─────────────── │→p │ Φ │{p} │{q} │{r} │ ─────────────── │q │{p} │{q} │{r} │Φ │ ─────────────── │*r │{q} │{r} │Φ │{p} │ ─────────────── Figure 1 : Anε-NFA (a) (4 pts) Compute the ε-closure of each state. (b) (6 pts) Convert the automaton to a DFA, 9. (15 pts) Consider the DFA given in Fingure 2.Suppose we want to find an equivalent minimum DFA. (a) (10 pts) Use the table filling method discussed in class to find all distinguishable pairs of states. Shoe T[i,j] for 1<= i < j <= 4. Mark T[i,j] with an ”X“ if there exists a string ω that can tell i and j apart as far as reaching a final state is concerned. Show your work in sufficient detail. (b) (5 pts) Draw the minimum DFA. ╭ ╮ b ╭╭ ╮╮ → 1 ←──────────── 2 ╰ ╯ ╰╰ ╯╯ │ │ ↑ ↑│ │ │b │ ││ │ │ a │ ││ │ │ ╭ ╮──── ││ │ ──────→ 3 ││ │ ╰ ╯ ││ │ │ ││ │ │ ││ │ │b a││a │ │ ││ │a │ ││ │ ↓ ││ ────────→ ╭ ╮────── │ 4 ←────── ╰ ╯ ↑│ ─ b Figure 2 : A DFA. ※ 編輯: nihility7893 來自: 140.112.25.106 (01/15 14:44)







like.gif 您可能會有興趣的文章
icon.png[問題/行為] 貓晚上進房間會不會有憋尿問題
icon.pngRe: [閒聊] 選了錯誤的女孩成為魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一張
icon.png[心得] EMS高領長版毛衣.墨小樓MC1002
icon.png[分享] 丹龍隔熱紙GE55+33+22
icon.png[問題] 清洗洗衣機
icon.png[尋物] 窗台下的空間
icon.png[閒聊] 双極の女神1 木魔爵
icon.png[售車] 新竹 1997 march 1297cc 白色 四門
icon.png[討論] 能從照片感受到攝影者心情嗎
icon.png[狂賀] 賀賀賀賀 賀!島村卯月!總選舉NO.1
icon.png[難過] 羨慕白皮膚的女生
icon.png閱讀文章
icon.png[黑特]
icon.png[問題] SBK S1安裝於安全帽位置
icon.png[分享] 舊woo100絕版開箱!!
icon.pngRe: [無言] 關於小包衛生紙
icon.png[開箱] E5-2683V3 RX480Strix 快睿C1 簡單測試
icon.png[心得] 蒼の海賊龍 地獄 執行者16PT
icon.png[售車] 1999年Virage iO 1.8EXi
icon.png[心得] 挑戰33 LV10 獅子座pt solo
icon.png[閒聊] 手把手教你不被桶之新手主購教學
icon.png[分享] Civic Type R 量產版官方照無預警流出
icon.png[售車] Golf 4 2.0 銀色 自排
icon.png[出售] Graco提籃汽座(有底座)2000元誠可議
icon.png[問題] 請問補牙材質掉了還能再補嗎?(台中半年內
icon.png[問題] 44th 單曲 生寫竟然都給重複的啊啊!
icon.png[心得] 華南紅卡/icash 核卡
icon.png[問題] 拔牙矯正這樣正常嗎
icon.png[贈送] 老莫高業 初業 102年版
icon.png[情報] 三大行動支付 本季掀戰火
icon.png[寶寶] 博客來Amos水蠟筆5/1特價五折
icon.pngRe: [心得] 新鮮人一些面試分享
icon.png[心得] 蒼の海賊龍 地獄 麒麟25PT
icon.pngRe: [閒聊] (君の名は。雷慎入) 君名二創漫畫翻譯
icon.pngRe: [閒聊] OGN中場影片:失蹤人口局 (英文字幕)
icon.png[問題] 台灣大哥大4G訊號差
icon.png[出售] [全國]全新千尋侘草LED燈, 水草

請輸入看板名稱,例如:WOW站內搜尋

TOP