tailieunhanh - Lecture note Theory of automata - Lecture 8

Lecture Theory of automata - Lecture 8 presents the following content: TG definition, Examples: accepting all strings, accepting none, starting with b, not ending in b, containing aa, containing aa or bb. | Lecture # 17 Theory Of Automata By Dr. MM Alam 1 1 Lecture 16 Recap . Transducers Example 2 Regular Languages Introduction Regular Languages Union, Concatenation, Closure also results in a regular language Complement of a regular language and Intersection with another language also results in a regular language 2 Theorem 12 Two languages over Σ = {a,b} L1 = all strings with a double a L2 = all strings with an even number of a's. L1 and L2 are not the same, since aaa is in L1 but not in L2 and aba in in L2 but not in L1 Example 3 Theorem 12 L1 and L2 are regular languages defined by the regular expressions below. r1 = (a + b)*aa(a + b)* r2 = b*(ab*ab*)* A word in L2 can have some b’s in the front But whenever there is an a, it balanced by an other a (after some b’s). Gives the factor of the form (ab*ab*) The words can have as many factors of this from as it wants. It can end an a or ab. Example 4 Theorem 12 These two languages can also be defined by FA (Kleen’s theorem) Example FA1 FA2 | Lecture # 17 Theory Of Automata By Dr. MM Alam 1 1 Lecture 16 Recap . Transducers Example 2 Regular Languages Introduction Regular Languages Union, Concatenation, Closure also results in a regular language Complement of a regular language and Intersection with another language also results in a regular language 2 Theorem 12 Two languages over Σ = {a,b} L1 = all strings with a double a L2 = all strings with an even number of a's. L1 and L2 are not the same, since aaa is in L1 but not in L2 and aba in in L2 but not in L1 Example 3 Theorem 12 L1 and L2 are regular languages defined by the regular expressions below. r1 = (a + b)*aa(a + b)* r2 = b*(ab*ab*)* A word in L2 can have some b’s in the front But whenever there is an a, it balanced by an other a (after some b’s). Gives the factor of the form (ab*ab*) The words can have as many factors of this from as it wants. It can end an a or ab. Example 4 Theorem 12 These two languages can also be defined by FA (Kleen’s theorem) Example FA1 FA2 5 Theorem 12 In the first machine we stay in the start state until we read our first a. Then we move to the middle state. Here we can find a double a. If we read another a from the input string while in the middle state, we move to the final state where we remain. If we read a b, we go back to -. If we never get past the middle state, the word has no double a and is rejected. Example 6 Theorem 12 The second machine switches from left state to right state or from right state to left state every time it reads an a. It ignores all b's. If the string begins on the left and ends on the left, it must have made an even number of left/right switches. Therefore, the strings this machine accepts are exactly those in L2 . Example 7 Theorem 12 The first step in building the machine (and regular expression) for L1∩L2 is to find the machines that accept the complementary languages L1' and L2'. The English description of these languages is: L1' = all strings that do not contain the substring a L2' =

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.