tailieunhanh - Lecture note Theory of automata - Lecture 13

The main contents of this chapter include all of the following: Examples of Kleene’s theorem part III (method 1) continued, Kleene’s theorem part III (method 2: Concatenation of FAs), example of Kleene’s theorem part III (method 2: Concatenation of FAs). | Lecture # 22 Theory Of Automata By Dr. MM Alam 1 1 Lecture#21 at a glance JFLAP for Pumping Lemma Version II Practical Demonstrations Context Free Grammar For earliest computers . Every procedure, no matter how complicated, had to be spelled out in the crudest set of instructions: They accepted no instructions except those in their own machine language. It could take dozens of these primitive instructions to do anything useful. It could take quite a few to evaluate one complicated arithmetic expression. 3 Context Free Grammar For example to calculate This clearly required that some "higher-level" language be invented-a language in which one mathematical step, such as evaluating the formula above, could be converted into one single computer instruction. 4 Context Free Grammar A super program called the compiler does the conversion from a high-level language into assembler language code. It cannot just look at the expression and understand it. Rules must be given by which this string . | Lecture # 22 Theory Of Automata By Dr. MM Alam 1 1 Lecture#21 at a glance JFLAP for Pumping Lemma Version II Practical Demonstrations Context Free Grammar For earliest computers . Every procedure, no matter how complicated, had to be spelled out in the crudest set of instructions: They accepted no instructions except those in their own machine language. It could take dozens of these primitive instructions to do anything useful. It could take quite a few to evaluate one complicated arithmetic expression. 3 Context Free Grammar For example to calculate This clearly required that some "higher-level" language be invented-a language in which one mathematical step, such as evaluating the formula above, could be converted into one single computer instruction. 4 Context Free Grammar A super program called the compiler does the conversion from a high-level language into assembler language code. It cannot just look at the expression and understand it. Rules must be given by which this string can be processed. 5 Context Free Grammar Also we want our machine to be able to reject strings of symbols that make no sense as arithmetic expressions. Like "((9)+". This input string should not take us to a final state in the machine. However, we cannot know that this is a bad input string until we have reached the last letter. 6 Context Free Grammar If the + were changed to a ), the formula would be valid. An FA that translated expressions into instructions as it scanned left to right would already be turning out code before it realized that the whole expression is nonsense. 7 Context Free Grammar Rules for valid arithmetic expressions. Rule 1 Any number is in the set AE. Rule 2 If x and y are in AE then so are: -(x) (x + y) (x - y) (x*y) (x/y) (x**y) For example, the input string ((3 + 4) * (6 + 7)) 8 Context Free Grammar The way this can be produced from the rules is by the sequence 3 is in AE 4 is in AE (3 + 4) is in AE 6 is in AE 7 is in AE (6 + 7) is in AE ((3 + 4) * (6 + 7)) is

TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
8    193    0    21-05-2024
10    171    0    21-05-2024
75    145    0    21-05-2024
173    112    0    21-05-2024
8    117    0    21-05-2024
185    109    0    21-05-2024
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.