1) Grammars express languages through productions and derivations.
2) Regular grammars are grammars that are either right-linear or left-linear.
3) The languages generated by regular grammars are regular languages, as proven by constructing a non-deterministic finite automaton from a regular grammar that accepts the same language.
On Inherent Complexity of Computation, by Attila SzegediZeroTurnaround
The system you just recently deployed is likely an application processing some data, likely relying on some configuration, maybe using some plugins, certainly relying on some libraries, using services of an operating system running on some physical hardware. The previous sentence names 7 categories into which we compartmentalise various parts of a computation process that’s in the end going on in a physical world. Where do you draw the line of functionality between categories? From what vantage points do these distinctions become blurry? Finally, how does it all interact with the actual physical world in which the computation takes place? (What is the necessary physical minimum required to perform a computation, anyway?) Let’s make a journey from your AOP-assembled, plugin-injected, YAML-configured, JIT compiled, Hotspot-executed, Linux-on-x86 hosted Java application server talking JSON-over-HTTP-over-TCP-over-IP-over-Ethernet all the way down to electrons. And then back. Recorded at GeekOut 2013.
An Interactive, hyperlinked slide show that makes the parts of speech more fun to learn. It is complete with internet games and movies. Should use it fully yourself before using it in front of a class
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
This is a presentation by Dada Robert in a Your Skill Boost masterclass organised by the Excellence Foundation for South Sudan (EFSS) on Saturday, the 25th and Sunday, the 26th of May 2024.
He discussed the concept of quality improvement, emphasizing its applicability to various aspects of life, including personal, project, and program improvements. He defined quality as doing the right thing at the right time in the right way to achieve the best possible results and discussed the concept of the "gap" between what we know and what we do, and how this gap represents the areas we need to improve. He explained the scientific approach to quality improvement, which involves systematic performance analysis, testing and learning, and implementing change ideas. He also highlighted the importance of client focus and a team approach to quality improvement.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
The Indian economy is classified into different sectors to simplify the analysis and understanding of economic activities. For Class 10, it's essential to grasp the sectors of the Indian economy, understand their characteristics, and recognize their importance. This guide will provide detailed notes on the Sectors of the Indian Economy Class 10, using specific long-tail keywords to enhance comprehension.
For more information, visit-www.vavaclasses.com
9. S aSb
Grammar:S
Derivation of sentence
aabb :
S aSb aaSbb aabb
S aSb S 9
10. S aSb aaSbb aaaSbbb aaabbb
Other derivations:
S aSb aaSbb aaaSbbb
aaaaSbbbb aaaabbbb
10
11. 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” }
11
13. More Notation
G V , T , P, S
Grammar
V : A finiteSet of variables
T : A finiteSet of terminal symbols
S : Start variable
P: Set of Production rules
13
V and T are assumed to be disjoint
14. Example
G S aSb
Grammar : S
G V , T , P, S
V {S } T {a, b}
P {S aSb, S
14
}
15. More Notation
Sentential Form:
A sentence that contains
variables and terminals
Example:
S aSb aaSbb aaaSbbb aaabbb
Sentential Forms sentence
15
16. *
S aaabbb
We write:
Instead of:
S aSb aaSbb aaaSbbb aaabbb
16
17. *
w1 wn
In general we write:
w1 w2 w3 wn
If:
17
37. Theorem
Languages
Regular
Generated by
Languages
Regular Grammars
37
38. Theorem - Part 1
Languages
Regular
Generated by
Languages
Regular Grammars
Any regular grammar generates
a regular language
38
39. Theorem - Part 2
Languages
Regular
Generated by
Languages
Regular Grammars
Any regular language is generated
by a regular grammar
39
40. Proof – Part 1
Languages
Regular
Generated by
Languages
Regular Grammars
The language L (G ) generated by
any regular grammar G is regular
40
41. The case of Right-Linear
Grammars
Let G be a right-linear grammar
We will prove: L(G ) is regular
L( M ) L(G )
Proof idea: We will construct NFA M
41
with L(M)=L(G)
42. Grammar G is right-linear
Example:
S aA | B
A aa B
B b B|a
42
43. Construct NFA M such that
every state is a grammar variable:
A special
S VF
final state
B
S aA | B
A aa B
B b B|a 43
50. NFA M Grammar
A G
a S aA | B
a
A aa B
S a B bB | a
VF
a
B
L( M ) L(G )
b
aaab * a b * a
50
51. In General
A right-linear grammar G
has variables: V0 ,V1,V2 ,
and productions: Vi a1a2 amV j
or
Vi a1a2 am
51
52. We construct the NFA M such that:
each variable Vicorresponds to a
node: V1 V3
V0
VF
V2 special
V4
final state
52
53. Vi a1a2 amV j
For each production:
we add transitions and intermediate
nodes
Vi a1 a2 ………
am Vj
53
54. For each production:
Vi a1a2 am
we add transitions and intermediate
nodes
Vi a1 a2 ………
am
VF
54
55. Resulting NFA M looks like this:
a9
a2 a4
a1 V1 V3
a3 a5
V0
a3 a4
VF
a8 a9
V2 a5
V4
It holds that: L(G ) L( M ) 55
56. The case of Left-Linear
Grammars
Let G be a left-linear grammar
We will prove: L (G ) is regular
Proof idea:
We will construct a right-linear
grammar G with R
L(G ) L(G )
56
57. Since G is left-linear grammar
the productions look like:
A Ba1a2 ak
A a1a2 ak
57
58. Left G
A Ba1a2 ak
linear
Construct right-linear grammar G
A Bv
Right
G A ak a2a1B
linear
R
A v B 58
60. R
L(G ) L(G )
It is easy to see that:
G
Since is right-linear, we have:
R L(G )
L(G ) L(G )
Regular Regular Regular
Language Language Language
60
61. Proof - Part 2
Languages
Regular
Generated by
Languages
Regular Grammars
Any regular language L is generated
by some regular grammar G
61
62. Any regular language L is generated
by some regular grammar G
Proof idea:
Let M be the NFA with L L(M ).
Construct from M a regular grammar G
such that L ( M ) L (G )
62
63. Since L is regular
there is an NFA M such that L L(M )
b
Example:
M a
a
q0 q1 q2
b
L ab * ab(b * ab) * q3
L L(M ) 63
64. Convert M to a right-linear grammar
b
M a
a
q0 q1 q2
b
q0 aq1
q3
64
70. Since G is right-linear grammar
G is also a regular grammar
with L(G ) L( M ) L
70
71. For any regular language one can
construct left linear as well as right
linear grammar.
71
72. A
a a
a VF
S a F → Ba
B B → Bb here F is
start symbol
S aA | B B → Aaa
b B→S
A aa B A → Sa
B bB | a S→ this is new rule
72
as S is now a final state
73. A → aB D → Cb
B → bB D→B
C→B a
B → aC
B →B b Now D is the
C→b D start variable
D→ B B → Aa
A→
D→
73
88. S aSb
S SS
S
L(G ) {w : na ( w) nb ( w),
and na (v) nb (v)
in any prefix v}
() ((( ))) (( )) 88
89. Definition: Context-Free
Grammars
Grammar
G (V , T , P, S )
Variables Terminal Start
symbols variable
Productions of the form:
A x
x is string of variables and terminals 89
91. Derivation Order
1. S AB 2. A aaA 4. B Bb
3. A 5. B
Leftmost derivation:
1 2 3 4 5
S AB aaAB aaB aaBb aab
Rightmost derivation:
1 4 5 2 3
S AB ABb Ab aaAb aab
91
92. S aAB
A bBb
B A|
Leftmost derivation:
S aAB abBbB abAbB abbBbbB
abbbbB abbbb
Rightmost derivation:
S aAB aA abBb abAb
abbBbb abbbb 92
94. Def:
G =(V,T,P,S)
An ordered tree is a derivation tree for G iff
1 The root is labeled S
2 every leaf has a label from T { }
3 Every interior vertex has a label from V
4 If a vertex has label A(variable) and its children
are labeled from (L to R)
a1,a2,…an then P must contain a production
A a1 a2 …an
5 A leaf labeled has no sibling.
94
95. Yield:
The string of terminals obtained by
reading the leaves of the tree from left
to right omitting any ’s encountered
is called yield of the tree.
95
96. Partial derivation tree
A tree that has properties 3,4,5 but 1
need not
And 2 is replaced by
V T { }
96
104. S AB aaAB
Partial derivation tree S
A B
a a A
104
105. sentential
S AB aaAB
form
Partial derivation tree S
A B
yield
a a A
aaAB
105
106. Sometimes, derivation order doesn’t matter
Leftmost:
S AB aaAB aaB aaBb aab
Rightmost:
S AB ABb Ab aaAb aab
S
Same derivation tree
A B
a a A B b
106
108. E E E | E E | (E) | a
a a a
E E E E a E a E E
a a E a a*a
E E
leftmost derivation
a E E
a a 108
109. E E E | E E | (E) | a
a a a
E E E E E E a E E E
a a E a a a
E E
leftmost derivation
E E a
a 109 a
110. E E E | E E | (E) | a
a a a
Two derivation trees
E E
E E E E
a E E E E a
a a a 110 a
111. The grammarE E E | E E | (E) | a
is ambiguous:
string a a a has two derivation trees
E E
E E E E
a E E E E a
a a a a
111
112. The grammarE E E | E E | (E) | a
is ambiguous:
string a a a has two leftmost derivations
E E E a E a E E
a a E a a*a
E E E E E E a E E
a a E a a a 112
113. Definition:
A context-free grammar G is ambiguous
if some string w L(G ) has:
two or more derivation trees
113
114. In other words:
A context-free grammar G is ambiguous
if some string w L(G ) has:
two or more leftmost derivations
(or rightmost)
114
115. Why do we care about ambiguity?
a a a
take a 2
E E
E E E E
a E E E E a
a a a 115 a
123. The grammar G: E E T
E T
T T F
T F
F (E)
F a
is non-ambiguous:
Every string w L (G ) has
a unique derivation tree 123
124. Inherent Ambiguity
Some context free languages
have only ambiguous grammars
Example: n n m n m m
L {a b c } {a b c }
S S1 | S2 S1 S1c | A S2 aS2 | B
A aAb | B bBc |
124
125. n n n
The string a b c
has two derivation trees
S S
S1 S2
S1 c a S2
125
127. A parser knows the grammar
of the programming language
127
128. The parser finds the derivation
of a particular input
derivation
Parser
input E => E + E
E -> E + E
=> E + E * E
10 + 2 * 5 |E*E
=> 10 + E*E
| INT
=> 10 + 2 * E
=> 10 + 2 * 5
128
129. derivation tree
derivation
E
E => E + E E + E
=> E + E * E
=> 10 + E*E 10
E * E
=> 10 + 2 * E
=> 10 + 2 * 5 2 5
129