Grammars 1 Grammars express languages Example the English
- Slides: 33
Grammars 1
Grammars express languages Example: the English language 2
3
A derivation of “the boy walks”: 4
A derivation of “a dog runs”: 5
Language of the grammar: L = { “a boy runs”, “a boy walks”, “the boy runs”, “the boy walks”, “a dog runs”, “a dog walks”, “the dog runs”, “the dog walks” } 6
Notation Variable or Non-terminal Production rule Terminal 7
Another Example Grammar: Derivation of sentence : 8
Derivation of sentence : 9
Other derivations: 10
Language of the grammar 11
More Notation Grammar Set of variables Set of terminal symbols Start variable Set of Production rules 12
Example Grammar : 13
More Notation Sentential Form: A sentence that contains Variables and terminals Example: Sentential Forms sentence 14
We write: Instead of: 15
In general we write: If: 16
By default: 17
Examples Grammar: 18
Another Example Grammar G: Derivations: 19
20
Language of a Grammar For a grammar with start variable 21
Example For grammar G: Since: 22
A Convenient Notation 23
Linear Grammars 24
A Linear Grammars with at most one variable on the right side of a production Examples: 25
A Non-Linear Grammar 26
Another Linear Grammar 27
Right-Linear Grammars All productions have the form: or Example: 28
Left-Linear Grammars All productions have form: or Example: 29
Regular Grammars 30
Regular Grammars Definition: A regular grammar is any right-linear or left-linear grammar Examples: 31
Observation Regular grammars generate regular languages Examples: Grammar G: 32
Theorem A Language is regular if and only if there is a grammar such that 33
- Every linear grammar generates a regular language
- Express languages
- Unrestricted grammar examples
- Questions on context free grammar
- Eliminating epsilon productions from cfg
- Chomsky hierarchy
- New zealand national sport
- Aotearoa the land of the long white cloud
- Hình ảnh bộ gõ cơ thể búng tay
- Bổ thể
- Tỉ lệ cơ thể trẻ em
- Gấu đi như thế nào
- Chụp phim tư thế worms-breton
- Hát lên người ơi
- Môn thể thao bắt đầu bằng chữ đua
- Thế nào là hệ số cao nhất
- Các châu lục và đại dương trên thế giới
- Công thức tiính động năng
- Trời xanh đây là của chúng ta thể thơ
- Mật thư anh em như thể tay chân
- Phép trừ bù
- Phản ứng thế ankan
- Các châu lục và đại dương trên thế giới
- Thơ thất ngôn tứ tuyệt đường luật
- Quá trình desamine hóa có thể tạo ra
- Một số thể thơ truyền thống
- Cái miệng bé xinh thế chỉ nói điều hay thôi
- Vẽ hình chiếu vuông góc của vật thể sau
- Nguyên nhân của sự mỏi cơ sinh 8
- đặc điểm cơ thể của người tối cổ
- V cc cc
- Vẽ hình chiếu đứng bằng cạnh của vật thể
- Fecboak