TAILIEUCHUNG - INTRODUCTION TO COMPUTER SCIENCE - PART 8

REGULAR EXPRESSIONS máy nhận ra chuỗi ký tự với một số mô hình. Trong tài liệu này, chúng tôi đáp ứng biểu thức thường xuyên là một cách đại số để mô tả một mô hình chuỗi. thường xuyên biểu thức tương tự như đại số của các biểu thức số học mà chúng ta quen thuộc, và đại số quan hệ mà chúng tôi đã gặp trong Tài liệu # 3. Thật thú vị, thiết lập các mô hình có thể được thể hiện trong biểu thức chính quy đại số là chính xác cùng một tập hợp các mô hình có thể. | INTRODUCTION TO COMPUTER SCIENCE HANDOUT 8. REGULAR EXPRESSIONS K5 K6 Computer Science Department Văn Lang University Second semester -- Feb 2002 Instructor Trăn Đức Quang Major themes 1. Introduction 2. Algebraic Laws for Regular Expressions Reading Sections and . INTRODUCTION In the previous handout we have studied a finite automaton which is in a sense a machine recognizing character strings with some patterns. In this handout we meet regular expressions which is an algebraic way to describe a string pattern. Regular expressions are analogous to the algebra of arithmetic expressions with which we are all familiar and the relational algebra that we met in Handout 3. Interestingly the set of patterns that can be expressed in the regular-expression algebra is exactly the same set of patterns that can be described by automata. For example the regular expression a bc can express the patterns described by the following automaton. start Ai c 46 INTRODUCTION TO COMPUTER SCIENCE HANDOUT 8. REGULAR EXPRESSIONS A set of strings denoted by a regular expression E is called a regular language and can be referred to as L E . Given two regular languages L and M we can construct new languages by applying the operators below one or more times to these languages 1. The union of two languages L and M denoted L È M is the set of strings that are in either L or M. For example if L 00 01 11 and M aa ab the union L È M 00 01 11 aa ab . 2. The concatenation of languages L and M denoted LM is the set of strings that can be formed by taking any string in L and concatenating it with any string in M. For the above example we have LM 00aa 01aa 11aa 00ab 01ab 11ab . 3. The closure star or Kleene closure of a language L is denoted L and represents the set of strings that can be formed by taking any number of strings from L and concatenating all of them. Algebra of regular expressions like all kinds of algebras starts with some elementary expressions usually constants and or .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.