This is the lecture slide contains:
- CFG definition
- Designing CFG from DFA
- Designing CFG from RE
- Designing CFG for linked terminals typed languages
- Union of CFGs
This Presentation is used to create PPT on the topic "Chomsky Normal Form" in Theory of Computation. This presentation is also useful to study this topic.
This lecture slide contains:
1. Regular Languages
2. Regular Operations
3. Closure of regular languages
4. Regular expression
5. Precedence of regular operations
6. RE for different languages
7. RE to NFA conversion
8. DFA to GNFA to RE conversion
This lecture slide contains:
- Difference between FA, PDA and TM
- Formal definition of TM
- TM transition function and configuration
- Designing TM for different languages
- Simulating TM for different strings
This is the lecture slide contains:
- CFG definition
- Designing CFG from DFA
- Designing CFG from RE
- Designing CFG for linked terminals typed languages
- Union of CFGs
This Presentation is used to create PPT on the topic "Chomsky Normal Form" in Theory of Computation. This presentation is also useful to study this topic.
This lecture slide contains:
1. Regular Languages
2. Regular Operations
3. Closure of regular languages
4. Regular expression
5. Precedence of regular operations
6. RE for different languages
7. RE to NFA conversion
8. DFA to GNFA to RE conversion
This lecture slide contains:
- Difference between FA, PDA and TM
- Formal definition of TM
- TM transition function and configuration
- Designing TM for different languages
- Simulating TM for different strings
This Lecture Note discusses the followings:
- What is NFA
- DFA vs NFA
- How does NFA compute
- Designing different NFA machines
- Regular operations on NFAs
- Conversion from NFA to DFA
This lecture covers:
1. Regular Language and Regular Operations
2. Closure properties of DFAs
3. Union of 2 DFA machines
4. Intersection of 2 DFA machines
5. Complement of DFA machines
Short Notes on Automata Theory
Automata theory is the study of abstract machines and automata, as well as the computational problems that can be solved using them. It is a theory in theoretical computer science and discrete mathematics (a subject of study in both mathematics and computer science). The word automata (the plural of automaton) comes from the Greek word αὐτόματα, which means "self-making".
This presentation contains:
1. Language, Regular Language
2. DFA vs. NFA
3. Components of DFA
4. Acceptability checking
5. Group-wise designing different types of DFA machines
This Lecture Note discusses the followings:
- What is NFA
- DFA vs NFA
- How does NFA compute
- Designing different NFA machines
- Regular operations on NFAs
- Conversion from NFA to DFA
This lecture covers:
1. Regular Language and Regular Operations
2. Closure properties of DFAs
3. Union of 2 DFA machines
4. Intersection of 2 DFA machines
5. Complement of DFA machines
Short Notes on Automata Theory
Automata theory is the study of abstract machines and automata, as well as the computational problems that can be solved using them. It is a theory in theoretical computer science and discrete mathematics (a subject of study in both mathematics and computer science). The word automata (the plural of automaton) comes from the Greek word αὐτόματα, which means "self-making".
This presentation contains:
1. Language, Regular Language
2. DFA vs. NFA
3. Components of DFA
4. Acceptability checking
5. Group-wise designing different types of DFA machines
This slide explains the conversion procedure from ER Diagram to Relational Schema.
1. Entity set to Relation
2. Relationship set to Relation
3. Attributes to Columns, Primary key, Foreign Keys
1. What is Entity Relationship Model
2. Entity and Entity Set
3. Relationship and Relationship Set
4. Attributes and it's kinds
5. Participation Constraints and Mapping Cardinality
6. Aggregation, Specialization, and Generalization
7. Some Sample ERD models
This note includes the followings:
- Database Create, Drop Operations
- Database Table Create, Drop Operations
- Database Table Alter Operation
- Data insertion
- Data deletion
- Existing data update
- Searching data from data table (showing all record, specific columns, specific rows, column aliasing, sorting data, limiting data, distinct data)
- Aggregate functions
- Group by clause
- Having clause
- Types of table joins
- Table aliasing, Inner Join, Left/Right Join, Self Join
- Subquery operation (scalar subquery, column subquery, row subquery, correlated subquery, derived table)
This note contains some sample MySQL query practices based on the HR Schema database. The practice sections are from the following categories:
- DDL statements
- Basic Select statements
- Aggregate operations
- Join operations
This slide contains,
1) Some terminologies like yields, derives, word, derivation
2) Leftmost and Rightmost derivation
3) Ambiguity checking
4) Parse tree generation and ambiguity checking
This presentation contains:
1. Introduction
2. Central areas of TOC
3. Complexity theory
4. Computability theory
5. Automata theory
6. Related terminologies
7. Strings
8. Languages
9. Proof, Theorem, Lemma, Corollaries
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
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
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.
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 Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
What is the purpose of the Sabbath Law in the Torah. It is interesting to compare how the context of the law shifts from Exodus to Deuteronomy. Who gets to rest, and why?
Ethnobotany and Ethnopharmacology:
Ethnobotany in herbal drug evaluation,
Impact of Ethnobotany in traditional medicine,
New development in herbals,
Bio-prospecting tools for drug discovery,
Role of Ethnopharmacology in drug evaluation,
Reverse Pharmacology.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
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 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
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
2. CFG – Context Free Grammar
2
A Context Free Grammar is a 4 tuple (V, 𝛴, R, S), where
▸ V is a finite set called the variables
▸ Σ is a finite set, disjoint from V, called the terminals
▸ R is a finite set of rules, with each rule being a variable and a string of variables and terminals
▸ S ϵ V is the start variable
Example:
Grammar, G1 = ( { S }, { a, b }, R, S )
V = { S }
Σ = { a, b }
R is,
S → aSb | SS | ε
Example:
Grammar, G2 = ( V, Σ, R, <EXPR> )
V = { <EXPR>, <TERM>, <FACTOR> }
Σ = { a, +, x, (, ) }
R is,
<EXPR> → <EXPR> + <TERM> | <TERM>
<TERM> → <TERM> x <FACTOR> | <FACTOR>
<FACTOR> → ( <EXPR> ) | a
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
3. CNF - Chomsky Normal Form
3
▸ When working with context-free grammar, it is often convenient to have them in simplified form.
▸ One of the simplest and most useful forms is called the Chomsky Normal Form.
▸ CNF is useful in giving algorithms for working with CFGs.
Chomsky Normal Form:
A context-free grammar is in Chomsky Normal Form if every rule is of the form,
A → BC
A → a
where a is any terminal and A, B, C are any variables – except that B and C may not be the start variable.
If S is the start variable, then the rule S → 𝜀 is valid.
[ i.e. if language contains 𝜀, then we allow S -> 𝜀 where S is start symbol, and forbid S on RHS]
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
4. CFG in CNF
4
Theorem:
Any Context Free Language is generated by a Context-Free Grammar in Chomsky Normal Form.
The conversion to Chomsky Normal Form has 4 main steps:
▸ Get rid of all 𝜀 productions.
▸ Get rid of all productions where RHS is a single variable.
▸ Replace every production that is too long by shorter productions.
▸ Move all terminals to productions where RHS is one terminal.
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
5. CFG in CNF – Step 1
5
CFG to CNF conversion principle:
Rules that violate the CNF conditions are replaced with equivalent ones that are satisfactory.
Step 1:
Add a new start variable S0 and the rule S0 → S where S was the original start variable.
▸It guarantees that the start variable doesn’t occur on the right-hand side of a rule.
Example:
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
S → ASA | aB
A → B | S
B → b | ε
S0 → S
S → ASA | aB
A → B | S
B → b | 𝜀
Step 1
6. CFG in CNF – Step 2
6
Step 2:
Eliminate all 𝜀 rules of the form A → 𝜀, where A is not the start variable.
▸For each occurrence of an A on the right-hand side of a rule, add a new rule with that occurrence deleted.
– If R → uAv is a rule in which u and v are strings of variables and terminals, we add new rule,
R → uv
– Do this for each occurrence of A. If the rule is R → uAvAw then we will add rules,
R → uvAw, R → uAvw, and R → uvw
– If the rule is R → A, then the new rule becomes R → 𝜀 unless we had previously removed the rule R → 𝜀
▸Repeat this step until all 𝜀-rules are eliminated.
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
7. Example:
CFG in CNF – Step 2
7
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Removing 𝜀-rule B → 𝜀 ,
S0 → S
S → ASA | aB | a
A → B | S | 𝜀
B → b | 𝜀
S → ASA | aB
A → B | S
B → b | ε
S0 → S
S → ASA | aB
A → B | S
B → b | 𝜀
Step 1
Step 2
Removing 𝜀-rule A → 𝜀 ,
S0 → S
S → ASA | aB | a | SA | AS | S
A → B | S | 𝜀
B → b
Step 2
8. CFG in CNF – Step 3
8
Step 3: Eliminate all the unit rules of the form A → B.
▸ Whenever a rule B → u appears, add a new rule A → u unless this was a unit rule previously removed.
▸ Repeat this step until all unit rules are eliminated.
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
9. Example:
CFG in CNF – Step 3
9
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Removing 𝜀-rule B → 𝜀 ,
S0 → S
S → ASA | aB | a
A → B | S | 𝜀
B → b | 𝜀
S → ASA | aB
A → B | S
B → b | ε
S0 → S
S → ASA | aB
A → B | S
B → b | 𝜀
Step 1 Step 2
Removing 𝜀-rule A → 𝜀 ,
S0 → S
S → ASA | aB | a | SA | AS | S
A → B | S | 𝜀
B → b
Step 2
Removing unit rule S → S,
S0 → S
S → ASA | aB | a | SA | AS | S
A → B | S
B → b
Step 3
Removing unit rule S0 → S,
S0 → S | ASA | aB | a | SA | AS
S → ASA | aB | a | SA | AS
A → B | S
B → b
Step 3
Removing unit rule A → B,
S0 → ASA | aB | a | SA | AS
S → ASA | aB | a | SA | AS
A → B | S | b
B → b
Step 3
Removing unit rule A → S,
S0 → ASA | aB | a | SA | AS
S → ASA | aB | a | SA | AS
A → S | b | ASA | aB | a | SA | AS
B → b
Step 3
10. CFG in CNF – Step 4
10
Step 4:
Convert all the remaining rules in the proper form.
▸ Replace each rule of the form, A → u1 u2 … … uk where k>=3 and each ui is a variable or terminal symbol with these new
rules,
A → u1 A1, A1 → u2 A2, A2 → u3 A3, … … , Ak-2 → uk-1 uk
▸Replace each terminal ui in the preceding rules with the new variable Ui and add the rule,
Ui → ui
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
11. Example:
CFG in CNF – Step 4
11
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
Removing 𝜀-rule B → 𝜀 ,
S0 → S
S → ASA | aB | a
A → B | S | 𝜀
B → b | 𝜀
S → ASA | aB
A → B | S
B → b | ε
S0 → S
S → ASA | aB
A → B | S
B → b | 𝜀
Step 1 Step 2
Removing 𝜀-rule A → 𝜀 ,
S0 → S
S → ASA | aB | a | SA | AS | S
A → B | S | 𝜀
B → b
Step 2
Removing unit rule S → S,
S0 → S
S → ASA | aB | a | SA | AS | S
A → B | S
B → b
Step 3
Removing unit rule S0 → S,
S0 → S | ASA | aB | a | SA | AS
S → ASA | aB | a | SA | AS
A → B | S
B → b
Step 3
Removing unit rule A → B,
S0 → ASA | aB | a | SA | AS
S → ASA | aB | a | SA | AS
A → B | S | b
B → b
Step 3
Removing unit rule A → S,
S0 → ASA | aB | a | SA | AS
S → ASA | aB | a | SA | AS
A → S | b | ASA | aB | a | SA | AS
B → b
Step 3
Proper form conversion,
S0 → AA1 | UB | a | SA | AS
A1 → SA
U → a
S → AA1 | UB | a | SA | AS
A → b | AA1 | UB | a | SA | AS
B → b
Step 4
12. CFG in CNF – Practice Set
12
1.
S → ASB
A → aAS | a | ε
B → SbS | A | bb
2.
S → XY
X → abb | aXb | ε
Y → c | cY
3.
S → aXbY
X → aX | 𝜀
Y → bY | 𝜀
4.
S → aXbX
X → aY | bY | 𝜀
Y → X | c
5.
S → S1 | S2
S1 → S1b | Ab | 𝜀
A → aAb | ab
S2 → S2a | Ba | 𝜀
B → bBa | ba
Mohammad Imam Hossain | Lecturer, Dept. of CSE | UIU
6.
S → DBC | Ba
B → 0B1 | 01 | 𝜀
C → aCb | aC | Bb
D → bD | D
7.
S → aX | bY | b | ZZc
X → Yaa | abZ | 𝜀
Y → bXXb | ab | cZ
Z → a | b | XZ | 𝜀
8.
A -> BAB | B | 𝜀
B -> 00 | 𝜀
13. 13
References:
Chapter 2(section 2.1), Introduction to the Theory of Computation, 3rd Edition by Michael Sipser
THANKS!
Any questions?
You can find me at imam@cse.uiu.ac.bd