In this slide you will explore more about how to make derivations ,design parse tree ,what is ambiguity and how to remove ambiguity ,left recursion ,left factoring .
This slide is prepared By these following Students of Dept. of CSE JnU, Dhaka. Thanks To: Nusrat Jahan, Arifatun Nesa, Fatema Akter, Maleka Khatun, Tamanna Tabassum.
A grammar is said to be regular, if the production is in the form -
A → αB,
A -> a,
A → ε,
for A, B ∈ N, a ∈ Σ, and ε the empty string
A regular grammar is a 4 tuple -
G = (V, Σ, P, S)
V - It is non-empty, finite set of non-terminal symbols,
Σ - finite set of terminal symbols, (Σ ∈ V),
P - a finite set of productions or rules,
S - start symbol, S ∈ (V - Σ)
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDAAshish Duggal
Push Down Automata (PDA) is part of TOC (Theory of Computation)
From this presentation you will get all the information related to PDA also it will help you to easily understand this topic. There is also one example.
This PPT is very helpful for Computer science and Computer Engineer
(B.C.A., M.C.A., B.TECH. , M.TECH.)
Table of Contents (TOC) is a list of the headings or sections in a document, typically found at the beginning of the document. The TOC provides a quick reference for the reader to navigate to the specific section they are interested in reading.
In terms of grammar, TOCs often use parallel structure to list the headings and subheadings, such as using bullet points or numbered lists. In addition, TOCs may also use capitalization, bold or italic formatting to indicate the level of the heading or subheading.
A typical TOC structure is to start with the main heading, followed by subheadings and sub-subheadings. For example, the main heading may be "Introduction," followed by subheadings "Background," "Purpose," and "Methodology." Each subheading may then have sub-subheadings, such as "Background" having sub-subheadings "Historical context" and "Recent developments."
It's important to note that TOCs can vary depending on the type of document and the style guide being used. Some TOCs may use numbers, while others use bullet points. Additionally, some TOCs may include page numbers while others may not.
In summary, TOCs provide a quick reference for the reader to navigate the document, often using parallel structure, capitalization, and formatting to indicate the level of headings and subheadings. The structure and formatting of TOCs may vary depending on the type of document and style guide being used.
In this slide you will explore more about how to make derivations ,design parse tree ,what is ambiguity and how to remove ambiguity ,left recursion ,left factoring .
This slide is prepared By these following Students of Dept. of CSE JnU, Dhaka. Thanks To: Nusrat Jahan, Arifatun Nesa, Fatema Akter, Maleka Khatun, Tamanna Tabassum.
A grammar is said to be regular, if the production is in the form -
A → αB,
A -> a,
A → ε,
for A, B ∈ N, a ∈ Σ, and ε the empty string
A regular grammar is a 4 tuple -
G = (V, Σ, P, S)
V - It is non-empty, finite set of non-terminal symbols,
Σ - finite set of terminal symbols, (Σ ∈ V),
P - a finite set of productions or rules,
S - start symbol, S ∈ (V - Σ)
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDAAshish Duggal
Push Down Automata (PDA) is part of TOC (Theory of Computation)
From this presentation you will get all the information related to PDA also it will help you to easily understand this topic. There is also one example.
This PPT is very helpful for Computer science and Computer Engineer
(B.C.A., M.C.A., B.TECH. , M.TECH.)
Table of Contents (TOC) is a list of the headings or sections in a document, typically found at the beginning of the document. The TOC provides a quick reference for the reader to navigate to the specific section they are interested in reading.
In terms of grammar, TOCs often use parallel structure to list the headings and subheadings, such as using bullet points or numbered lists. In addition, TOCs may also use capitalization, bold or italic formatting to indicate the level of the heading or subheading.
A typical TOC structure is to start with the main heading, followed by subheadings and sub-subheadings. For example, the main heading may be "Introduction," followed by subheadings "Background," "Purpose," and "Methodology." Each subheading may then have sub-subheadings, such as "Background" having sub-subheadings "Historical context" and "Recent developments."
It's important to note that TOCs can vary depending on the type of document and the style guide being used. Some TOCs may use numbers, while others use bullet points. Additionally, some TOCs may include page numbers while others may not.
In summary, TOCs provide a quick reference for the reader to navigate the document, often using parallel structure, capitalization, and formatting to indicate the level of headings and subheadings. The structure and formatting of TOCs may vary depending on the type of document and style guide being used.
Theory of competition topic simplification of cfg, normal form of FG.pptxJisock
Table of Contents (TOC) is a list of the headings or sections in a document, typically found at the beginning of the document. The TOC provides a quick reference for the reader to navigate to the specific section they are interested in reading.
In terms of grammar, TOCs often use parallel structure to list the headings and subheadings, such as using bullet points or numbered lists. In addition, TOCs may also use capitalization, bold or italic formatting to indicate the level of the heading or subheading.
A typical TOC structure is to start with the main heading, followed by subheadings and sub-subheadings. For example, the main heading may be "Introduction," followed by subheadings "Background," "Purpose," and "Methodology." Each subheading may then have sub-subheadings, such as "Background" having sub-subheadings "Historical context" and "Recent developments."
It's important to note that TOCs can vary depending on the type of document and the style guide being used. Some TOCs may use numbers, while others use bullet points. Additionally, some TOCs may include page numbers while others may not.
In summary, TOCs provide a quick reference for the reader to navigate the document, often using parallel structure, capitalization, and formatting to indicate the level of headings and subheadings. The structure and formatting of TOCs may vary depending on the type of document and style guide being used.
Automata theory - describes to derives string from Context free grammar - derivation and parse tree
normal forms - Chomsky normal form and Griebah normal form
It includes all the basics of calculus. It also includes all the formulas of derivatives and how to carry it out. It also includes function definition and different types of function along with relation.
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)Mohammad Ilyas Malik
The term "Automata" is derived from the Greek word "αὐτόματα" which means "self-acting". An automaton (Automata in plural) is an abstract self-propelled computing device which follows a predetermined sequence of operations automatically.
On demand delivery of IT resources through the internet with payment depending on the use of the service is known as cloud computing.
The term cloud refers to a network or the internet.
It gives a solution for infrastructure at low cost.
Cloud computing refers to manipulating, configuring, and accessing the applications online. It offers online data storage, infrastructure and application.
Cloud computing is both a combination of software and hardware based computing resources delivered as a network service.
A multimedia networking system allows for the data exchange of discrete and continuous media among computers.
This communication requires proper service and protocols for data transmission.
LAYERS: Provide a set of operations to the requesting application. Logically related services are grouped into layers according to the OSI layes.
PROTOCOL: A protocol consists of a set of rules which must be followed by peer layer instances during any communication between these two peers.
Virtualization is a technique, which allows to share single physical instance of an application or resource among multiple organizations or tenants (customers)..
Virtualization is a proved technology that makes it possible to run multiple operating system and applications on the same server at same time.
Virtualization is the process of creating a logical(virtual) version of a server operating system, a storage device, or network services.
The technology that work behind virtualization is known as a virtual machine monitor(VM), or virtual manager which separates compute environments from the actual physical infrastructure.
ABSTRACT
Software industry is heading towards centralized computing. Due to this trend data and programs are being taken away from traditional desktop PCs and placed in Compute clouds instead. Compute clouds are enormous server farms packed with computing power and storage space accessible through the Internet.
Instead of having to manage one’s own infrastructure to run applications, server time and storage space can be bought from an external service provider. From the customers point of view the benefit behind this idea is to be able to dynamically adjust computing power up or down to meet the demand for that power at a particular moment. This kind of flexibility not only ensures that no costs are incurred by excess processing capacity, but also enables hardware infrastructure to scale up with business growth. Because of growing interest in taking advantage of cloud computing a number of service providers are working on providing cloud services. Amazon, Salerforce.com and Google are examples of firms that already have working solutions on the market. Recently also Microsoft released a preview version of its cloud platform called the Azure. Early adopters can test the platform and development tools free of charge.
The main purpose of this paper is to shed light on the internals of Microsoft’s Azure platform. In addition to examining how Azure platform works.
The benefits of Azure platform are explored. The most important benefit in
Microsoft’s solution is that it resembles existing Windows environment a lot. Developers can use the same application programming interfaces (APIs) and development tools they are already used to. The second benefit is that migrating applications to cloud is easy. This partially stems from the fact that Azure’s services can be exploited by an application whether it is run locally or in the cloud.
Cloud Computing refers to manipulating, configuring, and accessing the applications online. It offers online data storage, infrastructure and application.
Cloud Computing is both a combination of software and hardware based computing resources delivered as a network service.
Basic Concepts:
There are certain services and models working behind the scene making the cloud computing feasible and accessible to end users. Following are the working models for cloud computing:
1. Deployment Models
2. Service Models
Azure was announced in October 2008 and released on 1 February 2010 as Windows Azure, before being renamed to Microsoft Azure on 25 March 2014. Along with Amazon Web Services Azure is considered a leader in the IAAS field.
Microsoft Azure is an open and flexible cloud platform that enables you to quickly build, deploy, and manage applications across a global network of Microsoft-managed datacenters. You can build applications using any language, tool, or framework. And you can integrate your public cloud applications with your existing IT environment.
This definition tells us that Microsoft Azure is a cloud platform, which means you can use it for running your business applications, services, and workloads in the cloud. But it also includes some key words that tell us even more:
Open Microsoft Azure provides a set of cloud services that allow you to build and deploy cloud-based applications using almost any programming language, framework, or tool.
Flexible Microsoft Azure provides a wide range of cloud services that can let you do everything from hosting your company’s website to running big SQL databases in the cloud. It also includes different features that can help deliver high performance and low latency for cloud-based applications.
Microsoft-managed Microsoft Azure services are currently hosted in several datacenters spread across the United States, Europe, and Asia. These datacenters are managed by Microsoft and provide expert global support on a 24x7x365 basis.
Compatible Cloud applications running on Microsoft Azure can easily be integrated with on-premises IT environments that utilize the Microsoft Windows Server platform.
It provides both PAAS and IAAS services and supports many different programming languages, tools and frameworks, including both Microsoft-specific and third-party software and systems.
Welcome to WIPAC Monthly the magazine brought to you by the LinkedIn Group Water Industry Process Automation & Control.
In this month's edition, along with this month's industry news to celebrate the 13 years since the group was created we have articles including
A case study of the used of Advanced Process Control at the Wastewater Treatment works at Lleida in Spain
A look back on an article on smart wastewater networks in order to see how the industry has measured up in the interim around the adoption of Digital Transformation in the Water Industry.
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
Hierarchical Digital Twin of a Naval Power SystemKerry Sado
A hierarchical digital twin of a Naval DC power system has been developed and experimentally verified. Similar to other state-of-the-art digital twins, this technology creates a digital replica of the physical system executed in real-time or faster, which can modify hardware controls. However, its advantage stems from distributing computational efforts by utilizing a hierarchical structure composed of lower-level digital twin blocks and a higher-level system digital twin. Each digital twin block is associated with a physical subsystem of the hardware and communicates with a singular system digital twin, which creates a system-level response. By extracting information from each level of the hierarchy, power system controls of the hardware were reconfigured autonomously. This hierarchical digital twin development offers several advantages over other digital twins, particularly in the field of naval power systems. The hierarchical structure allows for greater computational efficiency and scalability while the ability to autonomously reconfigure hardware controls offers increased flexibility and responsiveness. The hierarchical decomposition and models utilized were well aligned with the physical twin, as indicated by the maximum deviations between the developed digital twin hierarchy and the hardware.
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
2. OUTLINE
• Context-Free Grammar Introduction
• Derivation Tree/Parse Tree
• Sentential Form and Partial Derivation Tree
• Types of Derivation Tree
• Left and Right Recursive Grammars
• Ambiguity in Context-Free Grammars
• CFG Simplification
3. Context-Free Grammar Introduction
Grammar: Grammar is a set of rules which check whether a string belong to a particular
language or not.
Context-Free Grammar:
• It is a notation used to specify the syntax of language.
• Context free grammar are used to design parser.
4. Definition: A context-free grammar (CFG) consisting of a finite set of grammar rules is
a quadruple (N, T, P, S) where
• N is a set of non-terminal symbols.
• T is a set of terminals where N ∩ T = NULL.
• P is a set of rules, P: N → (N U T)*, i.e., the left-hand side of the production rule P does have
any right context or left context.
• S is the start symbol.
Example
• The grammar ({A}, {a, b, c}, P, A), P : A → aA, A → abc.
• The grammar ({S, a, b}, {a, b}, P, S), P: S → aSa, S → bSb, S → ε
• The grammar ({S, F}, {0, 1}, P, S), P: S → 00S | 11F, F → 00F | ε
5. Derivation Tree/Parse Tree
Generation of Derivation Tree
A derivation tree or parse tree is an ordered rooted tree that graphically represents the
semantic information a string derived from a context-free grammar.
Representation Technique:
1. Root vertex: Must be labeled by the start symbol.
2. Vertex: Labeled by a non-terminal symbol.
3. Leaves: Labeled by a terminal symbol or ε.
6. If S → x1x2 …… xn is a production rule in a CFG, then the parse tree / derivation tree will
be as follows:
7. There are two different approaches to draw a derivation tree:
1. Top-down Approach:
(a) Starts with the starting symbol S
(b) Goes down to tree leaves using productions
2. Bottom-up Approach:
(a) Starts from tree leaves
(b) Proceeds upward to the root which is the starting symbol S
8. Derivation or Yield of a Tree
The derivation or the yield of a parse tree is the final string obtained by concatenating the
labels of the leaves of the tree from left to right, ignoring the Nulls. However, if all the
leaves are Null, derivation is Null.
9. Example
Let a CFG {N,T,P,S} be
N = {S}, T = {a, b}, Starting symbol = S, P = S → SS | aSb | ε
One derivation from the above CFG is “abaabb”
Answer
S → SS
S → aSbS (replace S →aSb)
S →abS (replace S →ε)
S → abaSb (replace S →aSb)
S → abaaSbb (replace S →aSb)
S→ abaabb (replace S →ε)
10. Sentential Form and Partial Derivation Tree
A partial derivation tree is a sub-tree of a derivation tree/parse tree such that either all of
its children are in the sub-tree or none of them are in the sub-tree.
Example
If in any CFG the productions are:
S → AB, A → aaA | ε, B →Bb| ε
the partial derivation tree can be the following:
If a partial derivation tree contains the root S, it is called a sentential form. The above
sub-tree is also in sentential form.
11. Types of Derivation Tree
Leftmost and Rightmost Derivation of a String
1. Leftmost derivation - A leftmost derivation is obtained by applying production to
the leftmost variable in each step.
2. Rightmost derivation - A rightmost derivation is obtained by applying production
to the rightmost variable in each step.
12. Example
Let any set of production rules in a CFG be
X → X+X | X*X |X| a
over an alphabet {a}.
Find the leftmost derivation for the string
"a+a*a“.
Answer:
X → X+X
X→ a+X
X→ a+ X*X
X→a+a*X
X→ a+a*a
13. Example
Let any set of production rules in a CFG be
X → X+X | X*X |X| a
over an alphabet {a}.
Find the Rightmost derivation for the string
"a+a*a“.
Answer:
X → X*X
X→ X*a
X → X+X*a
X →X+a*a
X→ a+a*a
14.
15.
16. Example:
Consider the following grammar
S → bB/Aa
A→b/ bs/ aAA
B → a/ aS/ Bbb
Find:
Leftmost and right most derivation For string baababa and Also find derivation tree
17.
18. Left and Right Recursive Grammars
In a context-free grammar G, if there is a production in the form X → Xa where X is a non-
terminal and ‘a’ is a string of terminals, it is called a left recursive production. The grammar
having a left recursive production is called a left recursive grammar.
And if in a context-free grammar G, if there is a production is in the form X → aX where X is a
non-terminal and ‘a’ is a string of terminals, it is called a right recursive production. The grammar
having a right recursive production is called a right recursive grammar.
19. Ambiguity in Context-Free Grammars
If a context free grammar G has more than one derivation tree for some string w ∈ L(G), it is
called an ambiguous grammar. There exist multiple right-most or left-most derivations for some
string generated from that grammar.
Problem
Check whether the grammar G with production rules:
X → X+X | X*X |X| a
is ambiguous or not.
Solution
Let’s find out the derivation tree for the string "a+a*a". It has two derivations.
20. Derivation 1:
X → X+X
X→ a +X
X→ a+ X*X
X →a+a*X
X→ a+a*a
Parse tree1:
Since there are two parse trees for a single string
"a+a*a", the grammar G is ambiguous
Derivation 2:
X → X*X
X→X+X*X
X→ a+ X*X
X →a+a*X
X→ a+a*a
Parse tree 2:
21. CFG Simplification
In a CFG, it may happen that all the production rules and symbols are not needed for the
derivation of strings. Besides, there may be some null productions and unit productions.
Elimination of these productions and symbols is called simplification of CFGs.
Simplification essentially comprises of the following steps:
Reduction of CFG
Removal of Unit Productions
Removal of Null Productions
22. Reduction of CFG
CFGs are reduced in two phases:
Phase 1: Derivation of an equivalent grammar, G’, from the CFG, G, such that each variable
derives some terminal string.
Derivation Procedure:
Step 1: Include all symbols, W1, that derive some terminal and initialize i=1.
Step 2: Include all symbols, Wi+1, that derive Wi.
Step 3: Increment i and repeat Step 2, until Wi+1 = Wi.
Step 4: Include all production rules that have Wi in it.
23. Phase 2:
Derivation of an equivalent grammar, G”, from the CFG, G’, such that each symbol appears in a
sentential form.
Derivation Procedure:
Step 1: Include the start symbol in Y1 and initialize i = 1.
Step 2: Include all symbols, Yi+1, that can be derived from Yi and include all production rules
that have been applied.
Step 3: Increment i and repeat Step 2, until Yi+1 = Yi.
24. Problem
Find a reduced grammar equivalent to the grammar G, having production rules,
P: S AC | B, A a, C c | BC, E aA | e
Solution
Phase 1:
T = { a, c, e }
W1 = { A, C, E } from rules A a, C c and E aA
W2 = { A, C, E } U { S } from rule S AC
W3 = { A, C, E, S } U
Since W2 = W3, we can derive G’ as:
G’ = { { A, C, E, S }, { a, c, e }, P, {S}}
where P: S AC, A a, C c , E aA | e
25. Phase 2:
Y1 = { S }
Y2 = { S, A, C } from rule S AC
Y3 = { S, A, C, a, c } from rules A a and C c
Y4 = { S, A, C, a, c }
Since Y3 = Y4, we can derive G” as:
G” = { { A, C, S }, { a, c }, P, {S}}
where P: S AC, A a, C c
26. Removal of Unit productions
Any production rule in the form A → B where A, B ∈ Non-terminal is called unit production.
Removal Procedure:
Step 1: To remove A→B, add production A → x to the grammar rule whenever B → x
occurs in the grammar. [x ∈ Terminal, x can be Null]
Step 2: Delete A→B from the grammar.
Step 3: Repeat from step 1 until all unit productions are removed.
27. Problem
Remove unit production from the following:
S → XY, X → a, Y → Z | b, Z → M, M → N, N → a
Solution:
There are 3 unit productions in the grammar:
Y → Z, Z → M, and M → N
At first, we will remove M → N.
As N → a, we add M → a, and M → N is removed.
The production set becomes
S → XY, X → a, Y → Z | b, Z → M, M → a, N → a
Now we will remove Z → M.
As M → a, we add Z→ a, and Z → M is removed.
The production set becomes
S → XY, X → a, Y → Z | b, Z → a, M → a, N → a
28. Now we will remove Y → Z.
As Z → a, we add Y→ a, and Y → Z is removed.
The production set becomes
S → XY, X → a, Y → a | b, Z → a, M → a, N → a
Now Z, M, and N are unreachable, hence we can remove those.
The final CFG is unit production free:
S → XY, X → a, Y → a | b
29. Removal of Null Productions
In a CFG, a non-terminal symbol ‘A’ is a nullable variable if there is a production A → ϵ or
there is a derivation that starts at A and finally ends up with
ϵ: A → .......… → ϵ
Removal Procedure:
Step1 Find out nullable non-terminal variables which derive ϵ.
Step2 For each production A → a, construct all productions A → x where x is obtained
from ‘a’ by removing one or multiple non-terminals from Step 1.
Step3 Combine the original productions with the result of step 2 and remove ϵ-
productions.
30. Problem
Remove null production from the following:
S→ASA | aB | b, A → B, B → b | ϵ
Solution:
There are two nullable variables: A and B
At first, we will remove B → ϵ.
After removing B → ϵ, the production set becomes:
S→ASA | aB | b | a, A → B| b | ϵ, B → b
Now we will remove A → ϵ.
After removing A → ϵ, the production set becomes:
S→ASA | aB | b | a | SA | AS | S, A → B| b, B → b
This is the final production set without null transition.